 |
F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
11 #ifndef Svc_CmdSequencerImpl_HPP
12 #define Svc_CmdSequencerImpl_HPP
18 #include "Svc/CmdSequencer/CmdSequencerComponentAc.hpp"
23 public CmdSequencerComponentBase
75 const CmdSequencer_FileReadStage::t stage,
92 const U32 recordNumber,
260 virtual void reset() = 0;
264 virtual void clear() = 0;
300 INITIAL_COMPUTED_VALUE = 0xFFFFFFFFU
383 bool deserializeHeader();
387 bool readRecordsAndCRC();
430 bool validateRecords();
473 this->expirationTime = time;
478 this->m_state = CLEAR;
486 if (this->m_state == CLEAR) {
569 void cmdResponseIn_handler(
573 const Fw::CmdResponse& response
577 void schedIn_handler(
583 void seqRunIn_handler(
596 void seqCancelIn_handler(
608 void CS_AUTO_cmdHandler(
615 void CS_CANCEL_cmdHandler(
622 void CS_MANUAL_cmdHandler(
628 void CS_RUN_cmdHandler(
632 Svc::CmdSequencer_BlockState block
637 void CS_START_cmdHandler(
645 void CS_STEP_cmdHandler(
652 void CS_VALIDATE_cmdHandler(
662 void CS_JOIN_WAIT_cmdHandler(
680 void performCmd_Cancel();
683 void performCmd_Step();
686 void performCmd_Step_RELATIVE(
691 void performCmd_Step_ABSOLUTE(
696 void commandComplete(
701 void sequenceComplete();
731 FPrimeSequence m_FPrimeSequence;
734 Sequence *m_sequence;
740 U32 m_cancelCmdCount;
752 Sequence::Record m_record;
761 U32 m_totalExecutedCount;
764 U32 m_sequencesCompletedCount;
770 Timer m_cmdTimeoutTimer;
773 Svc::CmdSequencer_BlockState::t m_blockState;
CmdSequencerComponentImpl(const char *compName)
Construct a CmdSequencer.
Sequence(CmdSequencerComponentImpl &component)
Construct a Sequence object.
NATIVE_INT_TYPE m_allocatorId
The allocator ID.
bool hasMoreRecords() const
void deallocateBuffer(Fw::MemAllocator &allocator)
Deallocate the buffer.
void setTimeout(const NATIVE_UINT_TYPE seconds)
Descriptor m_descriptor
The descriptor.
Header m_header
The sequence header.
virtual ~Sequence()
Destroy a Sequence object.
SerializeStatus
forward declaration for string
U32 m_computed
Computed CRC.
void init()
Initialize computed CRC.
void timeBaseMismatch(const TimeBase currTimeBase, const TimeBase seqTimeBase)
Time base mismatch.
Defines a base class for a memory allocator for classes.
@ END_OF_SEQUENCE
end of sequence
void fileInvalid(const CmdSequencer_FileReadStage::t stage, const I32 error)
File invalid.
Fw::CmdStringArg m_fileName
The sequence file name.
Events(Sequence &sequence)
Construct an Events object.
void fileCRCFailure(const U32 storedCRC, const U32 computedCRC)
File CRC failure.
Defines a file class to validate files or generate a file validator file.
void fileSizeError(const U32 size)
File size error.
CmdSequencerComponentImpl & m_component
The enclosing component.
virtual bool loadFile(const Fw::CmdStringArg &fileName)=0
Fw::CmdStringArg & getFileName()
Fw::LogStringArg & getLogFileName()
Fw::LogStringArg m_logFileName
Copy of file name for events.
bool loadFile(const Fw::CmdStringArg &fileName)
const Header & getHeader() const
Get the sequence header.
void loadSequence(const Fw::String &fileName)
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
Container for computed and stored CRC values.
A sequence that uses the F Prime binary format.
void fileNotFound()
File not found.
Fw::ComBuffer m_command
The command.
void timeContextMismatch(const FwTimeContextStoreType currTimeContext, const FwTimeContextStoreType seqTimeContext)
Time context mismatch.
void recordMismatch(const U32 numRecords, const U32 extraBytes)
Record mismatch.
void nextRecord(Record &record)
void deallocateBuffer(Fw::MemAllocator &allocator)
Return allocated buffer. Call during shutdown.
static Comparison compare(const Time &time1, const Time &time2)
Sequence event reporting.
void setFileName(const Fw::CmdStringArg &fileName)
Set the file name. Also sets the log file name.
FPrimeSequence(CmdSequencerComponentImpl &component)
Construct an FPrimeSequence.
void init(const NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance)
Initialize a CmdSequencer.
~CmdSequencerComponentImpl()
Destroy a CmdDispatcherComponentBase.
virtual bool hasMoreRecords() const =0
void finalize()
Finalize computed CRC.
Events m_events
Event reporting.
void fileReadError()
File read error.
Record()
Construct a Record object.
virtual void nextRecord(Record &record)=0
void recordInvalid(const U32 recordNumber, const I32 error)
Record invalid.
Fw::ExternalSerializeBuffer m_buffer
Serialize buffer to hold the binary sequence data.
A sequence with unspecified binary format.
Fw::Time m_timeTag
The time tag. NOTE: timeBase and context not filled in.
void allocateBuffer(NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, NATIVE_UINT_TYPE bytes)
Give the sequence representation a memory buffer.
void update(const BYTE *buffer, NATIVE_UINT_TYPE bufferSize)
Update computed CRC.
void setSequenceFormat(Sequence &sequence)