Class for publishing data using various transport mechanisms.
More...
#include <data_publisher.hpp>
|
| | DataPublisher (const PublisherType &publisher_type, zmq::context_t &zmq_context) |
| | Constructor for DataPublisher.
|
|
| ~DataPublisher () |
| | Destructor - ensures socket is closed.
|
| bool | setup (const std::string &endpoint) |
| | Sets up the publisher with the specified endpoint.
|
| template<typename T> |
| bool | try_publish (const T &message) |
| | Non-blocking publish of a message.
|
Class for publishing data using various transport mechanisms.
Currently supports ZMQ publisher socket with configurable endpoints.
◆ DataPublisher()
| synapse::DataPublisher::DataPublisher |
( |
const PublisherType & | publisher_type, |
|
|
zmq::context_t & | zmq_context ) |
|
inline |
Constructor for DataPublisher.
- Parameters
-
| publisher_type | Type of publisher transport to use |
| zmq_context | ZMQ context to use for socket creation |
◆ setup()
| bool synapse::DataPublisher::setup |
( |
const std::string & | endpoint | ) |
|
|
inline |
Sets up the publisher with the specified endpoint.
- Parameters
-
| endpoint | Endpoint string for the publisher |
- Returns
- true if setup was successful, false otherwise
◆ try_publish()
template<typename T>
| bool synapse::DataPublisher::try_publish |
( |
const T & | message | ) |
|
|
inline |
Non-blocking publish of a message.
Attempts to publish a message without blocking. Returns false if publish fails.
- Template Parameters
-
| T | Protocol Buffers message type to publish |
- Parameters
-
| message | Message to publish |
- Returns
- true if message was published successfully, false otherwise
The documentation for this class was generated from the following file: