DCCL v3
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
dccl Namespace Reference

Dynamic Compact Control Language namespace. More...

Namespaces

 arith
 DCCL Arithmetic Encoder Library namespace.
 
 compiler
 Compiler workarounds namespace.
 
 internal
 Namespace for objects used internally by DCCL.
 
 legacyccl
 DCCL Implementation of the REMUS CCL Language Library namespace.
 
 native_protobuf
 Implements the default Google Protocol Buffers encoder for a variety of numeric types.
 
 test
 Unit test namespace.
 
 tool
 'dccl' command line tool namespace
 
 v2
 Goby/DCCL version 2 default field codecs.
 
 v3
 DCCL version 3 default field codecs.
 

Classes

class  Bitset
 A variable size container of bits (subclassed from std::deque<bool>) with an optional hierarchy. Similar to set::bitset but can be resized at runtime and has the ability to have parent Bitsets that can give bits to their children. More...
 
class  Codec
 The Dynamic CCL enCODer/DECoder. This is the main class you will use to load, encode and decode DCCL messages. Many users will not need any other DCCL classes than this one. More...
 
class  DCCLFieldOptions
 
class  DCCLFieldOptions_Units
 
class  DCCLMessageOptions
 
class  DefaultIdentifierCodec
 Provides the default 1 byte or 2 byte DCCL ID codec. More...
 
class  DynamicProtobufManager
 Helper class for creating google::protobuf::Message objects that are not statically compiled into the application. More...
 
class  Exception
 Exception class for DCCL. More...
 
class  FieldCodecBase
 Provides a base class for defining DCCL field encoders / decoders. Most users who wish to define custom encoders/decoders will use the RepeatedTypedFieldCodec, TypedFieldCodec or its children (e.g. TypedFixedFieldCodec) instead of directly inheriting from this class. More...
 
class  FieldCodecManager
 A class for managing the various field codecs. Here you can add and remove field codecs. The DCCL Codec and DefaultMessageCodec use the find() methods to locate the appropriate field codec. More...
 
class  FieldCodecSelector
 A class that goes between FieldCodecBase and TypedFieldCodec to determine if the pre_encode() and post_decode() methods (which convert between WireType and FieldType) must be implemented or not. More...
 
class  FieldCodecSelector< WireType, FieldType, typename boost::enable_if< boost::is_same< WireType, FieldType > >::type >
 A class that goes between FieldCodecBase and TypedFieldCodec to determine if the pre_encode() and post_decode() methods must be implemented or not. The specialization is selected if WireType == FieldType and implements these functions as a pass-through. More...
 
class  Logger
 The DCCL Logger class. Do not instantiate this class directly. Rather, use the dccl::dlog object. More...
 
class  NullValueException
 Exception used to signal null (non-existent) value within field codecs during decode. More...
 
class  Option
 Represents a command line option. More...
 
class  OutOfRangeException
 
class  RepeatedTypedFieldCodec
 Base class for "repeated" (multiple value) static-typed (no boost::any) field encoders/decoders. Use TypedFixedFieldCodec if your codec is fixed length (always uses the same number of bits on the wire). Use TypedFieldCodec if your fields are always singular ("optional" or "required"). Singular fields are default implemented in this codec by calls to the equivalent repeated function with an empty or single valued vector. More...
 
class  TypedFieldCodec
 Base class for static-typed (no boost::any) field encoders/decoders. Most single-valued user defined variable length codecs will start with this class. Use TypedFixedFieldCodec if your codec is fixed length (always uses the same number of bits on the wire) or RepeatedTypedFieldCodec if your codec has special behavior for repeated (vector) fields. More...
 
class  TypedFixedFieldCodec
 Base class for static-typed field encoders/decoders that use a fixed number of bits on the wire regardless of the value of the field. Use TypedFieldCodec if your encoder is variable length. See TypedFieldCodec for an explanation of the template parameters (FieldType and WireType). More...
 

Typedefs

typedef google::protobuf::uint32 uint32
 an unsigned 32 bit integer
 
typedef google::protobuf::int32 int32
 a signed 32 bit integer
 
typedef google::protobuf::uint64 uint64
 an unsigned 64 bit integer
 
typedef google::protobuf::int64 int64
 a signed 64 bit integer
 

Enumerations

enum  MessagePart { HEAD, BODY, UNKNOWN }
 

Functions

void protobuf_AddDesc_dccl_2fapps_2fpb_5fplugin_2foption_5fextensions_2eproto ()
 
void protobuf_AssignDesc_dccl_2fapps_2fpb_5fplugin_2foption_5fextensions_2eproto ()
 
void protobuf_ShutdownFile_dccl_2fapps_2fpb_5fplugin_2foption_5fextensions_2eproto ()
 
bool operator== (const Bitset &a, const Bitset &b)
 
bool operator< (const Bitset &a, const Bitset &b)
 
Bitset operator& (const Bitset &b1, const Bitset &b2)
 
Bitset operator| (const Bitset &b1, const Bitset &b2)
 
Bitset operator^ (const Bitset &b1, const Bitset &b2)
 
std::ostream & operator<< (std::ostream &os, const Bitset &b)
 
std::ostream & operator<< (std::ostream &os, const Codec &codec)
 
unsigned floor_bits2bytes (unsigned bits)
 
unsigned ceil_bits2bytes (unsigned bits)
 
std::ostream & operator<< (std::ostream &out, const google::protobuf::Message &msg)
 
template<typename Float >
Float round (Float d)
 
template<typename Float >
boost::enable_if< boost::is_floating_point< Float >, Float >::type round (Float value, int precision)
 
