ddt  0.1
Public Member Functions | List of all members
ddt::DdtClient Class Reference

#include <ddtClient.hpp>

Public Member Functions

 DdtClient (const std::string remote_broker, const int32_t repl_time, const int32_t hb_interval, const int32_t hb_timeout, const std::string broker, DdtLogger *ddt_logger)
 
virtual ~DdtClient ()
 
void AddUuid (std::string uuid, std::string dsi)
 
void UnregisterSubscriber (std::string uuid)
 
bool CheckIfEmpty ()
 
bool CheckPublisherExists (const std::string &data_stream_identifier)
 
int32_t RegisterRemoteSubscriber (const std::string &subscriber_uuid, const std::string &data_stream_identifier, const int32_t latency, const int32_t deadline)
 
std::string GetPublishingUri (const std::string &data_stream_identifier)
 
int32_t get_max_data_sample_size (const std::string &data_stream_identifier)
 
int32_t get_number_of_samples (const std::string &data_stream_identifier)
 
bool get_compute_checksum (const std::string &data_stream_identifier)
 

Detailed Description

This class creates MAL clients to connect to remote brokers. It provides a connection listener which observes the connection state and reregisters subscribers in the case a broker was restarted. It also provides the heartbeat functionality.

Constructor & Destructor Documentation

◆ DdtClient()

DdtClient::DdtClient ( const std::string  remote_broker,
const int32_t  repl_time,
const int32_t  hb_interval,
const int32_t  hb_timeout,
const std::string  broker,
DdtLogger ddt_logger 
)

Constructor

◆ ~DdtClient()

DdtClient::~DdtClient ( )
virtual

Destructor

Member Function Documentation

◆ AddUuid()

void DdtClient::AddUuid ( std::string  uuid,
std::string  dsi 
)

Adds a subscriber uuid and its data stream to the subscriber_map.

◆ CheckIfEmpty()

bool DdtClient::CheckIfEmpty ( )

Checks if there are no more subscribers attached to this client. Returns if subscriber_map is empty.

◆ CheckPublisherExists()

bool DdtClient::CheckPublisherExists ( const std::string &  data_stream_identifier)

Checks if a publisher for the specified data stream exists. This calls CheckPublisherExists() at the remote broker.

◆ get_compute_checksum()

bool DdtClient::get_compute_checksum ( const std::string &  data_stream_identifier)

Returns compute_checksum from the memory accessor.

◆ get_max_data_sample_size()

int32_t DdtClient::get_max_data_sample_size ( const std::string &  data_stream_identifier)

Returns max_data_sample_size by calling get_max_data_sample_size() at the remote broker.

◆ get_number_of_samples()

int32_t DdtClient::get_number_of_samples ( const std::string &  data_stream_identifier)

Returns number_of_samples by calling get_number_of_samples() at the remote broker.

◆ GetPublishingUri()

std::string DdtClient::GetPublishingUri ( const std::string &  data_stream_identifier)

Returns the publishing uri by calling GetPublishingUri() at the remote broker.

◆ RegisterRemoteSubscriber()

int32_t DdtClient::RegisterRemoteSubscriber ( const std::string &  subscriber_uuid,
const std::string &  data_stream_identifier,
const int32_t  latency,
const int32_t  deadline 
)

Registers a subscriber at the remote broker. This calls RegisterRemoteSubscriber() at the remote broker.

◆ UnregisterSubscriber()

void DdtClient::UnregisterSubscriber ( std::string  uuid)

Unregisters a subscriber from the remote broker and removes its uuid from the subscriber_map.


The documentation for this class was generated from the following files: