Unit tests for Sensors library.
More...
|
template<typename T > |
std::string | to_hex (T value) |
| Converts the numeric value into its hex representation. More...
|
|
template<typename T > |
std::string | to_hex (T *data, uint16_t length) |
| Converts the array of numeric values data into its hex representation. More...
|
|
Unit tests for Sensors library.
The unit tests are intendet to be executed on the host for development, therefore the restrictions on the library do not apply and all C++ language features including STL can be used.
◆ to_hex() [1/2]
template<typename T >
std::string to_hex |
( |
T |
value | ) |
|
Converts the numeric value
into its hex representation.
- Template Parameters
-
T | Data type of the numeric value to operate on. |
- Parameters
-
- Returns
- Hex representation of the
value
.
◆ to_hex() [2/2]
template<typename T >
std::string to_hex |
( |
T * |
data, |
|
|
uint16_t |
length |
|
) |
| |
Converts the array of numeric values data
into its hex representation.
- Template Parameters
-
T | Data type of the elements to operate on. |
- Parameters
-
data | Array of numeric values. |
length | Length of the array. |
- Returns
- Hex representation of the numeric values in the array
data
.