This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
robot.idl
196 lines (143 loc) · 3.65 KB
/
robot.idl
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#ifdef INTERFACE
module robot {
exception TooFast {};
enum Command { START_COMMAND, STOP_COMMAND };
struct Status
{
string msg;
};
@DDSService
interface RobotControl
{
void command(Command com);
float setSpeed(float speed) raises (TooFast);
float getSpeed();
void getStatus(out Status status);
};
}; //module robot
#endif // INTERFACE
#ifdef BASIC
#include <rpc_types.idl>
/******************************************/
/* Interface Specific Types Below */
/******************************************/
module robot {
struct TooFast
{
dds::rpc::UnusedMember dummy;
};//@top-level false
enum Command { START_COMMAND, STOP_COMMAND };
struct Status
{
string msg;
};//@top-level false
struct RobotControl_command_In
{
Command com;
};//@top-level false
struct RobotControl_setSpeed_In
{
float speed;
};//@top-level false
struct RobotControl_getSpeed_In
{
dds::rpc::UnusedMember dummy;
};//@top-level false
struct RobotControl_getStatus_In
{
dds::rpc::UnusedMember dummy;
};//@top-level false
const long RobotControl_command_Hash = 1;
const long RobotControl_setSpeed_Hash = 2;
const long RobotControl_getSpeed_Hash = 3;
const long RobotControl_getStatus_Hash = 4;
union RobotControl_Call switch(long)
{
default:
dds::rpc::UnknownOperation unknownOp;
case RobotControl_command_Hash:
RobotControl_command_In command;
case RobotControl_setSpeed_Hash:
RobotControl_setSpeed_In setSpeed;
case RobotControl_getSpeed_Hash:
RobotControl_getSpeed_In getSpeed;
case RobotControl_getStatus_Hash:
RobotControl_getStatus_In getStatus;
};//@top-level false
struct RobotControl_Request
{
dds::rpc::RequestHeader header;
RobotControl_Call data;
};
/***********************************************/
/* Reply Types */
/***********************************************/
struct RobotControl_command_Out
{
dds::rpc::UnusedMember dummy;
};//@top-level false
struct RobotControl_setSpeed_Out
{
float return_;
};//@top-level false
struct RobotControl_getSpeed_Out
{
float return_;
};//@top-level false
const long TooFast_Ex_Hash = 0xAFED; // HASH
struct RobotControl_getStatus_Out
{
Status status;
};//@top-level false
union RobotControl_command_Result switch(long)
{
default:
dds::rpc::UnknownException unknownEx;
case dds::rpc::REMOTE_EX_OK:
RobotControl_command_Out result;
};//@top-level false
union RobotControl_setSpeed_Result switch(long)
{
default:
dds::rpc::UnknownException unknownEx;
case dds::rpc::REMOTE_EX_OK:
RobotControl_setSpeed_Out result;
case TooFast_Ex_Hash:
TooFast toofast_ex;
};//@top-level false
union RobotControl_getSpeed_Result switch(long)
{
default:
dds::rpc::UnknownException unknownEx;
case dds::rpc::REMOTE_EX_OK:
RobotControl_getSpeed_Out result;
};//@top-level false
union RobotControl_getStatus_Result switch(long)
{
default:
dds::rpc::UnknownException unknownEx;
case dds::rpc::REMOTE_EX_OK:
RobotControl_getStatus_Out result;
};//@top-level false
union RobotControl_Return switch(long)
{
default:
dds::rpc::UnknownOperation unknownOp;
case RobotControl_command_Hash:
RobotControl_command_Result command;
case RobotControl_setSpeed_Hash:
RobotControl_setSpeed_Result setSpeed;
case RobotControl_getSpeed_Hash:
RobotControl_getSpeed_Result getSpeed;
case RobotControl_getStatus_Hash:
RobotControl_getStatus_Result getStatus;
};//@top-level false
struct RobotControl_Reply
{
dds::rpc::ReplyHeader header;
RobotControl_Return data;
};
}; // module robot
#endif // BASIC
#ifdef ENHANCED
#endif // ENHANCED