| Visioscan Set SDK Libraries 1.3.5 Visioscan Set SDK Help documentation file for C++ and C++/CLI |

Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Utility Class Reference

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.

## Detailed Description

Common utility class.

## Member Function Documentation

## ◆ be16_to_cpu_signed() [1/3]

int16_t Utility::be16_to_cpu_signed | ( | char | high,
|  | char | low )
| static

Computes a char combinaison to 16bit int.

Parameters

  high | The high bytes of the int
  low | The low bytes of the int

Returns
  a 16bit int structure

Parameters

  high | The high bytes of the int
  low | The low bytes of the int

Returns
  an 16bit int structure

## ◆ be16_to_cpu_signed() [2/3]

int16_t Utility::be16_to_cpu_signed | ( | char | recvChar | ) |
| static

Computes a char to 16bit int.

Parameters

  recvChar | The char to be converted

Returns
  a 16bit int structure

## ◆ be16_to_cpu_signed() [3/3]

int16_t Utility::be16_to_cpu_signed | ( | string | recvBuffer | ) |
| static

Computes a string to 16bit int.

Parameters

  recvBuffer | The buffer to converted

Returns
  a 16bit int structure

## ◆ be16_to_cpu_unsigned() [1/3]

uint16_t Utility::be16_to_cpu_unsigned | ( | char | high,
|  | char | low )
| static

Computes a char combinaison to unsigned 16bit int.

Parameters

  high | The high bytes of the int
  low | The low bytes of the int

Returns
  an unsigned 16bit int structure

Parameters

  high | The high bytes of the int
  low | The low bytes of the int

Returns
  a unsigned 16bit int structure

## ◆ be16_to_cpu_unsigned() [2/3]

uint16_t Utility::be16_to_cpu_unsigned | ( | char | recvChar | ) |
| static

Computes a char to unsigned 16bit int.

Parameters

  recvChar | The char to be converted

Returns
  an unsigned 16bit int structure

## ◆ be16_to_cpu_unsigned() [3/3]

uint16_t Utility::be16_to_cpu_unsigned | ( | string | recvBuffer | ) |
| static

Computes a string to unsigned 16bit int.

Parameters

  recvBuffer | The buffer to converted

Returns
  an 16bit unsigned int structure

Parameters

  recvBuffer | The buffer to converted

Returns
  an unsigned 16bit int structure

## ◆ ConvertHexTo16Bit()

int16_t Utility::ConvertHexTo16Bit | ( | char * | toConvert | ) |
| static

Convert a 2 pos char array to 16bit integer.

Parameters

  toConvert | the char array to convert

Returns
  The 16 bit integer

## ◆ ConvertHexTo32Bit()

int32_t Utility::ConvertHexTo32Bit | ( | char * | toConvert | ) |
| static

Convert a 4 pos char array to 32bit integer.

Parameters

  toConvert | the char array to convert

Returns
  The 32 bit integer

## ◆ ConvertHexTo64Bit()

int64_t Utility::ConvertHexTo64Bit | ( | char * | toConvert | ) |
| static

Convert a 8 pos char array to 64bit integer.

Parameters

  toConvert | the char array to convert

Returns
  The 64 bit integer

## ◆ ConvertHexTo8Bit()

int8_t Utility::ConvertHexTo8Bit | ( | char * | toConvert | ) |
| static

Convert a 1 pos char array to 8bit integer.

Parameters

  toConvert | the char array to convert

Returns
  The 8 bit integer

## ◆ ConvertHexToUnsigned16Bit()

uint16_t Utility::ConvertHexToUnsigned16Bit | ( | char * | toConvert | ) |
| static

Convert a 2 pos char array to 16bit unsigned integer.

Parameters

  toConvert | the char array to convert

Returns
  The 16 bit unsigned integer

## ◆ ConvertHexToUnsigned32Bit()

uint32_t Utility::ConvertHexToUnsigned32Bit | ( | char * | toConvert | ) |
| static

