Open topic with navigation

TIBCO Rendezvous® 8.7.0

# Wire Format Datatypes

Wire Format Type | Type Description | Notes
Special Types
`TIBRVMSG_``MSG` | Rendezvous message |
`TIBRVMSG_``DATETIME` | Rendezvous datetime |
`TIBRVMSG_``OPAQUE` | opaque byte sequence |
`TIBRVMSG_``STRING` | ISO 8859-1 character string (also called Latin-1) | `NULL`-terminated.
`TIBRVMSG_``XML` | XML data (byte sequence) |
Scalar Types
`TIBRVMSG_``BOOL` | boolean | `TIBRV_``FALSE`, `TIBRV_``TRUE`
`TIBRVMSG_``I8` | 8-bit integer |
`TIBRVMSG_``I16` | 16-bit integer |
`TIBRVMSG_``I32` | 32-bit integer |
`TIBRVMSG_``I64` | 64-bit integer |
`TIBRVMSG_``U8` | 8-bit unsigned integer |
`TIBRVMSG_``U16` | 16-bit unsigned integer |
`TIBRVMSG_``U32` | 32-bit unsigned integer |
`TIBRVMSG_``U64` | 64-bit unsigned integer |
`TIBRVMSG_``F32` | 32-bit floating point |
`TIBRVMSG_``F64` | 64-bit floating point |
`TIBRVMSG_``IPADDR32` | 4-byte IP address | Network byte order. String representation is four-part dot-delimited notation.
`TIBRVMSG_``IPPORT16` | 2-byte IP port | Network byte order. String representation is a 16-bit decimal integer.
Array Types
`TIBRVMSG_``I8ARRAY` | 8-bit integer array | The `count` property of the field reflects the number of elements in the array.
`TIBRVMSG_``I16ARRAY` | 16-bit integer array
`TIBRVMSG_``I32ARRAY` | 32-bit integer array
`TIBRVMSG_``I64ARRAY` | 64-bit integer array
`TIBRVMSG_``U8ARRAY` | 8-bit unsigned integer array
`TIBRVMSG_``U16ARRAY` | 16-bit unsigned integer array
`TIBRVMSG_``U32ARRAY` | 32-bit unsigned integer array
`TIBRVMSG_``U64ARRAY` | 64-bit unsigned integer array
`TIBRVMSG_``F32ARRAY` | 32-bit floating point array
`TIBRVMSG_``F64ARRAY` | 64-bit floating point array

# C Datatypes

C Type | Type Description | Notes
`tibrv_``bool` | boolean | `TIBRV_``FALSE`, `TIBRV_``TRUE`
`tibrv_``f32` | 32-bit floating point |
`tibrv_``f64` | 64-bit floating point |
`tibrv_``i8` | 8-bit integer |
`tibrv_``i16` | 16-bit integer |
`tibrv_``i32` | 32-bit integer |
`tibrv_``i64` | 64-bit integer |
`tibrv_``u8` | 8-bit unsigned integer |
`tibrv_``u16` | 16-bit unsigned integer |
`tibrv_``u32` | 32-bit unsigned integer |
`tibrv_``u64` | 64-bit unsigned integer |
`tibrv_``ipaddr32` | 4-byte IP address | Stored in network byte order. String representation is four-part dot-delimited notation.
`tibrv_``ipport16` | 2-byte IP port | Stored in network byte order. String representation is a decimal integer (all 16-bits).
`tibrvMsg` `DateTime` | Rendezvous datetime struct | See TibrvMsgDateTime. See also `tibrvMsgDateTime` on page 53 in TIBCO Rendezvous C Reference.
`tibrv_``f32*` | 32-bit floating point array |
`tibrv_``f64*` | 64-bit floating point array |
`tibrv_``i8*` | 8-bit integer array |
`tibrv_``i16*` | 16-bit integer array |
`tibrv_``i32*` | 32-bit integer array |
`tibrv_``i64*` | 64-bit integer array |
`tibrv_``u8*` | 8-bit unsigned integer array |
`tibrv_``u16*` | 16-bit unsigned integer array |
`tibrv_``u32*` | 32-bit unsigned integer array |
`tibrv_``u64*` | 64-bit unsigned integer array |
`tibrv` `Msg` | Rendezvous message | See TibrvMsg. See also `tibrvMsg` on page 52 in TIBCO Rendezvous C Reference.
`char*` | character string | ISO 8859-1 (Latin-1) character encoding
`void*` | opaque byte sequence |

# Datatype Conversion

Rendezvous software converts datatypes in two situations:

| • | As it translates a message to wire format (when sending a message).

| • | As it extracts data from a message field.

Convenience methods that extract a field from a Rendezvous message automatically decode the field’s data to a homologous C type. Wire Format to C Datatype Conversion Matrix specifies the homologous decodings as well as conversions to other types. See also, TibrvMsg::getField()TibrvMsg::getField().

Convenience methods that add a field to a Rendezvous message or update an existing field severely restrict type encoding. These methods encode only to homologous types (the solid dots along the diagonal of Wire Format to C Datatype Conversion Matrix indicate pairs of homologous types).

## General Rules

These general rules govern most conversions.

## Supported

| • | All wire format types decode to the homologous C datatypes (in get calls), and all C datatypes encode to the homologous wire format types (in add and update calls).

| • | All wire format numeric scalar types convert to all C numeric scalar types.

| • | All wire format numeric array types convert to all C numeric array types.

## Caution

| • | Converting a wire format opaque or XML byte sequence to a C character string creates a printable string, but the string does not capture any of the opaque data bytes (it captures only the number of bytes).

| • | Converting a wire format signed integer to a C unsigned integer discards the sign.

| • | Converting a wire format numeric type to a C numeric type with fewer bits risks loss of precision.

| • | Converting wire format floating point numbers to C integer types discards the fractional part.

| • | Converting large (out-of-range) wire format floating point numbers to C integers results in the maximum integer of the C target size.

## Not Supported

| • | Array types do not convert to scalar types.

| • | Scalar types do not convert to array types.

| • | C types do not convert to non-homologous wire format types (when adding or updating a field).

## Converting to Boolean

| • | When converting a string to a boolean, all strings in which the first character is either `t` or `T` map to boolean `true`. All other strings map to boolean `false`.

| • | When converting a numeric value to a boolean, zero maps to boolean `false`. All non-zero numeric values map to boolean `true`.

Figure 230: Wire Format to C Datatype Conversion Matrix

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.