RTI Connext C API Version 7.7.0
transport_interface_user.h
1/*
2 * (c) Copyright, Real-Time Innovations, 2005-2024.
3 * All rights reserved.
4 *
5 * No duplications, whole or partial, manual or electronic, may be made
6 * without express written permission. Any such copies, or
7 * revisions thereof, must display this notice unaltered.
8 * This code contains trade secrets of Real-Time Innovations, Inc.
9 */
10
11#ifndef transport_interface_user_h
12#define transport_interface_user_h
13
14#include "transport/transport_dll.h"
15#include "transport/transport_common.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/* ================================================================= */
22/* Component: Custom Transport Plugin (Abstract) */
23/* ================================================================= */
24
25/*i \file
26 * \ingroup NDDS_TransportPluginComponent
27 * \brief Abstract transport Plugin API visible to the transport plugin user.
28 */
29
30
31/* ================================================================= */
32/* Transport Property */
33/* ================================================================= */
34
35/*e \dref_Transport_Property_t
36 * \ingroup NDDS_TransportConfigurationComponent
37 */
39 /*e \dref_Transport_Property_t_classid */
41
42 /*e \dref_Transport_Property_t_address_bit_count */
44
45 /*e \dref_Transport_Property_t_properties_bitmap */
47
48 /*e \dref_Transport_Property_t_gather_send_buffer_count_max */
50
51 /*e \dref_Transport_Property_t_message_size_max */
53
54 /*e \dref_Transport_Property_t_allow_interfaces_list */
56
57 /*e \dref_Transport_Property_t_allow_interfaces_list_length */
59
60 /*e \dref_Transport_Property_t_deny_interfaces_list */
62
63 /*e \dref_Transport_Property_t_deny_interfaces_list_length */
65
66 /*e \dref_Transport_Property_t_allow_multicast_interfaces_list */
68
69 /*e \dref_Transport_Property_t_allow_multicast_interfaces_list_length */
71
72 /*e \dref_Transport_Property_t_deny_multicast_interfaces_list */
74
75 /*e \dref_Transport_Property_t_deny_multicast_interfaces_list_length */
77
78 /*e \dref_Transport_Property_t_transport_uuid */
80
81 /*i \dref_Transport_Property_t_domain_participant_ptr */
82 void *domain_participant_ptr;
83
84 /*i \dref_Transport_Property_t_domain_participant_forwarder */
85 const struct NDDS_Transport_Plugin_DomainParticipantForwarder
86 *domain_participant_forwarder;
87
88 /*e \dref_Transport_Property_t_thread_name_prefix */
90
91 /*e \dref_Transport_Property_t_max_interface_count */
93};
94
95/*i
96 * @brief Free the memory of the interface list property.
97 * @param allowInterfaceList \b In. The list of interfaces.
98 * @param allowInterfaceListLength \b In. The length of the list of interfaces.
99 */
100extern NDDS_Transport_DllExport void
101NDDS_Transport_Property_finalize_interface_list(
102 char ***allowInterfaceList,
103 RTI_INT32 *allowInterfaceListLength);
104
105/*i
106 * \ingroup NDDS_TransportConfigurationComponent
107 *
108 * \brief Safely copies NDDS_Transport_Property_t.
109 *
110 * @return 1 copy was successful, 0 if there is an error.
111*/
112extern NDDS_Transport_DllExport RTIBool NDDS_Transport_Property_copy(
113 struct NDDS_Transport_Property_t *dst,
114 const struct NDDS_Transport_Property_t *src);
115
116/*i
117 * \ingroup NDDS_TransportConfigurationComponent
118 * \brief Returns NDDS_Transport_Property_t arrays.
119 */
120extern NDDS_Transport_DllExport void NDDS_Transport_Property_finalize(
121 struct NDDS_Transport_Property_t *property);
122
123/*i
124 * \ingroup NDDS_TransportConfigurationComponent
125 *
126 * \brief Used to verify that a NDDS_Transport_Property_t is consistent
127 * and valid.
128 *
129 * @param property_in \st_in
130 *
131 * @return 1 if the stucture is self-consistent, 0 if there is an error.
132*/
133extern NDDS_Transport_DllExport RTI_INT32 NDDS_Transport_Property_verify(
134 const struct NDDS_Transport_Property_t *property_in);
135
136/*i
137 * \ingroup NDDS_TransportConfigurationComponent
138 * \brief This method returns an array containing the list of valid parent
139 * properties which are common for all the transports.
140 */
141extern NDDS_Transport_DllExport const char **
142NDDS_Transport_Property_get_common_properties(void);
143
144/*i
145 * \ingroup NDDS_TransportConfigurationComponent
146 * @brief parse transport Class ID property
147 * @param property_value \b In. property value to parse.
148 * @param class_id \b Out. Output classId.
149 * @return RTI_TRUE if the parsing is done properly, RTI_FLASE otherwise.
150 */
151extern NDDS_Transport_DllExport RTIBool NDDS_Transport_parse_transport_class_id(
152 const char *property_value,
153 NDDS_Transport_ClassId_t *class_id);
154
155/*i
156 * \ingroup NDDS_TransportConfigurationComponent
157 *
158 * \brief Set polled or blocking behavior of transport.
159*
160 * Some Transport Plugins may support the ability to have polled
161 * receive calls as well as blocking receive calls. This bit allows
162 * the instantiator of the plugin to decide in which receive mode that
163 * the Transport Plugin instance will run.
164*
165 * Currently, this ability is supported by the builtin Transport
166 * Plugins only for testing purposes. Thus this bit is not exposed to
167 * customers for their own Transport Plugins.
168 */
169#define NDDS_TRANSPORT_PROPERTY_BIT_POLLED (0x1)
170
171/*e
172 * \ingroup NDDS_TransportConfigurationComponent
173 *
174 * \brief Specified zero-copy behavior of transport.
175 *
176 * A Transport Plugin may commit to one of three behaviors for zero copy
177 * receives:
178 *
179 * <OL>
180 * <LI>Always does zero copy.
181 * <LI>Sometimes does zero copy, up to the transport discretion.
182 * <LI>Never does zero copy.
183 * </OL>
184 *
185 * This bit should be set only if the Transport Plugin commits to
186 * always doing a zero copy receive, or more specifically, always
187 * loaning a buffer through its \c receive_rEA() call.
188 *
189 * In that case, \ndds will not need to allocate storage for a
190 * message that it retrieves with the \c receive_rEA() call.
191 *
192 * \internal
193 * @see \ref NDDS_TransportPlugin_loaning_receive
194 */
195#define NDDS_TRANSPORT_PROPERTY_BIT_BUFFER_ALWAYS_LOANED (0x2)
196
197/*e
198 * \ingroup NDDS_TransportConfigurationComponent
199 *
200 * \brief Minimum number of gather-send buffers that must be supported by a
201 * Transport Plugin implementation.
202 *
203 * For the NDDS_Transport_Property_t structure to be valid, the value
204 * of NDDS_Transport_Property_t#gather_send_buffer_count_max must be
205 * greater than or equal to this value.
206 *
207 * \internal
208 * @see \ref NDDS_TransportPlugin_gather_send
209 */
210#define NDDS_TRANSPORT_PROPERTY_GATHER_SEND_BUFFER_COUNT_MIN (3)
211
212#ifdef __cplusplus
213} /* extern "C" */
214#endif
215
216#endif /* transport_interface_user_h */
RTI_INT32 NDDS_Transport_ClassId_t
Type for storing RTI Connext Transport Plugin class IDs.
Definition: transport_common_user.h:121
Base configuration structure that must be inherited by derived Transport Plugin classes.
Definition: transport_interface_user.h:38
struct NDDS_Transport_UUID transport_uuid
Univocally identifies a transport plugin.
Definition: transport_interface_user.h:79
char * thread_name_prefix
Prefix used to name the transport threads.
Definition: transport_interface_user.h:89
RTI_INT32 deny_interfaces_list_length
Number of elements in the deny_interfaces_list.
Definition: transport_interface_user.h:64
RTI_INT32 gather_send_buffer_count_max
Specifies the maximum number of buffers that RTI Connext can pass to the send() function of a transpo...
Definition: transport_interface_user.h:49
RTI_INT32 message_size_max
The maximum size of an RTPS message in bytes that can be sent or received by the transport plugin.
Definition: transport_interface_user.h:52
char ** allow_interfaces_list
A list of strings, each identifying a range of interface addresses or an interface name....
Definition: transport_interface_user.h:55
char ** allow_multicast_interfaces_list
A list of strings, each identifying a range of interface addresses or an interface name....
Definition: transport_interface_user.h:67
RTI_INT32 address_bit_count
Number of bits in a 16-byte address that are used by the transport. Should be between -128 and 128.
Definition: transport_interface_user.h:43
char ** deny_interfaces_list
A list of strings, each identifying a range of interface addresses or an interface name....
Definition: transport_interface_user.h:61
RTI_INT32 deny_multicast_interfaces_list_length
Number of elements in deny_multicast_interfaces_list.
Definition: transport_interface_user.h:76
RTI_INT32 properties_bitmap
A bitmap that defines various properties of the transport to the RTI Connext core.
Definition: transport_interface_user.h:46
NDDS_Transport_ClassId_t classid
The Transport-Plugin Class ID.
Definition: transport_interface_user.h:40
RTI_INT32 allow_multicast_interfaces_list_length
Number of elements in the allow_multicast_interfaces_list.
Definition: transport_interface_user.h:70
RTI_INT32 max_interface_count
Maximum number of addresses from the allow_interfaces_list that will be announced.
Definition: transport_interface_user.h:92
char ** deny_multicast_interfaces_list
A list of strings, each identifying a range of interface addresses or an interface name....
Definition: transport_interface_user.h:73
RTI_INT32 allow_interfaces_list_length
Number of elements in the allow_interfaces_list.
Definition: transport_interface_user.h:58
Unequivocally identifies a transport plugin instance.
Definition: transport_common.h:136