17 #if FW_ENABLE_TEXT_LOGGING
33 CMD_FILEDOWNLINK_SENDFILE
46 class ComponentIpcSerializableBuffer :
61 return sizeof(m_buff);
64 U8* getBuffAddr(
void) {
68 const U8* getBuffAddr(
void)
const {
74 U8 m_buff[SERIALIZATION_SIZE];
88 return &this->m_cmdIn_InputPort[
portNum];
109 this->m_bufferGetCaller_OutputPort[
portNum].addCallPort(port);
182 #if FW_ENABLE_TEXT_LOGGING == 1
183 void FileDownlinkComponentBase ::
184 set_LogText_OutputPort(
190 this->m_LogText_OutputPort[
portNum].addCallPort(port);
198 #if FW_PORT_SERIALIZATION
203 Fw::InputSerializePort *port
207 return this->m_bufferGetCaller_OutputPort[
portNum].registerSerialPort(port);
213 Fw::InputSerializePort *port
223 Fw::InputSerializePort *port
233 Fw::InputSerializePort *port
243 Fw::InputSerializePort *port
253 Fw::InputSerializePort *port
263 Fw::InputSerializePort *port
273 Fw::InputSerializePort *port
280 #if FW_ENABLE_TEXT_LOGGING == 1
281 void FileDownlinkComponentBase ::
282 set_LogText_OutputPort(
284 Fw::InputSerializePort *port
288 return this->m_LogText_OutputPort[
portNum].registerSerialPort(port);
303 this->
getIdBase() + OPCODE_FILEDOWNLINK_SENDFILE
315 #if FW_OBJECT_NAMES == 1
317 Fw::ActiveComponentBase(compName)
320 Fw::ActiveComponentBase()
341 port < this->getNum_cmdIn_InputPorts();
345 this->m_cmdIn_InputPort[port].init();
346 this->m_cmdIn_InputPort[port].addCallComp(
350 this->m_cmdIn_InputPort[port].setPortNum(port);
352 #if FW_OBJECT_NAMES == 1
357 "%s_cmdIn_InputPort[%d]",
361 this->m_cmdIn_InputPort[port].setObjName(portName);
380 #if FW_OBJECT_NAMES == 1
385 "%s_pingIn_InputPort[%d]",
397 port < this->getNum_bufferGetCaller_OutputPorts();
400 this->m_bufferGetCaller_OutputPort[port].
init();
402 #if FW_OBJECT_NAMES == 1
407 "%s_bufferGetCaller_OutputPort[%d]",
411 this->m_bufferGetCaller_OutputPort[port].setObjName(portName);
424 #if FW_OBJECT_NAMES == 1
429 "%s_timeCaller_OutputPort[%d]",
446 #if FW_OBJECT_NAMES == 1
451 "%s_bufferSendOut_OutputPort[%d]",
468 #if FW_OBJECT_NAMES == 1
473 "%s_tlmOut_OutputPort[%d]",
490 #if FW_OBJECT_NAMES == 1
495 "%s_cmdResponseOut_OutputPort[%d]",
512 #if FW_OBJECT_NAMES == 1
517 "%s_cmdRegOut_OutputPort[%d]",
534 #if FW_OBJECT_NAMES == 1
539 "%s_eventOut_OutputPort[%d]",
556 #if FW_OBJECT_NAMES == 1
561 "%s_pingOut_OutputPort[%d]",
571 #if FW_ENABLE_TEXT_LOGGING == 1
574 port < this->getNum_LogText_OutputPorts();
577 this->m_LogText_OutputPort[port].
init();
579 #if FW_OBJECT_NAMES == 1
584 "%s_LogText_OutputPort[%d]",
588 this->m_LogText_OutputPort[port].setObjName(portName);
597 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
622 return this->m_bufferGetCaller_OutputPort[
portNum].invoke(
size);
650 getNum_bufferGetCaller_OutputPorts(
void)
653 this->m_bufferGetCaller_OutputPort
666 getNum_cmdIn_InputPorts(
void)
669 this->m_cmdIn_InputPort
729 #if FW_ENABLE_TEXT_LOGGING == 1
731 getNum_LogText_OutputPorts(
void)
734 this->m_LogText_OutputPort
743 bool FileDownlinkComponentBase ::
747 portNum < this->getNum_bufferGetCaller_OutputPorts(),
750 return this->m_bufferGetCaller_OutputPort[
portNum].isConnected();
823 #if FW_ENABLE_TEXT_LOGGING == 1
824 bool FileDownlinkComponentBase ::
828 portNum < this->getNum_LogText_OutputPorts(),
831 return this->m_LogText_OutputPort[
portNum].isConnected();
839 void FileDownlinkComponentBase ::
851 FileDownlinkComponentBase* compPtr =
852 (FileDownlinkComponentBase*) callComp;
854 const U32 idBase = callComp->
getIdBase();
856 switch (
opCode - idBase) {
858 case OPCODE_FILEDOWNLINK_SENDFILE:
859 compPtr->FileDownlink_SendFile_cmdHandlerBase(
867 compPtr->FileDownlink_Cancel_cmdHandlerBase(
875 compPtr->cmdResponse_out(
886 void FileDownlinkComponentBase ::
901 void FileDownlinkComponentBase ::
902 FileDownlink_SendFile_cmdHandlerBase(
914 ComponentIpcSerializableBuffer msg;
926 _status = msg.serialize(port);
932 _status = msg.serialize(
opCode);
938 _status = msg.serialize(
cmdSeq);
944 _status = msg.serialize(
args);
962 void FileDownlinkComponentBase::
963 FileDownlink_SendFile_preMsgHook(
979 #if FW_CMD_CHECK_RESIDUAL
1000 void FileDownlinkComponentBase ::
1001 tlmWrite_FileDownlink_FilesSent(U32 arg)
1018 _id = this->
getIdBase() + CHANNELID_FILEDOWNLINK_FILESSENT;
1091 Fw::Time FileDownlinkComponentBase ::
1107 void FileDownlinkComponentBase ::
1108 log_WARNING_HI_FileDownlink_FileOpenError(
1122 _id = this->
getIdBase() + EVENTID_FILEDOWNLINK_FILEOPENERROR;
1130 #if FW_AMPCS_COMPATIBLE
1156 #if FW_ENABLE_TEXT_LOGGING
1157 if (this->m_LogText_OutputPort[0].isConnected()) {
1159 #if FW_OBJECT_NAMES == 1
1160 const char* _formatString =
1161 "(%s) %s: Could not open file %s";
1163 const char* _formatString =
1164 "%s: Could not open file %s";
1176 "FileDownlink_FileOpenError "
1183 this->m_LogText_OutputPort[0].invoke(
1218 #if FW_AMPCS_COMPATIBLE
1244 #if FW_ENABLE_TEXT_LOGGING
1245 if (this->m_LogText_OutputPort[0].isConnected()) {
1247 #if FW_OBJECT_NAMES == 1
1248 const char* _formatString =
1249 "(%s) %s: Could not read file %s";
1251 const char* _formatString =
1252 "%s: Could not read file %s";
1264 "FileDownlink_FileReadError "
1271 this->m_LogText_OutputPort[0].invoke(
1306 #if FW_AMPCS_COMPATIBLE
1339 #if FW_ENABLE_TEXT_LOGGING
1340 if (this->m_LogText_OutputPort[0].isConnected()) {
1342 #if FW_OBJECT_NAMES == 1
1343 const char* _formatString =
1344 "(%s) %s: Sent file %s to file %s";
1346 const char* _formatString =
1347 "%s: Sent file %s to file %s";
1359 "FileDownlink_FileSent "
1367 this->m_LogText_OutputPort[0].invoke(
1402 #if FW_AMPCS_COMPATIBLE
1435 #if FW_ENABLE_TEXT_LOGGING
1436 if (this->m_LogText_OutputPort[0].isConnected()) {
1438 #if FW_OBJECT_NAMES == 1
1439 const char* _formatString =
1440 "(%s) %s: Canceled downlink of file %s to file %s";
1442 const char* _formatString =
1443 "%s: Canceled downlink of file %s to file %s";
1455 "FileDownlink_DownlinkCanceled "
1463 this->m_LogText_OutputPort[0].invoke(
1496 void FileDownlinkComponentBase ::
1512 ComponentIpcSerializableBuffer msg;
1515 _status = msg.serialize(
1523 _status = msg.serialize(
portNum);
1530 _status = msg.serialize(
key);
1553 void FileDownlinkComponentBase ::
1570 ComponentIpcSerializableBuffer msg;
1589 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
1591 if (msgType == FILEDOWNLINK_COMPONENT_EXIT) {
1596 deserStatus = msg.deserialize(
portNum);
1609 deserStatus = msg.deserialize(
key);
1616 this->pingIn_handler(
1626 case CMD_FILEDOWNLINK_SENDFILE: {
1629 deserStatus = msg.deserialize(
opCode);
1637 deserStatus = msg.deserialize(
cmdSeq);
1645 deserStatus = msg.deserialize(
args);
1659 this->cmdResponse_out(
1674 this->cmdResponse_out(
1686 #if FW_CMD_CHECK_RESIDUAL
1696 this->FileDownlink_SendFile_cmdHandler(