Skip to content

Inscoper::Utils

Utils class provides utility functions. More...

#include <Utils.h>

Public Functions

Name
std::string deviceTypeToString(Inscoper::EDeviceType deviceType)
Convert EDeviceType enum to string.
Inscoper::EDeviceType stringToDeviceType(const std::string & deviceTypeStr)
Convert string to EDeviceType.
std::string driverTypeToString(Inscoper::EDriverType driverType)
Convert EDriverType enum to string.
Inscoper::EDriverType stringToDriverType(const std::string & driverTypeStr)
Convert string to EDriverType.
std::string functionTypeToString(Inscoper::EFunctionType functionType)
Convert EFunctionType enum to string.
Inscoper::EFunctionType stringToFunctionType(const std::string & functionTypeStr)
Convert string to EFunctionType.
std::string paramTypeToString(Inscoper::EParamType paramType)
Convert EParamType enum to string.
Inscoper::EParamType stringToParamType(const std::string & paramTypeStr)
Convert string to EParamType.
std::string subDeviceTypeToString(Inscoper::ESubDeviceType type)
Convert ESubDeviceType enum to string.
Inscoper::ESubDeviceType stringToSubDeviceType(const std::string & typeStr)
Convert string to ESubDeviceType.
std::string subDeviceStatusToString(Inscoper::ESubDeviceStatus status)
Convert ESubDeviceStatus enum to string.
Inscoper::ESubDeviceStatus stringToSubDeviceStatus(const std::string & statusStr)
Convert string to ESubDeviceStatus..
std::string functionStatusToString(Inscoper::EFunctionStatus status)
Convert EFunctionStatus enum to string.
Inscoper::EFunctionStatus stringToFunctionStatus(const std::string & statusStr)
Convert string to EFunctionStatus.
std::string connectionTypeDescToString(Inscoper::EConnectionTypeDesc connectionTypeDesc)
Convert EConnectionTypeDesc enum to string.
Inscoper::EConnectionTypeDesc stringToConnectionTypeDesc(const std::string & connectionTypeDescStr)
Convert string to EConnectionTypeDesc.
std::string logLevelToString(Inscoper::ELogLevel logLevel)
Convert ELogLevel enum to string.
Inscoper::ELogLevel stringToLogLevel(const std::string & logLevelStr)
Convert string to ELogLevel.
std::string dataToString(const std::vector< unsigned char > & data)
Convert data bytes to string.
int dataToInt(const std::vector< unsigned char > & data)
Convert data bytes to integer.
double dataToDouble(const std::vector< unsigned char > & data)
Convert data bytes to double.
std::string boxTypeToString(Inscoper::EBoxType type)
Convert EBoxType enum to string.
Inscoper::EBoxType stringToBoxType(const std::string & boxTypeStr)
Convert string to EBoxType.

Detailed Description

class Inscoper::Utils;

Utils class provides utility functions.

This class contains helper functions for converting between enum types and their string representations, as well as data conversion utilities.

Public Functions Documentation

function deviceTypeToString

static std::string deviceTypeToString(
    Inscoper::EDeviceType deviceType
)

Convert EDeviceType enum to string.

Parameters:

  • deviceType : The device type to convert

Return: The corresponding string value. "" if unknown device type

function stringToDeviceType

static Inscoper::EDeviceType stringToDeviceType(
    const std::string & deviceTypeStr
)

Convert string to EDeviceType.

Parameters:

  • deviceTypeStr : The device type string to convert

Return: The corresponding type. GENERIC if unknown device type

function driverTypeToString

static std::string driverTypeToString(
    Inscoper::EDriverType driverType
)

Convert EDriverType enum to string.

Parameters:

  • driverType : The driver type to convert

Return: The corresponding string value. "" if unknown driver type

function stringToDriverType

static Inscoper::EDriverType stringToDriverType(
    const std::string & driverTypeStr
)

Convert string to EDriverType.

Parameters:

  • driverTypeStr : The driver type string to convert

Return: The corresponding type. INSCOPER_BOX if unknown driver type

function functionTypeToString

static std::string functionTypeToString(
    Inscoper::EFunctionType functionType
)

Convert EFunctionType enum to string.

Parameters:

  • functionType : The function type to convert

Return: The corresponding string value. "" if unknown function type

function stringToFunctionType

static Inscoper::EFunctionType stringToFunctionType(
    const std::string & functionTypeStr
)

Convert string to EFunctionType.

Parameters:

  • functionTypeStr : The function type string to convert

Return: The corresponding type. SET if unknown function type

function paramTypeToString

