7 #ifndef Svc_FileDownlinkComponentAc_HPP 8 #define Svc_FileDownlinkComponentAc_HPP 21 #if FW_ENABLE_TEXT_LOGGING == 1 24 #if !FW_DIRECT_PORT_CALLS 27 #if !FW_DIRECT_PORT_CALLS 136 #if !FW_DIRECT_PORT_CALLS 153 #if !FW_DIRECT_PORT_CALLS 191 #if !FW_DIRECT_PORT_CALLS 217 #if FW_ENABLE_TEXT_LOGGING == 1 220 void set_textEventOut_OutputPort(
241 #if !FW_DIRECT_PORT_CALLS 269 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 280 Fw::InputSerializePort* port
286 Fw::InputSerializePort* port
292 Fw::InputSerializePort* port
295 #if FW_ENABLE_TEXT_LOGGING == 1 298 void set_textEventOut_OutputPort(
300 Fw::InputSerializePort* port
308 Fw::InputSerializePort* port
314 Fw::InputSerializePort* port
319 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 330 Fw::InputSerializePort* port
336 Fw::InputSerializePort* port
342 Fw::InputSerializePort* port
366 const char* compName =
"" 446 #if FW_ENABLE_TEXT_LOGGING == 1 451 static constexpr
FwIndexType getNum_textEventOut_OutputPorts() {
525 #if FW_ENABLE_TEXT_LOGGING == 1 530 bool isConnected_textEventOut_OutputPort(
577 #if FW_DIRECT_PORT_CALLS 630 #if FW_DIRECT_PORT_CALLS 1013 static void m_p_cmdIn_in(
1028 static void m_p_Run_in(
1045 static void m_p_bufferReturn_in(
1052 static void m_p_pingIn_in(
1071 void cmdResponseOut_out(
1087 #if FW_ENABLE_TEXT_LOGGING 1090 void textEventOut_out(
1101 void timeCaller_out(
1114 #if !FW_DIRECT_PORT_CALLS 1127 #if !FW_DIRECT_PORT_CALLS 1149 #if !FW_DIRECT_PORT_CALLS 1166 #if FW_ENABLE_TEXT_LOGGING == 1 1181 #if !FW_DIRECT_PORT_CALLS Supplied filename has overflowed.
Channel ID for FilesSent.
An error occurred opening a file.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
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
Channel ID for PacketsSent.
Supplied filename has overflowed. This intentionally discards the filename to avoid cascading overflo...
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].
Svc::InputSendFileRequestPort * get_SendFile_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_bufferReturn_InputPorts()
virtual void unLock()
Unlock the guarded mutex.
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.
The File Downlink component stopped due to a zero-size file.
Enum representing a command response.
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].
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
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
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.
The File Downlink component successfully sent a file.
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
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.
Cancel the downlink in progress, if any.
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
The File Downlink component started a file download.
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].
The File Downlink component generated an error when trying to send a data packet. ...
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].
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()
The File Downlink component canceled downlink of a file.
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 has detected a timeout. Downlink has been canceled.
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()
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()
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
An error occurred reading a file.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()