7 #ifndef Svc_FileDownlinkComponentAc_HPP 8 #define Svc_FileDownlinkComponentAc_HPP 22 #if !FW_DIRECT_PORT_CALLS 25 #if !FW_DIRECT_PORT_CALLS 134 #if !FW_DIRECT_PORT_CALLS 151 #if !FW_DIRECT_PORT_CALLS 189 #if !FW_DIRECT_PORT_CALLS 215 #if FW_ENABLE_TEXT_LOGGING == 1 218 void set_textEventOut_OutputPort(
239 #if !FW_DIRECT_PORT_CALLS 267 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 278 Fw::InputSerializePort* port
284 Fw::InputSerializePort* port
290 Fw::InputSerializePort* port
293 #if FW_ENABLE_TEXT_LOGGING == 1 296 void set_textEventOut_OutputPort(
298 Fw::InputSerializePort* port
306 Fw::InputSerializePort* port
312 Fw::InputSerializePort* port
317 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 328 Fw::InputSerializePort* port
334 Fw::InputSerializePort* port
340 Fw::InputSerializePort* port
364 const char* compName =
"" 444 #if FW_ENABLE_TEXT_LOGGING == 1 449 static constexpr
FwIndexType getNum_textEventOut_OutputPorts() {
523 #if FW_ENABLE_TEXT_LOGGING == 1 528 bool isConnected_textEventOut_OutputPort(
575 #if FW_DIRECT_PORT_CALLS 628 #if FW_DIRECT_PORT_CALLS 1011 static void m_p_cmdIn_in(
1026 static void m_p_Run_in(
1043 static void m_p_bufferReturn_in(
1050 static void m_p_pingIn_in(
1069 void cmdResponseOut_out(
1085 #if FW_ENABLE_TEXT_LOGGING 1088 void textEventOut_out(
1099 void timeCaller_out(
1112 #if !FW_DIRECT_PORT_CALLS 1125 #if !FW_DIRECT_PORT_CALLS 1147 #if !FW_DIRECT_PORT_CALLS 1164 #if FW_ENABLE_TEXT_LOGGING == 1 1179 #if !FW_DIRECT_PORT_CALLS The File Downlink component stopped due to a zero-size file.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
An error occurred opening a file.
void Cancel_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_SendFile_InputPorts()
void regCommands()
Register commands with the Command Dispatcher.
FwIdType FwOpcodeType
The type of a command opcode.
PlatformSizeType FwSizeType
static constexpr FwIndexType getNum_FileComplete_OutputPorts()
void tlmWrite_PacketsSent(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
An error occurred reading a file.
Supplied filename has overflowed.
Svc::InputSendFileRequestPort * get_SendFile_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_bufferReturn_InputPorts()
The File Downlink component successfully sent a file.
The File Downlink component generated an error when trying to send a data packet. ...
virtual void unLock()
Unlock the guarded mutex.
Enum representing a command response.
The File Downlink component started a file download.
virtual void SendPartial_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendPartial.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOut.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
void init()
Object initializer.
void log_ACTIVITY_HI_DownlinkCanceled(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
Channel ID for FilesSent.
Channel ID for PacketsSent.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void bufferReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferReturn.
FwIdType FwEventIdType
The type of an event identifier.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
Auto-generated base for FileDownlink component.
friend class FileDownlinkTesterBase
Friend class tester to support autocoded test harness.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &fileName) const
void log_WARNING_LO_DownlinkPartialWarning(U32 startOffset, U32 length, U32 filesize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
virtual void Cancel_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
bool isConnected_FileComplete_OutputPort(FwIndexType portNum) const
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
virtual void Cancel_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command Cancel.
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
virtual void Run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Run.
void SendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
Supplied filename has overflowed. This intentionally discards the filename to avoid cascading overflo...
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
static constexpr FwIndexType getNum_bufferSendOut_OutputPorts()
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Enum representing event severity.
void FileComplete_out(FwIndexType portNum, const Svc::SendFileResponse &resp) const
Invoke output port FileComplete.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_ACTIVITY_HI_FileSent(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum) const
Svc::SendFileResponse SendFile_handlerBase(FwIndexType portNum, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 offset, U32 length)
Handler base-class function for input port SendFile.
virtual void lock()
Lock the guarded mutex.
void tlmWrite_Warnings(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_WARNING_HI_SendDataFail(const Fw::StringBase &sourceFileName, U32 byteOffset) const
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void log_WARNING_HI_FileReadError(const Fw::StringBase &fileName, I32 status) const
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
Fw::InputBufferSendPort * get_bufferReturn_InputPort(FwIndexType portNum)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Cancel the downlink in progress, if any.
PlatformIndexType FwIndexType
FileDownlinkComponentBase(const char *compName="")
Construct FileDownlinkComponentBase object.
virtual void SendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendFile.
static constexpr FwIndexType getNum_Run_InputPorts()
virtual Svc::SendFileResponse SendFile_handler(FwIndexType portNum, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 offset, U32 length)=0
Handler for input port SendFile.
Send file response struct.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_pingIn_InputPorts()
void log_WARNING_HI_DownlinkZeroSizeFile(const Fw::StringBase &sourceFileName) const
virtual void SendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
RateGroupDivider component implementation.
virtual void SendPartial_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName, U32 startOffset, U32 length)=0
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void tlmWrite_FilesSent(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
friend class FileDownlinkTester
Friend class tester implementation to support white-box testing.
virtual void bufferReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferReturn.
void log_WARNING_HI_FilenameDestinationOverflow() const
The File Downlink component canceled downlink of a file.
void SendPartial_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_FileComplete_OutputPort(FwIndexType portNum, Svc::InputSendFileCompletePort *port)
Connect port to FileComplete[portNum].
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void log_WARNING_HI_FilenameSourceOverflow() const
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
The File Downlink component has detected a timeout. Downlink has been canceled.
void log_ACTIVITY_HI_SendStarted(U32 fileSize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_DownlinkPartialFail(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 startOffset, U32 filesize) const
void Run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Run.
virtual void bufferReturn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferReturn.
virtual void Run_handler(FwIndexType portNum, U32 context)=0
Handler for input port Run.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
The File Downlink component has detected a timeout. Downlink has been canceled.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()