Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvMsgData_Decoder

Function Type

## Declaration

    typedef tibrv_status (*tibrvMsgData_Decoder)(
        char**               wire_buffer,
        tibrvMsgField*       field,
        tibrvMsgDataType*    decoded_type);

## Purpose

Decode a wire format field to a local datatype.

## Remarks

Programs define decoders for custom datatypes. Layer 2 decoder functions augment the Wire Format to C Datatype Conversion Matrix.

Each decoder must fulfill these responsibilities:

| • | Set the size, count and data parts of the destination field struct. (The layer 3 function sets the name, id and type.)

| • | Advance `*wire_buffer` to the end the source data (in the message). tibrvMsgData_GetBytes() automatically advances this buffer pointer.

| • | Store the low-level type of the new data reference in `*decoded_type`.

| • | Check consistency, and properly address byte order and endian issues.

Note | If your decoder implementation allocates process storage, it must call tibrvMsgData_Malloc() rather than `malloc`.

Parameter | Description
`wire_buffer` | This parameter receives the location of an address within the wire buffer of the source message. The source data starts at that address.
`field` | This parameter receives the location of a destination field object. The decoder function must set the parts of this field with the source data, its size and count.
`decoded_type` | This parameter receives a location. The decoder function must store the low-level type of the new data reference in that location.

## See Also

tibrvMsgField

tibrvMsgDataType

tibrvMsgData_GetBytes()

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.