Tibco::Rv::Msg::Field - Manipulate a Tibco message field
my ( $field ) = $msg->createField( name => 'myField' ); $field->i8( 123 ); $field->opaque( "abc\0abc" ); $field->ipaddr32( '184.108.40.206' ); $field->u64array( [ 1, 123, 3030 ] ); print "U64Array\n" if ( $field->type == Tibco::Rv::Msg::U64ARRAY ); print "Count: ", $field->count, "; size: ", $field->size, "\n";
Message Field-manipulating class. Holds a single value, like a C enum, along with a name and an id.
%args: name => $name, id => $id
Tibco::Rv::Msg::Field, with name and id as given in %args (name defaults '' and id defaults to 0, if not specified).
$field is initialized with boolean value
$field's name to
undef, sets name to ''.
$field's count. For array types,
$count is the number of elements in the array. For all other types,
$count is 1.
$field's size. For array types,
$size is the size in bytes of one element of the array. For all other types,
$size is the size in bytes of the data (for strings, this includes the NULL terminator, and for xml or opaque fields, this is the total number of bytes).
Returns the Tibco::Rv::Msg Message Type Constant representing the type of data contained in the field.
$value currently held in
$field. Dies with a Tibco::Rv::ARG_CONFLICT Status message if <type> does not match the type of data currently held by
<type> can be: bool, str, opaque, xml, f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, ipaddr32, ipport16, date, or msg
Sets the value of
$field to type <type> if it is not already.
Same as <type>, except it returns an array reference of values.
<type> can be: f32, f64, i8, i16, i32, i64, u8, u16, u32, u64
Some as <type>, except it must be given an array reference of values.
Paul Sturm <firstname.lastname@example.org>