10 #if FW_ENABLE_TEXT_LOGGING 26 BYTE TextQueueIntIfSize[
33 class ComponentIpcSerializableBuffer :
43 MAX_DATA_SIZE =
sizeof(BuffUnion),
45 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
49 return sizeof(m_buff);
56 const U8* getBuffAddr()
const {
62 U8 m_buff[SERIALIZATION_SIZE];
86 this->m_TextLogger_InputPort[port].
init();
91 this->m_TextLogger_InputPort[port].
setPortNum(port);
93 #if FW_OBJECT_NAMES == 1 97 this->m_objName.toChar(),
100 this->m_TextLogger_InputPort[port].setObjName(portName.
toChar());
107 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
111 static_cast<FwAssertArgType>(qStat)
124 static_cast<FwAssertArgType>(portNum)
127 return &this->m_TextLogger_InputPort[portNum];
136 Fw::ActiveComponentBase(compName)
175 static_cast<FwAssertArgType>(portNum)
195 ComponentIpcSerializableBuffer msg;
199 _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_TEXTQUEUE));
202 static_cast<FwAssertArgType>(_status)
206 _status = msg.serialize(static_cast<FwIndexType>(0));
209 static_cast<FwAssertArgType>(_status)
212 _status = msg.serialize(text);
215 static_cast<FwAssertArgType>(_status)
222 if (qStatus == Os::Queue::Status::FULL) {
229 static_cast<FwAssertArgType>(qStatus)
240 ComponentIpcSerializableBuffer msg;
250 static_cast<FwAssertArgType>(msgStatus)
260 static_cast<FwAssertArgType>(deserStatus)
263 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
265 if (msgType == ACTIVETEXTLOGGER_COMPONENT_EXIT) {
270 deserStatus = msg.deserialize(portNum);
273 static_cast<FwAssertArgType>(deserStatus)
278 case INT_IF_TEXTQUEUE: {
280 deserStatus = msg.deserialize(text);
285 static_cast<FwAssertArgType>(deserStatus)
291 msg.getBuffLeft() == 0,
314 void ActiveTextLoggerComponentBase ::
326 compPtr->TextLogger_handlerBase(
Serialization/Deserialization operation was successful.
PlatformAssertArgType FwAssertArgType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
virtual void TextQueue_internalInterfaceHandler(const Fw::InternalInterfaceString &text)=0
Internal interface handler for TextQueue.
void init()
Initialization function.
NATIVE_UINT_TYPE SizeType
Status
status returned from the queue send function
PlatformSizeType FwSizeType
virtual void TextLogger_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)=0
Handler for input port TextLogger.
ActiveTextLoggerComponentBase(const char *compName="")
Construct ActiveTextLoggerComponentBase object.
PlatformIndexType FwIndexType
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
SerializeStatus
forward declaration for string
Message will block until space is available.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
virtual ~ActiveTextLoggerComponentBase()
Destroy ActiveTextLoggerComponentBase object.
Fw::InputLogTextPort * get_TextLogger_InputPort(FwIndexType portNum)
const char * toChar() const
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Errors dispatching messages.
Enum representing event severity.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
uint8_t U8
8-bit unsigned integer
#define PRI_PlatformIntType
PlatformQueuePriorityType FwQueuePriorityType
message to exit active component task
A message was sent requesting an exit of the loop.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void incNumMsgDropped()
increment the number of messages dropped
message sent/received okay
Message will return with status when space is unavailable.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void TextLogger_handlerBase(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::TextLogString &text)
Handler base-class function for input port TextLogger.
void TextQueue_internalInterfaceInvoke(const Fw::InternalInterfaceString &text)
Internal interface base-class function for TextQueue.
FwIndexType getNum_TextLogger_InputPorts() const