Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvMsgData_Converter

Function Type

## Declaration

    typedef tibrv_status (*tibrvMsgData_Converter)(
        tibrvMsgField*       field,
        tibrv_u8             destination_type,
        tibrvMsgDataType*    converted_type);

## Purpose

Convert a message field to another local datatype.

## Remarks

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

Each converter function receives a message field, and replaces information within it.

Each converter must fulfill these responsibilities:

| • | For disallowed conversions, return the status code TIBRV_CONVERSION_FAILED.

| • | Convert the field’s data to the `destination_type`, and store the new data back into the field.

| • | Set the field’s size part to reflect the new size of the converted data.

| • | Set the field’s count part to reflect the new element count of the converted data.

| • | Set the field’s type part to reflect the `destination_type`.

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

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

Parameter | Description
`field` | This parameter receives the location of a message field. The converter function modifies that field to effect the conversion.
`destination_type` | This parameter receives the type identifier representing the datatype of the resulting field. This parameter instructs the converter function to convert the field to this datatype. The parameter can be any of the predefined datatypes listed in Wire Format Datatypes, as well as any custom datatypes that the program defines.
`converted_type` | This parameter receives a location. The converter function must store the low-level type of the new data reference in that location.

## See Also

tibrvMsgField

tibrvMsgDataType

tibrvMsgData_GetBytes()

tibrvMsgData_GetSize()

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.