20 FwIndexType SeqDispatcher::getNextAvailableSequencerIdx() {
30 void SeqDispatcher::runSequence(
FwIndexType sequencerIdx,
36 static_cast<FwAssertArgType>(sequencerIdx));
38 FW_ASSERT(this->m_entryTable[sequencerIdx].state ==
40 static_cast<FwAssertArgType>(this->m_entryTable[sequencerIdx].state));
43 this->m_entryTable[sequencerIdx].state =
46 this->m_entryTable[sequencerIdx].state =
50 this->m_sequencersAvailable--;
52 this->m_entryTable[sequencerIdx].sequenceRunning = fileName;
54 this->m_dispatchedCount++;
57 this->m_entryTable[sequencerIdx].sequenceRunning);
65 static_cast<FwAssertArgType>(portNum));
66 if (this->m_entryTable[portNum].state ==
68 this->m_entryTable[portNum].state ==
71 if (this->m_entryTable[portNum].sequenceRunning != fileName) {
76 this->m_entryTable[portNum].sequenceRunning = fileName;
86 this->m_entryTable[portNum].state =
88 this->m_entryTable[portNum].sequenceRunning = fileName;
89 this->m_sequencersAvailable--;
101 static_cast<FwAssertArgType>(portNum));
102 if (this->m_entryTable[portNum].state !=
104 this->m_entryTable[portNum].state !=
117 if (this->m_entryTable[portNum].state ==
122 this->m_entryTable[portNum].cmdSeq, response);
126 this->m_errorCount++;
135 this->m_entryTable[portNum].sequenceRunning =
"<no seq>";
136 this->m_sequencersAvailable++;
143 FwIndexType idx = this->getNextAvailableSequencerIdx();
156 void SeqDispatcher ::RUN_cmdHandler(
const FwOpcodeType opCode,
160 FwIndexType idx = this->getNextAvailableSequencerIdx();
168 this->runSequence(idx, fileName, block);
176 this->m_entryTable[idx].opCode = opCode;
177 this->m_entryTable[idx].cmdSeq = cmdSeq;
181 void SeqDispatcher::LOG_STATUS_cmdHandler(
void tlmWrite_sequencersAvailable(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void tlmWrite_errorCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
Wait or don't wait for something.
void seqDoneIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler for input port seqDoneIn.
Enum representing a command response.
void log_WARNING_LO_UnknownSequenceFinished(U16 idx) const
Log event UnknownSequenceFinished.
void log_ACTIVITY_LO_LogSequencerStatus(U16 idx, Svc::SeqDispatcher_CmdSequencerState state, const Fw::StringBase &filename) const
Log event LogSequencerStatus.
U32 FwOpcodeType
The type of a command opcode.
void log_WARNING_LO_UnexpectedSequenceStarted(U16 idx, const Fw::StringBase &newSequence) const
Log event UnexpectedSequenceStarted.
Command successfully executed.
SeqDispatcher(const char *const compName)
void log_WARNING_HI_NoAvailableSequencers() const
Log event NoAvailableSequencers.
Command had execution error.
void seqRunOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqRunOut.
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &fileName)
Handler for input port seqRunIn.
bool isConnected_seqRunOut_OutputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
Auto-generated base for SeqDispatcher component.
RateGroupDivider component implementation.
Don't wait for something.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void seqStartIn_handler(FwIndexType portNum, const Fw::StringBase &fileName)
Handler for input port seqStartIn.
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