Update Scalar

Convenience Methods

Declaration

void update(
    java.lang.String fieldName,
    scalar_type       data)
  throws TibrvException
void update(
    java.lang.String fieldName,
    scalar_type       data,
    int              fieldId)
  throws TibrvException
void updateUbits(
    java.lang.String fieldName,
    scalar_type       data)
  throws TibrvException
void updateUbits(
    java.lang.String fieldName,
    scalar_type       data,
    int              fieldId)
  throws TibrvException

Purpose

Update a field containing a scalar value.

Method Forms

The convenience methods named update() determine the field type from the numeric type of the data.

The convenience methods named updateUnn() update unsigned integer fields, discarding the sign bit of a Java integer data value.

Method Name

Java Data Type

Field Type

Type Description

update

boolean

TibrvMsg.BOOL

boolean

update

float

TibrvMsg.F32

32-bit floating point

update

double

TibrvMsg.F64

64-bit floating point

update

byte

TibrvMsg.I8

8-bit integer

update

short

TibrvMsg.I16

16-bit integer

update

int

TibrvMsg.I32

32-bit integer

update

long

TibrvMsg.I64

64-bit integer

updateU8

byte

TibrvMsg.U8

8-bit unsigned integer

updateU16

short

TibrvMsg.U16

16-bit unsigned integer

updateU32

int

TibrvMsg.U32

32-bit unsigned integer

updateU64

long

TibrvMsg.U64

64-bit unsigned integer

Parameter

Description

data

Update a field with this data value.

It is illegal to add or update a field with null data.

fieldName

Update a field with this name.

When absent, locate the field by identifier only.

fieldId

Update a field with this identifier. All field identifiers must be unique within each message.

Zero is a special value, indicating no identifier. It is illegal to add a field that has both a null field name, and a non-zero field identifier.