tibrvMsg_ConvertToString()

Function

Declaration

tibrv_status tibrvMsg_ConvertToString(
    tibrvMsg            message,
    const char**        string);

Purpose

Format a message as a string.

Remarks

Programs can use this function to obtain a string representation of the message for printing.

For most datatypes, this function formats the full value of the field to the output string; however, these two types are exceptions:

TIBRVMSG_OPAQUE

This function abbreviates the value of an opaque field; for example, [472 opaque bytes].

TIBRVMSG_XML

This function abbreviates the value of an XML field; for example, [XML document: 472 bytes].

The size measures uncompressed data.

This function formats TIBRVMSG_IPADDR32 fields as four dot-separated decimal integers.

This function formats TIBRVMSG_IPPORT16 fields as one decimal integer.

For printing tibrvMsgDateTime values, see Converting Dates to Strings.

Parameter

Description

message

Format this message as a string.

string

The program supplies a location in this parameter; the function stores a pointer to the string in that location. The function allocates storage for the string itself as part of the message; the string pointer remains valid until the message is destroyed. The program must not modify the string.