10 #if FW_ENABLE_TEXT_LOGGING
20 BUFFERRETURN_BUFFERSEND,
38 class ComponentIpcSerializableBuffer :
53 return sizeof(m_buff);
60 const U8* getBuffAddr()
const {
66 U8 m_buff[SERIALIZATION_SIZE];
90 this->m_cmdIn_InputPort[port].
init();
95 this->m_cmdIn_InputPort[port].
setPortNum(port);
97 #if FW_OBJECT_NAMES == 1
101 this->m_objName.toChar(),
104 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
114 this->m_Run_InputPort[port].
init();
121 #if FW_OBJECT_NAMES == 1
125 this->m_objName.toChar(),
128 this->m_Run_InputPort[port].setObjName(portName.
toChar());
138 this->m_SendFile_InputPort[port].
init();
143 this->m_SendFile_InputPort[port].
setPortNum(port);
145 #if FW_OBJECT_NAMES == 1
149 this->m_objName.toChar(),
152 this->m_SendFile_InputPort[port].setObjName(portName.
toChar());
162 this->m_bufferReturn_InputPort[port].
init();
167 this->m_bufferReturn_InputPort[port].
setPortNum(port);
169 #if FW_OBJECT_NAMES == 1
173 this->m_objName.toChar(),
176 this->m_bufferReturn_InputPort[port].setObjName(portName.
toChar());
186 this->m_pingIn_InputPort[port].
init();
191 this->m_pingIn_InputPort[port].
setPortNum(port);
193 #if FW_OBJECT_NAMES == 1
197 this->m_objName.toChar(),
200 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
210 this->m_cmdRegOut_OutputPort[port].
init();
212 #if FW_OBJECT_NAMES == 1
216 this->m_objName.toChar(),
219 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
229 this->m_cmdResponseOut_OutputPort[port].
init();
231 #if FW_OBJECT_NAMES == 1
235 this->m_objName.toChar(),
238 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
248 this->m_eventOut_OutputPort[port].
init();
250 #if FW_OBJECT_NAMES == 1
254 this->m_objName.toChar(),
257 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
261 #if FW_ENABLE_TEXT_LOGGING == 1
265 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
268 this->m_textEventOut_OutputPort[port].
init();
270 #if FW_OBJECT_NAMES == 1
274 this->m_objName.toChar(),
277 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
288 this->m_timeCaller_OutputPort[port].
init();
290 #if FW_OBJECT_NAMES == 1
294 this->m_objName.toChar(),
297 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
307 this->m_tlmOut_OutputPort[port].
init();
309 #if FW_OBJECT_NAMES == 1
313 this->m_objName.toChar(),
316 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
326 this->m_FileComplete_OutputPort[port].
init();
328 #if FW_OBJECT_NAMES == 1
332 this->m_objName.toChar(),
335 this->m_FileComplete_OutputPort[port].setObjName(portName.
toChar());
345 this->m_bufferSendOut_OutputPort[port].
init();
347 #if FW_OBJECT_NAMES == 1
351 this->m_objName.toChar(),
354 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
364 this->m_pingOut_OutputPort[port].
init();
366 #if FW_OBJECT_NAMES == 1
370 this->m_objName.toChar(),
373 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
379 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
399 return &this->m_cmdIn_InputPort[portNum];
414 return &this->m_Run_InputPort[portNum];
425 return &this->m_SendFile_InputPort[portNum];
436 return &this->m_bufferReturn_InputPort[portNum];
447 return &this->m_pingIn_InputPort[portNum];
465 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
479 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
493 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
496 #if FW_ENABLE_TEXT_LOGGING == 1
498 void FileDownlinkComponentBase ::
499 set_textEventOut_OutputPort(
505 portNum < this->getNum_textEventOut_OutputPorts(),
509 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
525 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
539 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
557 this->m_FileComplete_OutputPort[portNum].
addCallPort(port);
571 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
585 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
588 #if FW_PORT_SERIALIZATION
597 Fw::InputSerializePort* port
605 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
611 Fw::InputSerializePort* port
619 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
625 Fw::InputSerializePort* port
633 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
636 #if FW_ENABLE_TEXT_LOGGING == 1
638 void FileDownlinkComponentBase ::
639 set_textEventOut_OutputPort(
641 Fw::InputSerializePort* port
645 portNum < this->getNum_textEventOut_OutputPorts(),
649 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
657 Fw::InputSerializePort* port
665 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
671 Fw::InputSerializePort* port
679 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
684 #if FW_PORT_SERIALIZATION
693 Fw::InputSerializePort* port
701 this->m_FileComplete_OutputPort[portNum].registerSerialPort(port);
707 Fw::InputSerializePort* port
715 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
721 Fw::InputSerializePort* port
729 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
741 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
743 this->m_cmdRegOut_OutputPort[0].
invoke(
747 this->m_cmdRegOut_OutputPort[0].
invoke(
751 this->m_cmdRegOut_OutputPort[0].
invoke(
762 Fw::ActiveComponentBase(compName)
833 #if FW_ENABLE_TEXT_LOGGING == 1
836 getNum_textEventOut_OutputPorts()
const
889 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
900 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
911 return this->m_eventOut_OutputPort[portNum].
isConnected();
914 #if FW_ENABLE_TEXT_LOGGING == 1
916 bool FileDownlinkComponentBase ::
917 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
920 portNum < this->getNum_textEventOut_OutputPorts(),
924 return this->m_textEventOut_OutputPort[portNum].isConnected();
937 return this->m_timeCaller_OutputPort[portNum].
isConnected();
948 return this->m_tlmOut_OutputPort[portNum].
isConnected();
963 return this->m_FileComplete_OutputPort[portNum].
isConnected();
974 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
985 return this->m_pingOut_OutputPort[portNum].
isConnected();
1011 ComponentIpcSerializableBuffer msg;
1015 _status = msg.serialize(
1024 _status = msg.serialize(portNum);
1031 _status = msg.serialize(context);
1099 ComponentIpcSerializableBuffer msg;
1103 _status = msg.serialize(
1112 _status = msg.serialize(portNum);
1119 _status = msg.serialize(fwBuffer);
1152 ComponentIpcSerializableBuffer msg;
1156 _status = msg.serialize(
1165 _status = msg.serialize(portNum);
1172 _status = msg.serialize(key);
1237 this->m_FileComplete_OutputPort[portNum].
invoke(
1252 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1267 this->m_pingOut_OutputPort[portNum].
invoke(
1283 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1284 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1305 ComponentIpcSerializableBuffer msg;
1318 _status = msg.serialize(port);
1324 _status = msg.serialize(opCode);
1330 _status = msg.serialize(cmdSeq);
1336 _status = msg.serialize(args);
1364 ComponentIpcSerializableBuffer msg;
1377 _status = msg.serialize(port);
1383 _status = msg.serialize(opCode);
1389 _status = msg.serialize(cmdSeq);
1395 _status = msg.serialize(args);
1423 ComponentIpcSerializableBuffer msg;
1427 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_SENDPARTIAL));
1436 _status = msg.serialize(port);
1442 _status = msg.serialize(opCode);
1448 _status = msg.serialize(cmdSeq);
1454 _status = msg.serialize(args);
1520 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1521 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1529 if (this->m_eventOut_OutputPort[0].isConnected()) {
1533 #if FW_AMPCS_COMPATIBLE
1548 this->m_eventOut_OutputPort[0].
invoke(
1557 #if FW_ENABLE_TEXT_LOGGING
1558 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1559 #if FW_OBJECT_NAMES == 1
1560 const char* _formatString =
1561 "(%s) %s: Could not open file %s";
1563 const char* _formatString =
1564 "%s: Could not open file %s";
1571 this->m_objName.toChar(),
1577 this->m_textEventOut_OutputPort[0].invoke(
1595 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1596 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1604 if (this->m_eventOut_OutputPort[0].isConnected()) {
1608 #if FW_AMPCS_COMPATIBLE
1623 #if FW_AMPCS_COMPATIBLE
1626 static_cast<U8>(
sizeof(I32))
1639 this->m_eventOut_OutputPort[0].
invoke(
1648 #if FW_ENABLE_TEXT_LOGGING
1649 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1650 #if FW_OBJECT_NAMES == 1
1651 const char* _formatString =
1652 "(%s) %s: Could not read file %s with status %" PRIi32
"";
1654 const char* _formatString =
1655 "%s: Could not read file %s with status %" PRIi32
"";
1662 this->m_objName.toChar(),
1669 this->m_textEventOut_OutputPort[0].invoke(
1687 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1688 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1696 if (this->m_eventOut_OutputPort[0].isConnected()) {
1700 #if FW_AMPCS_COMPATIBLE
1721 this->m_eventOut_OutputPort[0].
invoke(
1730 #if FW_ENABLE_TEXT_LOGGING
1731 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1732 #if FW_OBJECT_NAMES == 1
1733 const char* _formatString =
1734 "(%s) %s: Sent file %s to file %s";
1736 const char* _formatString =
1737 "%s: Sent file %s to file %s";
1744 this->m_objName.toChar(),
1751 this->m_textEventOut_OutputPort[0].invoke(
1769 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1770 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1778 if (this->m_eventOut_OutputPort[0].isConnected()) {
1782 #if FW_AMPCS_COMPATIBLE
1803 this->m_eventOut_OutputPort[0].
invoke(
1812 #if FW_ENABLE_TEXT_LOGGING
1813 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1814 #if FW_OBJECT_NAMES == 1
1815 const char* _formatString =
1816 "(%s) %s: Canceled downlink of file %s to file %s";
1818 const char* _formatString =
1819 "%s: Canceled downlink of file %s to file %s";
1826 this->m_objName.toChar(),
1828 "DownlinkCanceled ",
1833 this->m_textEventOut_OutputPort[0].invoke(
1851 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1852 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1860 if (this->m_eventOut_OutputPort[0].isConnected()) {
1864 #if FW_AMPCS_COMPATIBLE
1885 this->m_eventOut_OutputPort[0].
invoke(
1894 #if FW_ENABLE_TEXT_LOGGING
1895 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1896 #if FW_OBJECT_NAMES == 1
1897 const char* _formatString =
1898 "(%s) %s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1900 const char* _formatString =
1901 "%s: Timeout occurred during downlink of file %s to file %s. Downlink has been canceled.";
1908 this->m_objName.toChar(),
1915 this->m_textEventOut_OutputPort[0].invoke(
1936 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1937 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1945 if (this->m_eventOut_OutputPort[0].isConnected()) {
1949 #if FW_AMPCS_COMPATIBLE
1958 #if FW_AMPCS_COMPATIBLE
1961 static_cast<U8>(
sizeof(U32))
1968 _status = _logBuff.
serialize(startOffset);
1974 #if FW_AMPCS_COMPATIBLE
1977 static_cast<U8>(
sizeof(U32))
1990 #if FW_AMPCS_COMPATIBLE
1993 static_cast<U8>(
sizeof(U32))
2018 this->m_eventOut_OutputPort[0].
invoke(
2027 #if FW_ENABLE_TEXT_LOGGING
2028 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2029 #if FW_OBJECT_NAMES == 1
2030 const char* _formatString =
2031 "(%s) %s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2033 const char* _formatString =
2034 "%s: Offset %" PRIu32
" plus length %" PRIu32
" is greater than source size %" PRIu32
" for partial downlink of file %s to file %s. ";
2041 this->m_objName.toChar(),
2043 "DownlinkPartialWarning ",
2051 this->m_textEventOut_OutputPort[0].invoke(
2071 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2072 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2080 if (this->m_eventOut_OutputPort[0].isConnected()) {
2084 #if FW_AMPCS_COMPATIBLE
2105 #if FW_AMPCS_COMPATIBLE
2108 static_cast<U8>(
sizeof(U32))
2115 _status = _logBuff.
serialize(startOffset);
2121 #if FW_AMPCS_COMPATIBLE
2124 static_cast<U8>(
sizeof(U32))
2137 this->m_eventOut_OutputPort[0].
invoke(
2146 #if FW_ENABLE_TEXT_LOGGING
2147 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2148 #if FW_OBJECT_NAMES == 1
2149 const char* _formatString =
2150 "(%s) %s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2152 const char* _formatString =
2153 "%s: Error occurred during partial downlink of file %s to file %s. Offset %" PRIu32
" greater than or equal to source filesize %" PRIu32
".";
2160 this->m_objName.toChar(),
2162 "DownlinkPartialFail ",
2169 this->m_textEventOut_OutputPort[0].invoke(
2187 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2188 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2196 if (this->m_eventOut_OutputPort[0].isConnected()) {
2200 #if FW_AMPCS_COMPATIBLE
2215 #if FW_AMPCS_COMPATIBLE
2218 static_cast<U8>(
sizeof(U32))
2225 _status = _logBuff.
serialize(byteOffset);
2231 this->m_eventOut_OutputPort[0].
invoke(
2240 #if FW_ENABLE_TEXT_LOGGING
2241 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2242 #if FW_OBJECT_NAMES == 1
2243 const char* _formatString =
2244 "(%s) %s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2246 const char* _formatString =
2247 "%s: Failed to send data packet from file %s at byte offset %" PRIu32
".";
2254 this->m_objName.toChar(),
2261 this->m_textEventOut_OutputPort[0].invoke(
2280 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2281 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2289 if (this->m_eventOut_OutputPort[0].isConnected()) {
2293 #if FW_AMPCS_COMPATIBLE
2302 #if FW_AMPCS_COMPATIBLE
2305 static_cast<U8>(
sizeof(U32))
2330 this->m_eventOut_OutputPort[0].
invoke(
2339 #if FW_ENABLE_TEXT_LOGGING
2340 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2341 #if FW_OBJECT_NAMES == 1
2342 const char* _formatString =
2343 "(%s) %s: Downlink of %" PRIu32
" bytes started from %s to %s";
2345 const char* _formatString =
2346 "%s: Downlink of %" PRIu32
" bytes started from %s to %s";
2353 this->m_objName.toChar(),
2361 this->m_textEventOut_OutputPort[0].invoke(
2381 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2383 this->m_timeCaller_OutputPort[0].isConnected() &&
2386 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2400 this->m_tlmOut_OutputPort[0].
invoke(
2414 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2416 this->m_timeCaller_OutputPort[0].isConnected() &&
2419 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2433 this->m_tlmOut_OutputPort[0].
invoke(
2447 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2449 this->m_timeCaller_OutputPort[0].isConnected() &&
2452 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2466 this->m_tlmOut_OutputPort[0].
invoke(
2481 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2483 this->m_timeCaller_OutputPort[0].
invoke(_time);
2501 this->m_guardedPortMutex.
lock();
2507 this->m_guardedPortMutex.
unLock();
2517 ComponentIpcSerializableBuffer msg;
2540 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2542 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
2547 deserStatus = msg.deserialize(portNum);
2558 deserStatus = msg.deserialize(context);
2573 case BUFFERRETURN_BUFFERSEND: {
2594 deserStatus = msg.deserialize(key);
2609 case CMD_SENDFILE: {
2612 deserStatus = msg.deserialize(opCode);
2620 deserStatus = msg.deserialize(cmdSeq);
2641 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2656 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2669 #if FW_CMD_CHECK_RESIDUAL
2671 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2693 deserStatus = msg.deserialize(opCode);
2701 deserStatus = msg.deserialize(cmdSeq);
2720 #if FW_CMD_CHECK_RESIDUAL
2722 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2737 case CMD_SENDPARTIAL: {
2740 deserStatus = msg.deserialize(opCode);
2748 deserStatus = msg.deserialize(cmdSeq);
2769 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2784 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2799 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2814 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2827 #if FW_CMD_CHECK_RESIDUAL
2829 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2860 void FileDownlinkComponentBase ::
2872 const U32 idBase = callComp->
getIdBase();
2876 switch (opCode - idBase) {
2878 compPtr->SendFile_cmdHandlerBase(
2887 compPtr->Cancel_cmdHandlerBase(
2896 compPtr->SendPartial_cmdHandlerBase(
2910 void FileDownlinkComponentBase ::
2919 compPtr->Run_handlerBase(
2937 return compPtr->SendFile_handlerBase(
2946 void FileDownlinkComponentBase ::
2947 m_p_bufferReturn_in(
2955 compPtr->bufferReturn_handlerBase(
2961 void FileDownlinkComponentBase ::
2970 compPtr->pingIn_handlerBase(
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_HI
Important informational events.
@ WARNING_LO
A less serious but recoverable event.
void init()
Object initializer.
const char * toChar() const
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Buffer &fwBuffer)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode)
Invoke a port interface.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke a port interface.
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Os::Queue m_queue
queue object for active component
@ MSG_DISPATCH_OK
Dispatch was normal.
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
NATIVE_UINT_TYPE SizeType
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
void unLock()
unlock the mutex and assert success
void lock()
lock the mutex and assert success
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
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.
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
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.
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())
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)
void invoke(U32 key)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputPingPort *callPort)
Register an input port.
void addCallPort(InputSendFileCompletePort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(const Svc::SendFileResponse &resp)
Invoke a port interface.
Send file response struct.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.