F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
CmdSequencerImpl.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CmdSequencerImpl.cpp
3 // \author Bocchino/Canham
4 // \brief cpp file for CmdDispatcherComponentBase component implementation class
5 //
6 // \copyright
7 // Copyright (C) 2009-2018 California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #include <Fw/Types/Assert.hpp>
16 #include <Fw/Com/ComPacket.hpp>
18 extern "C" {
20 }
21 
22 namespace Svc {
23 
24  // ----------------------------------------------------------------------
25  // Construction, initialization, and destruction
26  // ----------------------------------------------------------------------
27 
29  CmdSequencerComponentImpl(const char* name) :
31  m_FPrimeSequence(*this),
32  m_sequence(&this->m_FPrimeSequence),
33  m_loadCmdCount(0),
34  m_cancelCmdCount(0),
35  m_errorCount(0),
36  m_runMode(STOPPED),
37  m_stepMode(AUTO),
38  m_executedCount(0),
39  m_totalExecutedCount(0),
40  m_sequencesCompletedCount(0),
41  m_timeout(0)
42  {
43 
44  }
45 
47  const NATIVE_INT_TYPE instance) {
48  CmdSequencerComponentBase::init(queueDepth, instance);
49  }
50 
52  this->m_timeout = timeout;
53  }
54 
57  {
58  this->m_sequence = &sequence;
59  }
60 
63  const NATIVE_INT_TYPE identifier,
64  Fw::MemAllocator& allocator,
65  const NATIVE_UINT_TYPE bytes
66  )
67  {
68  this->m_sequence->allocateBuffer(identifier, allocator, bytes);
69  }
70 
72  loadSequence(const Fw::EightyCharString& fileName)
73  {
74  FW_ASSERT(this->m_runMode == STOPPED, this->m_runMode);
75  if (not this->loadFile(fileName)) {
76  this->m_sequence->clear();
77  }
78  }
79 
82  {
83  this->m_sequence->deallocateBuffer(allocator);
84  }
85 
87 
88  }
89 
90  // ----------------------------------------------------------------------
91  // Handler implementations
92  // ----------------------------------------------------------------------
93 
95  FwOpcodeType opCode,
96  U32 cmdSeq,
97  const Fw::CmdStringArg& fileName) {
98 
99  if (not this->requireRunMode(STOPPED)) {
100  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
101  return;
102  }
103 
104  // load commands
105  if (not this->loadFile(fileName)) {
106  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
107  return;
108  }
109 
110  this->m_executedCount = 0;
111 
112  // Check the step mode. If it is auto, start the sequence
113  if (AUTO == this->m_stepMode) {
114  this->m_runMode = RUNNING;
115  this->performCmd_Step();
116  }
117 
118  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK);
119  }
120 
122  FwOpcodeType opCode,
123  U32 cmdSeq,
124  const Fw::CmdStringArg& fileName
125  ) {
126 
127  if (!this->requireRunMode(STOPPED)) {
128  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
129  return;
130  }
131 
132  // load commands
133  if (not this->loadFile(fileName)) {
134  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
135  return;
136  }
137 
138  // clear the buffer
139  this->m_sequence->clear();
140 
142 
143  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK);
144 
145  }
146 
149  NATIVE_INT_TYPE portNum,
150  Fw::EightyCharString &filename
151  ) {
152 
153  if (!this->requireRunMode(STOPPED)) {
155  return;
156  }
157 
158  // If file name is non-empty, load a file.
159  // Empty file name means don't load.
160  if (filename != "") {
161  Fw::CmdStringArg cmdStr(filename);
162  const bool status = this->loadFile(cmdStr);
163  if (!status) {
165  return;
166  }
167  }
168  else if (not this->m_sequence->hasMoreRecords()) {
169  // No sequence loaded
171  this->error();
173  return;
174  }
175 
176  this->m_executedCount = 0;
177 
178  // Check the step mode. If it is auto, start the sequence
179  if (AUTO == this->m_stepMode) {
180  this->m_runMode = RUNNING;
181  this->performCmd_Step();
182  }
183 
185  }
186 
188  FwOpcodeType opCode, U32 cmdSeq) {
189  if (RUNNING == this->m_runMode) {
190  this->performCmd_Cancel();
192  ++this->m_cancelCmdCount;
194  } else {
196  }
197  this->cmdResponse_out(opCode, cmdSeq, Fw::COMMAND_OK);
198  }
199 
200  // ----------------------------------------------------------------------
201  // Private helper methods
202  // ----------------------------------------------------------------------
203 
204  bool CmdSequencerComponentImpl ::
205  loadFile(const Fw::CmdStringArg& fileName)
206  {
207  const bool status = this->m_sequence->loadFile(fileName);
208  if (status) {
209  Fw::LogStringArg& logFileName = this->m_sequence->getLogFileName();
210  this->log_ACTIVITY_LO_CS_SequenceLoaded(logFileName);
211  ++this->m_loadCmdCount;
212  this->tlmWrite_CS_LoadCommands(this->m_loadCmdCount);
213  }
214  return status;
215  }
216 
218  ++this->m_errorCount;
220  }
221 
223  this->m_sequence->reset();
224  this->m_runMode = STOPPED;
225  this->m_cmdTimer.clear();
226  this->m_cmdTimeoutTimer.clear();
227  this->m_executedCount = 0;
228  // write sequence done port with error, if connected
229  if (this->isConnected_seqDone_OutputPort(0)) {
231  }
232 
233  }
234 
237  NATIVE_INT_TYPE portNum,
238  FwOpcodeType opcode,
239  U32 cmdSeq,
240  Fw::CommandResponse response
241  )
242  {
243  if (this->m_runMode == STOPPED) {
244  // Sequencer is not running
246  } else {
247  // clear command timeout
248  this->m_cmdTimeoutTimer.clear();
249  if (response != Fw::COMMAND_OK) {
250  this->commandError(this->m_executedCount, opcode, response);
251  this->performCmd_Cancel();
252  } else if (this->m_runMode == RUNNING && this->m_stepMode == AUTO) {
253  // Auto mode
254  this->commandComplete(opcode);
255  if (not this->m_sequence->hasMoreRecords()) {
256  // No data left
257  this->m_runMode = STOPPED;
258  this->sequenceComplete();
259  } else {
260  this->performCmd_Step();
261  }
262  } else {
263  // Manual step mode
264  this->commandComplete(opcode);
265  if (not this->m_sequence->hasMoreRecords()) {
266  this->m_runMode = STOPPED;
267  this->sequenceComplete();
268  }
269  }
270  }
271  }
272 
275  {
276 
277  Fw::Time currTime = this->getTime();
278  // check to see if a command time is pending
279  if (this->m_cmdTimer.isExpiredAt(currTime)) {
280  this->comCmdOut_out(0, m_record.m_command, 0);
281  this->m_cmdTimer.clear();
282  // start command timeout timer
283  this->setCmdTimeout(currTime);
284  } else if (this->m_cmdTimeoutTimer.isExpiredAt(this->getTime())) { // check for command timeout
287  this->m_executedCount
288  );
289  // If there is a command timeout, cancel the sequence
290  this->performCmd_Cancel();
291  }
292  }
293 
295  CS_START_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
296  {
297  if (not this->m_sequence->hasMoreRecords()) {
298  // No sequence loaded
300  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
301  return;
302  }
303  if (!this->requireRunMode(STOPPED)) {
304  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
305  return;
306  }
307  this->m_runMode = RUNNING;
308  this->performCmd_Step();
310  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK);
311  }
312 
314  CS_STEP_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
315  {
316  if (this->requireRunMode(RUNNING)) {
317  this->performCmd_Step();
318  // check for special case where end of sequence entry was encountered
319  if (this->m_runMode != STOPPED) {
321  this->m_sequence->getLogFileName(),
322  this->m_executedCount
323  );
324  }
325  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK);
326  } else {
327  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
328  }
329  }
330 
332  CS_AUTO_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
333  {
334  if (this->requireRunMode(STOPPED)) {
335  this->m_stepMode = AUTO;
337  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK);
338  } else {
339  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
340  }
341  }
342 
344  CS_MANUAL_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
345  {
346  if (this->requireRunMode(STOPPED)) {
347  this->m_stepMode = MANUAL;
349  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_OK);
350  } else {
351  this->cmdResponse_out(opcode, cmdSeq, Fw::COMMAND_EXECUTION_ERROR);
352  }
353  }
354 
355  // ----------------------------------------------------------------------
356  // Helper methods
357  // ----------------------------------------------------------------------
358 
360  if (this->m_runMode == mode) {
361  return true;
362  } else {
364  return false;
365  }
366  }
367 
370  const U32 number,
371  const U32 opCode,
372  const U32 error
373  )
374  {
376  this->m_sequence->getLogFileName(),
377  number,
378  opCode,
379  error
380  );
381  this->error();
382  }
383 
385 
387  // set clock time base and context from value set when sequence was loaded
388  const Sequence::Header& header = this->m_sequence->getHeader();
391 
392  Fw::Time currentTime = this->getTime();
393  switch (this->m_record.m_descriptor) {
395  this->m_runMode = STOPPED;
396  this->sequenceComplete();
397  break;
399  this->performCmd_Step_RELATIVE(currentTime);
400  break;
402  this->performCmd_Step_ABSOLUTE(currentTime);
403  break;
404  default:
406  }
407  }
408 
411  // reset buffer
412  this->m_sequence->clear();
415  this->m_executedCount = 0;
416  // write sequence done port, if connected
417  if (this->isConnected_seqDone_OutputPort(0)) {
418  this->seqDone_out(0,0,0,Fw::COMMAND_OK);
419  }
420  }
421 
424  this->m_sequence->getLogFileName(),
425  this->m_executedCount,
426  opcode
427  );
428  ++this->m_executedCount;
429  ++this->m_totalExecutedCount;
431  }
432 
435  {
436  this->m_record.m_timeTag.add(currentTime.getSeconds(),currentTime.getUSeconds());
437  this->performCmd_Step_ABSOLUTE(currentTime);
438  }
439 
442  {
443  if (currentTime >= this->m_record.m_timeTag) {
444  this->comCmdOut_out(0, m_record.m_command, 0);
445  this->setCmdTimeout(currentTime);
446  } else {
447  this->m_cmdTimer.set(this->m_record.m_timeTag);
448  }
449  }
450 
453  NATIVE_INT_TYPE portNum,
454  U32 key
455  )
456  {
457  // send ping response
458  this->pingOut_out(0,key);
459  }
460 
462  setCmdTimeout(const Fw::Time &currentTime)
463  {
464  // start timeout timer if enabled and not in step mode
465  if ((this->m_timeout > 0) and (AUTO == this->m_stepMode)) {
466  Fw::Time expTime = currentTime;
467  expTime.add(this->m_timeout,0);
468  this->m_cmdTimeoutTimer.set(expTime);
469  }
470  }
471 
472 }
473 
Svc::CmdSequencerComponentImpl::CmdSequencerComponentImpl
CmdSequencerComponentImpl(const char *compName)
Construct a CmdSequencer.
Definition: CmdSequencerImpl.cpp:29
Svc::CmdSequencerComponentImpl::m_timeout
NATIVE_UINT_TYPE m_timeout
timeout value
Definition: CmdSequencerImpl.hpp:778
Svc::CmdSequencerComponentImpl::m_sequencesCompletedCount
U32 m_sequencesCompletedCount
The total number of sequences completed.
Definition: CmdSequencerImpl.hpp:775
Svc::CmdSequencerComponentImpl::opcode
PRIVATE FwOpcodeType opcode
The command opcode.
Definition: CmdSequencerImpl.hpp:598
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_PortSequenceStarted
void log_ACTIVITY_HI_CS_PortSequenceStarted(Fw::LogStringArg &filename)
Definition: CmdSequencerComponentAc.cpp:3392
Svc::CmdSequencerComponentImpl::Sequence::deallocateBuffer
void deallocateBuffer(Fw::MemAllocator &allocator)
Deallocate the buffer.
Definition: Sequence.cpp:100
Svc::CmdSequencerComponentBase
Auto-generated base for CmdSequencer component.
Definition: CmdSequencerComponentAc.hpp:52
Svc::CmdSequencerComponentImpl::Sequence::Record::m_descriptor
Descriptor m_descriptor
The descriptor.
Definition: CmdSequencerImpl.hpp:230
Fw::Time
Definition: Time.hpp:10
Svc::CmdSequencerComponentImpl::CS_RUN_cmdHandler
void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)
Handler for command CS_RUN.
Definition: CmdSequencerImpl.cpp:94
Svc::CmdSequencerComponentImpl::setTimeout
void setTimeout(NATIVE_UINT_TYPE seconds)
Definition: CmdSequencerImpl.cpp:51
Svc::CmdSequencerComponentImpl::pingIn_handler
void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key)
Handler for ping port.
Definition: CmdSequencerImpl.cpp:452
Fw::CommandResponse
CommandResponse
Definition: CmdResponsePortAc.hpp:24
Svc::CmdSequencerComponentImpl::CS_CANCEL_cmdHandler
void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)
Definition: CmdSequencerImpl.cpp:187
Serializable.hpp
Svc::CmdSequencerComponentBase::tlmWrite_CS_CancelCommands
void tlmWrite_CS_CancelCommands(U32 arg)
Definition: CmdSequencerComponentAc.cpp:1621
Svc::CmdSequencerComponentImpl::m_runMode
RunMode m_runMode
The run mode.
Definition: CmdSequencerImpl.hpp:757
Fw::LogStringArg
Definition: LogString.hpp:11
Svc::CmdSequencerComponentImpl::Sequence::clear
virtual void clear(void)=0
Svc::CmdSequencerComponentImpl::Sequence::Record::END_OF_SEQUENCE
@ END_OF_SEQUENCE
end of sequence
Definition: CmdSequencerImpl.hpp:215
Svc::CmdSequencerComponentBase::log_ACTIVITY_LO_CS_CommandComplete
void log_ACTIVITY_LO_CS_CommandComplete(Fw::LogStringArg &fileName, U32 recordNumber, U32 opCode)
Definition: CmdSequencerComponentAc.cpp:2587
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_SequenceComplete
void log_ACTIVITY_HI_CS_SequenceComplete(Fw::LogStringArg &fileName)
Definition: CmdSequencerComponentAc.cpp:2711
Svc::CmdSequencerComponentBase::tlmWrite_CS_Errors
void tlmWrite_CS_Errors(U32 arg)
Definition: CmdSequencerComponentAc.cpp:1650
Fw::EightyCharString
Definition: EightyCharString.hpp:10
Svc::CmdSequencerComponentImpl::response
PRIVATE FwOpcodeType U32 Fw::CommandResponse response
< The command response
Definition: CmdSequencerImpl.hpp:601
Svc::CmdSequencerComponentImpl::performCmd_Step
void performCmd_Step(void)
Perform a Step command.
Definition: CmdSequencerImpl.cpp:384
Fw::Time::getUSeconds
U32 getUSeconds(void) const
Definition: Time.cpp:138
Svc::CmdSequencerComponentBase::tlmWrite_CS_SequencesCompleted
void tlmWrite_CS_SequencesCompleted(U32 arg)
Definition: CmdSequencerComponentAc.cpp:1708
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_ModeSwitched
void log_ACTIVITY_HI_CS_ModeSwitched(SeqMode mode)
Definition: CmdSequencerComponentAc.cpp:3578
Svc::CmdSequencerComponentBase::pingOut_out
void pingOut_out(NATIVE_INT_TYPE portNum, U32 key)
Definition: CmdSequencerComponentAc.cpp:758
Svc::CmdSequencerComponentBase::log_WARNING_HI_CS_SequenceTimeout
void log_WARNING_HI_CS_SequenceTimeout(Fw::LogStringArg &filename, U32 command)
Definition: CmdSequencerComponentAc.cpp:3843
Svc::CmdSequencerComponentBase::seqDone_out
void seqDone_out(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)
Definition: CmdSequencerComponentAc.cpp:768
Svc::CmdSequencerComponentImpl::Sequence::loadFile
virtual bool loadFile(const Fw::CmdStringArg &fileName)=0
Svc::CmdSequencerComponentImpl::requireRunMode
bool requireRunMode(RunMode mode)
Definition: CmdSequencerImpl.cpp:359
Fw::CmdStringArg
Definition: CmdString.hpp:11
Svc::CmdSequencerComponentImpl::m_totalExecutedCount
U32 m_totalExecutedCount
The total number of commands executed across all sequences.
Definition: CmdSequencerImpl.hpp:772
Assert.hpp
Svc::CmdSequencerComponentImpl::Sequence::Record::ABSOLUTE
@ ABSOLUTE
Absolute time.
Definition: CmdSequencerImpl.hpp:213
Svc::CmdSequencerComponentBase::log_WARNING_LO_CS_NoSequenceActive
void log_WARNING_LO_CS_NoSequenceActive(void)
Definition: CmdSequencerComponentAc.cpp:3676
Svc::CmdSequencerComponentBase::cmdResponseIn_handler
virtual void cmdResponseIn_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)=0
Handler for input port cmdResponseIn.
Svc::CmdSequencerComponentImpl::CS_START_cmdHandler
void CS_START_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
Definition: CmdSequencerImpl.cpp:295
Svc::CmdSequencerComponentImpl::Sequence::Header::m_timeContext
FwTimeContextStoreType m_timeContext
The context of the sequence.
Definition: CmdSequencerImpl.hpp:200
Svc::CmdSequencerComponentImpl::allocateBuffer
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
Definition: CmdSequencerImpl.cpp:62
Svc::CmdSequencerComponentImpl::Sequence::reset
virtual void reset(void)=0
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Svc::CmdSequencerComponentImpl::CS_MANUAL_cmdHandler
void CS_MANUAL_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
Definition: CmdSequencerImpl.cpp:344
Svc::CmdSequencerComponentBase::SEQ_AUTO_MODE
@ SEQ_AUTO_MODE
Definition: CmdSequencerComponentAc.hpp:905
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_CmdStepped
void log_ACTIVITY_HI_CS_CmdStepped(Fw::LogStringArg &filename, U32 command)
Definition: CmdSequencerComponentAc.cpp:3949
Svc::CmdSequencerComponentImpl::sequenceComplete
void sequenceComplete(void)
Record a sequence complete event.
Definition: CmdSequencerImpl.cpp:409
SerialBuffer.hpp
Fw::COMMAND_EXECUTION_ERROR
@ COMMAND_EXECUTION_ERROR
Definition: CmdResponsePortAc.hpp:29
Svc::CmdSequencerComponentImpl::Sequence::Record::RELATIVE
@ RELATIVE
Relative time.
Definition: CmdSequencerImpl.hpp:214
Svc::CmdSequencerComponentImpl::Sequence::Record::m_command
Fw::ComBuffer m_command
The command.
Definition: CmdSequencerImpl.hpp:236
Svc::CmdSequencerComponentImpl::cmdSeq
PRIVATE FwOpcodeType U32 cmdSeq
The command sequence number.
Definition: CmdSequencerImpl.hpp:599
Svc::CmdSequencerComponentImpl::Sequence::allocateBuffer
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
Give the sequence representation a memory buffer.
Definition: Sequence.cpp:79
Svc::CmdSequencerComponentBase::log_WARNING_HI_CS_UnexpectedCompletion
void log_WARNING_HI_CS_UnexpectedCompletion(U32 opcode)
Definition: CmdSequencerComponentAc.cpp:3480
Svc::CmdSequencerComponentBase::CS_AUTO_cmdHandler
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Handler for command CS_AUTO.
FwOpcodeType
#define FwOpcodeType
Type representation for a command opcode.
Definition: FpConfig.hpp:62
Svc::CmdSequencerComponentImpl::commandError
void commandError(const U32 number, const U32 opCode, const U32 error)
Record an error in executing a sequence command.
Definition: CmdSequencerImpl.cpp:369
Svc::CmdSequencerComponentBase::log_WARNING_HI_CS_CommandError
void log_WARNING_HI_CS_CommandError(Fw::LogStringArg &fileName, U32 recordNumber, U32 opCode, U32 errorStatus)
Definition: CmdSequencerComponentAc.cpp:2799
Svc::CmdSequencerComponentBase::isConnected_seqDone_OutputPort
bool isConnected_seqDone_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CmdSequencerComponentAc.cpp:982
Svc::CmdSequencerComponentImpl::m_executedCount
U32 m_executedCount
The number of commands executed in this sequence.
Definition: CmdSequencerImpl.hpp:769
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Fw::Time::setTimeBase
void setTimeBase(TimeBase timeBase)
Definition: Time.cpp:246
Svc::CmdSequencerComponentImpl::deallocateBuffer
void deallocateBuffer(Fw::MemAllocator &allocator)
Return allocated buffer. Call during shutdown.
Definition: CmdSequencerImpl.cpp:81
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_SequenceCanceled
void log_ACTIVITY_HI_CS_SequenceCanceled(Fw::LogStringArg &fileName)
Definition: CmdSequencerComponentAc.cpp:1845
Svc::CmdSequencerComponentImpl::m_cmdTimeoutTimer
Timer m_cmdTimeoutTimer
timeout timer
Definition: CmdSequencerImpl.hpp:781
FW_ASSERT
#define FW_ASSERT(...)
Definition: Assert.hpp:9
Svc::CmdSequencerComponentImpl::performCmd_Step_ABSOLUTE
void performCmd_Step_ABSOLUTE(Fw::Time &currentTime)
Perform a Step command with an absolute time.
Definition: CmdSequencerImpl.cpp:441
Svc::CmdSequencerComponentImpl::Sequence::getHeader
const Header & getHeader(void) const
Get the sequence header.
Definition: Sequence.cpp:111
Fw::MemAllocator
Definition: MemAllocator.hpp:44
Svc::CmdSequencerComponentImpl::Sequence::Header
A sequence header.
Definition: CmdSequencerImpl.hpp:162
Svc::CmdSequencerComponentImpl::m_stepMode
StepMode m_stepMode
The step mode.
Definition: CmdSequencerImpl.hpp:760
Svc::CmdSequencerComponentImpl::error
void error(void)
Record an error.
Definition: CmdSequencerImpl.cpp:217
Svc::CmdSequencerComponentImpl::performCmd_Step_RELATIVE
void performCmd_Step_RELATIVE(Fw::Time &currentTime)
Perform a Step command with a relative time.
Definition: CmdSequencerImpl.cpp:434
Fw::Time::getSeconds
U32 getSeconds(void) const
Definition: Time.cpp:134
Svc::CmdSequencerComponentBase::fileName
PROTECTED U32 const Fw::CmdStringArg & fileName
Definition: CmdSequencerComponentAc.hpp:671
Svc::CmdSequencerComponentImpl::performCmd_Cancel
void performCmd_Cancel(void)
Perform a Cancel command.
Definition: CmdSequencerImpl.cpp:222
Svc::CmdSequencerComponentImpl::CS_VALIDATE_cmdHandler
void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)
Definition: CmdSequencerImpl.cpp:121
Svc::CmdSequencerComponentImpl::CS_STEP_cmdHandler
void CS_STEP_cmdHandler(FwOpcodeType opcode, U32 cmdSeq)
Definition: CmdSequencerImpl.cpp:314
Svc::CmdSequencerComponentImpl::~CmdSequencerComponentImpl
~CmdSequencerComponentImpl(void)
Destroy a CmdDispatcherComponentBase.
Definition: CmdSequencerImpl.cpp:86
Svc::CmdSequencerComponentImpl::m_errorCount
U32 m_errorCount
The number of errors.
Definition: CmdSequencerImpl.hpp:754
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_CmdStarted
void log_ACTIVITY_HI_CS_CmdStarted(Fw::LogStringArg &filename)
Definition: CmdSequencerComponentAc.cpp:4055
Svc::CmdSequencerComponentImpl::m_cancelCmdCount
U32 m_cancelCmdCount
The number of Cancel commands executed.
Definition: CmdSequencerImpl.hpp:751
lib_crc.h
Svc::CmdSequencerComponentImpl::m_loadCmdCount
U32 m_loadCmdCount
The number of Load commands executed.
Definition: CmdSequencerImpl.hpp:748
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::CmdSequencerComponentImpl::m_sequence
Sequence * m_sequence
The abstract sequence.
Definition: CmdSequencerImpl.hpp:745
Svc::CmdSequencerComponentImpl::m_cmdTimer
Timer m_cmdTimer
The command time timer.
Definition: CmdSequencerImpl.hpp:766
Svc::CmdSequencerComponentImpl::Sequence::getLogFileName
Fw::LogStringArg & getLogFileName(void)
Definition: Sequence.cpp:130
Svc::CmdSequencerComponentBase::SEQ_STEP_MODE
@ SEQ_STEP_MODE
Definition: CmdSequencerComponentAc.hpp:904
Svc::CmdSequencerComponentImpl::m_record
Sequence::Record m_record
The sequence record currently being processed.
Definition: CmdSequencerImpl.hpp:763
Svc::CmdSequencerComponentImpl::Sequence::Header::m_timeBase
TimeBase m_timeBase
The time base of the sequence.
Definition: CmdSequencerImpl.hpp:197
Fw::COMMAND_OK
@ COMMAND_OK
Definition: CmdResponsePortAc.hpp:25
Svc::CmdSequencerComponentBase::tlmWrite_CS_CommandsExecuted
void tlmWrite_CS_CommandsExecuted(U32 arg)
Definition: CmdSequencerComponentAc.cpp:1679
Svc::CmdSequencerComponentImpl::Sequence::nextRecord
virtual void nextRecord(Record &record)=0
CmdSequencerImpl.hpp
Fw::Time::setTimeContext
void setTimeContext(FwTimeContextStoreType context)
Definition: Time.cpp:250
Fw::Time::add
static Time add(Time &a, Time &b)
Definition: Time.cpp:188
Svc::CmdSequencerComponentImpl::Sequence
A sequence with unspecified binary format.
Definition: CmdSequencerImpl.hpp:52
Svc::CmdSequencerComponentImpl::setCmdTimeout
void setCmdTimeout(const Fw::Time &currentTime)
Set command timeout timer.
Definition: CmdSequencerImpl.cpp:462
Svc::CmdSequencerComponentImpl::Sequence::Record::m_timeTag
Fw::Time m_timeTag
The time tag. NOTE: timeBase and context not filled in.
Definition: CmdSequencerImpl.hpp:233
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::CmdSequencerComponentImpl::Sequence::hasMoreRecords
virtual bool hasMoreRecords(void) const =0
Svc::CmdSequencerComponentImpl::commandComplete
void commandComplete(const U32 opCode)
Record a completed command.
Definition: CmdSequencerImpl.cpp:422
Svc::CmdSequencerComponentImpl::schedIn_handler
void schedIn_handler(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE order)
Handler for input port schedIn.
Definition: CmdSequencerImpl.cpp:274
Svc::CmdSequencerComponentImpl::setSequenceFormat
void setSequenceFormat(Sequence &sequence)
Definition: CmdSequencerImpl.cpp:56
ComPacket.hpp
Svc::CmdSequencerComponentBase::log_WARNING_HI_CS_InvalidMode
void log_WARNING_HI_CS_InvalidMode(void)
Definition: CmdSequencerComponentAc.cpp:2941
Svc::CmdSequencerComponentImpl::seqRunIn_handler
void seqRunIn_handler(NATIVE_INT_TYPE portNum, Fw::EightyCharString &filename)
Handler for input port seqRunIn.
Definition: CmdSequencerImpl.cpp:148
Svc::CmdSequencerComponentImpl::loadSequence
void loadSequence(const Fw::EightyCharString &fileName)
Definition: CmdSequencerImpl.cpp:72
Svc::CmdSequencerComponentBase::log_ACTIVITY_HI_CS_SequenceValid
void log_ACTIVITY_HI_CS_SequenceValid(Fw::LogStringArg &filename)
Definition: CmdSequencerComponentAc.cpp:3755