Get Opaque Byte Sequence
Convenience Function
Declaration
tibrv_statustibrvMsg_GetOpaque
(
tibrvMsg message,
const char* fieldName,
const void** value,
tibrv_u32* length);
tibrv_statustibrvMsg_GetOpaqueEx
(
tibrvMsg message,
const char* fieldName,
const void** value,
tibrv_u32* length,
tibrv_u16 fieldId);
Purpose
Get the value of a field as an opaque byte sequence.
Remarks
This convenience function retrieves a field and extracts its data.
Since it is not possible to convert any other datatype to an opaque byte sequence, the field must already contain an opaque byte sequence. Otherwise, the function returns TIBRV_CONVERSION_FAILED.
Pointer data extracted from the field remain valid until the message is destroyed; that is, even removing the field or updating the field’s value does not invalidate pointer data.
This function produces values that are read-only snapshots of the field data (see Pointer Snapshot). Programs must not modify the value sequence.
Parameter |
Description |
|
Get the specified field of this message. |
|
Get a field with this name. |
|
The program supplies a location in this parameter, and the function stores the length of the opaque byte sequence in that location. |
|
The program supplies a location in this parameter, and the function stores a pointer to the field value in that location. |
|
Get the field with this identifier. Zero is a special value that signifies no field identifier. All non-zero field identifiers must be unique within each message. |