SccpBcdMaskToAscii

Converts the binary coded hexadecimal mask pointed to by pBcd to an ASCII string of digits.

Prototype

SCCP_STATUS SccpBcdMaskToAscii ( U8 *pBcd, U32 nDigits, char *pAsciiBuf, U32 nAsciiBufLen)

Argument

Description

pBcd

Pointer to an address of a binary coded hexadecimal mask.

nDigits

Number of digits contained in the mask.

pAsciiBuf

Pointer to an address of a buffer for the converted mask.

nAsciiBufLen

Size of the output buffer in bytes.


Return values

Return value

Description

SCCP_SUCCESS

 

SCCP_BADDIGIT

Mask contains values other than zero through nine.

SCCP_BUFLEN

ASCII buffer is not large enough to hold the converted mask.

SCCP_NULLPTR

Null pointer was passed as an input parameter.


Details

The results are placed in the buffer pointed to by pAsciiBuf. If the number of digits is less than the size of the ASCII buffer, the buffer is padded with null characters.

Note: The ASCII string does not end in a null-termination character when the buffer size is exactly the same as the number of digits.