Go to the documentation of this file.
5 #ifndef UAVCAN_PROTOCOL_DYNAMIC_NODE_ID_SERVER_STORAGE_MARSHALLER_HPP_INCLUDED
6 #define UAVCAN_PROTOCOL_DYNAMIC_NODE_ID_SERVER_STORAGE_MARSHALLER_HPP_INCLUDED
14 #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
20 namespace dynamic_node_id_server
31 const uint8_t ret = (ch >
'9') ?
static_cast<uint8_t>(ch -
'a' + 10) :
static_cast<uint8_t>(ch -
'0');
47 for (
uint8_t i = 0; i < UniqueID::MaxSize; i++)
65 serialized.
appendFormatted(
"%llu",
static_cast<unsigned long long>(inout_value));
70 return get(key, inout_value);
80 return get(key, inout_value);
107 if (
static_cast<char>(*it) <
'0' ||
static_cast<char>(*it) >
'9')
121 #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
125 #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
133 #if UAVCAN_CPP_VERSION >= UAVCAN_CPP11
146 static const uint8_t NumBytes = UniqueID::MaxSize;
152 if (val.
size() != NumBytes * 2)
163 if ((
static_cast<char>(*it) <
'0' ||
static_cast<char>(*it) >
'9') &&
164 (
static_cast<char>(*it) <
'a' ||
static_cast<char>(*it) >
'f'))
175 for (
uint8_t byte_index = 0; byte_index < NumBytes; byte_index++)
177 out_value[byte_index] =
179 out_value[byte_index] =
190 #endif // Include guard
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> size()) &&sizeof((*(reinterpret_cast< const R * >(0)))[0])
static uint8_t convertLowerCaseHexCharToNibble(char ch)
int setAndGetBack(const IStorageBackend::String &key, uint32_t &inout_value)
int get(const IStorageBackend::String &key, uint32_t &out_value) const
#define UAVCAN_TRACE(...)
struct UAVCAN_EXPORT StaticAssert
void appendFormatted(const char *const format, const A value)
static IStorageBackend::String convertUniqueIDToHex(const UniqueID &key)
const typedef ValueType * const_iterator
StorageMarshaller(IStorageBackend &storage)
EnableIf< sizeof((reinterpret_cast< const R * >0)) -> begin()) &&sizeof((reinterpret_cast< const R * >(0)) -> size())>::Type packSquareMatrix(const R &src_row_major)
int get(const IStorageBackend::String &key, UniqueID &out_value) const
IStorageBackend & storage_
int setAndGetBack(const IStorageBackend::String &key, UniqueID &inout_value)
void convertToLowerCaseASCII()
virtual void set(const String &key, const String &value)=0
virtual String get(const String &key) const =0
const char * c_str() const
protocol::dynamic_node_id::server::Entry::FieldTypes::unique_id UniqueID