19 FwIndexType SeqDispatcher::getNextAvailableSequencerIdx() {
29 void SeqDispatcher::runSequence(
FwIndexType sequencerIdx,
36 static_cast<FwAssertArgType>(sequencerIdx));
39 static_cast<FwAssertArgType>(this->m_entryTable[sequencerIdx].state));
47 this->m_sequencersAvailable--;
49 this->m_entryTable[sequencerIdx].sequenceRunning = fileName;
51 this->m_dispatchedCount++;
53 this->
seqRunOut_out(sequencerIdx, this->m_entryTable[sequencerIdx].sequenceRunning, args);
65 if (this->m_entryTable[portNum].sequenceRunning != fileName) {
70 this->m_entryTable[portNum].sequenceRunning);
71 this->m_entryTable[portNum].sequenceRunning = fileName;
82 this->m_entryTable[portNum].sequenceRunning = fileName;
83 this->m_sequencersAvailable--;
107 this->m_entryTable[portNum].sequenceRunning =
"<no seq>";
114 this->
cmdResponse_out(this->m_entryTable[portNum].opCode, this->m_entryTable[portNum].cmdSeq, response);
118 this->m_errorCount++;
127 this->m_entryTable[portNum].sequenceRunning =
"<no seq>";
128 this->m_sequencersAvailable++;
134 FwIndexType idx = this->getNextAvailableSequencerIdx();
148 void SeqDispatcher ::RUN_cmdHandler(
const FwOpcodeType opCode,
154 this->RUN_ARGS_cmdHandler(opCode, cmdSeq, fileName, block, emptyArgs);
158 void SeqDispatcher ::RUN_ARGS_cmdHandler(
const FwOpcodeType opCode,
161 const BlockState& block,
163 FwIndexType idx = this->getNextAvailableSequencerIdx();
171 this->runSequence(idx, fileName, block, buffer);
179 this->m_entryTable[idx].opCode = opCode;
180 this->m_entryTable[idx].cmdSeq = cmdSeq;
184 void SeqDispatcher::LOG_STATUS_cmdHandler(
const FwOpcodeType opCode,
193 void SeqDispatcher::CANCEL_NAME_cmdHandler(
197 bool canceled =
false;
201 if (running && this->m_entryTable[idx].sequenceRunning == fileName) {
224 void SeqDispatcher::CANCEL_ALL_cmdHandler(
const FwOpcodeType opCode,
void tlmWrite_sequencersAvailable(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_errorCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
FwIdType FwOpcodeType
The type of a command opcode.
bool isConnected_seqRunOut_OutputPort(FwIndexType portNum) const
void seqDoneIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler for input port seqDoneIn.
Enum representing a command response.
void tlmWrite_canceledCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_seqCancelOut_OutputPort(FwIndexType portNum) const
void log_WARNING_LO_CancelSequenceNotFound(const Fw::StringBase &filename) const
Log event CancelSequenceNotFound.
void log_WARNING_LO_UnknownSequenceFinished(U16 idx) const
Log event UnknownSequenceFinished.
Sequencer blocking state.
void seqRunOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqRunOut.
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &fileName, const Svc::SeqArgs &args)
Handler for input port seqRunIn.
void log_WARNING_LO_UnexpectedSequenceStarted(U16 idx, const Fw::StringBase &newSequence) const
Log event UnexpectedSequenceStarted.
Command successfully executed.
void seqStartIn_handler(FwIndexType portNum, const Fw::StringBase &fileName, const Svc::SeqArgs &args)
Handler for input port seqStartIn.
SeqDispatcher(const char *const compName)
void log_WARNING_HI_NoAvailableSequencers() const
Log event NoAvailableSequencers.
Command had execution error.
void log_ACTIVITY_LO_LogSequencerStatus(U16 idx, const Svc::SeqDispatcher_CmdSequencerState &state, const Fw::StringBase &filename) const
Log event LogSequencerStatus.
A read-only abstract superclass for StringBase.
PlatformIndexType FwIndexType
Auto-generated base for SeqDispatcher component.
RateGroupDivider component implementation.
void seqCancelOut_out(FwIndexType portNum) const
Invoke output port seqCancelOut.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_ACTIVITY_HI_SequenceCanceled(U16 idx, const Fw::StringBase &filename) const
Log event SequenceCanceled.
void log_WARNING_HI_ConflictingSequenceStarted(U16 idx, const Fw::StringBase &newSequence, const Fw::StringBase &sequenceInInternalState) const
Log event ConflictingSequenceStarted.
void tlmWrite_dispatchedCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const