Update Array

Convenience Functions

Declaration

tibrv_status tibrvMsg_Updateelement_typeArray(
   tibrvMsg            message,
   const char*         fieldName,
   const element_type*    value,
   tibrv_u32           numElements);
tibrv_status tibrvMsg_Updateelement_typeArrayEx(
   tibrvMsg            message,
   const char*         fieldName,
   const element_type*    value,
   tibrv_u32           numElements,
   tibrv_u16           fieldId);

Purpose

Update a field containing an array value.

Remarks

Each convenience function in this family locates a field (by name or identifier) and updates its data.

The type of the existing field (within the message) and the type of the updating value must match. The number of elements can change.

Pointer data previously extracted from the field remain valid and unchanged until the message is destroyed; that is, even updating the field’s value does not invalidate pointer data. (See Pointer Snapshot.)

Function Name

Element Type

Type Description

tibrvMsg_UpdateI8Array

tibrv_i8

8-bit integer array

tibrvMsg_UpdateU8Array

tibrv_u8

8-bit unsigned integer array

tibrvMsg_UpdateI16Array

tibrv_i16

16-bit integer array

tibrvMsg_UpdateU16Array

tibrv_u16

16-bit unsigned integer array

tibrvMsg_UpdateI32Array

tibrv_i32

32-bit integer array

tibrvMsg_UpdateU32Array

tibrv_u32

32-bit unsigned integer array

tibrvMsg_UpdateI64Array

tibrv_i64

64-bit integer array

tibrvMsg_UpdateU64Array

tibrv_u64

64-bit unsigned integer array

tibrvMsg_UpdateF32Array

tibrv_f32

32-bit floating point array

tibrvMsg_UpdateF64Array

tibrv_f64

64-bit floating point array

tibrvMsg_UpdateMsgArray

tibrv_Msg

message array

tibrvMsg_UpdateStringArray

char*

string array

Parameter

Description

message

Update the specified field of this message.

fieldName

Update a field with this name.

value

Update the message field to this array value.

The function copies the new array into the existing field.

numElements

When updating an array type, the program supplies the count of array elements in this parameter.

fieldId

Update the field with this identifier. Zero is a special value that signifies no field identifier. It is illegal to add a field that has both a NULL field name, and a non-zero field identifier.

See Also

Field Names and Field Identifiers