Common utility class. More...
#include <Utility.h>
Static Public Member Functions | |
| static double | ToInches (double metricMilimeters) |
| Converts milimeters to inches. | |
| static double | ToMilimeters (double imperialInches) |
| Converts inches to milimeters. | |
| static int16_t | be16_to_cpu_signed (string recvBuffer) |
| Computes a string to 16bit int. | |
| static int16_t | be16_to_cpu_signed (char recvChar) |
| Computes a char to 16bit int. | |
| static int16_t | be16_to_cpu_signed (char high, char low) |
| Computes a char combinaison to 16bit int. | |
| static uint16_t | be16_to_cpu_unsigned (string recvBuffer) |
| Computes a string to unsigned 16bit int. | |
| static uint16_t | be16_to_cpu_unsigned (char recvChar) |
| Computes a char to unsigned 16bit int. | |
| static uint16_t | be16_to_cpu_unsigned (char high, char low) |
| Computes a char combinaison to unsigned 16bit int. | |
| static string | ReplaceAll (string str, const string &from, const string &to) |
| Replaces all 'from' char to 'to' chars in a string. | |
| static vector< string > | Split (string toSplit, string delimiter) |
| Split a string base in a delimitor int a strings vector. | |
| static string | ConvertToHexRepresentation8 (int8_t toConvert) |
| Convert a 8bit integer to a hexadecimal string representaiton. | |
| static string | ConvertToHexRepresentation16 (int16_t toConvert) |
| Convert a 16bit integer to a hexadecimal string representaiton. | |
| static string | ConvertToHexRepresentation32 (int32_t toConvert) |
| Convert a 32bit integer to a hexadecimal string representaiton. | |
| static string | ConvertToHexRepresentation64 (int64_t toConvert) |
| Convert a 64bit integer to a hexadecimal string representaiton. | |
| static int8_t | ConvertHexTo8Bit (char *toConvert) |
| Convert a 1 pos char array to 8bit integer. | |
| static int16_t | ConvertHexTo16Bit (char *toConvert) |
| Convert a 2 pos char array to 16bit integer. | |
| static int32_t | ConvertHexTo32Bit (char *toConvert) |
| Convert a 4 pos char array to 32bit integer. | |
| static int64_t | ConvertHexTo64Bit (char *toConvert) |
| Convert a 8 pos char array to 64bit integer. | |
| static uint8_t | ConvertHexToUnsigned8Bit (char *toConvert) |
| Convert a 1 pos char array to 8bit integer. | |
| static uint16_t | ConvertHexToUnsigned16Bit (char *toConvert) |
| Convert a 2 pos char array to 16bit unsigned integer. | |
| static uint32_t | ConvertHexToUnsigned32Bit (char *toConvert) |
| Convert a 4 pos char array to 32bit unsigned integer. | |
| static uint64_t | ConvertHexToUnsigned64Bit (char *toConvert) |
| Convert a 8 pos char array to 64bit unsigned integer. | |
| static string | ExtractIpModel (const char *toFormat) |
| From 4 chars pointer, rebuild an understable ip v4 adress/gateway/mask. | |
| static string | ExtractMacModel (const char *toFormat) |
| From 6 chars pointer, rebuild an understable mac adress. | |
| static string | RemoveTrailingZeros (std::string toClean) |
| Trim a string to leave 1 decimal char removing extra zeros. | |
Common utility class.
|
static |
Computes a char combinaison to 16bit int.
| high | The high bytes of the int |
| low | The low bytes of the int |
| high | The high bytes of the int |
| low | The low bytes of the int |
|
static |
Computes a char to 16bit int.
| recvChar | The char to be converted |
|
static |
Computes a string to 16bit int.
| recvBuffer | The buffer to converted |
|
static |
Computes a char combinaison to unsigned 16bit int.
| high | The high bytes of the int |
| low | The low bytes of the int |
| high | The high bytes of the int |
| low | The low bytes of the int |
|
static |
Computes a char to unsigned 16bit int.
| recvChar | The char to be converted |
|
static |
Computes a string to unsigned 16bit int.
| recvBuffer | The buffer to converted |
| recvBuffer | The buffer to converted |
|
static |
Convert a 2 pos char array to 16bit integer.
| toConvert | the char array to convert |
|
static |
Convert a 4 pos char array to 32bit integer.
| toConvert | the char array to convert |
|
static |
Convert a 8 pos char array to 64bit integer.
| toConvert | the char array to convert |
|
static |
Convert a 1 pos char array to 8bit integer.
| toConvert | the char array to convert |
|
static |
Convert a 2 pos char array to 16bit unsigned integer.
| toConvert | the char array to convert |
|
static |
Convert a 4 pos char array to 32bit unsigned integer.
| toConvert | the char array to convert |
|
static |
Convert a 8 pos char array to 64bit unsigned integer.
| toConvert | the char array to convert |
|
static |
Convert a 1 pos char array to 8bit integer.
| toConvert | the char array to convert |
|
static |
Convert a 16bit integer to a hexadecimal string representaiton.
| toConvert | the number to convert |
|
static |
Convert a 32bit integer to a hexadecimal string representaiton.
| toConvert | the number to convert |
|
static |
Convert a 64bit integer to a hexadecimal string representaiton.
| toConvert | the number to convert |
|
static |
Convert a 8bit integer to a hexadecimal string representaiton.
| toConvert | the number to convert |
|
static |
From 4 chars pointer, rebuild an understable ip v4 adress/gateway/mask.
| toFromat |
|
static |
From 6 chars pointer, rebuild an understable mac adress.
| toFromat |
|
static |
Trim a string to leave 1 decimal char removing extra zeros.
| toClean | The string to be trimmed |
|
static |
Replaces all 'from' char to 'to' chars in a string.
| str | The source string |
| from | The string to be replaced |
| to | The replacement string |
|
static |
Split a string base in a delimitor int a strings vector.
| toSplit | The source string |
| delimiter | The delimiter on which the source string has to be splitted |
|
static |
Converts milimeters to inches.
| metricMilimeters | The value in milimeters |
|
static |
Converts inches to milimeters.
| imperialInches | The value in milimeters |