Get Array

Convenience Methods

Declaration

TibrvStatus getelement_typeArray(
    const char*           fieldName,
    tibrv_element_type*&   value,
    tibrv_u32&            numElementsAddr,
    tibrv_u16             fieldId=0);

Purpose

Get the value of a field as an array.

Remarks

Each convenience method in this family retrieves a field and extracts its data. If the field’s type (as it exists) is does not match the type of the convenience method, then the method attempts to convert the data (see Datatype Conversion). If conversion is not possible, the method 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.

These methods produce values that are read-only snapshots of the field data (see Pointer Snapshot). Programs must not modify elements of the value array.

Method Name

Element Type

Type Description

getF32Array

tibrv_f32

32-bit floating point array

getF64Array

tibrv_f64

64-bit floating point array

getI8Array

tibrv_i8

8-bit integer array

getI16Array

tibrv_i16

16-bit integer array

getI32Array

tibrv_i32

32-bit integer array

getI64Array

tibrv_i64

64-bit integer array

getU8Array

tibrv_u8

8-bit unsigned integer array

getU16Array

tibrv_u16

16-bit unsigned integer array

getU32Array

tibrv_u32

32-bit unsigned integer array

getU64Array

tibrv_u64

64-bit unsigned integer array

Parameter

Description

fieldName

Get a field with this name.

value

When extracting an array type, the program supplies a variable in this parameter, and the method stores a pointer to the array in that variable.

numElementsAddr

When extracting an array type, the program supplies a variable in this parameter, and the method stores the number of array elements in that variable.

fieldId

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.

See Also

Validity of Data Extracted From Message Fields

Field Names and Field Identifiers