RTI Connext Micro  Version 2.4.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
netio_rtps.h
Go to the documentation of this file.
1 /*
2  * FILE: netio_rtps.h - RTPS API
3  *
4  * Copyright 2011-2014 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 
111 /*ci
112  * \brief Calculate RTPS port numbers
113  *
114  * \details
115  *
116  * This function is typically registered with NETIO address resolvers top
117  * calculate port numbers for address strings passed in as strings.
118  *
119  * \param[in] param Should be type \ref NETIO_RtpsPortData
120  * \param[in] kind The type of address to resolve
121  * \param[in] port_base The base port
122  * \param[in] index The port index
123  * \param[out] address Contains the resolved port number on successful return
124  *
125  * \return RTI_TRUE on success, RTI_FALSE on failure
126  */
127 MUST_CHECK_RETURN NETIODllExport RTI_BOOL
128 NETIO_rtps_calculate_port(void *param,NETIO_RouteKind_T kind,
129  RTI_UINT32 port_base,RTI_INT32 index,
130  struct NETIO_Address *address);
131 
132 #include "netio/netio_rtps_impl.h"
133 
134 #ifdef __cplusplus
135 } /* extern "C" */
136 #endif
137 
138 #endif /* netio_rtps_h */
139 
140 /*ci @} */

RTI Connext Micro Version 2.4.1.0 Copyright © Thu Nov 20 2014 Real-Time Innovations, Inc