template<typename Int >
Int abs (Int i)
 
template<typename Int >
boost::enable_if< boost::is_integral< Int >, Int >::type round (Int value, int precision)
 
std::ostream & operator<< (std::ostream &os, const FieldCodecBase &field_codec)
 
Exception type_error (const std::string &action, const std::type_info &expected, const std::type_info &got)
 
void to_ostream (const std::string &msg, dccl::logger::Verbosity vrb, dccl::logger::Group grp, std::ostream *os, bool add_timestamp)
 
void protobuf_AddDesc_dccl_2foption_5fextensions_2eproto ()
 
void protobuf_AssignDesc_dccl_2foption_5fextensions_2eproto ()
 
void protobuf_ShutdownFile_dccl_2foption_5fextensions_2eproto ()
 
void protobuf_AddDesc_dccl_2fprotobuf_2foption_5fextensions_2eproto ()
 
void protobuf_AssignDesc_dccl_2fprotobuf_2foption_5fextensions_2eproto ()
 
void protobuf_ShutdownFile_dccl_2fprotobuf_2foption_5fextensions_2eproto ()
 
Binary encoding
void hex_decode (const std::string &in, std::string *out)
 Decodes a (little-endian) hexadecimal string to a byte string. Index 0 and 1 (first byte) of in are written to index 0 (first byte) of out More...
 
std::string hex_decode (const std::string &in)
 
template<typename CharIterator >
void hex_encode (CharIterator begin, CharIterator end, std::string *out, bool upper_case=false)
 Encodes a (little-endian) hexadecimal string from a byte string. Index 0 of begin is written to index 0 and 1 (first byte) of out More...
 
template<typename CharIterator >
std::string hex_encode (CharIterator begin, CharIterator end)
 
void hex_encode (const std::string &in, std::string *out, bool upper_case=false)
 Encodes a (little-endian) hexadecimal string from a byte string. Index 0 of in is written to index 0 and 1 (first byte) of out More...
 
std::string hex_encode (const std::string &in)
 
std::string b64_encode (const std::string &in)
 
std::string b64_decode (const std::string &in)
 
unsigned ceil_log2 (dccl::uint64 v)
 
unsigned long ceil_log2 (double d)
 
unsigned long ceil_log2 (int i)
 
unsigned long ceil_log2 (long i)
 
unsigned long ceil_log2 (unsigned i)
 
double log2 (double d)
 

Variables

extern::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,::google::protobuf::internal::MessageTypeTraits< ::dccl::DCCLFieldOptions >, 11, false > field
 
extern::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,::google::protobuf::internal::MessageTypeTraits< ::dccl::DCCLMessageOptions >, 11, false > msg
 
const unsigned BITS_IN_BYTE = 8
 
Logger dlog
 
const std::string VERSION_STRING = "3.0.12"
 
const std::string VERSION_DATE = "2019.07.12"
 
const std::string COMPILE_DATE = "2019.07.19"
 

Detailed Description

Dynamic Compact Control Language namespace.

Function Documentation

unsigned dccl::ceil_log2 ( dccl::uint64  v)
inline
Returns
Efficiently computes ceil(log2(v))

Definition at line 180 of file binary.h.

void dccl::hex_decode ( const std::string &  in,
std::string *  out 
)
inline

Decodes a (little-endian) hexadecimal string to a byte string. Index 0 and 1 (first byte) of in are written to index 0 (first byte) of out

Parameters
inhexadecimal string (e.g. "544f4d" or "544F4D")
outpointer to string to store result (e.g. "TOM").

Definition at line 49 of file binary.h.

template<typename CharIterator >
void dccl::hex_encode ( CharIterator  begin,
CharIterator  end,
std::string *  out,
bool  upper_case = false 
)
inline

Encodes a (little-endian) hexadecimal string from a byte string. Index 0 of begin is written to index 0 and 1 (first byte) of out

Parameters
beginiterator to first byte of string to encode (e.g. "TOM")
enditerator pointing to the past-the-end character of the string.
outpointer to string to store result (e.g. "544f4d")
upper_caseset true to use upper case for the alphabet characters (i.e. A,B,C,D,E,F), otherwise lowercase is used (a,b,c,d,e,f).

Definition at line 100 of file binary.h.

void dccl::hex_encode ( const std::string &  in,
std::string *  out,
bool  upper_case = false 
)
inline

Encodes a (little-endian) hexadecimal string from a byte string. Index 0 of in is written to index 0 and 1 (first byte) of out

Parameters
inbyte string to encode (e.g. "TOM")
outpointer to string to store result (e.g. "544f4d")
upper_caseset true to use upper case for the alphabet characters (i.e. A,B,C,D,E,F), otherwise lowercase is used (a,b,c,d,e,f).

Definition at line 146 of file binary.h.

template<typename Float >
boost::enable_if<boost::is_floating_point<Float>, Float>::type dccl::round ( Float  value,
int  precision 
)

round 'value' to 'precision' number of decimal places

Parameters
valuevalue to round
precisionnumber of places past the decimal to round (e.g. dec=1 rounds to tenths)
Returns
rounded value

Definition at line 82 of file common.h.

template<typename Int >
boost::enable_if<boost::is_integral<Int>, Int>::type dccl::round ( Int  value,
int  precision 
)

round 'value' to 'precision' number of decimal places

Parameters
valuevalue to round
precisionnumber of places past the decimal to round (e.g. dec=1 rounds to tenths)
Returns
rounded value

Definition at line 97 of file common.h.