Goby v2
|
Objects pertaining to transitioning from DCCLv1 to DCCLv2. More...
Classes | |
class | DCCLAlgorithmPerformer |
class | DCCLMessage |
class | DCCLMessageContentHandler |
class | DCCLMessageErrorHandler |
class | DCCLMessageVal |
defines a DCCL value More... | |
class | DCCLMessageVar |
class | DCCLMessageVarBool |
class | DCCLMessageVarBroadcastFlag |
class | DCCLMessageVarCCLID |
class | DCCLMessageVarDCCLID |
class | DCCLMessageVarDest |
class | DCCLMessageVarEnum |
class | DCCLMessageVarFloat |
class | DCCLMessageVarHead |
class | DCCLMessageVarHex |
class | DCCLMessageVarInt |
class | DCCLMessageVarMultiMessageFlag |
class | DCCLMessageVarSrc |
class | DCCLMessageVarStatic |
class | DCCLMessageVarString |
class | DCCLMessageVarTime |
class | DCCLMessageVarUnused |
class | DCCLPublish |
class | DCCLTransitionalCodec |
provides an API to the Transitional Dynamic CCL Codec (looks like DCCLv1, but calls DCCLv2). Warning: this class is for legacy support only, new applications should use DCCLCodec directly. More... | |
class | QueueContentHandler |
class | QueueErrorHandler |
Typedefs | |
typedef boost::function< void(DCCLMessageVal &)> | AlgFunction1 |
boost::function for a function taking a single DCCLMessageVal reference. Used for algorithm callbacks. More... | |
typedef boost::function< void(DCCLMessageVal &, const std::vector< DCCLMessageVal > &)> | AlgFunction2 |
boost::function for a function taking a dccl::MessageVal reference, and the MessageVal of a second part of the message. Used for algorithm callbacks. More... | |
Enumerations | |
enum | DCCLType { dccl_static, dccl_bool, dccl_int, dccl_float, dccl_enum, dccl_string, dccl_hex } |
Enumeration of DCCL types used for sending messages. dccl_enum and dccl_string primarily map to cpp_string, dccl_bool to cpp_bool, dccl_int to cpp_long, dccl_float to cpp_double. More... | |
enum | DCCLCppType { cpp_notype, cpp_bool, cpp_string, cpp_long, cpp_double } |
Enumeration of C++ types used in DCCL. More... | |
enum | { POWER2_BITS_IN_BYTE = 3 } |
enum | { POWER2_NIBS_IN_BYTE = 1 } |
enum | DCCLHeaderPart { HEAD_CCL_ID = 0, HEAD_DCCL_ID = 1, HEAD_TIME = 2, HEAD_SRC_ID = 3, HEAD_DEST_ID = 4, HEAD_MULTIMESSAGE_FLAG = 5, HEAD_BROADCAST_FLAG = 6, HEAD_UNUSED = 7 } |
enum | DCCLHeaderBits { HEAD_CCL_ID_SIZE = 8, HEAD_DCCL_ID_SIZE = 9, HEAD_TIME_SIZE = 17, HEAD_SRC_ID_SIZE = 5, HEAD_DEST_ID_SIZE = 5, HEAD_FLAG_SIZE = 1, HEAD_UNUSED_SIZE = 2 } |
Functions | |
unsigned | bits2bytes (unsigned bits) |
unsigned | bytes2bits (unsigned bytes) |
unsigned | bytes2nibs (unsigned bytes) |
unsigned | nibs2bytes (unsigned nibs) |
std::string | type_to_string (DCCLType type) |
std::string | type_to_protobuf_type (DCCLType type) |
std::string | type_to_string (DCCLCppType type) |
std::string | to_str (DCCLHeaderPart p) |
template<typename Value > | |
std::ostream & | operator<< (std::ostream &out, const std::map< std::string, Value > &m) |
use this for displaying a human readable version | |
template<typename Value > | |
std::ostream & | operator<< (std::ostream &out, const std::multimap< std::string, Value > &m) |
std::ostream & | operator<< (std::ostream &out, const std::set< unsigned > &s) |
use this for displaying a human readable version of this STL object | |
std::ostream & | operator<< (std::ostream &out, const std::set< std::string > &s) |
use this for displaying a human readable version of this STL object | |
std::ostream & | operator<< (std::ostream &os, const DCCLMessageVal &mv) |
std::ostream & | operator<< (std::ostream &os, const std::vector< DCCLMessageVal > &vm) |
Binary encoding | |
bool | char_array2hex_string (const unsigned char *c, std::string &s, const unsigned int n) |
converts a char (byte) array into a hex string More... | |
bool | hex_string2char_array (unsigned char *c, const std::string &s, const unsigned int n) |
turns a string of hex chars ABCDEF into a character array reading each byte 0xAB,0xCD, 0xEF, etc. | |
std::string | long2binary_string (unsigned long l, unsigned short bits) |
return a string represented the binary value of l for bits number of bits which reads MSB -> LSB | |
std::string | binary_string2hex_string (const std::string &bs) |
converts a binary string ("1000101010101010") into a hex string ("8AAA") | |
std::string | hex_string2binary_string (const std::string &bs) |
converts a boost::dynamic_bitset (similar to std::bitset but without compile time size requirements) into a hex string More... | |
template<typename T > | |
bool | hex_string2number (const std::string &s, T &t) |
converts a hex string ("8AAA") into a dynamic_bitset More... | |
template<typename T > | |
bool | number2hex_string (std::string &s, const T &t, unsigned int width=2) |
converts a decimal number of type T into a hex string More... | |
template<typename T > | |
std::string | number2hex_string (const T &t, unsigned int width=2) |
converts a decimal number of type T into a hex string assuming success More... | |
Variables | |
const unsigned | DCCL_NUM_HEADER_BYTES = 6 |
const unsigned | DCCL_NUM_HEADER_PARTS = 8 |
const std::string | DCCL_HEADER_NAMES [] |
Objects pertaining to transitioning from DCCLv1 to DCCLv2.
typedef boost::function<void(DCCLMessageVal&)> goby::transitional::AlgFunction1 |
boost::function for a function taking a single DCCLMessageVal reference. Used for algorithm callbacks.
Think of this as a generalized version of a function pointer (void (*)(DCCLMessageVal&)). See http://www.boost.org/doc/libs/1_34_0/doc/html/function.html for more on boost:function.
Definition at line 39 of file message_algorithms.h.
typedef boost::function<void(DCCLMessageVal&, const std::vector<DCCLMessageVal>&)> goby::transitional::AlgFunction2 |
boost::function for a function taking a dccl::MessageVal reference, and the MessageVal of a second part of the message. Used for algorithm callbacks.
Think of this as a generalized version of a function pointer (void (*)(DCCLMessageVal&, const DCCLMessageVal&). See http://www.boost.org/doc/libs/1_34_0/doc/html/function.html for more on boost:function.
Definition at line 48 of file message_algorithms.h.
Enumeration of C++ types used in DCCL.
Enumerator | |
---|---|
cpp_notype |
not one of the C++ types used in DCCL |
cpp_bool |
C++ bool |
cpp_string |
C++ std::string |
cpp_long |
C++ long |
cpp_double |
C++ double |
Definition at line 56 of file dccl_constants.h.
Enumeration of DCCL types used for sending messages. dccl_enum and dccl_string primarily map to cpp_string, dccl_bool to cpp_bool, dccl_int to cpp_long, dccl_float to cpp_double.
Enumerator | |
---|---|
dccl_static |
tag_static |
dccl_bool |
tag_bool |
dccl_int |
tag_int |
dccl_float |
tag_float |
dccl_enum |
tag_enum |
dccl_string |
tag_string |
dccl_hex |
tag_hex |
Definition at line 45 of file dccl_constants.h.
|
inline |
converts a char (byte) array into a hex string
c | pointer to array of char |
s | reference to string to put char into as hex |
n | length of c the first two hex chars in s are the 0 index in c |
Definition at line 168 of file dccl_constants.h.
|
inline |
converts a boost::dynamic_bitset (similar to std::bitset but without compile time size requirements) into a hex string
converts a hex string ("8AAA") into a binary string ("1000101010101010")
only works on whole byte string (even number of nibbles)
Definition at line 239 of file dccl_constants.h.
bool goby::transitional::hex_string2number | ( | const std::string & | s, |
T & | t | ||
) |
converts a hex string ("8AAA") into a dynamic_bitset
attempts to convert a hex string into a numerical representation (of type T)
Definition at line 268 of file dccl_constants.h.
bool goby::transitional::number2hex_string | ( | std::string & | s, |
const T & | t, | ||
unsigned int | width = 2 |
||
) |
converts a decimal number of type T into a hex string
s | string reference to store result in |
t | decimal number to convert |
width | desired width (in characters) of return string. Width should be twice the number of bytes |
Definition at line 282 of file dccl_constants.h.
std::string goby::transitional::number2hex_string | ( | const T & | t, |
unsigned int | width = 2 |
||
) |
converts a decimal number of type T into a hex string assuming success
t | decimal number to convert |
width | desired width (in characters) of return string. Width should be twice the number of bytes |
Definition at line 295 of file dccl_constants.h.
const std::string goby::transitional::DCCL_HEADER_NAMES[] |
Definition at line 142 of file dccl_constants.h.