Firmware for Arduino | PLEN Project Company Inc.
Utility Namespace Reference

Classes

class  AbstractParser
 Abstract parser interface. More...
 
class  CharGroupParser
 Parser class that accepts only characters given. More...
 
class  HexStringParser
 Parser class that accepts only hex string. More...
 
class  NilParser
 Parser class that accepts all. More...
 
class  Profiler
 Tiny metrics class. More...
 
class  StringGroupParser
 Parser class that accepts only strings given. More...
 

Functions

uint16_t hexbytes2uint16_impl (const char *bytes, uint8_t size)
 Convert hex string to an uint16_t. More...
 
template<const int SIZE>
uint16_t hexbytes2uint16 (const char *bytes)
 hexbytes2uint16_impl with compile time assertion More...
 
int16_t hexbytes2int16_impl (const char *bytes, uint8_t size)
 Convert hex string to an int16_t. More...
 
template<const int SIZE>
int16_t hexbytes2int16 (const char *bytes)
 hexbytes2int16_impl with compile time assertion. More...
 

Function Documentation

template<const int SIZE>
int16_t Utility::hexbytes2int16 ( const char *  bytes)

hexbytes2int16_impl with compile time assertion.

Template Parameters
SIZELength of hex string buffer.
Parameters
[in]bytesPointer of hex string buffer.
int16_t Utility::hexbytes2int16_impl ( const char *  bytes,
uint8_t  size 
)

Convert hex string to an int16_t.

Convert with regard to the highest bit as signed bit after converting hex string to bit-expression.

Parameters
[in]bytesPointer of hex string buffer.
[in]sizeLength of hex string buffer.
Attention
The method does not validate arguments.
template<const int SIZE>
uint16_t Utility::hexbytes2uint16 ( const char *  bytes)

hexbytes2uint16_impl with compile time assertion

Template Parameters
SIZELength of hex string buffer.
Parameters
[in]bytesPointer of hex string buffer.
uint16_t Utility::hexbytes2uint16_impl ( const char *  bytes,
uint8_t  size 
)

Convert hex string to an uint16_t.

Parameters
[in]bytesPointer of hex string buffer.
[in]sizeLength of hex string buffer.
Attention
The method does not validate its arguments.