feat: add environment variables and docs
ref: N25B-352
This commit is contained in:
@@ -5,6 +5,7 @@ from robot_interface.state import state
|
||||
|
||||
from robot_interface.core.config import settings
|
||||
|
||||
|
||||
class MainReceiver(ReceiverBase):
|
||||
"""
|
||||
The main receiver endpoint, responsible for handling ping and negotiation requests.
|
||||
@@ -12,10 +13,12 @@ class MainReceiver(ReceiverBase):
|
||||
:param zmq_context: The ZeroMQ context to use.
|
||||
:type zmq_context: zmq.Context
|
||||
|
||||
:param port: The port to use.
|
||||
:param port: The port to use, defaults to value in `settings.agent_settings.main_receiver_port`.
|
||||
:type port: int
|
||||
"""
|
||||
def __init__(self, zmq_context, port=settings.agent_settings.main_receiver_port):
|
||||
def __init__(self, zmq_context, port=None):
|
||||
if port is None:
|
||||
port = settings.agent_settings.main_receiver_port
|
||||
super(MainReceiver, self).__init__("main")
|
||||
self.create_socket(zmq_context, zmq.REP, port, bind=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user