ddt 1.2.1
|
#include <ddtDataProducer.hpp>
DdtDataProducer (DdtLogger *logger) | |
DdtDataProducer (const std::string &data_stream_identifier, const int32_t latency, const int32_t deadline, const std::string publishing_uri, DdtLogger *logger) | |
~DdtDataProducer () override | |
void | Publish (DataPacket data_packet) |
void | Notify (const NotificationType type) override |
std::string | get_publishing_uri () const |
Additional Inherited Members | |
![]() | |
enum | NotificationType { NEW_DATA , PUB_REG , PUB_UNREG , SHM_DEL } |
![]() | |
DdtProducerConsumerBase (DdtLogger *ddt_logger) | |
virtual | ~DdtProducerConsumerBase () |
![]() | |
void | Init (DdtLogger *ddt_logger) |
void | LoadDefaults () |
void | ReadIni () |
void | PrintConfigValues () |
int32_t | GetFreePort () const |
![]() | |
int32_t | min_port |
int32_t | max_port |
DdtLogger * | logger |
const int | MIN_PORT_DEFAULT = 5100 |
const int | MAX_PORT_DEFAULT = 5500 |
const int | MIN_RANGE = 3 |
const int | LINE_LENGTH = 256 |
This class provides the functionality to publish data over network and enables sending new data notifications.
|
explicit |
Constructor
logger | A DDT logger object (no transfer of ownership). |
DdtDataProducer::DdtDataProducer | ( | const std::string & | data_stream_identifier, |
const int32_t | latency, | ||
const int32_t | deadline, | ||
const std::string | publishing_uri, | ||
DdtLogger * | logger ) |
Constructor
data_stream_identifier | The data stream identifier. |
latency | A MAL QoS parameter. Shall be the maximum time a sample may remain in-transit between the publisher and subscriber in [ms]. |
deadline | A MAL QoS parameter. Shall be the maximum age of a sample in [s]. |
publishing_uri | The publishing URI. |
logger | A DDT logger object (no transfer of ownership). |
|
overridedefault |
Destructor
std::string DdtDataProducer::get_publishing_uri | ( | ) | const |
Returns publishing_uri.
|
overridevirtual |
Attaches a notification to the data packet and sends it via MALps to remote brokers.
type | The type of the notification. |
Implements ddt::DdtProducerConsumerBase.
void DdtDataProducer::Publish | ( | DataPacket | data_packet | ) |
Publishes the data over network.
data_packet | The data packet. |