RTI Connext DDS Micro
Version 2.4.11
|
UDP Transform Example. More...
Data Structures | |
struct | MyUdpTransformFactory |
The UDP Transformation factory class. More... | |
struct | MyUdpTransform |
The custom UDP transformation class. More... |
Functions | |
RTI_PRIVATE struct MyUdpTransform * | MyUdpTransform_create (struct MyUdpTransformFactory *factory, const struct UDP_TransformProperty *const property) |
Method to create an instance of MyUdpTransform. | |
RTI_PRIVATE void | MyUdpTransform_delete (struct MyUdpTransform *t) |
Method to delete an instance of MyUdpTransform. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_create_destination_transform (UDP_Transform_T *const udptf, void **const context, const struct NETIO_Address *const destination, const struct NETIO_Netmask *const netmask, void *user_data, const struct UDP_TransformProperty *const property, RTI_INT32 *const ec) |
Method to create a transformation for an destination address. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_delete_destination_transform (UDP_Transform_T *const udptf, void *context, const struct NETIO_Address *const destination, const struct NETIO_Netmask *const netmask, RTI_INT32 *const ec) |
Method to delete a transformation for an destination address. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_create_source_transform (UDP_Transform_T *const udptf, void **const context, const struct NETIO_Address *const source, const struct NETIO_Netmask *const netmask, void *user_data, const struct UDP_TransformProperty *const property, RTI_INT32 *const ec) |
Method to create a transformation for an source address. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_delete_source_transform (UDP_Transform_T *const udptf, void *context, const struct NETIO_Address *const source, const struct NETIO_Netmask *const netmask, RTI_INT32 *const ec) |
Method to delete a transformation for an source address. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_transform_source (UDP_Transform_T *const udptf, void *context, const struct NETIO_Address *const source, const NETIO_Packet_T *const in_packet, NETIO_Packet_T **out_packet, RTI_INT32 *const ec) |
Method to transform data based on a source address. | |
RTI_PRIVATE RTI_BOOL | MyUdpTransform_transform_destination (UDP_Transform_T *const udptf, void *context, const struct NETIO_Address *const destination, const NETIO_Packet_T *const in_packet, NETIO_Packet_T **packet_out, RTI_INT32 *const ec) |
Method to transform data based on a destination address. | |
RTI_PRIVATE RT_Component_T * | MyUdpTransformFactory_create_component (struct RT_ComponentFactory *factory, struct RT_ComponentProperty *property, struct RT_ComponentListener *listener) |
Method called by RTI Connext DDS Micro to create an instance of transformation. | |
RTI_PRIVATE void | MyUdpTransformFactory_delete_component (struct RT_ComponentFactory *factory, RT_Component_T *component) |
Method called by RTI Connext DDS Micro to delete an instance of transformation. | |
RTI_PRIVATE struct RT_ComponentFactory * | MyUdpTransformFactory_initialize (struct RT_ComponentFactoryProperty *property, struct RT_ComponentFactoryListener *listener) |
Method called by RTI Connext DDS Micro when a factory is registered. | |
RTI_PRIVATE void | MyUdpTransformFactory_finalize (struct RT_ComponentFactory *factory, struct RT_ComponentFactoryProperty **property, struct RT_ComponentFactoryListener **listener) |
Method called by RTI Connext DDS Micro when a factory is unregistered. | |
RTI_BOOL | MyUdpTransformFactory_register (RT_Registry_T *registry, const char *const name, struct MyUdpTransformFactoryProperty *property) |
Method to register this transformation in a registry. | |
RTI_BOOL | MyUdpTransformFactory_unregister (RT_Registry_T *registry, const char *const name, struct MyUdpTransformFactoryProperty **property) |
Method to unregister this transformation from a registry. |
UDP Transform Example.
The UDP interface is implemented as a NETIO interface and NETIO interface factory.
|
read |
Method to create an instance of MyUdpTransform.
[in] | factory | The factory creating this instance |
[in] | property | Generic UDP_Transform properties |
References MyUdpTransform::_parent, MyUdpTransform::buffer, MyUdpTransform::factory, MyUdpTransform::max_buffer_length, UDP_TransformProperty::max_send_message_size, OSAPI_ALIGNMENT_DEFAULT, OSAPI_Heap_allocate_buffer(), OSAPI_Heap_allocate_struct(), and OSAPI_Heap_free_struct().
Referenced by MyUdpTransformFactory_create_component().
RTI_PRIVATE void MyUdpTransform_delete | ( | struct MyUdpTransform * | t | ) |
Method to delete an instance of MyUdpTransform.
[in] | t | Transformation instance to delete |
References MyUdpTransform::buffer, OSAPI_Heap_free_buffer(), and OSAPI_Heap_free_struct().
Referenced by MyUdpTransformFactory_delete_component().
RTI_PRIVATE RTI_BOOL MyUdpTransform_create_destination_transform | ( | UDP_Transform_T *const | udptf, |
void **const | context, | ||
const struct NETIO_Address *const | destination, | ||
const struct NETIO_Netmask *const | netmask, | ||
void * | user_data, | ||
const struct UDP_TransformProperty *const | property, | ||
RTI_INT32 *const | ec | ||
) |
Method to create a transformation for an destination address.
For each asserted destination rule a transform is created by the transformation instance. This method determines how a UDP payload is transformed before it is sent to an address that matches destination & netmask.
[in] | udptf | UDP Transform instance that creates the transformation |
[out] | context | Pointer to a transformation context |
[in] | destination | Destination address for the transformation |
[in] | netmask | The netmask to apply to this destination. |
[in] | user_data | The user_data the rule was asserted with |
[in] | property | UDP transform specific properties |
[out] | ec | User defined error code |
RTI_PRIVATE RTI_BOOL MyUdpTransform_delete_destination_transform | ( | UDP_Transform_T *const | udptf, |
void * | context, | ||
const struct NETIO_Address *const | destination, | ||
const struct NETIO_Netmask *const | netmask, | ||
RTI_INT32 *const | ec | ||
) |
Method to delete a transformation for an destination address.
[in] | udptf | UDP Transform instance that created the transformation |
[out] | context | Pointer to a transformation context |
[in] | destination | Destination address for the transformation |
[in] | netmask | The netmask to apply to this destination. |
[out] | ec | User defined error code |
RTI_PRIVATE RTI_BOOL MyUdpTransform_create_source_transform | ( | UDP_Transform_T *const | udptf, |
void **const | context, | ||
const struct NETIO_Address *const | source, | ||
const struct NETIO_Netmask *const | netmask, | ||
void * | user_data, | ||
const struct UDP_TransformProperty *const | property, | ||
RTI_INT32 *const | ec | ||
) |
Method to create a transformation for an source address.
For each asserted source rule a transform is created by the transformation instance. This method determines how a UDP payload is transformed when it is received from an address that matches source & netmask.
[in] | udptf | UDP Transform instance that creates the transformation |
[out] | context | Pointer to a transformation context |
[in] | source | Destination address for the transformation |
[in] | netmask | The netmask to apply to this destination. |
[in] | user_data | The user_data the rule was asserted with |
[in] | property | UDP transform specific properties |
[out] | ec | User defined error code |
RTI_PRIVATE RTI_BOOL MyUdpTransform_delete_source_transform | ( | UDP_Transform_T *const | udptf, |
void * | context, | ||
const struct NETIO_Address *const | source, | ||
const struct NETIO_Netmask *const | netmask, | ||
RTI_INT32 *const | ec | ||
) |
Method to delete a transformation for an source address.
[in] | udptf | UDP Transform instance that created the transformation |
[out] | context | Pointer to a transformation context |
[in] | source | Source address for the transformation |
[in] | netmask | The netmask to apply to this destination. |
[out] | ec | User defined error code |
RTI_PRIVATE RTI_BOOL MyUdpTransform_transform_source | ( | UDP_Transform_T *const | udptf, |
void * | context, | ||
const struct NETIO_Address *const | source, | ||
const NETIO_Packet_T *const | in_packet, | ||
NETIO_Packet_T ** | out_packet, | ||
RTI_INT32 *const | ec | ||
) |
Method to transform data based on a source address.
[in] | udptf | UDP_Transform_T that performs the transformation |
[in] | context | Reference to context created by MyUdpTransform_create_source_transform |
[in] | source | Source address for the transformation |
[in] | in_packet | The NETIO packet to transform |
[out] | out_packet | The transformed NETIO packet |
[out] | ec | User defined error code |
RTI_PRIVATE RTI_BOOL MyUdpTransform_transform_destination | ( | UDP_Transform_T *const | udptf, |
void * | context, | ||
const struct NETIO_Address *const | destination, | ||
const NETIO_Packet_T *const | in_packet, | ||
NETIO_Packet_T ** | packet_out, | ||
RTI_INT32 *const | ec | ||
) |
Method to transform data based on a destination address.
[in] | udptf | UDP_Transform_T that performs the transformation |
[in] | context | Reference to context created by MyUdpTransform_create_destination_transform |
[in] | destination | Source address for the transformation |
[in] | in_packet | The NETIO packet to transform |
[out] | packet_out | The transformed NETIO packet |
[out] | ec | User defined error code |
RTI_PRIVATE RT_Component_T* MyUdpTransformFactory_create_component | ( | struct RT_ComponentFactory * | factory, |
struct RT_ComponentProperty * | property, | ||
struct RT_ComponentListener * | listener | ||
) |
Method called by RTI Connext DDS Micro to create an instance of transformation.
References MyUdpTransform::_parent, and MyUdpTransform_create().
RTI_PRIVATE void MyUdpTransformFactory_delete_component | ( | struct RT_ComponentFactory * | factory, |
RT_Component_T * | component | ||
) |
Method called by RTI Connext DDS Micro to delete an instance of transformation.
References MyUdpTransform_delete().
|
read |
Method called by RTI Connext DDS Micro when a factory is registered.
References MyUdpTransformFactory::_parent, OSAPI_Heap_allocate_struct(), and MyUdpTransformFactory::property.
RTI_PRIVATE void MyUdpTransformFactory_finalize | ( | struct RT_ComponentFactory * | factory, |
struct RT_ComponentFactoryProperty ** | property, | ||
struct RT_ComponentFactoryListener ** | listener | ||
) |
Method called by RTI Connext DDS Micro when a factory is unregistered.
References OSAPI_Heap_free_struct(), and MyUdpTransformFactory::property.
RTI_BOOL MyUdpTransformFactory_register | ( | RT_Registry_T * | registry, |
const char *const | name, | ||
struct MyUdpTransformFactoryProperty * | property | ||
) |
Method to register this transformation in a registry.
References RT_Registry_register().
RTI_BOOL MyUdpTransformFactory_unregister | ( | RT_Registry_T * | registry, |
const char *const | name, | ||
struct MyUdpTransformFactoryProperty ** | property | ||
) |
Method to unregister this transformation from a registry.
References RT_Registry_unregister().