This class provides an interface into the NDDS dissemination transport.
More...
#include <NddsTransport.h>
|
| typedef std::vector< std::string > | HostsVector |
| | Used to define a vector of hosts to contact. More...
|
| |
This class provides an interface into the NDDS dissemination transport.
Definition at line 22 of file NddsTransport.h.
Used to define a vector of hosts to contact.
Definition at line 68 of file Transport.h.
Constructor.
- Parameters
-
| id | unique identifer - usually a combination of host:port |
| context | knowledge context |
| config | transport configuration settings |
| launch_transport | whether or not to launch this transport |
Definition at line 19 of file NddsTransport.cpp.
| madara::transport::NddsTransport::~NddsTransport |
( |
| ) |
|
| int madara::transport::Base::check_transport |
( |
void |
| ) |
|
|
inlineinherited |
all subclasses should call this method at the beginning of send_data
Definition at line 19 of file Transport.inl.
| void madara::transport::NddsTransport::close |
( |
void |
| ) |
|
|
virtual |
| void madara::transport::Base::invalidate_transport |
( |
void |
| ) |
|
|
inlineinherited |
Invalidates a transport to indicate it is shutting down.
Definition at line 34 of file Transport.inl.
Preps a message for sending.
- Parameters
-
| orig_updates | updates before send filtering is applied |
| print_prefix | prefix to include before every log message, e.g., "MyTransport::svc" |
- Returns
- -1 Transport is shutting down
-2 Transport is invalid
-3 Unable to allocate send buffer
0 No message to send > 0 size of buffered message
filter the updates according to the filters specified by the user in QoSTransportSettings (if applicable)
size = buffer[0] (unsigned 64 bit) transport id = buffer[8] (8 byte) domain = buffer[16] (32 byte domain name) originator = buffer[48] (64 byte originator host:port) type = buffer[112] (unsigned 32 bit type of message–usually MULTIASSIGN) updates = buffer[116] (unsigned 32 bit number of updates) quality = buffer[120] (unsigned 32 bit quality of message) clock = buffer[124] (unsigned 64 bit clock for this message) ttl = buffer[132] (the new knowledge starts here) knowledge = buffer[133] (the new knowledge starts here)
Definition at line 815 of file Transport.cpp.
| int madara::transport::NddsTransport::reliability |
( |
void |
| ) |
const |
Accesses reliability setting.
- Returns
- whether we are using reliable dissemination or not
Definition at line 90 of file NddsTransport.cpp.
| int madara::transport::NddsTransport::reliability |
( |
const int & |
setting | ) |
|
Sets the reliability setting.
- Returns
- the changed setting
Definition at line 96 of file NddsTransport.cpp.
Sends a list of knowledge updates to listeners.
- Parameters
-
| updates | listing of all updates that must be sent |
- Returns
- result of write operation or -1 if we are shutting down
get current lamport clock.
Implements madara::transport::Base.
Definition at line 294 of file NddsTransport.cpp.
Getter for the transport settings.
- Returns
- the current transport settings
Definition at line 45 of file Transport.inl.
| int madara::transport::NddsTransport::setup |
( |
void |
| ) |
|
|
virtual |
Activates this transport.
- Returns
- 0 for success. This function may exit the process if the OSPL daemon hasn't been started.
Reimplemented from madara::transport::Base.
Definition at line 102 of file NddsTransport.cpp.
| int madara::transport::Base::validate_transport |
( |
void |
| ) |
|
|
inlineinherited |
Validates a transport to indicate it is not shutting down.
Definition at line 6 of file Transport.inl.
| DDSDataReader* madara::transport::NddsTransport::data_reader_ |
|
private |
| DDSDataWriter* madara::transport::NddsTransport::data_writer_ |
|
private |
| DDSDomainParticipant* madara::transport::NddsTransport::domain_participant_ |
|
private |
| const std::string madara::transport::Base::id_ |
|
protectedinherited |
host:port identifier of this process
Definition at line 186 of file Transport.h.
| volatile bool madara::transport::Base::is_valid_ |
|
protectedinherited |
| ACE_Thread_Mutex madara::transport::Base::mutex_ |
|
protectedinherited |
data received rules, defined in Transport settings
Definition at line 195 of file Transport.h.
scheduler for dropping packets to simulate network issues
Definition at line 206 of file Transport.h.
| const char * madara::transport::NddsTransport::partition_ = "Madara_knowledge" |
|
staticprivate |
| DDSPublisher* madara::transport::NddsTransport::publisher_ |
|
private |
monitor for receiving bandwidth usage
Definition at line 203 of file Transport.h.
monitor for sending bandwidth usage
Definition at line 200 of file Transport.h.
| volatile bool madara::transport::Base::shutting_down_ |
|
protectedinherited |
| DDSSubscriber* madara::transport::NddsTransport::subscriber_ |
|
private |
| const char * madara::transport::NddsTransport::topic_names_ |
|
staticprivate |
Initial value:= {
"MADARA_KaRL_Data",
"MADARA_KaRL_Control"
}
Definition at line 75 of file NddsTransport.h.
| DDSTopic* madara::transport::NddsTransport::update_topic_ |
|
private |
| Ndds_Knowledge_UpdateDataWriter* madara::transport::NddsTransport::update_writer_ |
|
private |
| Condition madara::transport::Base::valid_setup_ |
|
protectedinherited |
The documentation for this class was generated from the following files: