9
9
10
10
// Necessary project-specified types
11
11
#include < Fw/Types/MallocAllocator.hpp>
12
- #include < Os/Log.hpp>
13
12
#include < Svc/FramingProtocol/FprimeProtocol.hpp>
14
13
15
14
// Used for 1Hz synthetic cycling
18
17
// Allows easy reference to objects in FPP/autocoder required namespaces
19
18
using namespace MathDeployment ;
20
19
21
- // Instantiate a system logger that will handle Fw::Logger::logMsg calls
22
- Os::Log logger;
23
-
24
20
// The reference topology uses a malloc-based allocator for components that need to allocate memory during the
25
21
// initialization phase.
26
22
Fw::MallocAllocator mallocator;
@@ -62,18 +58,18 @@ enum TopologyConstants {
62
58
63
59
// Ping entries are autocoded, however; this code is not properly exported. Thus, it is copied here.
64
60
Svc::Health::PingEntry pingEntries[] = {
65
- {PingEntries::blockDrv ::WARN, PingEntries::blockDrv ::FATAL, " blockDrv" },
66
- {PingEntries::tlmSend ::WARN, PingEntries::tlmSend ::FATAL, " chanTlm" },
67
- {PingEntries::cmdDisp ::WARN, PingEntries::cmdDisp ::FATAL, " cmdDisp" },
68
- {PingEntries::cmdSeq ::WARN, PingEntries::cmdSeq ::FATAL, " cmdSeq" },
69
- {PingEntries::eventLogger ::WARN, PingEntries::eventLogger ::FATAL, " eventLogger" },
70
- {PingEntries::fileDownlink ::WARN, PingEntries::fileDownlink ::FATAL, " fileDownlink" },
71
- {PingEntries::fileManager ::WARN, PingEntries::fileManager ::FATAL, " fileManager" },
72
- {PingEntries::fileUplink ::WARN, PingEntries::fileUplink ::FATAL, " fileUplink" },
73
- {PingEntries::prmDb ::WARN, PingEntries::prmDb ::FATAL, " prmDb" },
74
- {PingEntries::rateGroup1 ::WARN, PingEntries::rateGroup1 ::FATAL, " rateGroup1" },
75
- {PingEntries::rateGroup2 ::WARN, PingEntries::rateGroup2 ::FATAL, " rateGroup2" },
76
- {PingEntries::rateGroup3 ::WARN, PingEntries::rateGroup3 ::FATAL, " rateGroup3" },
61
+ {PingEntries::MathDeployment_blockDrv ::WARN, PingEntries::MathDeployment_blockDrv ::FATAL, " blockDrv" },
62
+ {PingEntries::MathDeployment_tlmSend ::WARN, PingEntries::MathDeployment_tlmSend ::FATAL, " chanTlm" },
63
+ {PingEntries::MathDeployment_cmdDisp ::WARN, PingEntries::MathDeployment_cmdDisp ::FATAL, " cmdDisp" },
64
+ {PingEntries::MathDeployment_cmdSeq ::WARN, PingEntries::MathDeployment_cmdSeq ::FATAL, " cmdSeq" },
65
+ {PingEntries::MathDeployment_eventLogger ::WARN, PingEntries::MathDeployment_eventLogger ::FATAL, " eventLogger" },
66
+ {PingEntries::MathDeployment_fileDownlink ::WARN, PingEntries::MathDeployment_fileDownlink ::FATAL, " fileDownlink" },
67
+ {PingEntries::MathDeployment_fileManager ::WARN, PingEntries::MathDeployment_fileManager ::FATAL, " fileManager" },
68
+ {PingEntries::MathDeployment_fileUplink ::WARN, PingEntries::MathDeployment_fileUplink ::FATAL, " fileUplink" },
69
+ {PingEntries::MathDeployment_prmDb ::WARN, PingEntries::MathDeployment_prmDb ::FATAL, " prmDb" },
70
+ {PingEntries::MathDeployment_rateGroup1 ::WARN, PingEntries::MathDeployment_rateGroup1 ::FATAL, " rateGroup1" },
71
+ {PingEntries::MathDeployment_rateGroup2 ::WARN, PingEntries::MathDeployment_rateGroup2 ::FATAL, " rateGroup2" },
72
+ {PingEntries::MathDeployment_rateGroup3 ::WARN, PingEntries::MathDeployment_rateGroup3 ::FATAL, " rateGroup3" },
77
73
};
78
74
79
75
/* *
@@ -156,7 +152,7 @@ void setupTopology(const TopologyState& state) {
156
152
Os::TaskString name (" ReceiveTask" );
157
153
// Uplink is configured for receive so a socket task is started
158
154
comDriver.configure (state.hostname , state.port );
159
- comDriver.startSocketTask (name, true , COMM_PRIORITY, Default::STACK_SIZE);
155
+ comDriver.start (name, true , COMM_PRIORITY, Default::STACK_SIZE);
160
156
}
161
157
}
162
158
@@ -172,7 +168,7 @@ void startSimulatedCycle(U32 milliseconds) {
172
168
// Main loop
173
169
while (cycling) {
174
170
MathDeployment::blockDrv.callIsr ();
175
- Os::Task::delay (milliseconds);
171
+ Os::Task::delay (Fw::TimeInterval ( milliseconds/ 1000 , milliseconds % 1000 ) );
176
172
177
173
cycleLock.lock ();
178
174
cycling = cycleFlag;
@@ -192,8 +188,8 @@ void teardownTopology(const TopologyState& state) {
192
188
freeThreads (state);
193
189
194
190
// Other task clean-up.
195
- comDriver.stopSocketTask ();
196
- (void )comDriver.joinSocketTask ( nullptr );
191
+ comDriver.stop ();
192
+ (void )comDriver.join ( );
197
193
198
194
// Resource deallocation
199
195
cmdSeq.deallocateBuffer (mallocator);
0 commit comments