|
| _callback_get_network_info (self, channel, msg) |
| Aggregate information about all nodes in the network.
|
| _serve (self) |
| Main loop handling incoming registry requests.
|
| _recvall (self, conn, n) |
| Receive n bytes from a connection.
|
| _handle_request (self, request) |
| Handle an incoming registry request.
|
| _stop (self) |
| Stop the server and wait for the serving thread to finish.
|
◆ __init__()
comm_infrastructure.registry.Registry.__init__ |
( |
| self, |
|
|
str | registry_host = "127.0.0.1", |
|
|
int | registry_port = 1234, |
|
|
int | lcm_network_bounces = 1 ) |
Initialize the Registry server instance.
- Parameters
-
registry_host | Host address for the registry. |
registry_port | Port on which the registry listens. |
lcm_network_bounces | TTL for LCM multicast messages. |
◆ _callback_get_network_info()
comm_infrastructure.registry.Registry._callback_get_network_info |
( |
| self, |
|
|
| channel, |
|
|
| msg ) |
|
protected |
Aggregate information about all nodes in the network.
- Parameters
-
channel | Unused service channel name. |
msg | Service request message. |
- Returns
- : Populated :class:network_info_t message.
◆ _handle_request()
comm_infrastructure.registry.Registry._handle_request |
( |
| self, |
|
|
| request ) |
|
protected |
Handle an incoming registry request.
- Parameters
-
request | Parsed request dictionary. |
- Returns
- : Response dictionary to send back to the client.
◆ _recvall()
comm_infrastructure.registry.Registry._recvall |
( |
| self, |
|
|
| conn, |
|
|
| n ) |
|
protected |
Receive n bytes from a connection.
- Parameters
-
conn | Socket connection. |
n | Number of bytes to receive. |
- Returns
- : The received bytes or None if EOF is hit.
◆ _serve()
comm_infrastructure.registry.Registry._serve |
( |
| self | ) |
|
|
protected |
Main loop handling incoming registry requests.
This method listens on the configured host and port, processing registration, deregistration and discovery requests from clients.
◆ _stop()
comm_infrastructure.registry.Registry._stop |
( |
| self | ) |
|
|
protected |
Stop the server and wait for the serving thread to finish.
- Returns
- : None
◆ start()
comm_infrastructure.registry.Registry.start |
( |
| self | ) |
|
Start the server and monitor for errors.
This method blocks until the server stops or encounters a fatal error.
◆ _stop_event
comm_infrastructure.registry.Registry._stop_event = threading.Event() |
|
protected |
◆ error_flag
bool comm_infrastructure.registry.Registry.error_flag = False |
◆ get_info_service
comm_infrastructure.registry.Registry.get_info_service = None |
◆ lock
comm_infrastructure.registry.Registry.lock = threading.Lock() |
◆ registry_host
comm_infrastructure.registry.Registry.registry_host |
◆ registry_port
comm_infrastructure.registry.Registry.registry_port |
comm_infrastructure.registry.Registry.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
◆ services
dict comm_infrastructure.registry.Registry.services = {} |
◆ thread
comm_infrastructure.registry.Registry.thread = None |
The documentation for this class was generated from the following file: