RTI Connext Micro  Version 2.4.1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
dds_c_tdatawriter_gen.h
1 /*
2  * FILE: dds_c_tdatawriter_gen.h - DDS typed datawriter template
3  *
4  * (c) Copyright, Real-Time Innovations, 2012-2014.
5  *
6  * All rights reserved.
7  *
8  * No duplications, whole or partial, manual or electronic, may be made
9  * without express written permission. Any such copies, or
10  * revisions thereof, must display this notice unaltered.
11  * This code contains trade secrets of Real-Time Innovations, Inc.
12  *
13  * Modification History
14  * --------------------
15  * 06jun2014,as Added compiler error on incorrect use of template header;
16  * source files do not need to undefine dds_c_tdatawriter_gen_h
17  * before including this header.
18  * 16sep2012,eh Created
19  */
20 /*i @file
21  * @ingroup DDSPublicationModule
22  */
23 #ifndef dds_c_tdatawriter_gen_h
24 #define dds_c_tdatawriter_gen_h
25 
26 #ifndef dds_c_common_h
27 #include "dds_c/dds_c_common.h"
28 #endif
29 #ifndef dds_c_infrastructure_h
31 #endif
32 #ifndef dds_c_publication_h
34 #endif
35 
36 #include "dds_c/dds_c_config.h"
37 
38 /*** SOURCE_BEGIN ***/
39 
40 #if defined(TDataWriter) && defined(TData)
41 
42 #define concatenate(A, B) A ## B
43 
44 #define TDataWriter_narrow_c(TDataWriter) concatenate(TDataWriter, _narrow)
45 #define TDataWriter_narrow TDataWriter_narrow_c(TDataWriter)
46 
47 #define TDataWriter_as_datawriter_c(TDataWriter) concatenate(TDataWriter, _as_datawriter)
48 #define TDataWriter_as_datawriter TDataWriter_as_datawriter_c(TDataWriter)
49 
50 #define TDataWriter_register_instance_c(TDataWriter) concatenate(TDataWriter, _register_instance)
51 #define TDataWriter_register_instance TDataWriter_register_instance_c(TDataWriter)
52 
53 #define TDataWriter_register_instance_w_timestamp_c(TDataWriter) concatenate(TDataWriter, _register_instance_w_timestamp)
54 #define TDataWriter_register_instance_w_timestamp TDataWriter_register_instance_w_timestamp_c(TDataWriter)
55 
56 #define TDataWriter_unregister_instance_c(TDataWriter) concatenate(TDataWriter, _unregister_instance)
57 #define TDataWriter_unregister_instance TDataWriter_unregister_instance_c(TDataWriter)
58 
59 #define TDataWriter_unregister_instance_w_timestamp_c(TDataWriter) concatenate(TDataWriter, _unregister_instance_w_timestamp)
60 #define TDataWriter_unregister_instance_w_timestamp TDataWriter_unregister_instance_w_timestamp_c(TDataWriter)
61 
62 #define TDataWriter_write_c(TDataWriter) concatenate(TDataWriter, _write)
63 #define TDataWriter_write TDataWriter_write_c(TDataWriter)
64 
65 #define TDataWriter_write_w_timestamp_c(TDataWriter) concatenate(TDataWriter, _write_w_timestamp)
66 #define TDataWriter_write_w_timestamp TDataWriter_write_w_timestamp_c(TDataWriter)
67 
68 #define TDataWriter_write_w_params_c(TDataWriter) concatenate(TDataWriter, _write_w_params)
69 #define TDataWriter_write_w_params TDataWriter_write_w_params_c(TDataWriter)
70 
71 #define TDataWriter_dispose_c(TDataWriter) concatenate(TDataWriter, _dispose)
72 #define TDataWriter_dispose TDataWriter_dispose_c(TDataWriter)
73 
74 #define TDataWriter_dispose_w_timestamp_c(TDataWriter) concatenate(TDataWriter, _dispose_w_timestamp)
75 #define TDataWriter_dispose_w_timestamp TDataWriter_dispose_w_timestamp_c(TDataWriter)
76 
77 
78 
79 /* ---------------------------------------------------------------------
80  Public Methods
81  --------------------------------------------------------------------- */
82 
83 TDataWriter*
84 TDataWriter_narrow(DDS_DataWriter* writer)
85 {
86  return (TDataWriter *)writer;
87 }
88 
90 TDataWriter_as_datawriter(TDataWriter* writer)
91 {
92  return (DDS_DataWriter *)writer;
93 }
94 
95 #ifdef INCLUDE_API_INSTANCE
97 TDataWriter_register_instance(TDataWriter* self,
98  const TData* instance_data)
99 {
101  instance_data);
102 }
103 #endif
104 
105 #ifdef INCLUDE_API_INSTANCE
107 TDataWriter_register_instance_w_timestamp(TDataWriter* self,
108  const TData* instance_data,
109  const struct DDS_Time_t* source_timestamp)
110 {
112  (DDS_DataWriter *)self, instance_data, source_timestamp);
113 }
114 #endif
115 
116 #ifdef INCLUDE_API_INSTANCE
118 TDataWriter_unregister_instance(TDataWriter* self,
119  const TData* instance_data,
120  const DDS_InstanceHandle_t* handle)
121 {
123  (DDS_DataWriter *)self, instance_data, handle);
124 }
125 #endif
126 
127 #ifdef INCLUDE_API_INSTANCE
129 TDataWriter_unregister_instance_w_timestamp(TDataWriter* self,
130  const TData* instance_data,
131  const DDS_InstanceHandle_t* handle,
132  const struct DDS_Time_t* source_timestamp)
133 {
135  (DDS_DataWriter *)self, instance_data, handle, source_timestamp);
136 }
137 #endif
138 
139 #ifdef INCLUDE_API_INSTANCE
141 TDataWriter_dispose(TDataWriter* self,
142  const TData* instance_data,
143  const DDS_InstanceHandle_t* instance_handle)
144 {
145  return DDS_DataWriter_dispose(
146  (DDS_DataWriter *)self, instance_data, instance_handle);
147 }
148 #endif
149 
150 #ifdef INCLUDE_API_INSTANCE
152 TDataWriter_dispose_w_timestamp(TDataWriter* self,
153  const TData* instance_data,
154  const DDS_InstanceHandle_t* instance_handle,
155  const struct DDS_Time_t* source_timestamp)
156 {
158  (DDS_DataWriter *)self,
159  instance_data, instance_handle, source_timestamp);
160 }
161 #endif
162 
164 TDataWriter_write(TDataWriter* self,
165  const TData* instance_data,
166  const DDS_InstanceHandle_t* handle)
167 {
168  return DDS_DataWriter_write((DDS_DataWriter *)self, instance_data, handle);
169 }
170 
172 TDataWriter_write_w_timestamp(TDataWriter* self,
173  const TData* instance_data,
174  const DDS_InstanceHandle_t* handle,
175  const struct DDS_Time_t* source_timestamp)
176 {
178  (DDS_DataWriter *)self, instance_data, handle, source_timestamp);
179 }
180 
182 TDataWriter_write_w_params(TDataWriter* self,
183  const TData* instance_data,
184  struct DDS_WriteParams_t* params)
185 {
187  (DDS_DataWriter *)self, instance_data, params);
188 }
189 
190 #undef concatenate
191 
192 #undef TDataWriter_narrow_c
193 #undef TDataWriter_narrow
194 
195 #undef TDataWriter_as_datawriter_c
196 #undef TDataWriter_as_datawriter
197 
198 #undef TDataWriter_register_instance_c
199 #undef TDataWriter_register_instance
200 
201 #undef TDataWriter_register_instance_w_timestamp_c
202 #undef TDataWriter_register_instance_w_timestamp
203 
204 #undef TDataWriter_unregister_instance_c
205 #undef TDataWriter_unregister_instance
206 
207 #undef TDataWriter_unregister_instance_w_timestamp_c
208 #undef TDataWriter_unregister_instance_w_timestamp
209 
210 #undef TDataWriter_write_c
211 #undef TDataWriter_write
212 
213 #undef TDataWriter_write_w_timestamp_c
214 #undef TDataWriter_write_w_timestamp
215 
216 #undef TDataWriter_write_w_params_c
217 #undef TDataWriter_write_w_params
218 
219 #undef TDataWriter_dispose_c
220 #undef TDataWriter_dispose
221 
222 #undef TDataWriter_dispose_w_timestamp_c
223 #undef TDataWriter_dispose_w_timestamp
224 
225 #else
226 #error "Incorrect use of dds_cpp_tdatawriter_gen.hxx: TDataWriter, and TData must be defined"
227 #endif /* defined(TDataWriter) && defined(TData) */
228 
229 #undef dds_c_tdatawriter_gen_h
230 #endif /* dds_c_tdatawriter_gen_h */

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