Goby3
3.1.5a
2024.05.23
|
#include <bitset>
#include <cmath>
#include <iomanip>
#include <limits>
#include <sstream>
#include <string>
#include <vector>
#include "goby/acomms/acomms_constants.h"
#include "goby/acomms/dccl.h"
Go to the source code of this file.
Namespaces | |
goby | |
The global namespace for the Goby project. | |
goby::moos | |
goby::moos::transitional | |
Functions | |
unsigned | goby::moos::transitional::bits2bytes (unsigned bits) |
unsigned | goby::moos::transitional::bytes2bits (unsigned bytes) |
unsigned | goby::moos::transitional::bytes2nibs (unsigned bytes) |
unsigned | goby::moos::transitional::nibs2bytes (unsigned nibs) |
std::string | goby::moos::transitional::type_to_string (DCCLType type) |
std::string | goby::moos::transitional::type_to_protobuf_type (DCCLType type) |
std::string | goby::moos::transitional::type_to_string (DCCLCppType type) |
std::string | goby::moos::transitional::to_str (DCCLHeaderPart p) |
Binary encoding | |
bool | goby::moos::transitional::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 | goby::moos::transitional::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. More... | |
std::string | goby::moos::transitional::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 More... | |
std::string | goby::moos::transitional::binary_string2hex_string (const std::string &bs) |
converts a binary string ("1000101010101010") into a hex string ("8AAA") More... | |
std::string | goby::moos::transitional::hex_string2binary_string (const std::string &bs) |
converts a hex string ("8AAA") into a binary string ("1000101010101010") More... | |
template<typename T > | |
bool | goby::moos::transitional::hex_string2number (const std::string &s, T &t) |
attempts to convert a hex string into a numerical representation (of type T) More... | |
template<typename T > | |
bool | goby::moos::transitional::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 | goby::moos::transitional::number2hex_string (const T &t, unsigned int width=2) |
converts a decimal number of type T into a hex string assuming success More... | |
Binary encoding | |
bool | goby::moos::transitional::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 | goby::moos::transitional::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. More... | |
std::string | goby::moos::transitional::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 More... | |
std::string | goby::moos::transitional::binary_string2hex_string (const std::string &bs) |
converts a binary string ("1000101010101010") into a hex string ("8AAA") More... | |
std::string | goby::moos::transitional::hex_string2binary_string (const std::string &bs) |
converts a hex string ("8AAA") into a binary string ("1000101010101010") More... | |
template<typename T > | |
bool | goby::moos::transitional::hex_string2number (const std::string &s, T &t) |
attempts to convert a hex string into a numerical representation (of type T) More... | |
template<typename T > | |
bool | goby::moos::transitional::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 | goby::moos::transitional::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 | goby::moos::transitional::DCCL_NUM_HEADER_BYTES = 6 |
const unsigned | goby::moos::transitional::DCCL_NUM_HEADER_PARTS = 8 |
const std::string | goby::moos::transitional::DCCL_HEADER_NAMES [] |