RTI Connext DDS Micro  Version 2.4.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
netio_rtps.h
Go to the documentation of this file.
1 /*
2  * FILE: netio_rtps.h - RTPS API
3  *
4  * Copyright 2011-2015 Real-Time Innovations, Inc.
5  *
6  * No duplications, whole or partial, manual or electronic, may be made
7  * without express written permission. Any such copies, or
8  * revisions thereof, must display this notice unaltered.
9  * This code contains trade secrets of Real-Time Innovations, Inc.
10  *
11  * Modification History
12  * --------------------
13  * 18may2011,eh Created
14  */
15 /*ce
16  * \file
17  * \brief RTPS API
18  */
19 /*ci \addtogroup NETIOUtility
20  * @{
21  */
22 #ifndef netio_rtps_h
23 #define netio_rtps_h
24 
25 #ifndef osapi_types_h
26 #include "osapi/osapi_types.h"
27 #endif
28 #ifndef reda_epoch_h
29 #include "reda/reda_epoch.h"
30 #endif
31 #ifndef osapi_time_h
32 #include "osapi/osapi_time.h"
33 #endif
34 #ifndef osapi_system_h
35 #include "osapi/osapi_system.h"
36 #endif
37 #ifndef netio_common_h
38 #include "netio/netio_common.h"
39 #endif
40 #ifndef netio_address_h
41 #include "netio/netio_address.h"
42 #endif
43 #ifndef netio_route_h
44 #include "netio/netio_route.h"
45 #endif
46 #ifndef netio_interface_h
47 #include "netio/netio_interface.h"
48 #endif
49 
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 /*ci
57  * \brief Parameters used by RTPS port resolvers
58  */
59 struct NETIO_RtpsPortParam
60 {
61  /*ci
62  * \brief The base port for the port calculation, typically 7400
63  */
64  RTI_INT32 port_base;
65 
66  /*ci
67  * \brief Number of ports are reserved for a domain
68  */
69  RTI_INT32 domain_id_gain;
70 
71  /*ci
72  * \brief Number of ports are reserved for a participant
73  */
74  RTI_INT32 participant_id_gain;
75 
76  /*ci
77  * \brief The port offset for meta-traffic multicast addresses
78  */
79  RTI_INT32 builtin_multicast_port_offset;
80 
81  /*ci
82  * \brief The port offset for meta-traffic unicast addresses
83  */
84  RTI_INT32 builtin_unicast_port_offset;
85 
86  /*ci
87  * \brief The port offset for user-traffic multicast addresses
88  */
89  RTI_INT32 user_multicast_port_offset;
90 
91  /*ci
92  * \brief The port offset for user-traffic unicast addresses
93  */
94  RTI_INT32 user_unicast_port_offset;
95 };
96 
97 /*ci
98  * \brief Structure passed to RTPS port resolvers
99  */
100 struct NETIO_RtpsPortData
101 {
102  /*e \dref_RtpsWellKnownPorts_t_domain_id
103  */
104  RTI_INT32 domain_id;
105 
106  /*e \dref_RtpsWellKnownPorts_t_port_param
107  */
108  struct NETIO_RtpsPortParam port_param;
109 
110  /*ci
111  * \brief The maximum allowed participant_id/index
112  */
113  RTI_INT32 max_participant_id;
114 };
115 
116 /*ci
117  * \brief Calculate RTPS port numbers
118  *
119  * \details
120  *
121  * This function is typically registered with NETIO address resolvers top
122  * calculate port numbers for address strings passed in as strings.
123  *
124  * \param[in] param Should be type \ref NETIO_RtpsPortData
125  * \param[in] kind The type of address to resolve
126  * \param[in] port_base The base port
127  * \param[in] index The port index
128  * \param[out] address Contains the resolved port number on successful return
129  *
130  * \return This function always returns RTI_TRUE
131  */
132 MUST_CHECK_RETURN NETIODllExport RTI_BOOL
133 NETIO_rtps_calculate_port(void *param,NETIO_RouteKind_T kind,
134  RTI_UINT32 port_base,RTI_INT32 index,
135  struct NETIO_Address *address);
136 
137 #ifdef __cplusplus
138 } /* extern "C" */
139 #endif
140 
141 #endif /* netio_rtps_h */
142 
143 /*ci @} */

RTI Connext DDS Micro Version 2.4.10 Copyright © Fri Jun 30 2017 Real-Time Innovations, Inc