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;
434 #if FW_ENABLE_TEXT_LOGGING == 1 437 getNum_logTextOut_OutputPorts()
const 475 static_cast<FwAssertArgType>(portNum)
478 return this->m_logOut_OutputPort[portNum].
isConnected();
481 #if FW_ENABLE_TEXT_LOGGING == 1 483 bool ActivePhaserComponentBase ::
484 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
487 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
488 static_cast<FwAssertArgType>(portNum)
491 return this->m_logTextOut_OutputPort[portNum].isConnected();
501 static_cast<FwAssertArgType>(portNum)
504 return this->m_timeCaller_OutputPort[portNum].
isConnected();
512 static_cast<FwAssertArgType>(portNum)
515 return this->m_tlmOut_OutputPort[portNum].
isConnected();
527 static_cast<FwAssertArgType>(portNum)
530 return this->m_PhaserMemberOut_OutputPort[portNum].
isConnected();
548 static_cast<FwAssertArgType>(portNum)
556 ComponentIpcSerializableBuffer msg;
560 _status = msg.serializeFrom(
561 static_cast<FwEnumStoreType>(CYCLEIN_CYCLE)
565 static_cast<FwAssertArgType>(_status)
569 _status = msg.serializeFrom(portNum);
572 static_cast<FwAssertArgType>(_status)
576 _status = msg.serializeFrom(cycleStart);
579 static_cast<FwAssertArgType>(_status)
586 if (qStatus == Os::Queue::Status::FULL) {
593 static_cast<FwAssertArgType>(qStatus)
626 static_cast<FwAssertArgType>(portNum)
630 this->m_PhaserMemberOut_OutputPort[portNum].isConnected(),
631 static_cast<FwAssertArgType>(portNum)
633 this->m_PhaserMemberOut_OutputPort[portNum].
invoke(
645 ComponentIpcSerializableBuffer msg;
649 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(INT_IF_TICK));
652 static_cast<FwAssertArgType>(_status)
656 _status = msg.serializeFrom(static_cast<FwIndexType>(0));
659 static_cast<FwAssertArgType>(_status)
666 if (qStatus == Os::Queue::Status::FULL) {
673 static_cast<FwAssertArgType>(qStatus)
694 (void) this->m_MissedDeadlineThrottle.fetch_add(1);
699 if (this->m_timeCaller_OutputPort[0].isConnected()) {
700 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
708 if (this->m_logOut_OutputPort[0].isConnected()) {
712 #if FW_AMPCS_COMPATIBLE 717 static_cast<FwAssertArgType>(_status)
721 #if FW_AMPCS_COMPATIBLE 728 static_cast<FwAssertArgType>(_status)
734 static_cast<FwAssertArgType>(_status)
737 #if FW_AMPCS_COMPATIBLE 740 static_cast<U8>(
sizeof(U32))
744 static_cast<FwAssertArgType>(_status)
750 static_cast<FwAssertArgType>(_status)
753 #if FW_AMPCS_COMPATIBLE 756 static_cast<U8>(
sizeof(U32))
760 static_cast<FwAssertArgType>(_status)
766 static_cast<FwAssertArgType>(_status)
769 #if FW_AMPCS_COMPATIBLE 772 static_cast<U8>(
sizeof(U32))
776 static_cast<FwAssertArgType>(_status)
782 static_cast<FwAssertArgType>(_status)
785 this->m_logOut_OutputPort[0].
invoke(
794 #if FW_ENABLE_TEXT_LOGGING 795 if (this->m_logTextOut_OutputPort[0].isConnected()) {
796 #if FW_OBJECT_NAMES == 1 797 const char* _formatString =
798 "(%s) %s: Port %" PRIi16
" schedule at %" PRIu32
" for %" PRIu32
" ticks was long by %" PRIu32
" ticks";
800 const char* _formatString =
801 "%s: Port %" PRIi16
" schedule at %" PRIu32
" for %" PRIu32
" ticks was long by %" PRIu32
" ticks";
808 this->m_objName.toChar(),
817 this->m_logTextOut_OutputPort[0].invoke(
835 this->m_MissedDeadlineThrottle = 0;
845 if (this->m_timeCaller_OutputPort[0].isConnected()) {
847 this->m_timeCaller_OutputPort[0].
invoke(_time);
862 ComponentIpcSerializableBuffer _msg;
872 static_cast<FwAssertArgType>(_msgStatus)
882 static_cast<FwAssertArgType>(_deserStatus)
885 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
887 if (_msgType == ACTIVEPHASER_COMPONENT_EXIT) {
892 _deserStatus = _msg.deserializeTo(portNum);
895 static_cast<FwAssertArgType>(_deserStatus)
900 case CYCLEIN_CYCLE: {
903 _deserStatus = _msg.deserializeTo(cycleStart);
906 static_cast<FwAssertArgType>(_deserStatus)
922 _msg.getBuffLeft() == 0,
943 void ActivePhaserComponentBase ::
952 compPtr->CycleIn_handlerBase(
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
message to exit active component task
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
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
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
Warning event that rate group has had a missed deadline.
Message will block until space is available.
FwIdType FwEventIdType
The type of an event identifier.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_logOut_OutputPorts() const
#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.
const char * toChar() const
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
FwIndexType getNum_tlmOut_OutputPorts() const
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)
FwIndexType getNum_PhaserMemberOut_OutputPorts() const
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.
Throttle reset count for MissedDeadline.
PlatformIndexType FwIndexType
virtual void Tick_internalInterfaceHandler()=0
Internal interface handler for Tick.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
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].
SerializeStatus serializeFrom(U8 val)
serialize 8-bit unsigned int
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.
FwIndexType getNum_timeCaller_OutputPorts() const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
void addCallPort(InputSchedPort *callPort)
Register an input port.
void log_WARNING_HI_MissedDeadline(FwIndexType p, U32 start, U32 length, U32 ticks)
FwIndexType getNum_CycleIn_InputPorts() const