GAMS  1.4.0
gams::transports::RosBridge Class Reference

Custom network transport generated by gpc.pl. More...

#include <RosBridge.h>

Inheritance diagram for gams::transports::RosBridge:

Public Member Functions

 RosBridge (const std::string &id, madara::transport::TransportSettings &new_settings, madara::knowledge::KnowledgeBase &context, std::vector< std::string > topics, std::map< std::string, std::string > topic_map, std::map< std::string, std::string > pub_topic_types)
 Constructor. More...
 
virtual ~RosBridge ()
 Destructor. More...
 
unsigned int in_message_count ()
 
unsigned int out_message_count ()
 
long send_data (const madara::knowledge::KnowledgeMap &modifieds)
 Sends a list of updates to the domain. More...
 

Protected Member Functions

std::pair< std::string, std::string > get_update_container_pair_ (const char *container_name)
 

Protected Attributes

unsigned int message_count_
 
gams::utility::ros::GamsParserparser_
 
std::map< std::string, std::string > pub_topic_types_
 
RosBridgeReadThreadread_thread_
 
madara::threads::Threader read_threads_
 threads for monitoring knowledge updates More...
 
std::map< std::string, std::string > topic_map_
 
std::vector< std::string > topics_
 

Detailed Description

Custom network transport generated by gpc.pl.

Definition at line 17 of file RosBridge.h.

Constructor & Destructor Documentation

◆ RosBridge()

gams::transports::RosBridge::RosBridge ( const std::string &  id,
madara::transport::TransportSettings &  new_settings,
madara::knowledge::KnowledgeBase &  context,
std::vector< std::string >  topics,
std::map< std::string, std::string >  topic_map,
std::map< std::string, std::string >  pub_topic_types 
)

Constructor.

Parameters
idunique identifier(generally host:port)
new_settingssettings to apply to the transport
contextthe knowledge record context
topicsvector of topics to subscribe
topic_mapmap from ros topic name to madara var name
pub_topic_typesmap from ros topic name to ros topic type

◆ ~RosBridge()

virtual gams::transports::RosBridge::~RosBridge ( )
virtual

Destructor.

Member Function Documentation

◆ get_update_container_pair_()

std::pair<std::string, std::string> gams::transports::RosBridge::get_update_container_pair_ ( const char *  container_name)
protected

◆ in_message_count()

unsigned int gams::transports::RosBridge::in_message_count ( )

◆ out_message_count()

unsigned int gams::transports::RosBridge::out_message_count ( )

◆ send_data()

long gams::transports::RosBridge::send_data ( const madara::knowledge::KnowledgeMap &  modifieds)

Sends a list of updates to the domain.

This function must be implemented by your transport

Parameters
modifiedsa list of keys to values of all records that have been updated and could be sent.
Returns
result of operation or -1 if we are shutting down

Member Data Documentation

◆ message_count_

unsigned int gams::transports::RosBridge::message_count_
protected

Definition at line 69 of file RosBridge.h.

◆ parser_

gams::utility::ros::GamsParser* gams::transports::RosBridge::parser_
protected

Definition at line 64 of file RosBridge.h.

◆ pub_topic_types_

std::map<std::string, std::string> gams::transports::RosBridge::pub_topic_types_
protected

Definition at line 63 of file RosBridge.h.

◆ read_thread_

RosBridgeReadThread* gams::transports::RosBridge::read_thread_
protected

Definition at line 56 of file RosBridge.h.

◆ read_threads_

madara::threads::Threader gams::transports::RosBridge::read_threads_
protected

threads for monitoring knowledge updates

Definition at line 55 of file RosBridge.h.

◆ topic_map_

std::map<std::string, std::string> gams::transports::RosBridge::topic_map_
protected

Definition at line 61 of file RosBridge.h.

◆ topics_

std::vector<std::string> gams::transports::RosBridge::topics_
protected

Definition at line 59 of file RosBridge.h.


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