7 #ifndef Svc_CmdSequencerComponentAc_HPP
8 #define Svc_CmdSequencerComponentAc_HPP
19 #if FW_ENABLE_TEXT_LOGGING == 1
213 #if FW_ENABLE_TEXT_LOGGING == 1
216 void set_LogText_OutputPort(
283 #if FW_PORT_SERIALIZATION
291 #if FW_ENABLE_TEXT_LOGGING == 1
294 void set_LogText_OutputPort(
296 Fw::InputSerializePort* port
304 Fw::InputSerializePort* port
310 Fw::InputSerializePort* port
316 Fw::InputSerializePort* port
322 Fw::InputSerializePort* port
328 Fw::InputSerializePort* port
333 #if FW_PORT_SERIALIZATION
344 Fw::InputSerializePort* port
350 Fw::InputSerializePort* port
356 Fw::InputSerializePort* port
362 Fw::InputSerializePort* port
386 const char* compName =
""
440 #if FW_ENABLE_TEXT_LOGGING == 1
506 #if FW_ENABLE_TEXT_LOGGING == 1
511 bool isConnected_LogText_OutputPort(
1235 static void m_p_cmdIn_in(
1250 static void m_p_cmdResponseIn_in(
1259 static void m_p_pingIn_in(
1266 static void m_p_schedIn_in(
1273 static void m_p_seqCancelIn_in(
1279 static void m_p_seqRunIn_in(
1321 #if FW_ENABLE_TEXT_LOGGING == 1
uint8_t U8
8-bit unsigned integer
PlatformSizeType FwSizeType
PlatformIndexType FwIndexType
C++-compatible configuration header for fprime configuration.
Enum representing a command response.
void init()
Object initializer.
Sequencer blocking state.
The stage of the file read operation.
Auto-generated base for CmdSequencer component.
virtual void CS_MANUAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void log_WARNING_HI_CS_JoinWaitingNotComplete()
void CS_MANUAL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
@ NUM_LOGTEXT_OUTPUT_PORTS
@ NUM_TIMECALLER_OUTPUT_PORTS
@ NUM_CMDRESPONSEOUT_OUTPUT_PORTS
@ NUM_TLMOUT_OUTPUT_PORTS
@ NUM_CMDREGOUT_OUTPUT_PORTS
@ NUM_LOGOUT_OUTPUT_PORTS
@ CHANNELID_CS_LOADCOMMANDS
Channel ID for CS_LoadCommands.
@ CHANNELID_CS_ERRORS
Channel ID for CS_Errors.
@ CHANNELID_CS_CANCELCOMMANDS
Channel ID for CS_CancelCommands.
@ CHANNELID_CS_COMMANDSEXECUTED
Channel ID for CS_CommandsExecuted.
@ CHANNELID_CS_SEQUENCESCOMPLETED
Channel ID for CS_SequencesCompleted.
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName)
void log_WARNING_LO_CS_NoRecords(const Fw::StringBase &fileName)
Log event CS_NoRecords.
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
void log_ACTIVITY_HI_CS_CmdStepped(const Fw::StringBase &filename, U32 command)
FwIndexType getNum_cmdResponseOut_OutputPorts() const
virtual void CS_START_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_START.
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void tlmWrite_CS_CancelCommands(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
void seqDone_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDone.
void CS_RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void CS_CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_CANCEL.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
FwIndexType getNum_pingOut_OutputPorts() const
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void CS_CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName)
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void log_WARNING_HI_CS_InvalidMode()
virtual ~CmdSequencerComponentBase()
Destroy CmdSequencerComponentBase object.
friend class CmdSequencerComponentBaseFriend
Friend class for white-box testing.
virtual void CS_START_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void CS_START_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_LO_CS_CommandComplete(const Fw::StringBase &fileName, U32 recordNumber, U32 opCode)
void log_WARNING_HI_CS_RecordMismatch(const Fw::StringBase &fileName, U32 header_records, U32 extra_bytes)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
virtual void CS_STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void CS_JOIN_WAIT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_seqDone_OutputPort(FwIndexType portNum)
FwIndexType getNum_timeCaller_OutputPorts() const
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::StringBase &fileName, U8 currTimeBase, U8 seqTimeBase)
virtual void CS_RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_RUN.
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
@ EVENTID_CS_TIMEBASEMISMATCH
The running time base doesn't match the time base in the sequence files.
@ EVENTID_CS_UNEXPECTEDCOMPLETION
A command status came back when no sequence was running.
@ EVENTID_CS_CMDSTARTED
A manual sequence was started.
@ EVENTID_CS_RECORDINVALID
The format of a command record was invalid.
@ EVENTID_CS_FILECRCFAILURE
The sequence file validation failed.
@ EVENTID_CS_JOINWAITINGNOTCOMPLETE
Cannot run new sequence when current sequence file is still running.
@ EVENTID_CS_PORTSEQUENCESTARTED
A local port request to run a sequence was started.
@ EVENTID_CS_SEQUENCEVALID
A sequence passed validation.
@ EVENTID_CS_SEQUENCECANCELED
A command sequence was successfully canceled.
@ EVENTID_CS_FILENOTFOUND
The sequence file was not found.
@ EVENTID_CS_MODESWITCHED
Switched step mode.
@ EVENTID_CS_FILESIZEERROR
The sequence file was too large.
@ EVENTID_CS_TIMECONTEXTMISMATCH
The running time base doesn't match the time base in the sequence files.
@ EVENTID_CS_SEQUENCECOMPLETE
A command sequence successfully completed.
@ EVENTID_CS_SEQUENCETIMEOUT
A sequence passed validation.
@ EVENTID_CS_INVALIDMODE
The Command Sequencer received a command that was invalid for its current mode.
@ EVENTID_CS_NOSEQUENCEACTIVE
A sequence related command came with no active sequence.
@ EVENTID_CS_JOINWAITING
Wait for the current running sequence file complete.
@ EVENTID_CS_CMDSTEPPED
A command in a sequence was stepped through.
@ EVENTID_CS_COMMANDERROR
The Command Sequencer issued a command and received an error status in return.
@ EVENTID_CS_FILEREADERROR
The Sequence File Loader could not read the sequence file.
@ EVENTID_CS_SEQUENCELOADED
Sequence file was successfully loaded.
@ EVENTID_CS_COMMANDCOMPLETE
The Command Sequencer issued a command and received a success status in return.
@ EVENTID_CS_RECORDMISMATCH
Number of records in header doesn't match number in file.
@ EVENTID_CS_FILEINVALID
The sequence file format was invalid.
FwIndexType getNum_cmdRegOut_OutputPorts() const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_CS_SequenceComplete(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_SequenceTimeout(const Fw::StringBase &filename, U32 command)
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
FwIndexType getNum_tlmOut_OutputPorts() const
void tlmWrite_CS_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time())
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
FwIndexType getNum_schedIn_InputPorts() const
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void CS_AUTO_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_cmdIn_InputPorts() const
void log_ACTIVITY_HI_CS_ModeSwitched(Svc::CmdSequencer_SeqMode mode)
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
@ NUM_SEQRUNIN_INPUT_PORTS
@ NUM_SEQCANCELIN_INPUT_PORTS
@ NUM_CMDRESPONSEIN_INPUT_PORTS
@ NUM_SCHEDIN_INPUT_PORTS
void set_comCmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comCmdOut[portNum].
void regCommands()
Register commands with the Command Dispatcher.
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
virtual void CS_VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_VALIDATE.
void log_ACTIVITY_HI_CS_SequenceCanceled(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, Svc::CmdSequencer_FileReadStage stage, I32 error)
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC)
virtual void CS_MANUAL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_MANUAL.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
FwIndexType getNum_seqRunIn_InputPorts() const
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename)
bool isConnected_comCmdOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_cmdResponseIn_InputPorts() const
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
virtual void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
FwIndexType getNum_logOut_OutputPorts() const
@ NUM_COMCMDOUT_OUTPUT_PORTS
@ NUM_SEQDONE_OUTPUT_PORTS
@ NUM_SEQSTARTOUT_OUTPUT_PORTS
@ NUM_PINGOUT_OUTPUT_PORTS
FwIndexType getNum_seqDone_OutputPorts() const
void comCmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comCmdOut.
void CS_VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_seqStartOut_OutputPorts() const
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error)
void CS_STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_seqCancelIn_InputPorts() const
void log_WARNING_LO_CS_NoSequenceActive()
void log_ACTIVITY_LO_CS_SequenceLoaded(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size)
void log_WARNING_HI_CS_UnexpectedCompletion(U32 opcode)
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
CmdSequencerComponentBase(const char *compName="")
Construct CmdSequencerComponentBase object.
virtual void CS_AUTO_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_AUTO.
FwIndexType getNum_comCmdOut_OutputPorts() const
FwIndexType getNum_pingIn_InputPorts() const
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::CmdSequencer_BlockState block)=0
void log_ACTIVITY_HI_CS_JoinWaiting(const Fw::StringBase &filename, U32 recordNumber, U32 opCode)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
@ OPCODE_CS_CANCEL
Cancel a command sequence.
@ OPCODE_CS_STEP
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode.
@ OPCODE_CS_MANUAL
Set the run mode to MANUAL.
@ OPCODE_CS_VALIDATE
Validate a command sequence file.
@ OPCODE_CS_RUN
Run a command sequence file.
@ OPCODE_CS_START
Start running a command sequence.
@ OPCODE_CS_AUTO
Set the run mode to AUTO.
@ OPCODE_CS_JOIN_WAIT
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
void log_WARNING_HI_CS_CommandError(const Fw::StringBase &fileName, U32 recordNumber, U32 opCode, U32 errorStatus)
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename)
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
void tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_CS_SequencesCompleted(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0