Update Scalar

Convenience Methods

Declaration

TibrvStatus updatescalar_type (
    const char*         fieldName,
    tibrv_scalar_type    value,
    tibrv_u16           fieldId=0);

Purpose

Update a field containing a scalar value.

Remarks

Each convenience method 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.

Method Name

Value Type

Type Description

updateBool

tibrv_bool

boolean scalar

updateI8

tibrv_i8

8-bit integer

updateU8

tibrv_u8

8-bit unsigned integer

updateI16

tibrv_i16

16-bit integer

updateU16

tibrv_u16

16-bit unsigned integer

updateI32

tibrv_i32

32-bit integer

updateU32

tibrv_u32

32-bit unsigned integer

updateI64

tibrv_i64

64-bit integer

updateU64

tibrv_u64

64-bit unsigned integer

updateF32

tibrv_f32

32-bit floating point

updateF64

tibrv_f64

64-bit floating point

updateIPAddr32

tibrv_ipaddr32

4-byte IP address

updateIPPort16

tibrv_ipport16

2-byte IP port

Parameter

Description

fieldName

Update a field with this name.

value

Update the message field to this value (which may be a literal or stored in a variable).

The method copies the value into the new message field.

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