MqttCommunicator class is responsible for handling the communication between camera streams running in the same or across different DS instances.
Definition at line 106 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.


Public Member Functions | |
| MqttCommunicator () | |
| Construct an uninitialized MQTT communicator. More... | |
| MqttCommunicator (const std::string &configFilePath) | |
| Construct an MQTT communicator from configuration. More... | |
| ~MqttCommunicator () override | |
| Stop and destroy the MQTT communicator. More... | |
| bool | isInitialized () override |
| Check if the communicator is initialized. More... | |
| void | initialize (const StreamId streamId, system_clock::time_point start, std::map< StreamId, std::shared_ptr< ICommunicator >> localInstanceCommunicators, const std::string &sensorName="") override |
| Initialize the communicator and start its processing loop. More... | |
| MessageType | available () override |
| Return the type of the next buffered message, or NONE when the buffer is empty. More... | |
| void | requestToSend (Payload payload) override |
| Request to send a message. More... | |
| void | requestToSend (const std::vector< Payload > &payloads) override |
| Request to send a message. More... | |
| void | get (Payload &payload) override |
| Get the message from buffer. More... | |
| void | processMessage (Payload payload) override |
| Process an incoming message. More... | |
| void | broadcast (Payload payload) override |
| Broadcast message. More... | |
| void | broadcast (std::vector< Payload > payloads) |
| Broadcast multiple messages through local and MQTT transports. More... | |
| void | commLog (std::string event, Payload payload) |
| Log a communication event. More... | |
| void | commLatencyLog (TimeStamp sendTime, TimeStamp recvTime) |
| Log communication latency. More... | |
| COMMUNICATOR_TYPES | getCommunicatorType () override |
| Return the communicator implementation type. More... | |
| StreamId | getStreamId () |
| Return the stream identifier for this communicator. More... | |
| void | initializePubSubInfo () |
| Initialize publish and subscribe topics from configuration. More... | |
| CamId | getEgoCamId () override |
| Return the ego camera ID from the broker topic or camera configuration. More... | |
| std::vector< CamId > | getPeerCamIds () override |
| Return peer camera IDs from broker topics or camera configuration. More... | |
| void | waitForConnectionCompletion () |
| Wait until all configured MQTT connections complete or time out. More... | |
| MqttCommunicator () | |
| Construct an uninitialized MQTT communicator. More... | |
| MqttCommunicator (const std::string &configFilePath) | |
| Construct an MQTT communicator from configuration. More... | |
| ~MqttCommunicator () override | |
| Stop and destroy the MQTT communicator. More... | |
| bool | isInitialized () override |
| Check if the communicator is initialized. More... | |
| void | initialize (const StreamId streamId, system_clock::time_point start, std::map< StreamId, std::shared_ptr< ICommunicator >> localInstanceCommunicators, const std::string &sensorName="") override |
| Initialize the communicator and start its processing loop. More... | |
| MessageType | available () override |
| Return the type of the next buffered message, or NONE when the buffer is empty. More... | |
| void | requestToSend (Payload payload) override |
| Request to send a message. More... | |
| void | requestToSend (const std::vector< Payload > &payloads) override |
| Request to send a message. More... | |
| void | get (Payload &payload) override |
| Get the message from buffer. More... | |
| void | processMessage (Payload payload) override |
| Process an incoming message. More... | |
| void | broadcast (Payload payload) override |
| Broadcast message. More... | |
| void | broadcast (std::vector< Payload > payloads) |
| Broadcast multiple messages through local and MQTT transports. More... | |
| void | commLog (std::string event, Payload payload) |
| Log a communication event. More... | |
| void | commLatencyLog (TimeStamp sendTime, TimeStamp recvTime) |
| Log communication latency. More... | |
| COMMUNICATOR_TYPES | getCommunicatorType () override |
| Return the communicator implementation type. More... | |
| StreamId | getStreamId () |
| Return the stream identifier for this communicator. More... | |
| void | initializePubSubInfo () |
| Initialize publish and subscribe topics from configuration. More... | |
| CamId | getEgoCamId () override |
| Return the ego camera ID from the broker topic or camera configuration. More... | |
| std::vector< CamId > | getPeerCamIds () override |
| Return peer camera IDs from broker topics or camera configuration. More... | |
| void | waitForConnectionCompletion () |
| Wait until all configured MQTT connections complete or time out. More... | |
Data Fields | |
| MqttCommunicatorParams | m_params |
| Stores MQTT communicator configuration parameters. More... | |
| std::map< std::string, bool > | m_connStatusMap |
| Tracks connection completion by broker topic. More... | |
| MqttCommunicator::MqttCommunicator | ( | ) |
Construct an uninitialized MQTT communicator.
| MqttCommunicator::MqttCommunicator | ( | const std::string & | configFilePath | ) |
Construct an MQTT communicator from configuration.
| [in] | configFilePath | Path to the configuration file. |
|
override |
Stop and destroy the MQTT communicator.
| MqttCommunicator::MqttCommunicator | ( | ) |
Construct an uninitialized MQTT communicator.
| MqttCommunicator::MqttCommunicator | ( | const std::string & | configFilePath | ) |
Construct an MQTT communicator from configuration.
| [in] | configFilePath | Path to the configuration file. |
|
override |
Stop and destroy the MQTT communicator.
|
overridevirtual |
Return the type of the next buffered message, or NONE when the buffer is empty.
Implements ICommunicator.
|
overridevirtual |
Return the type of the next buffered message, or NONE when the buffer is empty.
Implements ICommunicator.
|
overridevirtual |
|
overridevirtual |
| void MqttCommunicator::broadcast | ( | std::vector< Payload > | payloads | ) |
Broadcast multiple messages through local and MQTT transports.
| [in] | payloads | Messages to broadcast. |
| void MqttCommunicator::broadcast | ( | std::vector< Payload > | payloads | ) |
Broadcast multiple messages through local and MQTT transports.
| [in] | payloads | Messages to broadcast. |
Log communication latency.
| [in] | sendTime | Timestamp when the message was sent. |
| [in] | recvTime | Timestamp when the message was received. |
Log communication latency.
| [in] | sendTime | Timestamp when the message was sent. |
| [in] | recvTime | Timestamp when the message was received. |
| void MqttCommunicator::commLog | ( | std::string | event, |
| Payload | payload | ||
| ) |
Log a communication event.
| [in] | event | Event name. |
| [in] | payload | Payload to log. |
| void MqttCommunicator::commLog | ( | std::string | event, |
| Payload | payload | ||
| ) |
Log a communication event.
| [in] | event | Event name. |
| [in] | payload | Payload to log. |
|
overridevirtual |
Get the message from buffer.
| [out] | payload | Message removed from the input buffer. |
Implements ICommunicator.
|
overridevirtual |
Get the message from buffer.
| [out] | payload | Message removed from the input buffer. |
Implements ICommunicator.
|
inlineoverridevirtual |
Return the communicator implementation type.
Implements ICommunicator.
Definition at line 194 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
References MQTT_COMMUNICATOR.
|
inlineoverridevirtual |
Return the communicator implementation type.
Implements ICommunicator.
Definition at line 194 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
References MQTT_COMMUNICATOR.
|
inlineoverridevirtual |
Return the ego camera ID from the broker topic or camera configuration.
Reimplemented from ICommunicator.
Definition at line 203 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
inlineoverridevirtual |
Return the ego camera ID from the broker topic or camera configuration.
Reimplemented from ICommunicator.
Definition at line 203 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
inlineoverridevirtual |
Return peer camera IDs from broker topics or camera configuration.
Reimplemented from ICommunicator.
Definition at line 209 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
inlineoverridevirtual |
Return peer camera IDs from broker topics or camera configuration.
Reimplemented from ICommunicator.
Definition at line 209 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
inline |
Return the stream identifier for this communicator.
Definition at line 197 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
inline |
Return the stream identifier for this communicator.
Definition at line 197 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
|
overridevirtual |
Initialize the communicator and start its processing loop.
| [in] | streamId | Stream identifier for this communicator. |
| [in] | start | Reference start time for timestamp conversion. |
| [in] | localInstanceCommunicators | Communicators for local streams. |
| [in] | sensorName | Sensor name used by external transports. |
Implements ICommunicator.
|
overridevirtual |
Initialize the communicator and start its processing loop.
| [in] | streamId | Stream identifier for this communicator. |
| [in] | start | Reference start time for timestamp conversion. |
| [in] | localInstanceCommunicators | Communicators for local streams. |
| [in] | sensorName | Sensor name used by external transports. |
Implements ICommunicator.
| void MqttCommunicator::initializePubSubInfo | ( | ) |
Initialize publish and subscribe topics from configuration.
| void MqttCommunicator::initializePubSubInfo | ( | ) |
Initialize publish and subscribe topics from configuration.
|
overridevirtual |
Check if the communicator is initialized.
Implements ICommunicator.
|
overridevirtual |
Check if the communicator is initialized.
Implements ICommunicator.
|
overridevirtual |
Process an incoming message.
| [in] | payload | Incoming message to place in the input buffers. |
Implements ICommunicator.
|
overridevirtual |
Process an incoming message.
| [in] | payload | Incoming message to place in the input buffers. |
Implements ICommunicator.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
| void MqttCommunicator::waitForConnectionCompletion | ( | ) |
Wait until all configured MQTT connections complete or time out.
| void MqttCommunicator::waitForConnectionCompletion | ( | ) |
Wait until all configured MQTT connections complete or time out.
| std::map< std::string, bool > MqttCommunicator::m_connStatusMap |
Tracks connection completion by broker topic.
Definition at line 218 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.
| MqttCommunicatorParams MqttCommunicator::m_params |
Stores MQTT communicator configuration parameters.
Definition at line 217 of file sources/libs/nvmultiobjecttracker/include/modules/MultiViewAssociator/MqttCommunicator.hpp.