20 FwIndexType SeqDispatcher::getNextAvailableSequencerIdx() {
30 void SeqDispatcher::runSequence(
FwIndexType sequencerIdx,
38 FW_ASSERT(this->m_entryTable[sequencerIdx].state ==
40 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 if (this->m_entryTable[portNum].state ==
67 this->m_entryTable[portNum].state ==
70 if (this->m_entryTable[portNum].sequenceRunning != fileName) {
75 this->m_entryTable[portNum].sequenceRunning = fileName;
85 this->m_entryTable[portNum].state =
87 this->m_entryTable[portNum].sequenceRunning = fileName;
88 this->m_sequencersAvailable--;
100 if (this->m_entryTable[portNum].state !=
102 this->m_entryTable[portNum].state !=
115 if (this->m_entryTable[portNum].state ==
120 this->m_entryTable[portNum].cmdSeq, response);
124 this->m_errorCount++;
133 this->m_entryTable[portNum].sequenceRunning =
"<no seq>";
134 this->m_sequencersAvailable++;
141 FwIndexType idx = this->getNextAvailableSequencerIdx();
154 void SeqDispatcher ::RUN_cmdHandler(
const FwOpcodeType opCode,
158 FwIndexType idx = this->getNextAvailableSequencerIdx();
166 this->runSequence(idx, fileName, block);
174 this->m_entryTable[idx].opCode = opCode;
175 this->m_entryTable[idx].cmdSeq = cmdSeq;
179 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 seqStartIn_handler(NATIVE_INT_TYPE portNum, const Fw::StringBase &fileName)
Handler for input port seqStartIn.
PlatformIntType NATIVE_INT_TYPE
void seqDoneIn_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler for input port seqDoneIn.
Enum representing a command response.
PlatformIndexType FwIndexType
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.
void log_WARNING_LO_UnexpectedSequenceStarted(U16 idx, const Fw::StringBase &newSequence) const
Log event UnexpectedSequenceStarted.
Command successfully executed.
void seqRunIn_handler(NATIVE_INT_TYPE portNum, const Fw::StringBase &fileName)
Handler for input port seqRunIn.
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.
bool isConnected_seqRunOut_OutputPort(FwIndexType portNum)
Auto-generated base for SeqDispatcher component.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
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