TibrvMsg::getFieldByIndex()
Method
Declaration
TibrvStatusgetFieldByIndex
(
TibrvMsgField& field,
tibrv_u32 fieldIndex);
Purpose
Get a field from a message by an index.
Remarks
Programs can loop through all the fields of a message, to retrieve each field in turn using an integer index.
The method copies scalar data into the program’s field object. 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.
Add, remove and update calls can perturb the order of fields (which, in turn, affects the results when a program gets a field by index).
Parameter |
Description |
|
The program supplies a TibrvMsgField object; the method overwrites the contents of the object, using information from the message field. |
|
Get the field with this index. Zero specifies the first field. |