Classes | Typedefs | Enumerations | Functions | Variables
socrob::multicast Namespace Reference

SocRob Multicast library namespace. More...

Classes

class  Compressor
 Base class to implement a compressor. More...
class  Manager
 Main class of SocRob Multicast. More...
class  ManagerOptions
 Options to be used when constructing the Manager. More...

Typedefs

typedef boost::function< void(std::vector
< uint8_t > &) > 
buffer_function_type
 Function type that receives a buffer containing data or to be filled.
typedef boost::function< void(std::vector
< uint8_t > &, id_type,
std::vector< uint8_t > &) > 
handler_function_type
 Function type for short round handlers, first argument is the answer, second is the SSID, last is the question.
typedef boost::function< void(id_type,
std::vector< uint8_t > &) > 
id_buffer_function_type
 Function type that receives a SID and a buffer containing data or to be filled.
typedef boost::function< void(id_type) > id_function_type
 Function type that receives a SID.
typedef uint8_t id_type
 SID type (8 bits)
typedef uint32_t qid_type
 QID type (32 bits)
typedef boost::function< void(std::map
< id_type, std::vector
< uint8_t > > &) > 
short_callback_type
 Function type for short round callbacks, receiving a map of SIDs to their answers.

Enumerations

enum  agent_state_type { NOT_RUNNING, INSERT, RUNNING, REMOVE }
 Agent states. More...

Functions

template<typename T >
std::size_t deserialize (T &msg, std::vector< uint8_t > &in, std::size_t offset=0)
 Deserializes a ROS message.
void empty_buffer_function (std::vector< uint8_t > &)
 Empty function of type buffer_function_type.
void empty_handler_function (std::vector< uint8_t > &, id_type, std::vector< uint8_t > const &)
 Empty function of type handler_function_type.
void empty_id_buffer_function (id_type, std::vector< uint8_t > const &)
 Empty function of type id_buffer_function_type.
void empty_id_function (id_type)
 Empty function of type id_function_type.
void empty_short_callback (std::map< id_type, std::vector< uint8_t > > &)
 Empty function of type short_callback_type.
template<typename T >
void serialize_append (std::vector< uint8_t > &out, T const &msg)
 Serializes a ROS message, appending the result to the given vector.
template<typename T >
void serialize_overwrite (std::vector< uint8_t > &out, T const &msg)
 Serializes a ROS message, overwritting the whole given vector.

Variables

const std::size_t MAX_MESSAGE_SIZE = 65536
 Receive buffer size.

Detailed Description

SocRob Multicast library namespace.


Typedef Documentation

typedef boost::function<void (std::vector<uint8_t>&) > socrob::multicast::buffer_function_type

Function type that receives a buffer containing data or to be filled.

Definition at line 71 of file definitions.h.

typedef boost::function<void (std::vector<uint8_t>&, id_type, std::vector<uint8_t>&) > socrob::multicast::handler_function_type

Function type for short round handlers, first argument is the answer, second is the SSID, last is the question.

Definition at line 85 of file definitions.h.

typedef boost::function<void (id_type, std::vector<uint8_t>&) > socrob::multicast::id_buffer_function_type

Function type that receives a SID and a buffer containing data or to be filled.

Definition at line 78 of file definitions.h.

typedef boost::function<void (id_type) > socrob::multicast::id_function_type

Function type that receives a SID.

Definition at line 64 of file definitions.h.

typedef uint8_t socrob::multicast::id_type

SID type (8 bits)

Definition at line 53 of file definitions.h.

typedef uint32_t socrob::multicast::qid_type

QID type (32 bits)

Definition at line 56 of file definitions.h.

typedef boost::function<void (std::map<id_type, std::vector<uint8_t> >&) > socrob::multicast::short_callback_type

Function type for short round callbacks, receiving a map of SIDs to their answers.

Definition at line 92 of file definitions.h.


Enumeration Type Documentation

Agent states.

Enumerator:
NOT_RUNNING 
INSERT 
RUNNING 
REMOVE 

Definition at line 60 of file definitions.h.


Function Documentation

template<typename T >
std::size_t socrob::multicast::deserialize ( T &  msg,
std::vector< uint8_t > &  in,
std::size_t  offset = 0 
)

Deserializes a ROS message.

Shortcut to use ROS deserialization functions. This function can be used simply like this:

 size_t offset = 0;
 std_msgs::Int32 var1;
 offset += deserialize (var1, serialized_vector, offset);
 std_msgs::Int32 var2;
 offset += deserialize (var2, serialized_vector, offset);
Parameters:
msgResulting message.
inVector containing the message.
offsetPosition in the vector where the serialized message starts, defaults to 0.
Returns:
Size of the serialized message in the vector.

Definition at line 97 of file serialization.h.

void socrob::multicast::empty_buffer_function ( std::vector< uint8_t > &  ) [inline]

Empty function of type buffer_function_type.

Definition at line 74 of file definitions.h.

void socrob::multicast::empty_handler_function ( std::vector< uint8_t > &  ,
id_type  ,
std::vector< uint8_t > const &   
) [inline]

Empty function of type handler_function_type.

Definition at line 88 of file definitions.h.

void socrob::multicast::empty_id_buffer_function ( id_type  ,
std::vector< uint8_t > const &   
) [inline]

Empty function of type id_buffer_function_type.

Definition at line 81 of file definitions.h.

void socrob::multicast::empty_id_function ( id_type  ) [inline]

Empty function of type id_function_type.

Definition at line 67 of file definitions.h.

void socrob::multicast::empty_short_callback ( std::map< id_type, std::vector< uint8_t > > &  ) [inline]

Empty function of type short_callback_type.

Definition at line 95 of file definitions.h.

template<typename T >
void socrob::multicast::serialize_append ( std::vector< uint8_t > &  out,
T const &  msg 
)

Serializes a ROS message, appending the result to the given vector.

Shortcut to use ROS serialization functions. This function can be used several times with the same vector to serialize a sequence of ROS messages.

Parameters:
outVector where the result will be appended.
msgMessage to serialize.

Definition at line 48 of file serialization.h.

template<typename T >
void socrob::multicast::serialize_overwrite ( std::vector< uint8_t > &  out,
T const &  msg 
)

Serializes a ROS message, overwritting the whole given vector.

This function is a optimization of serialize_append for when the vector is to be overwritten, not frequently needed in practice. Use this instead of cleaning the vector and then doing an append.

Parameters:
outVector where the result will be placed.
msgMessage to serialize.

Definition at line 69 of file serialization.h.


Variable Documentation

const std::size_t socrob::multicast::MAX_MESSAGE_SIZE = 65536

Receive buffer size.

Definition at line 49 of file definitions.h.



socrob_multicast
Author(s): Joao Reis/jreis@isr.ist.utl.pt
autogenerated on Mon Jan 6 2014 11:47:49