-
Notifications
You must be signed in to change notification settings - Fork 0
/
exampleSupport.c
144 lines (113 loc) · 2.61 KB
/
exampleSupport.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.
This file was generated from example.idl using "rtiddsgen".
The rtiddsgen tool is part of the RTI Data Distribution Service distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the RTI Data Distribution Service manual.
*/
#include "exampleSupport.h"
/*** SOURCE_BEGIN ***/
/* =========================================================================== */
/* Requires */
#define TTYPENAME my_typeTYPENAME
/*
my_typeDataWriter (DDS_DataWriter)
*/
/* Defines */
#define TDataWriter my_typeDataWriter
#define TData my_type
#include "dds_c/dds_c_tdatawriter_gen.h"
#undef TDataWriter
#undef TData
/* =========================================================================== */
/*
my_typeDataReader (DDS_DataReader)
*/
/* Defines */
#define TDataReader my_typeDataReader
#define TDataSeq my_typeSeq
#define TData my_type
#include "dds_c/dds_c_tdatareader_gen.h"
#undef TDataReader
#undef TDataSeq
#undef TData
DDS_ReturnCode_t
my_typeTypeSupport_register_type(
DDS_DomainParticipant* participant,
const char* type_name)
{
DDS_ReturnCode_t retcode = DDS_RETCODE_ERROR;
if (participant == NULL)
{
goto done;
}
if (type_name == NULL)
{
type_name = my_typeTypePlugin_get_default_type_name();
if (type_name == NULL)
{
goto done;
}
}
retcode = DDS_DomainParticipant_register_type(
participant,
type_name,
my_typeTypePlugin_get());
if (retcode != DDS_RETCODE_OK)
{
goto done;
}
retcode = DDS_RETCODE_OK;
done:
return retcode;
}
#ifndef RTI_CERT
DDS_ReturnCode_t
my_typeTypeSupport_unregister_type(
DDS_DomainParticipant* participant,
const char* type_name)
{
DDS_ReturnCode_t retcode = DDS_RETCODE_ERROR;
if (participant == NULL)
{
goto done;
}
if (type_name == NULL)
{
type_name = my_typeTypePlugin_get_default_type_name();
if (type_name == NULL)
{
goto done;
}
}
if (my_typeTypePlugin_get() !=
DDS_DomainParticipant_unregister_type(participant,type_name))
{
goto done;
}
retcode = DDS_RETCODE_OK;
done:
return retcode;
}
#endif
const char*
my_typeTypeSupport_get_type_name(void)
{
return my_typeTYPENAME;
}
my_type *
my_typeTypeSupport_create_data(void)
{
my_type *data = NULL;
data = my_type_create();
return data;
}
#ifndef RTI_CERT
void
my_typeTypeSupport_delete_data(
my_type *data)
{
my_type_delete(data);
}
#endif
#undef TTYPENAME