ItalaApiC  1.3.3
Functions
ToCString

Functions

ITALA_API_C ItalaError STR_AddressToString (uint32_t address, char *string, size_t *pSize)
 
ITALA_API_C ItalaError STR_MacAddressToString (uint64_t address, char *string, size_t *pSize)
 
ITALA_API_C ItalaError STR_AccessStatusToString (DeviceAccessStatus status, char *string, size_t *pSize)
 

Detailed Description

All the methods related to string conversion.

Function Documentation

◆ STR_AddressToString()

ITALA_API_C ItalaError STR_AddressToString ( uint32_t  address,
char *  string,
size_t *  pSize 
)

Converts a four-byte address to a readable string representation in dotted-decimal format. This function is useful for displaying IP addresses, gateways and subnet masks as well.

Parameters
[in]addressThe address to convert to string format.
[out]stringArray of char, rappresenting the string converted.
[in,out]pSizeMaximum element of the array in input, number of element filled in output.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ STR_MacAddressToString()

ITALA_API_C ItalaError STR_MacAddressToString ( uint64_t  address,
char *  string,
size_t *  pSize 
)

Converts a MAC address to a readable string representation in colon-heaxadecimal format. This function is useful for displaying MAC addresses.

Parameters
[in]addressThe address to convert to string format.
[out]stringArray of char, rappresenting the string converted.
[in,out]pSizeMaximum element of the array in input, number of element filled in output.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.

◆ STR_AccessStatusToString()

ITALA_API_C ItalaError STR_AccessStatusToString ( DeviceAccessStatus  status,
char *  string,
size_t *  pSize 
)

Converts an access status value to a readable string representation.

Parameters
[in]statusThe address to convert to string format.
[out]stringArray of char, rappresenting the string converted.
[in,out]pSizeMaximum element of the array in input, number of element filled in output.
Returns
ItalaError the error code; return ItalaErrorSuccess (0) if no errors occures.