9 #if FW_ENABLE_TEXT_LOGGING 31 class ComponentIpcSerializableBuffer :
41 MAX_DATA_SIZE =
sizeof(BuffUnion),
43 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
47 return sizeof(m_buff);
54 const U8* getBuffAddr()
const {
60 U8 m_buff[SERIALIZATION_SIZE];
84 this->m_CycleIn_InputPort[port].
init();
89 this->m_CycleIn_InputPort[port].
setPortNum(port);
91 #if FW_OBJECT_NAMES == 1 95 this->m_objName.toChar(),
98 this->m_CycleIn_InputPort[port].setObjName(portName.
toChar());
108 this->m_logOut_OutputPort[port].
init();
110 #if FW_OBJECT_NAMES == 1 114 this->m_objName.toChar(),
117 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
121 #if FW_ENABLE_TEXT_LOGGING == 1 125 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
128 this->m_logTextOut_OutputPort[port].
init();
130 #if FW_OBJECT_NAMES == 1 134 this->m_objName.toChar(),
137 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
148 this->m_timeCaller_OutputPort[port].
init();
150 #if FW_OBJECT_NAMES == 1 154 this->m_objName.toChar(),
157 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
167 this->m_tlmOut_OutputPort[port].
init();
169 #if FW_OBJECT_NAMES == 1 173 this->m_objName.toChar(),
176 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
186 this->m_PhaserMemberOut_OutputPort[port].
init();
188 #if FW_OBJECT_NAMES == 1 192 this->m_objName.toChar(),
195 this->m_PhaserMemberOut_OutputPort[port].setObjName(portName.
toChar());
202 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
206 static_cast<FwAssertArgType>(qStat)
219 static_cast<FwAssertArgType>(portNum)
222 return &this->m_CycleIn_InputPort[portNum];
237 static_cast<FwAssertArgType>(portNum)
240 this->m_logOut_OutputPort[portNum].
addCallPort(port);
243 #if FW_ENABLE_TEXT_LOGGING == 1 245 void ActivePhaserComponentBase ::
246 set_logTextOut_OutputPort(
252 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
253 static_cast<FwAssertArgType>(portNum)
256 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
269 static_cast<FwAssertArgType>(portNum)
272 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
283 static_cast<FwAssertArgType>(portNum)
286 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
301 static_cast<FwAssertArgType>(portNum)
304 this->m_PhaserMemberOut_OutputPort[portNum].
addCallPort(port);
307 #if FW_PORT_SERIALIZATION 316 Fw::InputSerializePort* port
321 static_cast<FwAssertArgType>(portNum)
324 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
327 #if FW_ENABLE_TEXT_LOGGING == 1 329 void ActivePhaserComponentBase ::
330 set_logTextOut_OutputPort(
332 Fw::InputSerializePort* port
336 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
337 static_cast<FwAssertArgType>(portNum)
340 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
348 Fw::InputSerializePort* port
353 static_cast<FwAssertArgType>(portNum)
356 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
362 Fw::InputSerializePort* port
367 static_cast<FwAssertArgType>(portNum)
370 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
375 #if FW_PORT_SERIALIZATION 384 Fw::InputSerializePort* port
389 static_cast<FwAssertArgType>(portNum)
392 this->m_PhaserMemberOut_OutputPort[portNum].registerSerialPort(port);
403 Fw::ActiveComponentBase(compName)
405 this->m_MissedDeadlineThrottle = 0;
423 static_cast<FwAssertArgType>(portNum)
426 return this->m_logOut_OutputPort[portNum].
isConnected();
429 #if FW_ENABLE_TEXT_LOGGING == 1 431 bool ActivePhaserComponentBase ::
432 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
435 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
436 static_cast<FwAssertArgType>(portNum)
439 return this->m_logTextOut_OutputPort[portNum].isConnected();
449 static_cast<FwAssertArgType>(portNum)
452 return this->m_timeCaller_OutputPort[portNum].
isConnected();
460 static_cast<FwAssertArgType>(portNum)
463 return this->m_tlmOut_OutputPort[portNum].
isConnected();
475 static_cast<FwAssertArgType>(portNum)
478 return this->m_PhaserMemberOut_OutputPort[portNum].
isConnected();
496 static_cast<FwAssertArgType>(portNum)
504 ComponentIpcSerializableBuffer msg;
508 _status = msg.serializeFrom(
509 static_cast<FwEnumStoreType>(CYCLEIN_CYCLE)
513 static_cast<FwAssertArgType>(_status)
517 _status = msg.serializeFrom(portNum);
520 static_cast<FwAssertArgType>(_status)
524 _status = msg.serializeFrom(cycleStart);
527 static_cast<FwAssertArgType>(_status)
534 if (qStatus == Os::Queue::Status::FULL) {
541 static_cast<FwAssertArgType>(qStatus)
574 static_cast<FwAssertArgType>(portNum)
578 this->m_PhaserMemberOut_OutputPort[portNum].isConnected(),
579 static_cast<FwAssertArgType>(portNum)
581 this->m_PhaserMemberOut_OutputPort[portNum].
invoke(
593 ComponentIpcSerializableBuffer msg;
597 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(INT_IF_TICK));
600 static_cast<FwAssertArgType>(_status)
604 _status = msg.serializeFrom(static_cast<FwIndexType>(0));
607 static_cast<FwAssertArgType>(_status)
614 if (qStatus == Os::Queue::Status::FULL) {
621 static_cast<FwAssertArgType>(qStatus)
642 this->m_MissedDeadlineThrottle++;
647 if (this->m_timeCaller_OutputPort[0].isConnected()) {
648 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
656 if (this->m_logOut_OutputPort[0].isConnected()) {
660 #if FW_AMPCS_COMPATIBLE 665 static_cast<FwAssertArgType>(_status)
669 #if FW_AMPCS_COMPATIBLE 676 static_cast<FwAssertArgType>(_status)
682 static_cast<FwAssertArgType>(_status)
685 #if FW_AMPCS_COMPATIBLE 688 static_cast<U8>(
sizeof(U32))
692 static_cast<FwAssertArgType>(_status)
698 static_cast<FwAssertArgType>(_status)
701 #if FW_AMPCS_COMPATIBLE 704 static_cast<U8>(
sizeof(U32))
708 static_cast<FwAssertArgType>(_status)
714 static_cast<FwAssertArgType>(_status)
717 #if FW_AMPCS_COMPATIBLE 720 static_cast<U8>(
sizeof(U32))
724 static_cast<FwAssertArgType>(_status)
730 static_cast<FwAssertArgType>(_status)
733 this->m_logOut_OutputPort[0].
invoke(
742 #if FW_ENABLE_TEXT_LOGGING 743 if (this->m_logTextOut_OutputPort[0].isConnected()) {
744 #if FW_OBJECT_NAMES == 1 745 const char* _formatString =
746 "(%s) %s: Port %" PRIi16
" schedule at %" PRIu32
" for %" PRIu32
" ticks was long by %" PRIu32
" ticks";
748 const char* _formatString =
749 "%s: Port %" PRIi16
" schedule at %" PRIu32
" for %" PRIu32
" ticks was long by %" PRIu32
" ticks";
756 this->m_objName.toChar(),
765 this->m_logTextOut_OutputPort[0].invoke(
783 this->m_MissedDeadlineThrottle = 0;
793 if (this->m_timeCaller_OutputPort[0].isConnected()) {
795 this->m_timeCaller_OutputPort[0].
invoke(_time);
810 ComponentIpcSerializableBuffer _msg;
820 static_cast<FwAssertArgType>(_msgStatus)
830 static_cast<FwAssertArgType>(_deserStatus)
833 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
835 if (_msgType == ACTIVEPHASER_COMPONENT_EXIT) {
840 _deserStatus = _msg.deserializeTo(portNum);
843 static_cast<FwAssertArgType>(_deserStatus)
848 case CYCLEIN_CYCLE: {
851 _deserStatus = _msg.deserializeTo(cycleStart);
854 static_cast<FwAssertArgType>(_deserStatus)
870 _msg.getDeserializeSizeLeft() == 0,
891 void ActivePhaserComponentBase ::
900 compPtr->CycleIn_handlerBase(
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_CycleIn_InputPorts()
void addCallPort(InputTimePort *callPort)
Register an input port.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Status
status returned from the queue send function
Throttle reset count for MissedDeadline.
Warning event that rate group has had a missed deadline.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_PhaserMemberOut_OutputPort(FwIndexType portNum, Svc::InputSchedPort *port)
Connect port to PhaserMemberOut[portNum].
bool isConnected_PhaserMemberOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
No time base has been established (Required)
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
SerializeStatus
forward declaration for string
message to exit active component task
Message will block until space is available.
FwIdType FwEventIdType
The type of an event identifier.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void invoke(U32 context) const
Invoke a port interface.
ActivePhaserComponentBase(const char *compName="")
Construct ActivePhaserComponentBase object.
void invoke(Fw::Time &time) const
Invoke a port interface.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
const char * toChar() const
Convert to a C-style char*.
virtual ~ActivePhaserComponentBase()
Destroy ActivePhaserComponentBase object.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
A serious but recoverable event.
Errors dispatching messages.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void PhaserMemberOut_out(FwIndexType portNum, U32 context)
Invoke output port PhaserMemberOut.
void Tick_internalInterfaceInvoke()
Internal interface base-class function for Tick.
uint8_t U8
8-bit unsigned integer
Svc::InputCyclePort * get_CycleIn_InputPort(FwIndexType portNum)
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
A message was sent requesting an exit of the loop.
PlatformIndexType FwIndexType
virtual void Tick_internalInterfaceHandler()=0
Internal interface handler for Tick.
static constexpr FwIndexType getNum_PhaserMemberOut_OutputPorts()
void addCallPort(InputLogPort *callPort)
Register an input port.
void log_WARNING_HI_MissedDeadline_ThrottleClear()
Reset throttle value for MissedDeadline.
void init()
Initialization function.
void CycleIn_handlerBase(FwIndexType portNum, Os::RawTime &cycleStart)
Handler base-class function for input port CycleIn.
virtual void CycleIn_handler(FwIndexType portNum, Os::RawTime &cycleStart)=0
Handler for input port CycleIn.
void incNumMsgDropped()
increment the number of messages dropped
RateGroupDivider component implementation.
message sent/received okay
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
virtual void CycleIn_preMsgHook(FwIndexType portNum, Os::RawTime &cycleStart)
Pre-message hook for async input port CycleIn.
void start(FwTaskPriorityType priority=Os::Task::TASK_PRIORITY_DEFAULT, FwSizeType stackSize=Os::Task::TASK_DEFAULT, FwSizeType cpuAffinity=Os::Task::TASK_DEFAULT, FwTaskIdType identifier=static_cast< FwTaskIdType >(Os::Task::TASK_DEFAULT))
called by instantiator when task is to be started
Message will return with status when space is unavailable.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Implementation of malloc based allocator.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void addCallPort(InputSchedPort *callPort)
Register an input port.
void log_WARNING_HI_MissedDeadline(FwIndexType p, U32 start, U32 length, U32 ticks)