11 #ifndef Svc_CmdSequencerImpl_HPP
12 #define Svc_CmdSequencerImpl_HPP
92 const U32 recordNumber,
307 INITIAL_COMPUTED_VALUE = 0xFFFFFFFFU
390 bool deserializeHeader();
394 bool readRecordsAndCRC();
437 bool validateRecords();
480 this->expirationTime = time;
485 this->m_state = CLEAR;
493 if (this->m_state == CLEAR) {
570 void cmdResponseIn_handler(
578 void schedIn_handler(
584 void seqRunIn_handler(
597 void seqCancelIn_handler(
609 void CS_AUTO_cmdHandler(
616 void CS_CANCEL_cmdHandler(
623 void CS_MANUAL_cmdHandler(
629 void CS_RUN_cmdHandler(
638 void CS_START_cmdHandler(
646 void CS_STEP_cmdHandler(
653 void CS_VALIDATE_cmdHandler(
663 void CS_JOIN_WAIT_cmdHandler(
681 void performCmd_Cancel();
684 void performCmd_Step();
687 void performCmd_Step_RELATIVE(
692 void performCmd_Step_ABSOLUTE(
697 void commandComplete(
702 void sequenceComplete();
732 FPrimeSequence m_FPrimeSequence;
735 Sequence *m_sequence;
741 U32 m_cancelCmdCount;
753 Sequence::Record m_record;
762 U32 m_totalExecutedCount;
765 U32 m_sequencesCompletedCount;
771 Timer m_cmdTimeoutTimer;
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
U8 FwTimeContextStoreType
Defines a base class for a memory allocator for classes.
Defines a file class to validate files or generate a file validator file.
Enum representing a command response.
External serialize buffer with no copy semantics.
static Comparison compare(const Time &time1, const Time &time2)
Sequencer blocking state.
Auto-generated base for CmdSequencer component.
A sequence that uses the F Prime binary format.
FPrimeSequence(CmdSequencerComponentImpl &component)
Construct an FPrimeSequence.
bool loadFile(const Fw::StringBase &fileName)
void nextRecord(Record &record)
bool hasMoreRecords() const
Sequence event reporting.
void recordMismatch(const U32 numRecords, const U32 extraBytes)
Record mismatch.
void fileNotFound()
File not found.
void timeBaseMismatch(const TimeBase currTimeBase, const TimeBase seqTimeBase)
Time base mismatch.
void fileSizeError(const U32 size)
File size error.
void fileReadError()
File read error.
void fileCRCFailure(const U32 storedCRC, const U32 computedCRC)
File CRC failure.
Events(Sequence &sequence)
Construct an Events object.
void timeContextMismatch(const FwTimeContextStoreType currTimeContext, const FwTimeContextStoreType seqTimeContext)
Time context mismatch.
void recordInvalid(const U32 recordNumber, const I32 error)
Record invalid.
void fileInvalid(const CmdSequencer_FileReadStage::t stage, const I32 error)
File invalid.
@ END_OF_SEQUENCE
end of sequence
Fw::ComBuffer m_command
The command.
Descriptor m_descriptor
The descriptor.
Record()
Construct a Record object.
Fw::Time m_timeTag
The time tag. NOTE: timeBase and context not filled in.
A sequence with unspecified binary format.
Events m_events
Event reporting.
void allocateBuffer(NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, NATIVE_UINT_TYPE bytes)
Give the sequence representation a memory buffer.
Header m_header
The sequence header.
Fw::String & getStringFileName()
virtual bool loadFile(const Fw::StringBase &fileName)=0
Fw::CmdStringArg & getFileName()
Fw::LogStringArg m_logFileName
Copy of file name for events.
virtual void nextRecord(Record &record)=0
Fw::ExternalSerializeBuffer m_buffer
Serialize buffer to hold the binary sequence data.
void deallocateBuffer(Fw::MemAllocator &allocator)
Deallocate the buffer.
virtual bool hasMoreRecords() const =0
void setFileName(const Fw::StringBase &fileName)
Set the file name. Also sets the log file name.
CmdSequencerComponentImpl & m_component
The enclosing component.
NATIVE_INT_TYPE m_allocatorId
The allocator ID.
const Header & getHeader() const
Get the sequence header.
Fw::String m_stringFileName
Copy of file name for ports.
Fw::LogStringArg & getLogFileName()
Sequence(CmdSequencerComponentImpl &component)
Construct a Sequence object.
virtual ~Sequence()
Destroy a Sequence object.
Fw::CmdStringArg m_fileName
The sequence file name.
~CmdSequencerComponentImpl()
Destroy a CmdDispatcherComponentBase.
void deallocateBuffer(Fw::MemAllocator &allocator)
Return allocated buffer. Call during shutdown.
CmdSequencerComponentImpl(const char *compName)
Construct a CmdSequencer.
void setTimeout(const NATIVE_UINT_TYPE seconds)
void loadSequence(const Fw::StringBase &fileName)
void setSequenceFormat(Sequence &sequence)
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
SerializeStatus
forward declaration for string
Container for computed and stored CRC values.
void finalize()
Finalize computed CRC.
void init()
Initialize computed CRC.
U32 m_computed
Computed CRC.
void update(const BYTE *buffer, NATIVE_UINT_TYPE bufferSize)
Update computed CRC.