ASN1C C/C++ Common Runtime  ASN1C v7.6.x
Functions
Print values to text buffer functions.

Functions

int rtPrintToStringBoolean (const char *name, OSBOOL value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringInteger (const char *name, OSINT32 value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringInt64 (const char *name, OSINT64 value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringIpv4Addr (const char *name, OSSIZE numocts, const OSOCTET *data, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringIpv6Addr (const char *name, OSSIZE numocts, const OSOCTET *data, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringTBCDStr (const char *name, OSSIZE numocts, const OSOCTET *data, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringDateTime (const char *name, OSNumDateTime *pDateTime, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringText (const char *name, OSSIZE numocts, const OSOCTET *data, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringUnsigned (const char *name, OSUINT32 value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringUInt64 (const char *name, OSUINT64 value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringBitStr (const char *name, OSSIZE numbits, const OSOCTET *data, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringBitStrBin (const char *name, OSSIZE numbits, const OSOCTET *data, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringBitStrExt (const char *name, OSSIZE numbits, const OSOCTET *data, OSSIZE dataSize, const OSOCTET *extdata, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringBitStrBraceText (const char *name, OSSIZE numbits, const OSOCTET *data, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringBitStrBraceTextExt (const char *name, OSSIZE numbits, const OSOCTET *data, OSSIZE dataSize, const OSOCTET *extdata, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOctStr (const char *name, OSSIZE numocts, const OSOCTET *data, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringCharStr (const char *name, const char *cstring, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringUTF8Str (const char *name, const OSUTF8CHAR *ustring, char *buffer, OSSIZE bufferSize)
 
int rtPrintToString16BitCharStr (const char *name, const Asn116BitCharString *bstring, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToString32BitCharStr (const char *name, const Asn132BitCharString *bstring, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringReal (const char *name, OSREAL value, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOID (const char *name, const ASN1OBJID *pOID, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOID64 (const char *name, const ASN1OID64 *pOID, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOIDValue (const ASN1OBJID *pOID, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOID64Value (const ASN1OID64 *pOID, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOpenType (const char *name, OSSIZE numocts, const OSOCTET *data, const char *conn, char *buffer, OSSIZE bufferSize)
 
int rtPrintToStringOpenTypeExt (const char *name, const OSRTDList *pElemList, char *buffer, OSSIZE bufferSize)
 
int rtPrintToString (const char *namebuf, char *buffer, OSSIZE bufSize)
 
int rtPrintToStringHexStr (const char *name, OSSIZE numocts, const OSOCTET *data, char *buffer, OSSIZE bufSize)
 
int rtPrintToStringUnicodeCharStr (const char *name, const Asn116BitCharString *bstring, char *buffer, OSSIZE bufSize)
 
int rtPrintToStringUnivCharStr (const char *name, const Asn132BitCharString *bstring, char *buffer, OSSIZE bufSize)
 
int rtPrintToStringOpenTypeExtBraceText (const char *name, const OSRTDList *pElemList, char *buffer, OSSIZE bufSize)
 
int rtPrintToStringIndent (char *buffer, OSSIZE bufSize)
 
void rtPrintToStringResetIndent (OSVOIDARG)
 
void rtPrintToStringIncrIndent (OSVOIDARG)
 
void rtPrintToStringDecrIndent (OSVOIDARG)
 
int rtPrintToStringCloseBrace (char *buffer, OSSIZE bufSize)
 
int rtPrintToStringOpenBrace (const char *, char *buffer, OSSIZE bufSize)
 

Detailed Description

Format the output value to string in a "name = value" format. The value format is obtained by calling one of the "ToString" functions with the given value.

Function Documentation

◆ rtPrintToString()

int rtPrintToString ( const char *  namebuf,
char *  buffer,
OSSIZE  bufSize 
)
Parameters
namebufA pointer to the buffer name.
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToString16BitCharStr()

int rtPrintToString16BitCharStr ( const char *  name,
const Asn116BitCharString bstring,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
bstringA pointer to a 16-bit string to print.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToString32BitCharStr()

int rtPrintToString32BitCharStr ( const char *  name,
const Asn132BitCharString bstring,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
bstringA pointer to a 32-bit string to print.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringBitStr()

int rtPrintToStringBitStr ( const char *  name,
OSSIZE  numbits,
const OSOCTET *  data,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numbitsThe number of bits to be printed.
dataA pointer to the data to be printed.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringBitStrBin()

int rtPrintToStringBitStrBin ( const char *  name,
OSSIZE  numbits,
const OSOCTET *  data,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)

This function prints the value of a bit string to a text buffer in binary form.

Parameters
nameThe name of the variable to print.
numbitsThe number of bits to be printed.
dataA pointer to the data to be printed.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringBitStrBraceText()

int rtPrintToStringBitStrBraceText ( const char *  name,
OSSIZE  numbits,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufferSize 
)

This function prints the value of a bit string to a text buffer in brace text format.

Parameters
nameThe name of the variable to print.
numbitsThe number of bits to be printed.
dataA pointer to the data to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringBitStrBraceTextExt()

int rtPrintToStringBitStrBraceTextExt ( const char *  name,
OSSIZE  numbits,
const OSOCTET *  data,
OSSIZE  dataSize,
const OSOCTET *  extdata,
char *  buffer,
OSSIZE  bufferSize 
)

This function prints the value of a bit string to a text buffer in brace text format. It includes support for BIT STRING's with extension data.

Parameters
nameThe name of the variable to print.
numbitsThe number of bits to be printed.
dataA pointer to the data to be printed.
dataSizeSize, in bytes, of the data array.
extdataPointer to byte array containing extension data.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringBitStrExt()

int rtPrintToStringBitStrExt ( const char *  name,
OSSIZE  numbits,
const OSOCTET *  data,
OSSIZE  dataSize,
const OSOCTET *  extdata,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)

This function prints the value of a bit string to a text buffer. It includes support for BIT STRING's with extension data.

Parameters
nameThe name of the variable to print.
numbitsThe number of bits to be printed.
dataA pointer to the data to be printed.
dataSizeSize, in bytes, of the data array.
extdataPointer to byte array containing extension data.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringBoolean()

int rtPrintToStringBoolean ( const char *  name,
OSBOOL  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype forthe exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringCharStr()

int rtPrintToStringCharStr ( const char *  name,
const char *  cstring,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
cstringA pointer to the character string to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringCloseBrace()

int rtPrintToStringCloseBrace ( char *  buffer,
OSSIZE  bufSize 
)

This function closes a braced region by decreasing the indent level, printing indent spaces, and printing the closing brace.

Parameters
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringDateTime()

int rtPrintToStringDateTime ( const char *  name,
OSNumDateTime *  pDateTime,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
pDateTimePointer to date/time structure to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringDecrIndent()

void rtPrintToStringDecrIndent ( OSVOIDARG  )

This function decrements the current indentation level.

◆ rtPrintToStringHexStr()

int rtPrintToStringHexStr ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufSize 
)

This function prints the value of a binary string in hex format to string buffer. If the string is 32 bytes or less, it is printed on a single line with a '0x' prefix. If longer, a formatted hex dump showing both hex and ascii codes is done.

Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringIncrIndent()

void rtPrintToStringIncrIndent ( OSVOIDARG  )

This function increments the current indentation level.

◆ rtPrintToStringIndent()

int rtPrintToStringIndent ( char *  buffer,
OSSIZE  bufSize 
)

This function prints indentation spaces to buffer.

Parameters
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringInt64()

int rtPrintToStringInt64 ( const char *  name,
OSINT64  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype forthe exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringInteger()

int rtPrintToStringInteger ( const char *  name,
OSINT32  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype forthe exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringIpv4Addr()

int rtPrintToStringIpv4Addr ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringIpv6Addr()

int rtPrintToStringIpv6Addr ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringOctStr()

int rtPrintToStringOctStr ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringOID()

int rtPrintToStringOID ( const char *  name,
const ASN1OBJID pOID,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
pOIDA pointer to a OID to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringOID64()

int rtPrintToStringOID64 ( const char *  name,
const ASN1OID64 pOID,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
pOIDA pointer to a OID to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringOID64Value()

int rtPrintToStringOID64Value ( const ASN1OID64 pOID,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
pOIDA pointer to a OID to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringOIDValue()

int rtPrintToStringOIDValue ( const ASN1OBJID pOID,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
pOIDA pointer to a OID to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringOpenBrace()

int rtPrintToStringOpenBrace ( const char *  ,
char *  buffer,
OSSIZE  bufSize 
)

This function opens a braced region by printing indent spaces, printing the name and opening brace, and increasing the indent level.

Parameters
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringOpenType()

int rtPrintToStringOpenType ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
const char *  conn,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
connA pointer to the connector between the name and the value. This points to either -> or .
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringOpenTypeExt()

int rtPrintToStringOpenTypeExt ( const char *  name,
const OSRTDList pElemList,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
pElemListA pointer to the element to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringOpenTypeExtBraceText()

int rtPrintToStringOpenTypeExtBraceText ( const char *  name,
const OSRTDList pElemList,
char *  buffer,
OSSIZE  bufSize 
)

This function prints the value of an open type extension in brace text format to buffer.

Parameters
nameThe name of the variable to print.
pElemListA pointer to an element of a list.
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringReal()

int rtPrintToStringReal ( const char *  name,
OSREAL  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype forthe exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringResetIndent()

void rtPrintToStringResetIndent ( OSVOIDARG  )

This function resets the current indentation level to zero.

◆ rtPrintToStringTBCDStr()

int rtPrintToStringTBCDStr ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringText()

int rtPrintToStringText ( const char *  name,
OSSIZE  numocts,
const OSOCTET *  data,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
numoctsThe number of octets to be printed.
dataA pointer to the data to be printed.
bufferPointer to a buffer to receive the printed value.
bufferSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringUInt64()

int rtPrintToStringUInt64 ( const char *  name,
OSUINT64  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype for the exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringUnicodeCharStr()

int rtPrintToStringUnicodeCharStr ( const char *  name,
const Asn116BitCharString bstring,
char *  buffer,
OSSIZE  bufSize 
)

This function prints a Unicode string to string buffer. Characters in the string that are within the normal Ascii range are printed as single characters. Characters outside the Ascii range are printed as 4-byte hex codes (0xnnnn).

Parameters
nameThe name of the variable to print.
bstringA pointer to the bit string to be printed.
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringUnivCharStr()

int rtPrintToStringUnivCharStr ( const char *  name,
const Asn132BitCharString bstring,
char *  buffer,
OSSIZE  bufSize 
)

This function prints a Universal string to string buffer. Characters in the string that are within the normal Ascii range are printed as single characters. Characters outside the Ascii range are printed as 8-byte hex codes (0xnnnnnnnn).

Parameters
nameThe name of the variable to print.
bstringA pointer to the bit string to be printed.
bufferPointer to a buffer to receive the printed value.
bufSizeThe size of the buffer to receive the printed value.

◆ rtPrintToStringUnsigned()

int rtPrintToStringUnsigned ( const char *  name,
OSUINT32  value,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
valueASN.1 value to print (Note: multiple arguments may be used to represent the value- for example a bit string would be represented by a numbits and data argument. See the function prototype for the exact calling sequence).
bufferSizeThe size of the buffer to receive the printed value.
bufferPointer to a buffer to receive the printed value.

◆ rtPrintToStringUTF8Str()

int rtPrintToStringUTF8Str ( const char *  name,
const OSUTF8CHAR *  ustring,
char *  buffer,
OSSIZE  bufferSize 
)
Parameters
nameThe name of the variable to print.
ustringA pointer to the UTF-8 string to be printed.
bufferSizeThe size of the buffer to receive the printed value.
bufferA pointer to a buffer to receive the printed value.