F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PassiveTest.cpp
Go to the documentation of this file.
1// ======================================================================
2// \title PassiveTest.cpp
3// \author tiffany
4// \brief cpp file for PassiveTest component implementation class
5// ======================================================================
6
7
8#include "PassiveTest.hpp"
9#include <FpConfig.hpp>
10
11
12 // ----------------------------------------------------------------------
13 // Construction, initialization, and destruction
14 // ----------------------------------------------------------------------
15
16 PassiveTest ::
17 PassiveTest(
18 const char *const compName
19 ) : PassiveTestComponentBase(compName)
20 {
21
22 }
23
24 void PassiveTest ::
25 init(
26 NATIVE_INT_TYPE instance
27 )
28 {
29 PassiveTestComponentBase::init(instance);
30 }
31
32 PassiveTest ::
33 ~PassiveTest()
34 {
35
36 }
37
38 // ----------------------------------------------------------------------
39 // Handler implementations for user-defined typed input ports
40 // ----------------------------------------------------------------------
41
42 void PassiveTest ::
43 arrayArgsGuarded_handler(
44 const NATIVE_INT_TYPE portNum,
45 const FormalParamArray &a,
46 FormalParamArray &aRef
47 )
48 {
49 this->arrayArgsOut_out(portNum, a, aRef);
50 }
51
52 void PassiveTest ::
53 arrayArgsSync_handler(
54 const NATIVE_INT_TYPE portNum,
55 const FormalParamArray &a,
56 FormalParamArray &aRef
57 )
58 {
59 this->arrayArgsOut_out(portNum, a, aRef);
60 }
61
62 FormalParamArray PassiveTest ::
63 arrayReturnGuarded_handler(
64 const NATIVE_INT_TYPE portNum,
65 const FormalParamArray &a,
66 FormalParamArray &aRef
67 )
68 {
69 return this->arrayReturnOut_out(portNum, a, aRef);
70 }
71
72 FormalParamArray PassiveTest ::
73 arrayReturnSync_handler(
74 const NATIVE_INT_TYPE portNum,
75 const FormalParamArray &a,
76 FormalParamArray &aRef
77 )
78 {
79 return this->arrayReturnOut_out(portNum, a, aRef);
80 }
81
82 void PassiveTest ::
83 cmdOut_handler(
84 NATIVE_INT_TYPE portNum,
85 FwOpcodeType opCode,
86 U32 cmdSeq,
88 )
89 {
90 }
91
92 void PassiveTest ::
93 enumArgsGuarded_handler(
94 const NATIVE_INT_TYPE portNum,
95 const FormalParamEnum &en,
96 FormalParamEnum &enRef
97 )
98 {
99 this->enumArgsOut_out(portNum, en, enRef);
100 }
101
102 void PassiveTest ::
103 enumArgsSync_handler(
104 const NATIVE_INT_TYPE portNum,
105 const FormalParamEnum &en,
106 FormalParamEnum &enRef
107 )
108 {
109 this->enumArgsOut_out(portNum, en, enRef);
110 }
111
112 FormalParamEnum PassiveTest ::
113 enumReturnGuarded_handler(
114 const NATIVE_INT_TYPE portNum,
115 const FormalParamEnum &en,
116 FormalParamEnum &enRef
117 )
118 {
119 return this->enumReturnOut_out(portNum, en, enRef);
120 }
121
122 FormalParamEnum PassiveTest ::
123 enumReturnSync_handler(
124 const NATIVE_INT_TYPE portNum,
125 const FormalParamEnum &en,
126 FormalParamEnum &enRef
127 )
128 {
129 return this->enumReturnOut_out(portNum, en, enRef);
130 }
131
132 void PassiveTest ::
133 noArgsGuarded_handler(
134 const NATIVE_INT_TYPE portNum
135 )
136 {
137 this->noArgsOut_out(portNum);
138 }
139
140 bool PassiveTest ::
141 noArgsReturnGuarded_handler(
142 const NATIVE_INT_TYPE portNum
143 )
144 {
145 return this->noArgsReturnOut_out(portNum);
146 }
147
148 bool PassiveTest ::
149 noArgsReturnSync_handler(
150 const NATIVE_INT_TYPE portNum
151 )
152 {
153 return this->noArgsReturnOut_out(portNum);
154 }
155
156 void PassiveTest ::
157 noArgsSync_handler(
158 const NATIVE_INT_TYPE portNum
159 )
160 {
161 this->noArgsOut_out(portNum);
162 }
163
164 void PassiveTest ::
165 primitiveArgsGuarded_handler(
166 const NATIVE_INT_TYPE portNum,
167 U32 u32,
168 U32 &u32Ref,
169 F32 f32,
170 F32 &f32Ref,
171 bool b,
172 bool &bRef
173 )
174 {
175 this->primitiveArgsOut_out(
176 portNum,
177 u32,
178 u32Ref,
179 f32,
180 f32Ref,
181 b,
182 bRef
183 );
184 }
185
186 void PassiveTest ::
187 primitiveArgsSync_handler(
188 const NATIVE_INT_TYPE portNum,
189 U32 u32,
190 U32 &u32Ref,
191 F32 f32,
192 F32 &f32Ref,
193 bool b,
194 bool &bRef
195 )
196 {
197 this->primitiveArgsOut_out(
198 portNum,
199 u32,
200 u32Ref,
201 f32,
202 f32Ref,
203 b,
204 bRef
205 );
206 }
207
208 U32 PassiveTest ::
209 primitiveReturnGuarded_handler(
210 const NATIVE_INT_TYPE portNum,
211 U32 u32,
212 U32 &u32Ref,
213 F32 f32,
214 F32 &f32Ref,
215 bool b,
216 bool &bRef
217 )
218 {
219 return this->primitiveReturnOut_out(
220 portNum,
221 u32,
222 u32Ref,
223 f32,
224 f32Ref,
225 b,
226 bRef
227 );
228 }
229
230 U32 PassiveTest ::
231 primitiveReturnSync_handler(
232 const NATIVE_INT_TYPE portNum,
233 U32 u32,
234 U32 &u32Ref,
235 F32 f32,
236 F32 &f32Ref,
237 bool b,
238 bool &bRef
239 )
240 {
241 return this->primitiveReturnOut_out(
242 portNum,
243 u32,
244 u32Ref,
245 f32,
246 f32Ref,
247 b,
248 bRef
249 );
250 }
251
252 void PassiveTest ::
253 stringArgsGuarded_handler(
254 const NATIVE_INT_TYPE portNum,
255 const str80String &str80,
256 str80RefString &str80Ref,
257 const str100String &str100,
258 str100RefString &str100Ref
259 )
260 {
261 this->stringArgsOut_out(
262 portNum,
263 str80,
264 str80Ref,
265 str100,
266 str100Ref
267 );
268 }
269
270 void PassiveTest ::
271 stringArgsSync_handler(
272 const NATIVE_INT_TYPE portNum,
273 const str80String &str80,
274 str80RefString &str80Ref,
275 const str100String &str100,
276 str100RefString &str100Ref
277 )
278 {
279 this->stringArgsOut_out(
280 portNum,
281 str80,
282 str80Ref,
283 str100,
284 str100Ref
285 );
286 }
287
288 void PassiveTest ::
289 structArgsGuarded_handler(
290 const NATIVE_INT_TYPE portNum,
291 const FormalParamStruct &s,
292 FormalParamStruct &sRef
293 )
294 {
295 this->structArgsOut_out(portNum, s, sRef);
296 }
297
298 void PassiveTest ::
299 structArgsSync_handler(
300 const NATIVE_INT_TYPE portNum,
301 const FormalParamStruct &s,
302 FormalParamStruct &sRef
303 )
304 {
305 this->structArgsOut_out(portNum, s, sRef);
306 }
307
308 FormalParamStruct PassiveTest ::
309 structReturnGuarded_handler(
310 const NATIVE_INT_TYPE portNum,
311 const FormalParamStruct &s,
312 FormalParamStruct &sRef
313 )
314 {
315 return this->structReturnOut_out(portNum, s, sRef);
316 }
317
318 FormalParamStruct PassiveTest ::
319 structReturnSync_handler(
320 const NATIVE_INT_TYPE portNum,
321 const FormalParamStruct &s,
322 FormalParamStruct &sRef
323 )
324 {
325 return this->structReturnOut_out(portNum, s, sRef);
326 }
327
328 // ----------------------------------------------------------------------
329 // Handler implementations for user-defined serial input ports
330 // ----------------------------------------------------------------------
331
332 void PassiveTest ::
333 serialGuarded_handler(
334 NATIVE_INT_TYPE portNum,
336 )
337 {
338 this->serializeStatus = this->serialOut_out(portNum, Buffer);
339 }
340
341 void PassiveTest ::
342 serialSync_handler(
343 NATIVE_INT_TYPE portNum,
345 )
346 {
347 this->serializeStatus = this->serialOut_out(portNum, Buffer);
348 }
349
350 // ----------------------------------------------------------------------
351 // Command handler implementations
352 // ----------------------------------------------------------------------
353
354 void PassiveTest ::
355 CMD_NO_ARGS_cmdHandler(
356 const FwOpcodeType opCode,
357 const U32 cmdSeq
358 )
359 {
360 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
361 }
362
363 void PassiveTest ::
364 CMD_PRIMITIVE_cmdHandler(
365 const FwOpcodeType opCode,
366 const U32 cmdSeq,
367 U32 u32_1,
368 U32 u32_2,
369 F32 f32_1,
370 F32 f32_2,
371 bool b1,
372 bool b2
373 )
374 {
375 this->primitiveCmd.args.val1 = u32_1;
376 this->primitiveCmd.args.val2 = u32_2;
377 this->primitiveCmd.args.val3 = f32_1;
378 this->primitiveCmd.args.val4 = f32_2;
379 this->primitiveCmd.args.val5 = b1;
380 this->primitiveCmd.args.val6 = b2;
381
382 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
383 }
384
385 void PassiveTest ::
386 CMD_STRINGS_cmdHandler(
387 const FwOpcodeType opCode,
388 const U32 cmdSeq,
389 const Fw::CmdStringArg& str1,
390 const Fw::CmdStringArg& str2
391 )
392 {
393 this->stringCmd.args.val1 = str1;
394 this->stringCmd.args.val2 = str2;
395
396 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
397 }
398
399 void PassiveTest ::
400 CMD_ENUM_cmdHandler(
401 const FwOpcodeType opCode,
402 const U32 cmdSeq,
403 FormalParamEnum en
404 )
405 {
406 this->enumCmd.args.val = en;
407
408 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
409 }
410
411 void PassiveTest ::
412 CMD_ARRAY_cmdHandler(
413 const FwOpcodeType opCode,
414 const U32 cmdSeq,
415 FormalParamArray arr
416 )
417 {
418 this->arrayCmd.args.val = arr;
419
420 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
421 }
422
423 void PassiveTest ::
424 CMD_STRUCT_cmdHandler(
425 const FwOpcodeType opCode,
426 const U32 cmdSeq,
427 FormalParamStruct str
428 )
429 {
430 this->structCmd.args.val = str;
431
432 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
433 }
434
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
float F32
32-bit floating point
Definition BasicTypes.h:45
U32 FwOpcodeType
Definition FpConfig.h:56
C++-compatible configuration header for fprime configuration.
@ OK
Command successfully executed.