RTI Connext DDS Micro  Version 2.4.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
MyUdpTransform Struct Reference

The custom UDP transformation class. More...

Data Fields

struct UDP_Transform _parent
 Base-class. All UDP transforms must inherit from UDP_Transform.
struct MyUdpTransformFactoryfactory
 A reference to its own factory, if properties must be accessed.
NETIO_Packet_T packet
 NETIO_Packet to hold a transformed payload.
char * buffer
 The payload to assign to NETIO_Packet_T.
RTI_SIZE_T max_buffer_length
 The maximum length of the buffer. NOTE: The buffer must be 1 byte larger than the largest buffer.

Detailed Description

The custom UDP transformation class.

The MyUdpTransformFactory creates one instance of this class for each UDP interface created. In this example one packet buffer (NETIO_Packet_T), is allocated and a buffer to hold the transformed data (buffer)

Only one transformation can be done at a time and it is synchronous. Thus, it is sufficient with one buffer to transform input and output per instance of the MyUdpTransform.


Field Documentation

struct UDP_Transform MyUdpTransform::_parent

Base-class. All UDP transforms must inherit from UDP_Transform.

Referenced by MyUdpTransform_create(), and MyUdpTransformFactory_create_component().

struct MyUdpTransformFactory* MyUdpTransform::factory

A reference to its own factory, if properties must be accessed.

Referenced by MyUdpTransform_create().

NETIO_Packet_T MyUdpTransform::packet

NETIO_Packet to hold a transformed payload.

RTI Connext DDS Micro uses a NETIO_Packet_T to abstract data payload and this is what is being passed betweem the UDP transport and the transformation. The transformation must convert a payload into a NETIO_Packet. This is done with NETIO_Packet_initialize_from. This function saves all state except the payload buffer.

char* MyUdpTransform::buffer

The payload to assign to NETIO_Packet_T.

A transformation cannot do in-place transformations because the input buffer may be sent multiple times (for example due to reliability). A transformation instance can only transform one buffer at a time (send or receive). The buffer must be large enough to hold a transformed payload. When the the transformation is created it receives a UDP_TransformProperty. This property has the max send and receive buffers for transport and can be used to sise the buffer. Please refer to UDP_InterfaceFactoryProperty::max_send_message_size and UDP_InterfaceFactoryProperty::max_message_size.

Referenced by MyUdpTransform_create(), and MyUdpTransform_delete().

RTI_SIZE_T MyUdpTransform::max_buffer_length

The maximum length of the buffer. NOTE: The buffer must be 1 byte larger than the largest buffer.

Referenced by MyUdpTransform_create().


RTI Connext DDS Micro Version 2.4.11 Copyright © Mon Jul 23 2018 Real-Time Innovations, Inc