|
using | node_name_t = std::string |
|
using | endpoint_t = std::string |
|
using | topic_name_t = std::string |
|
using | service_name_t = std::string |
|
std::shared_mutex | dbMutex |
|
std::map< node_name_t, InfoPerNode > | connectedNodes_ |
|
std::map< topic_name_t, InfoPerTopic > | knownTopics_ |
|
std::map< service_name_t, InfoPerService > | knownServices_ |
|
void | db_remove_node (const std::string &nodeName) |
|
void | db_register_node (const std::string &nodeName) |
|
void | db_advertise_topic (const std::string &topicName, const std::string &topicTypeName, const std::string &publisherEndpoint, const std::string &nodeName) |
|
void | db_advertise_service (const std::string &serviceName, const std::string &inputTypeName, const std::string &outputTypeName, const std::string &publisherEndpoint, const std::string &nodeName) |
|
bool | db_get_service_info (const std::string &serviceName, std::string &publisherEndpoint, std::string &nodeName) const |
|
void | db_add_topic_subscriber (const std::string &topicName, const std::string &updatesEndPoint) |
|
void | send_topic_publishers_to_subscribed_clients (const std::string &topicName, const std::optional< std::string > &updatesEndPoint=std::nullopt) |
|
This class creates a parallel thread and listens for incoming connections from clients. This is the main hub for advertising and subscribing to topics. Users should instance a class mvsim::Client (C++) or mvsim.Client (Python) to interface with this server.
Usage:
- Instantiate a Server object.
- Set all parameters as desired.
- Call start(). It will return immediately.
- The server will be working on the background as long as the object is not destroyed.
- Upon destruction, the server thread will be automatically shut-down.
Messages and topics are described as Protobuf messages, and communications are done via ZMQ sockets.
See: https://mvsimulator.readthedocs.io/
Definition at line 60 of file Server.h.