static std::string paramTypeToString(
    Inscoper::EParamType paramType
)

Convert EParamType enum to string.

Parameters:

  • paramType : The parameter type to convert

Return: The corresponding string value. "" if unknown parameter type

function stringToParamType

static Inscoper::EParamType stringToParamType(
    const std::string & paramTypeStr
)

Convert string to EParamType.

Parameters:

  • paramTypeStr : The parameter type string to convert

Return: The corresponding type. UINT8 if unknown parameter type

function subDeviceTypeToString

static std::string subDeviceTypeToString(
    Inscoper::ESubDeviceType type
)

Convert ESubDeviceType enum to string.

Parameters:

  • type : The sub-device type to convert

Return: The corresponding string value. "" if unknown sub-device type

function stringToSubDeviceType

static Inscoper::ESubDeviceType stringToSubDeviceType(
    const std::string & typeStr
)

Convert string to ESubDeviceType.

Parameters:

  • typeStr : The sub-device type string to convert

Return: The corresponding type. NONE if unknown sub-device type

function subDeviceStatusToString

static std::string subDeviceStatusToString(
    Inscoper::ESubDeviceStatus status
)

Convert ESubDeviceStatus enum to string.

Parameters:

  • status : The sub-device status to convert

Return: The corresponding string value. "UNKNOWN" if unknown sub-device status

function stringToSubDeviceStatus

static Inscoper::ESubDeviceStatus stringToSubDeviceStatus(
    const std::string & statusStr
)

Convert string to ESubDeviceStatus..

Parameters:

  • statusStr : The sub-device status string to convert

Return: The corresponding status. UNKNOWN if unknown sub-device status

function functionStatusToString

static std::string functionStatusToString(
    Inscoper::EFunctionStatus status
)

Convert EFunctionStatus enum to string.

Parameters:

  • status : The funciton status to convert

Return: The corresponding string value. "UNKNOWN" if unknown function status

function stringToFunctionStatus

static Inscoper::EFunctionStatus stringToFunctionStatus(
    const std::string & statusStr
)

Convert string to EFunctionStatus.

Parameters:

  • statusStr : The function status string to convert

Return: The corresponding status. UNKNOWN if unknown function status

function connectionTypeDescToString

static std::string connectionTypeDescToString(
    Inscoper::EConnectionTypeDesc connectionTypeDesc
)

Convert EConnectionTypeDesc enum to string.

Parameters:

  • connectionTypeDesc : The connection type to convert

Return: The corresponding string value. "" if unknown connection type

function stringToConnectionTypeDesc

static Inscoper::EConnectionTypeDesc stringToConnectionTypeDesc(
    const std::string & connectionTypeDescStr
)

Convert string to EConnectionTypeDesc.

Parameters:

  • connectionTypeDescStr : The connection type string to convert

Return: The corresponding type. NONE if unknown connection type

function logLevelToString

static std::string logLevelToString(
    Inscoper::ELogLevel logLevel
)

Convert ELogLevel enum to string.

Parameters:

  • logLevel : The log level to convert

Return: The corresponding string value

function stringToLogLevel

static Inscoper::ELogLevel stringToLogLevel(
    const std::string & logLevelStr
)

Convert string to ELogLevel.

Parameters:

  • logLevelStr : The log level string to convert

Return: The corresponding log level

function dataToString

static std::string dataToString(
    const std::vector< unsigned char > & data
)

Convert data bytes to string.

Parameters:

  • data : The vector of bytes to convert

Return: The resulting string

Converts a vector of bytes into a string representation.

function dataToInt

static int dataToInt(
    const std::vector< unsigned char > & data
)

Convert data bytes to integer.

Parameters:

  • data : The vector of bytes to convert

Return: The resulting integer

Converts a vector of bytes into an integer value.

function dataToDouble

static double dataToDouble(
    const std::vector< unsigned char > & data
)

Convert data bytes to double.

Parameters:

  • data : The vector of bytes to convert

Return: The resulting double

Converts a vector of bytes into a double value.

function boxTypeToString

static std::string boxTypeToString(
    Inscoper::EBoxType type
)

Convert EBoxType enum to string.

Parameters:

  • type : The device controller type to convert

Return: The corresponding string value. "UNKNOWN" if unknown device controller type

function stringToBoxType

static Inscoper::EBoxType stringToBoxType(
    const std::string & boxTypeStr
)

Convert string to EBoxType.

Parameters:

  • boxTypeStr : The device controller type string to convert

Return: The corresponding type. UNKNOWN if unknown device controller type


Updated on 2026-04-02 at 10:55:36 +0200