10 #if FW_ENABLE_TEXT_LOGGING
19 BUFFERSENDIN_BUFFERSEND,
21 CMD_CLEAR_EVENT_THROTTLE,
34 class ComponentIpcSerializableBuffer :
49 return sizeof(m_buff);
56 const U8* getBuffAddr()
const {
62 U8 m_buff[SERIALIZATION_SIZE];
86 this->m_cmdIn_InputPort[port].
init();
91 this->m_cmdIn_InputPort[port].
setPortNum(port);
93 #if FW_OBJECT_NAMES == 1
97 this->m_objName.toChar(),
100 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
110 this->m_bufferSendIn_InputPort[port].
init();
115 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
117 #if FW_OBJECT_NAMES == 1
121 this->m_objName.toChar(),
124 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
134 this->m_schedIn_InputPort[port].
init();
139 this->m_schedIn_InputPort[port].
setPortNum(port);
141 #if FW_OBJECT_NAMES == 1
145 this->m_objName.toChar(),
148 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
158 this->m_cmdRegIn_OutputPort[port].
init();
160 #if FW_OBJECT_NAMES == 1
164 this->m_objName.toChar(),
167 this->m_cmdRegIn_OutputPort[port].setObjName(portName.
toChar());
177 this->m_cmdResponseOut_OutputPort[port].
init();
179 #if FW_OBJECT_NAMES == 1
183 this->m_objName.toChar(),
186 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
196 this->m_eventOut_OutputPort[port].
init();
198 #if FW_OBJECT_NAMES == 1
202 this->m_objName.toChar(),
205 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
209 #if FW_ENABLE_TEXT_LOGGING == 1
213 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
216 this->m_textEventOut_OutputPort[port].
init();
218 #if FW_OBJECT_NAMES == 1
222 this->m_objName.toChar(),
225 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
236 this->m_timeGetOut_OutputPort[port].
init();
238 #if FW_OBJECT_NAMES == 1
242 this->m_objName.toChar(),
245 this->m_timeGetOut_OutputPort[port].setObjName(portName.
toChar());
255 this->m_tlmOut_OutputPort[port].
init();
257 #if FW_OBJECT_NAMES == 1
261 this->m_objName.toChar(),
264 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
274 this->m_deallocBufferSendOut_OutputPort[port].
init();
276 #if FW_OBJECT_NAMES == 1
280 this->m_objName.toChar(),
283 this->m_deallocBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
293 this->m_dpWrittenOut_OutputPort[port].
init();
295 #if FW_OBJECT_NAMES == 1
299 this->m_objName.toChar(),
302 this->m_dpWrittenOut_OutputPort[port].setObjName(portName.
toChar());
312 this->m_procBufferSendOut_OutputPort[port].
init();
314 #if FW_OBJECT_NAMES == 1
318 this->m_objName.toChar(),
321 this->m_procBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
327 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
347 return &this->m_cmdIn_InputPort[portNum];
362 return &this->m_bufferSendIn_InputPort[portNum];
373 return &this->m_schedIn_InputPort[portNum];
391 this->m_cmdRegIn_OutputPort[portNum].
addCallPort(port);
405 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
419 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
422 #if FW_ENABLE_TEXT_LOGGING == 1
424 void DpWriterComponentBase ::
425 set_textEventOut_OutputPort(
431 portNum < this->getNum_textEventOut_OutputPorts(),
435 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
451 this->m_timeGetOut_OutputPort[portNum].
addCallPort(port);
465 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
483 this->m_deallocBufferSendOut_OutputPort[portNum].
addCallPort(port);
497 this->m_dpWrittenOut_OutputPort[portNum].
addCallPort(port);
511 this->m_procBufferSendOut_OutputPort[portNum].
addCallPort(port);
514 #if FW_PORT_SERIALIZATION
523 Fw::InputSerializePort* port
531 this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
537 Fw::InputSerializePort* port
545 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
551 Fw::InputSerializePort* port
559 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
562 #if FW_ENABLE_TEXT_LOGGING == 1
564 void DpWriterComponentBase ::
565 set_textEventOut_OutputPort(
567 Fw::InputSerializePort* port
571 portNum < this->getNum_textEventOut_OutputPorts(),
575 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
583 Fw::InputSerializePort* port
591 this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
597 Fw::InputSerializePort* port
605 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
610 #if FW_PORT_SERIALIZATION
619 Fw::InputSerializePort* port
627 this->m_deallocBufferSendOut_OutputPort[portNum].registerSerialPort(port);
633 Fw::InputSerializePort* port
641 this->m_dpWrittenOut_OutputPort[portNum].registerSerialPort(port);
647 Fw::InputSerializePort* port
655 this->m_procBufferSendOut_OutputPort[portNum].registerSerialPort(port);
667 FW_ASSERT(this->m_cmdRegIn_OutputPort[0].isConnected());
669 this->m_cmdRegIn_OutputPort[0].
invoke(
680 Fw::ActiveComponentBase(compName)
683 this->m_first_update_NumBuffersReceived =
true;
684 this->m_last_NumBuffersReceived = 0;
687 this->m_first_update_NumBytesWritten =
true;
688 this->m_last_NumBytesWritten = 0;
691 this->m_first_update_NumSuccessfulWrites =
true;
692 this->m_last_NumSuccessfulWrites = 0;
695 this->m_first_update_NumFailedWrites =
true;
696 this->m_last_NumFailedWrites = 0;
699 this->m_first_update_NumErrors =
true;
700 this->m_last_NumErrors = 0;
702 this->m_InvalidBufferThrottle = 0;
703 this->m_BufferTooSmallForPacketThrottle = 0;
704 this->m_InvalidHeaderHashThrottle = 0;
705 this->m_InvalidHeaderThrottle = 0;
706 this->m_BufferTooSmallForDataThrottle = 0;
707 this->m_FileOpenErrorThrottle = 0;
708 this->m_FileWriteErrorThrottle = 0;
765 #if FW_ENABLE_TEXT_LOGGING == 1
768 getNum_textEventOut_OutputPorts()
const
821 return this->m_cmdRegIn_OutputPort[portNum].
isConnected();
832 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
843 return this->m_eventOut_OutputPort[portNum].
isConnected();
846 #if FW_ENABLE_TEXT_LOGGING == 1
848 bool DpWriterComponentBase ::
849 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
852 portNum < this->getNum_textEventOut_OutputPorts(),
856 return this->m_textEventOut_OutputPort[portNum].isConnected();
869 return this->m_timeGetOut_OutputPort[portNum].
isConnected();
880 return this->m_tlmOut_OutputPort[portNum].
isConnected();
895 return this->m_deallocBufferSendOut_OutputPort[portNum].
isConnected();
906 return this->m_dpWrittenOut_OutputPort[portNum].
isConnected();
917 return this->m_procBufferSendOut_OutputPort[portNum].
isConnected();
943 ComponentIpcSerializableBuffer msg;
947 _status = msg.serialize(
956 _status = msg.serialize(portNum);
963 _status = msg.serialize(fwBuffer);
996 ComponentIpcSerializableBuffer msg;
1000 _status = msg.serialize(
1009 _status = msg.serialize(portNum);
1016 _status = msg.serialize(context);
1072 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
1089 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1106 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1122 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1123 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1144 ComponentIpcSerializableBuffer msg;
1148 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1157 _status = msg.serialize(port);
1163 _status = msg.serialize(opCode);
1169 _status = msg.serialize(cmdSeq);
1175 _status = msg.serialize(args);
1222 this->m_InvalidBufferThrottle++;
1227 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1228 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1236 if (this->m_eventOut_OutputPort[0].isConnected()) {
1239 #if FW_AMPCS_COMPATIBLE
1249 this->m_eventOut_OutputPort[0].
invoke(
1258 #if FW_ENABLE_TEXT_LOGGING
1259 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1260 #if FW_OBJECT_NAMES == 1
1261 const char* _formatString =
1262 "(%s) %s: Received buffer is invalid";
1264 const char* _formatString =
1265 "%s: Received buffer is invalid";
1272 this->m_objName.toChar(),
1277 this->m_textEventOut_OutputPort[0].invoke(
1298 this->m_BufferTooSmallForPacketThrottle++;
1303 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1304 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1312 if (this->m_eventOut_OutputPort[0].isConnected()) {
1316 #if FW_AMPCS_COMPATIBLE
1325 #if FW_AMPCS_COMPATIBLE
1328 static_cast<U8>(
sizeof(U32))
1335 _status = _logBuff.
serialize(bufferSize);
1341 #if FW_AMPCS_COMPATIBLE
1344 static_cast<U8>(
sizeof(U32))
1357 this->m_eventOut_OutputPort[0].
invoke(
1366 #if FW_ENABLE_TEXT_LOGGING
1367 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1368 #if FW_OBJECT_NAMES == 1
1369 const char* _formatString =
1370 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1372 const char* _formatString =
1373 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1380 this->m_objName.toChar(),
1382 "BufferTooSmallForPacket ",
1387 this->m_textEventOut_OutputPort[0].invoke(
1409 this->m_InvalidHeaderHashThrottle++;
1414 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1415 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1423 if (this->m_eventOut_OutputPort[0].isConnected()) {
1427 #if FW_AMPCS_COMPATIBLE
1436 #if FW_AMPCS_COMPATIBLE
1439 static_cast<U8>(
sizeof(U32))
1446 _status = _logBuff.
serialize(bufferSize);
1452 #if FW_AMPCS_COMPATIBLE
1455 static_cast<U8>(
sizeof(U32))
1462 _status = _logBuff.
serialize(storedHash);
1468 #if FW_AMPCS_COMPATIBLE
1471 static_cast<U8>(
sizeof(U32))
1478 _status = _logBuff.
serialize(computedHash);
1484 this->m_eventOut_OutputPort[0].
invoke(
1493 #if FW_ENABLE_TEXT_LOGGING
1494 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1495 #if FW_OBJECT_NAMES == 1
1496 const char* _formatString =
1497 "(%s) %s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1499 const char* _formatString =
1500 "%s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1507 this->m_objName.toChar(),
1509 "InvalidHeaderHash ",
1515 this->m_textEventOut_OutputPort[0].invoke(
1536 this->m_InvalidHeaderThrottle++;
1541 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1542 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1550 if (this->m_eventOut_OutputPort[0].isConnected()) {
1554 #if FW_AMPCS_COMPATIBLE
1563 #if FW_AMPCS_COMPATIBLE
1566 static_cast<U8>(
sizeof(U32))
1573 _status = _logBuff.
serialize(bufferSize);
1579 #if FW_AMPCS_COMPATIBLE
1582 static_cast<U8>(
sizeof(U32))
1589 _status = _logBuff.
serialize(errorCode);
1595 this->m_eventOut_OutputPort[0].
invoke(
1604 #if FW_ENABLE_TEXT_LOGGING
1605 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1606 #if FW_OBJECT_NAMES == 1
1607 const char* _formatString =
1608 "(%s) %s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1610 const char* _formatString =
1611 "%s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1618 this->m_objName.toChar(),
1625 this->m_textEventOut_OutputPort[0].invoke(
1646 this->m_BufferTooSmallForDataThrottle++;
1651 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1652 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1660 if (this->m_eventOut_OutputPort[0].isConnected()) {
1664 #if FW_AMPCS_COMPATIBLE
1673 #if FW_AMPCS_COMPATIBLE
1676 static_cast<U8>(
sizeof(U32))
1683 _status = _logBuff.
serialize(bufferSize);
1689 #if FW_AMPCS_COMPATIBLE
1692 static_cast<U8>(
sizeof(U32))
1705 this->m_eventOut_OutputPort[0].
invoke(
1714 #if FW_ENABLE_TEXT_LOGGING
1715 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1716 #if FW_OBJECT_NAMES == 1
1717 const char* _formatString =
1718 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1720 const char* _formatString =
1721 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1728 this->m_objName.toChar(),
1730 "BufferTooSmallForData ",
1735 this->m_textEventOut_OutputPort[0].invoke(
1756 this->m_FileOpenErrorThrottle++;
1761 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1762 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1770 if (this->m_eventOut_OutputPort[0].isConnected()) {
1774 #if FW_AMPCS_COMPATIBLE
1783 #if FW_AMPCS_COMPATIBLE
1786 static_cast<U8>(
sizeof(U32))
1805 this->m_eventOut_OutputPort[0].
invoke(
1814 #if FW_ENABLE_TEXT_LOGGING
1815 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1816 #if FW_OBJECT_NAMES == 1
1817 const char* _formatString =
1818 "(%s) %s: Error %" PRIu32
" opening file %s";
1820 const char* _formatString =
1821 "%s: Error %" PRIu32
" opening file %s";
1828 this->m_objName.toChar(),
1835 this->m_textEventOut_OutputPort[0].invoke(
1858 this->m_FileWriteErrorThrottle++;
1863 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1864 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1872 if (this->m_eventOut_OutputPort[0].isConnected()) {
1876 #if FW_AMPCS_COMPATIBLE
1885 #if FW_AMPCS_COMPATIBLE
1888 static_cast<U8>(
sizeof(U32))
1901 #if FW_AMPCS_COMPATIBLE
1904 static_cast<U8>(
sizeof(U32))
1911 _status = _logBuff.
serialize(bytesWritten);
1917 #if FW_AMPCS_COMPATIBLE
1920 static_cast<U8>(
sizeof(U32))
1927 _status = _logBuff.
serialize(bytesToWrite);
1939 this->m_eventOut_OutputPort[0].
invoke(
1948 #if FW_ENABLE_TEXT_LOGGING
1949 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1950 #if FW_OBJECT_NAMES == 1
1951 const char* _formatString =
1952 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1954 const char* _formatString =
1955 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1962 this->m_objName.toChar(),
1971 this->m_textEventOut_OutputPort[0].invoke(
1989 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1990 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1998 if (this->m_eventOut_OutputPort[0].isConnected()) {
2002 #if FW_AMPCS_COMPATIBLE
2011 #if FW_AMPCS_COMPATIBLE
2014 static_cast<U8>(
sizeof(U32))
2033 this->m_eventOut_OutputPort[0].
invoke(
2042 #if FW_ENABLE_TEXT_LOGGING
2043 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2044 #if FW_OBJECT_NAMES == 1
2045 const char* _formatString =
2046 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
2048 const char* _formatString =
2049 "%s: Wrote %" PRIu32
" bytes to file %s";
2056 this->m_objName.toChar(),
2063 this->m_textEventOut_OutputPort[0].invoke(
2081 this->m_InvalidBufferThrottle = 0;
2088 this->m_BufferTooSmallForPacketThrottle = 0;
2095 this->m_InvalidHeaderHashThrottle = 0;
2102 this->m_InvalidHeaderThrottle = 0;
2109 this->m_BufferTooSmallForDataThrottle = 0;
2116 this->m_FileOpenErrorThrottle = 0;
2123 this->m_FileWriteErrorThrottle = 0;
2137 if (not this->m_first_update_NumBuffersReceived) {
2139 if (arg == this->m_last_NumBuffersReceived) {
2143 this->m_last_NumBuffersReceived = arg;
2147 this->m_first_update_NumBuffersReceived =
false;
2148 this->m_last_NumBuffersReceived = arg;
2151 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2153 this->m_timeGetOut_OutputPort[0].isConnected() &&
2156 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2170 this->m_tlmOut_OutputPort[0].
invoke(
2185 if (not this->m_first_update_NumBytesWritten) {
2187 if (arg == this->m_last_NumBytesWritten) {
2191 this->m_last_NumBytesWritten = arg;
2195 this->m_first_update_NumBytesWritten =
false;
2196 this->m_last_NumBytesWritten = arg;
2199 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2201 this->m_timeGetOut_OutputPort[0].isConnected() &&
2204 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2218 this->m_tlmOut_OutputPort[0].
invoke(
2233 if (not this->m_first_update_NumSuccessfulWrites) {
2235 if (arg == this->m_last_NumSuccessfulWrites) {
2239 this->m_last_NumSuccessfulWrites = arg;
2243 this->m_first_update_NumSuccessfulWrites =
false;
2244 this->m_last_NumSuccessfulWrites = arg;
2247 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2249 this->m_timeGetOut_OutputPort[0].isConnected() &&
2252 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2266 this->m_tlmOut_OutputPort[0].
invoke(
2281 if (not this->m_first_update_NumFailedWrites) {
2283 if (arg == this->m_last_NumFailedWrites) {
2287 this->m_last_NumFailedWrites = arg;
2291 this->m_first_update_NumFailedWrites =
false;
2292 this->m_last_NumFailedWrites = arg;
2295 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2297 this->m_timeGetOut_OutputPort[0].isConnected() &&
2300 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2314 this->m_tlmOut_OutputPort[0].
invoke(
2329 if (not this->m_first_update_NumErrors) {
2331 if (arg == this->m_last_NumErrors) {
2335 this->m_last_NumErrors = arg;
2339 this->m_first_update_NumErrors =
false;
2340 this->m_last_NumErrors = arg;
2343 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2345 this->m_timeGetOut_OutputPort[0].isConnected() &&
2348 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2362 this->m_tlmOut_OutputPort[0].
invoke(
2377 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
2379 this->m_timeGetOut_OutputPort[0].
invoke(_time);
2394 ComponentIpcSerializableBuffer msg;
2417 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2419 if (msgType == DPWRITER_COMPONENT_EXIT) {
2424 deserStatus = msg.deserialize(portNum);
2432 case BUFFERSENDIN_BUFFERSEND: {
2450 case SCHEDIN_SCHED: {
2453 deserStatus = msg.deserialize(context);
2468 case CMD_CLEAR_EVENT_THROTTLE: {
2471 deserStatus = msg.deserialize(opCode);
2479 deserStatus = msg.deserialize(cmdSeq);
2498 #if FW_CMD_CHECK_RESIDUAL
2500 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2525 void DpWriterComponentBase ::
2537 const U32 idBase = callComp->
getIdBase();
2541 switch (opCode - idBase) {
2543 compPtr->CLEAR_EVENT_THROTTLE_cmdHandlerBase(
2557 void DpWriterComponentBase ::
2558 m_p_bufferSendIn_in(
2566 compPtr->bufferSendIn_handlerBase(
2572 void DpWriterComponentBase ::
2581 compPtr->schedIn_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_LO
Less important informational events.
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
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
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum)
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocBufferSendOut.
void log_WARNING_HI_BufferTooSmallForData(U32 bufferSize, U32 minSize)
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_bufferSendIn_InputPorts() const
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
Invoke output port dpWrittenOut.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
void log_WARNING_HI_FileOpenError(U32 status, const Fw::StringBase &file)
void log_WARNING_HI_FileWriteError(U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_deallocBufferSendOut_OutputPorts() const
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_cmdResponseOut_OutputPorts() const
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
void log_WARNING_HI_InvalidBuffer()
FwIndexType getNum_cmdRegIn_OutputPorts() const
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
@ EVENTID_INVALIDHEADER
Error occurred when deserializing the packet header.
@ EVENTID_INVALIDBUFFER
Received buffer is invalid.
@ EVENTID_BUFFERTOOSMALLFORDATA
Received buffer is too small to hold the data specified in the header.
@ EVENTID_FILEWRITTEN
File written.
@ EVENTID_BUFFERTOOSMALLFORPACKET
Received buffer is too small to hold a data product packet.
@ EVENTID_INVALIDHEADERHASH
The received buffer has an invalid header hash.
@ EVENTID_FILEWRITEERROR
An error occurred when writing to a file.
@ EVENTID_FILEOPENERROR
An error occurred when opening a file.
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
void log_WARNING_HI_FileWriteError_ThrottleClear()
Reset throttle value for FileWriteError.
FwIndexType getNum_tlmOut_OutputPorts() const
FwIndexType getNum_procBufferSendOut_OutputPorts() const
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
void tlmWrite_NumBuffersReceived(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_LO_FileWritten(U32 bytes, const Fw::StringBase &file)
@ CHANNELID_NUMBUFFERSRECEIVED
Channel ID for NumBuffersReceived.
@ CHANNELID_NUMBYTESWRITTEN
Channel ID for NumBytesWritten.
@ CHANNELID_NUMSUCCESSFULWRITES
Channel ID for NumSuccessfulWrites.
@ CHANNELID_NUMERRORS
Channel ID for NumErrors.
@ CHANNELID_NUMFAILEDWRITES
Channel ID for NumFailedWrites.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port procBufferSendOut.
void regCommands()
Register commands with the Command Dispatcher.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
void tlmWrite_NumBytesWritten(U64 arg, Fw::Time _tlmTime=Fw::Time())
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void log_WARNING_HI_BufferTooSmallForPacket(U32 bufferSize, U32 minSize)
void log_WARNING_HI_InvalidHeader(U32 bufferSize, U32 errorCode)
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
FwIndexType getNum_schedIn_InputPorts() const
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
@ EVENTID_INVALIDHEADER_THROTTLE
Throttle reset count for InvalidHeader.
@ EVENTID_INVALIDHEADERHASH_THROTTLE
Throttle reset count for InvalidHeaderHash.
@ EVENTID_FILEWRITEERROR_THROTTLE
Throttle reset count for FileWriteError.
@ EVENTID_BUFFERTOOSMALLFORDATA_THROTTLE
Throttle reset count for BufferTooSmallForData.
@ EVENTID_FILEOPENERROR_THROTTLE
Throttle reset count for FileOpenError.
@ EVENTID_INVALIDBUFFER_THROTTLE
Throttle reset count for InvalidBuffer.
@ EVENTID_BUFFERTOOSMALLFORPACKET_THROTTLE
Throttle reset count for BufferTooSmallForPacket.
FwIndexType getNum_timeGetOut_OutputPorts() const
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_dpWrittenOut_OutputPorts() const
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_FileOpenError_ThrottleClear()
Reset throttle value for FileOpenError.
FwIndexType getNum_cmdIn_InputPorts() const
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
void tlmWrite_NumFailedWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_eventOut_OutputPorts() const
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
Reset throttle value for BufferTooSmallForData.
@ OPCODE_CLEAR_EVENT_THROTTLE
Clear event throttling.
void log_WARNING_HI_InvalidHeaderHash(U32 bufferSize, U32 storedHash, U32 computedHash)
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
Invoke a port interface.
void addCallPort(InputDpWrittenPort *callPort)
Register an input port.
void init()
Initialization function.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.