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¶
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¶
Convert EDeviceType enum to string.
Parameters:
- deviceType : The device type to convert
Return: The corresponding string value. "" if unknown device type
function stringToDeviceType¶
Convert string to EDeviceType.
Parameters:
- deviceTypeStr : The device type string to convert
Return: The corresponding type. GENERIC if unknown device type
function driverTypeToString¶
Convert EDriverType enum to string.
Parameters:
- driverType : The driver type to convert
Return: The corresponding string value. "" if unknown driver type
function stringToDriverType¶
Convert string to EDriverType.
Parameters:
- driverTypeStr : The driver type string to convert
Return: The corresponding type. INSCOPER_BOX if unknown driver type
function functionTypeToString¶
Convert EFunctionType enum to string.
Parameters:
- functionType : The function type to convert
Return: The corresponding string value. "" if unknown function type
function stringToFunctionType¶
Convert string to EFunctionType.
Parameters:
- functionTypeStr : The function type string to convert
Return: The corresponding type. SET if unknown function type
function paramTypeToString¶
Convert EParamType enum to string.
Parameters:
- paramType : The parameter type to convert
Return: The corresponding string value. "" if unknown parameter type
function stringToParamType¶
Convert string to EParamType.
Parameters:
- paramTypeStr : The parameter type string to convert
Return: The corresponding type. UINT8 if unknown parameter type
function subDeviceTypeToString¶
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¶
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¶
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¶
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¶
Convert EFunctionStatus enum to string.
Parameters:
- status : The funciton status to convert
Return: The corresponding string value. "UNKNOWN" if unknown function status
function stringToFunctionStatus¶
Convert string to EFunctionStatus.
Parameters:
- statusStr : The function status string to convert
Return: The corresponding status. UNKNOWN if unknown function status
function connectionTypeDescToString¶
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¶
Convert ELogLevel enum to string.
Parameters:
- logLevel : The log level to convert
Return: The corresponding string value
function stringToLogLevel¶
Convert string to ELogLevel.
Parameters:
- logLevelStr : The log level string to convert
Return: The corresponding log level
function dataToString¶
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¶
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¶
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¶
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¶
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