Get Scalar
Convenience Methods
Declaration
TibrvStatusget
scalar_type
(
const char* fieldName,
tibrv_scalar_type
& value,
tibrv_u16 fieldId=0);
Purpose
Get the value of a field as a scalar value.
Remarks
Each convenience method in this family retrieves a field and extracts its data. If the field’s type (as it exists) 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.
Method Name |
Type |
Type Description |
|
|
boolean |
|
|
32-bit floating point |
|
|
64-bit floating point |
|
|
8-bit integer |
|
|
16-bit integer |
|
|
32-bit integer |
|
|
64-bit integer |
|
|
8-bit unsigned integer |
|
|
16-bit unsigned integer |
|
|
32-bit unsigned integer |
|
|
64-bit unsigned integer |
|
|
4-byte IP address |
|
|
2-byte IP port |
Parameter |
Description |
|
Get a field with this name. |
|
When extracting a scalar type, the program supplies a variable in this parameter, and the method copies the scalar value of the field to that variable. |
|
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. |