Convert a 4 pos char array to 32bit unsigned integer.

Parameters

  toConvert | the char array to convert

Returns
  The 32 bit unsigned integer

## ◆ ConvertHexToUnsigned64Bit()

uint64_t Utility::ConvertHexToUnsigned64Bit | ( | char * | toConvert | ) |
| static

Convert a 8 pos char array to 64bit unsigned integer.

Parameters

  toConvert | the char array to convert

Returns
  The 64 bit unsigned integer

## ◆ ConvertHexToUnsigned8Bit()

uint8_t Utility::ConvertHexToUnsigned8Bit | ( | char * | toConvert | ) |
| static

Convert a 1 pos char array to 8bit integer.

Parameters

  toConvert | the char array to convert

Returns
  The 8 bit integer

## ◆ ConvertToHexRepresentation16()

string Utility::ConvertToHexRepresentation16 | ( | int16_t | toConvert | ) |
| static

Convert a 16bit integer to a hexadecimal string representaiton.

Parameters

  toConvert | the number to convert

Returns
  A string representing the hew expression of the converted number

## ◆ ConvertToHexRepresentation32()

string Utility::ConvertToHexRepresentation32 | ( | int32_t | toConvert | ) |
| static

Convert a 32bit integer to a hexadecimal string representaiton.

Parameters

  toConvert | the number to convert

Returns
  A string representing the hew expression of the converted number

## ◆ ConvertToHexRepresentation64()

string Utility::ConvertToHexRepresentation64 | ( | int64_t | toConvert | ) |
| static

Convert a 64bit integer to a hexadecimal string representaiton.

Parameters

  toConvert | the number to convert

Returns
  A string representing the hew expression of the converted number

## ◆ ConvertToHexRepresentation8()

string Utility::ConvertToHexRepresentation8 | ( | int8_t | toConvert | ) |
| static

Convert a 8bit integer to a hexadecimal string representaiton.

Parameters

  toConvert | the number to convert

Returns
  A string representing the hew expression of the converted number

## ◆ ExtractIpModel()

string Utility::ExtractIpModel | ( | const char * | toFormat | ) |
| static

From 4 chars pointer, rebuild an understable ip v4 adress/gateway/mask.

Parameters

  toFromat |

Returns

## ◆ ExtractMacModel()

string Utility::ExtractMacModel | ( | const char * | toFormat | ) |
| static

From 6 chars pointer, rebuild an understable mac adress.

Parameters

  toFromat |

Returns

## ◆ RemoveTrailingZeros()

string Utility::RemoveTrailingZeros | ( | std::string | toClean | ) |
| static

Trim a string to leave 1 decimal char removing extra zeros.

Parameters

  toClean | The string to be trimmed

Returns
  The trimmed string

## ◆ ReplaceAll()

string Utility::ReplaceAll | ( | string | str,
|  | const string & | from,
|  | const string & | to )
| static

Replaces all 'from' char to 'to' chars in a string.

Parameters

  str | The source string
  from | The string to be replaced
  to | The replacement string

Returns
  A copy of the source string with replacement applied

## ◆ Split()

vector< string > Utility::Split | ( | string | toSplit,
|  | string | delimiter )
| static

Split a string base in a delimitor int a strings vector.

Parameters

  toSplit | The source string
  delimiter | The delimiter on which the source string has to be splitted

Returns
  A vecotr of the splitted string

## ◆ ToInches()

double Utility::ToInches | ( | double | metricMilimeters | ) |
| static

Converts milimeters to inches.

Parameters

  metricMilimeters | The value in milimeters

Returns
  A double representing the conversion to inches

## ◆ ToMilimeters()

double Utility::ToMilimeters | ( | double | imperialInches | ) |
| static

Converts inches to milimeters.

Parameters

  imperialInches | The value in milimeters

Returns
  A double representing the conversion to milimeters

The documentation for this class was generated from the following files:

- Utility.h
- Utility.cpp