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
Example.cpp
Go to the documentation of this file.
1// ======================================================================
2// \title Example.cpp
3// \author T. Chieu
4// \brief cpp file for Example component implementation class
5// ======================================================================
6
7
8#include <Example.hpp>
9#include <FpConfig.hpp>
10
11
12 // ----------------------------------------------------------------------
13 // Construction, initialization, and destruction
14 // ----------------------------------------------------------------------
15
16 Example ::
17 Example(
18 const char *const compName
19 ) : ExampleComponentBase(compName)
20 {
21
22 }
23
24 void Example ::
25 init(
26 const NATIVE_INT_TYPE instance
27 )
28 {
29 ExampleComponentBase::init(instance);
30 }
31
32 Example ::
33 ~Example()
34 {
35
36 }
37
38 // ----------------------------------------------------------------------
39 // Handler implementations for user-defined typed input ports
40 // ----------------------------------------------------------------------
41
42 void Example ::
43 arrayArgsIn_handler(
44 const NATIVE_INT_TYPE portNum,
45 const PortArray &a,
46 PortArray &aRef
47 )
48 {
49 this->arrayArgsOut_out(portNum, a, aRef);
50 }
51
52 PortArray Example ::
53 arrayReturnIn_handler(
54 const NATIVE_INT_TYPE portNum,
55 const PortArray &a,
56 PortArray &aRef
57 )
58 {
59 return this->arrayReturnOut_out(portNum, a, aRef);
60 }
61
62 void Example ::
63 enumArgsIn_handler(
64 const NATIVE_INT_TYPE portNum,
65 const PortEnum &e,
66 PortEnum &eRef
67 )
68 {
69 this->enumArgsOut_out(portNum, e, eRef);
70 }
71
72 PortEnum Example ::
73 enumReturnIn_handler(
74 const NATIVE_INT_TYPE portNum,
75 const PortEnum &e,
76 PortEnum &eRef
77 )
78 {
79 return this->enumReturnOut_out(portNum, e, eRef);
80 }
81
82 void Example ::
83 noArgsIn_handler(
84 const NATIVE_INT_TYPE portNum
85 )
86 {
87 this->noArgsOut_out(portNum);
88 }
89
90 bool Example ::
91 noArgsReturnIn_handler(
92 const NATIVE_INT_TYPE portNum
93 )
94 {
95 return this->noArgsReturnOut_out(portNum);
96 }
97
98 void Example ::
99 primitiveArgsIn_handler(
100 const NATIVE_INT_TYPE portNum,
101 U32 u32,
102 U32 &u32Ref,
103 F32 f32,
104 F32 &f32Ref,
105 bool b,
106 bool &bRef
107 )
108 {
109 this->primitiveArgsOut_out(
110 portNum,
111 u32,
112 u32Ref,
113 f32,
114 f32Ref,
115 b,
116 bRef
117 );
118 }
119
120 U32 Example ::
121 primitiveReturnIn_handler(
122 const NATIVE_INT_TYPE portNum,
123 U32 u32,
124 U32 &u32Ref,
125 F32 f32,
126 F32 &f32Ref,
127 bool b,
128 bool &bRef
129 )
130 {
131 return this->primitiveReturnOut_out(
132 portNum,
133 u32,
134 u32Ref,
135 f32,
136 f32Ref,
137 b,
138 bRef
139 );
140 }
141
142 void Example ::
143 stringArgsIn_handler(
144 const NATIVE_INT_TYPE portNum,
145 const str80String &str80,
146 str80RefString &str80Ref,
147 const str100String &str100,
148 str100RefString &str100Ref
149 )
150 {
151 this->stringArgsOut_out(
152 portNum,
153 str80,
154 str80Ref,
155 str100,
156 str100Ref
157 );
158 }
159
160 void Example ::
161 structArgsIn_handler(
162 const NATIVE_INT_TYPE portNum,
163 const PortStruct &s,
164 PortStruct &sRef
165 )
166 {
167 this->structArgsOut_out(portNum, s, sRef);
168 }
169
170 PortStruct Example ::
171 structReturnIn_handler(
172 const NATIVE_INT_TYPE portNum,
173 const PortStruct &s,
174 PortStruct &sRef
175 )
176 {
177 return this->structReturnOut_out(portNum, s, sRef);
178 }
179
180 // ----------------------------------------------------------------------
181 // Handler implementations for user-defined serial input ports
182 // ----------------------------------------------------------------------
183
184 void Example ::
185 serialIn_handler(
186 NATIVE_INT_TYPE portNum,
188 )
189 {
190 this->serializeStatus = this->serialOut_out(portNum, Buffer);
191 }
192
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
float F32
32-bit floating point
Definition BasicTypes.h:45
C++-compatible configuration header for fprime configuration.