 |
F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
13 #ifndef Svc_CmdSequencerImpl_HPP
14 #define Svc_CmdSequencerImpl_HPP
20 #include "Svc/CmdSequencer/CmdSequencerComponentAc.hpp"
25 public CmdSequencerComponentBase
78 static CmdSequencerComponentImpl::FileReadStage
119 const U32 recordNumber,
125 const U32 numRecords,
287 virtual void reset(
void) = 0;
291 virtual void clear(
void) = 0;
327 INITIAL_COMPUTED_VALUE = 0xFFFFFFFFU
401 bool readOpenFile(
void);
406 bool readHeader(
void);
410 bool deserializeHeader(
void);
414 bool readRecordsAndCRC(
void);
418 bool extractCRC(
void);
422 bool validateCRC(
void);
457 bool validateRecords(
void);
500 this->expirationTime = time;
505 this->m_state = CLEAR;
513 if (this->m_state == CLEAR) {
596 void cmdResponseIn_handler(
600 Fw::CommandResponse response
604 void schedIn_handler(
610 void seqRunIn_handler(
629 void CS_AUTO_cmdHandler(
636 void CS_CANCEL_cmdHandler(
643 void CS_MANUAL_cmdHandler(
649 void CS_RUN_cmdHandler(
657 void CS_START_cmdHandler(
665 void CS_STEP_cmdHandler(
672 void CS_VALIDATE_cmdHandler(
691 void performCmd_Cancel(
void);
694 void performCmd_Step(
void);
697 void performCmd_Step_RELATIVE(
702 void performCmd_Step_ABSOLUTE(
707 void commandComplete(
712 void sequenceComplete(
void);
742 FPrimeSequence m_FPrimeSequence;
745 Sequence *m_sequence;
751 U32 m_cancelCmdCount;
763 Sequence::Record m_record;
772 U32 m_totalExecutedCount;
775 U32 m_sequencesCompletedCount;
781 Timer m_cmdTimeoutTimer;
CmdSequencerComponentImpl(const char *compName)
Construct a CmdSequencer.
Sequence(CmdSequencerComponentImpl &component)
Construct a Sequence object.
NATIVE_INT_TYPE m_allocatorId
The allocator ID.
void deallocateBuffer(Fw::MemAllocator &allocator)
Deallocate the buffer.
Record(void)
Construct a Record object.
Descriptor m_descriptor
The descriptor.
Header m_header
The sequence header.
void setTimeout(NATIVE_UINT_TYPE seconds)
SerializeStatus
forward declaration for string
U32 m_computed
Computed CRC.
virtual void clear(void)=0
Defines a base class for a memory allocator for classes.
@ END_OF_SEQUENCE
end of sequence
Fw::CmdStringArg m_fileName
The sequence file name.
Events(Sequence &sequence)
Construct an Events object.
void fileInvalid(const FileReadStage::t stage, const I32 error)
File invalid.
virtual ~Sequence(void)
Destroy a Sequence 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
static CmdSequencerComponentImpl::FileReadStage toComponentEnum(const t fileReadStage)
Convert FileReadStage::t to CmdSequencerComponentImpl::FileReadStage.
void fileReadError(void)
File read error.
#define FwTimeContextStoreType
Storage conversion for time context in scripts/ground interface.
Fw::LogStringArg m_logFileName
Copy of file name for events.
bool loadFile(const Fw::CmdStringArg &fileName)
void fileNotFound(void)
File not found.
bool hasMoreRecords(void) const
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
virtual void reset(void)=0
File read stage for error reporting.
Container for computed and stored CRC values.
A sequence that uses the F Prime binary format.
Fw::ComBuffer m_command
The command.
void timeContextMismatch(const FwTimeContextStoreType currTimeContext, const FwTimeContextStoreType seqTimeContext)
Time context mismatch.
Fw::CmdStringArg & getFileName(void)
void recordMismatch(const U32 numRecords, const U32 extraBytes)
Record mismatch.
void allocateBuffer(const NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, const NATIVE_UINT_TYPE bytes)
Give the sequence representation a memory buffer.
#define FwOpcodeType
Type representation for a command opcode.
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
void nextRecord(Record &record)
void deallocateBuffer(Fw::MemAllocator &allocator)
Return allocated buffer. Call during shutdown.
CRC(void)
Construct a CRC.
void timeBaseMismatch(const FwTimeBaseStoreType currTimeBase, const FwTimeBaseStoreType seqTimeBase)
Time base mismatch.
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.
const Header & getHeader(void) const
Get the sequence header.
FPrimeSequence(CmdSequencerComponentImpl &component)
Construct an FPrimeSequence.
void init(const NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance)
Initialize a CmdSequencer.
#define FwTimeBaseStoreType
Storage conversion for time base in scripts/ground interface.
Events m_events
Event reporting.
~CmdSequencerComponentImpl(void)
Destroy a CmdDispatcherComponentBase.
void init(void)
Initialize computed CRC.
void finalize(void)
Finalize computed CRC.
Fw::LogStringArg & getLogFileName(void)
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.
int NATIVE_INT_TYPE
native integer type declaration
virtual bool hasMoreRecords(void) const =0
void update(const BYTE *buffer, NATIVE_UINT_TYPE bufferSize)
Update computed CRC.
void setSequenceFormat(Sequence &sequence)
void loadSequence(const Fw::EightyCharString &fileName)