7 #ifndef Svc_FileDownlinkComponentAc_HPP
8 #define Svc_FileDownlinkComponentAc_HPP
19 #if FW_ENABLE_TEXT_LOGGING == 1
196 #if FW_ENABLE_TEXT_LOGGING == 1
199 void set_textEventOut_OutputPort(
242 #if FW_PORT_SERIALIZATION
253 Fw::InputSerializePort* port
259 Fw::InputSerializePort* port
265 Fw::InputSerializePort* port
268 #if FW_ENABLE_TEXT_LOGGING == 1
271 void set_textEventOut_OutputPort(
273 Fw::InputSerializePort* port
281 Fw::InputSerializePort* port
287 Fw::InputSerializePort* port
292 #if FW_PORT_SERIALIZATION
303 Fw::InputSerializePort* port
309 Fw::InputSerializePort* port
315 Fw::InputSerializePort* port
339 const char* compName =
""
403 #if FW_ENABLE_TEXT_LOGGING == 1
408 FwIndexType getNum_textEventOut_OutputPorts()
const;
470 #if FW_ENABLE_TEXT_LOGGING == 1
475 bool isConnected_textEventOut_OutputPort(
909 static void m_p_cmdIn_in(
924 static void m_p_Run_in(
941 static void m_p_bufferReturn_in(
948 static void m_p_pingIn_in(
996 #if FW_ENABLE_TEXT_LOGGING == 1
PlatformSizeType FwSizeType
PlatformIndexType FwIndexType
C++-compatible configuration header for fprime configuration.
Enum representing a command response.
void init()
Object initializer.
Auto-generated base for FileDownlink component.
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.
@ NUM_BUFFERRETURN_INPUT_PORTS
@ NUM_SENDFILE_INPUT_PORTS
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
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.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferSendOut.
virtual void Cancel_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
FwIndexType getNum_FileComplete_OutputPorts() const
void regCommands()
Register commands with the Command Dispatcher.
FwIndexType getNum_pingOut_OutputPorts() const
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void FileComplete_out(FwIndexType portNum, const Svc::SendFileResponse &resp)
Invoke output port FileComplete.
virtual void Run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Run.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void SendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
FwIndexType getNum_cmdIn_InputPorts() const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum)
virtual void SendPartial_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName, U32 startOffset, U32 length)=0
FwIndexType getNum_Run_InputPorts() const
void Cancel_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_FileComplete_OutputPort(FwIndexType portNum)
void tlmWrite_Warnings(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void unLock()
Unlock the guarded mutex.
virtual void lock()
Lock the guarded mutex.
void log_WARNING_HI_DownlinkPartialFail(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 startOffset, U32 filesize)
void SendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Fw::InputBufferSendPort * get_bufferReturn_InputPort(FwIndexType portNum)
FwIndexType getNum_timeCaller_OutputPorts() const
void log_WARNING_HI_DownlinkTimeout(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
FileDownlinkComponentBase(const char *compName="")
Construct FileDownlinkComponentBase object.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
FwIndexType getNum_cmdResponseOut_OutputPorts() const
FwIndexType getNum_pingIn_InputPorts() const
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
FwIndexType getNum_bufferSendOut_OutputPorts() const
void log_WARNING_HI_FileReadError(const Fw::StringBase &fileName, I32 status)
void log_ACTIVITY_HI_SendStarted(U32 fileSize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
FwIndexType getNum_SendFile_InputPorts() const
@ NUM_FILECOMPLETE_OUTPUT_PORTS
@ NUM_BUFFERSENDOUT_OUTPUT_PORTS
@ NUM_PINGOUT_OUTPUT_PORTS
FwIndexType getNum_eventOut_OutputPorts() const
void log_ACTIVITY_HI_DownlinkCanceled(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
FwIndexType getNum_tlmOut_OutputPorts() const
void set_FileComplete_OutputPort(FwIndexType portNum, Svc::InputSendFileCompletePort *port)
Connect port to FileComplete[portNum].
@ CHANNELID_FILESSENT
Channel ID for FilesSent.
@ CHANNELID_PACKETSSENT
Channel ID for PacketsSent.
@ CHANNELID_WARNINGS
Channel ID for Warnings.
virtual void Cancel_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command Cancel.
void Run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Run.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
@ EVENTID_DOWNLINKTIMEOUT
The File Downlink component has detected a timeout. Downlink has been canceled.
@ EVENTID_SENDSTARTED
The File Downlink component started a file download.
@ EVENTID_DOWNLINKPARTIALFAIL
The File Downlink component has detected a timeout. Downlink has been canceled.
@ EVENTID_FILEREADERROR
An error occurred reading a file.
@ EVENTID_SENDDATAFAIL
The File Downlink component generated an error when trying to send a data packet.
@ EVENTID_DOWNLINKCANCELED
The File Downlink component canceled downlink of a file.
@ EVENTID_FILEOPENERROR
An error occurred opening a file.
@ EVENTID_FILESENT
The File Downlink component successfully sent a file.
@ EVENTID_DOWNLINKPARTIALWARNING
The File Downlink component has detected a timeout. Downlink has been canceled.
virtual void bufferReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferReturn.
Svc::InputSendFileRequestPort * get_SendFile_InputPort(FwIndexType portNum)
void log_WARNING_LO_DownlinkPartialWarning(U32 startOffset, U32 length, U32 filesize, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void bufferReturn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferReturn.
virtual void SendPartial_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendPartial.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void bufferReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferReturn.
@ NUM_TIMECALLER_OUTPUT_PORTS
@ NUM_EVENTOUT_OUTPUT_PORTS
@ NUM_CMDRESPONSEOUT_OUTPUT_PORTS
@ NUM_TLMOUT_OUTPUT_PORTS
@ NUM_CMDREGOUT_OUTPUT_PORTS
@ NUM_TEXTEVENTOUT_OUTPUT_PORTS
virtual ~FileDownlinkComponentBase()
Destroy FileDownlinkComponentBase object.
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void log_ACTIVITY_HI_FileSent(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName)
void tlmWrite_FilesSent(U32 arg, Fw::Time _tlmTime=Fw::Time())
void SendPartial_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void SendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SendFile.
FwIndexType getNum_cmdRegOut_OutputPorts() const
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
@ OPCODE_CANCEL
Cancel the downlink in progress, if any.
@ OPCODE_SENDPARTIAL
Read a named file off the disk from a starting position. Divide it into packets and send the packets ...
@ OPCODE_SENDFILE
Read a named file off the disk. Divide it into packets and send the packets for transmission to the g...
void log_WARNING_HI_SendDataFail(const Fw::StringBase &sourceFileName, U32 byteOffset)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
FwIndexType getNum_bufferReturn_InputPorts() const
void tlmWrite_PacketsSent(U32 arg, Fw::Time _tlmTime=Fw::Time())
friend class FileDownlinkComponentBaseFriend
Friend class for white-box testing.
virtual void Run_handler(FwIndexType portNum, U32 context)=0
Handler for input port Run.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
void log_WARNING_HI_FileOpenError(const Fw::StringBase &fileName)
Send file response struct.