9 #if FW_ENABLE_TEXT_LOGGING 34 this->m_getApidSeqCountIn_InputPort[port].
init();
35 this->m_getApidSeqCountIn_InputPort[port].
addCallComp(
37 m_p_getApidSeqCountIn_in
39 this->m_getApidSeqCountIn_InputPort[port].
setPortNum(port);
41 #if FW_OBJECT_NAMES == 1 45 this->m_objName.toChar(),
48 this->m_getApidSeqCountIn_InputPort[port].setObjName(portName.
toChar());
58 this->m_validateApidSeqCountIn_InputPort[port].
init();
59 this->m_validateApidSeqCountIn_InputPort[port].
addCallComp(
61 m_p_validateApidSeqCountIn_in
63 this->m_validateApidSeqCountIn_InputPort[port].
setPortNum(port);
65 #if FW_OBJECT_NAMES == 1 69 this->m_objName.toChar(),
72 this->m_validateApidSeqCountIn_InputPort[port].setObjName(portName.
toChar());
82 this->m_logOut_OutputPort[port].
init();
84 #if FW_OBJECT_NAMES == 1 88 this->m_objName.toChar(),
91 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
95 #if FW_ENABLE_TEXT_LOGGING == 1 99 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
102 this->m_logTextOut_OutputPort[port].
init();
104 #if FW_OBJECT_NAMES == 1 108 this->m_objName.toChar(),
111 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
122 this->m_timeCaller_OutputPort[port].
init();
124 #if FW_OBJECT_NAMES == 1 128 this->m_objName.toChar(),
131 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
145 static_cast<FwAssertArgType>(portNum)
148 return &this->m_getApidSeqCountIn_InputPort[portNum];
156 static_cast<FwAssertArgType>(portNum)
159 return &this->m_validateApidSeqCountIn_InputPort[portNum];
174 static_cast<FwAssertArgType>(portNum)
177 this->m_logOut_OutputPort[portNum].
addCallPort(port);
180 #if FW_ENABLE_TEXT_LOGGING == 1 182 void ApidManagerComponentBase ::
183 set_logTextOut_OutputPort(
189 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
190 static_cast<FwAssertArgType>(portNum)
193 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
206 static_cast<FwAssertArgType>(portNum)
209 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
212 #if FW_PORT_SERIALIZATION 221 Fw::InputSerializePort* port
226 static_cast<FwAssertArgType>(portNum)
229 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
232 #if FW_ENABLE_TEXT_LOGGING == 1 234 void ApidManagerComponentBase ::
235 set_logTextOut_OutputPort(
237 Fw::InputSerializePort* port
241 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
242 static_cast<FwAssertArgType>(portNum)
245 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
253 Fw::InputSerializePort* port
258 static_cast<FwAssertArgType>(portNum)
261 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
272 Fw::PassiveComponentBase(compName)
309 #if FW_ENABLE_TEXT_LOGGING == 1 312 getNum_logTextOut_OutputPorts()
const 334 static_cast<FwAssertArgType>(portNum)
337 return this->m_logOut_OutputPort[portNum].
isConnected();
340 #if FW_ENABLE_TEXT_LOGGING == 1 342 bool ApidManagerComponentBase ::
343 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
346 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
347 static_cast<FwAssertArgType>(portNum)
350 return this->m_logTextOut_OutputPort[portNum].isConnected();
360 static_cast<FwAssertArgType>(portNum)
363 return this->m_timeCaller_OutputPort[portNum].
isConnected();
382 static_cast<FwAssertArgType>(portNum)
413 static_cast<FwAssertArgType>(portNum)
446 if (this->m_timeCaller_OutputPort[0].isConnected()) {
447 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
455 if (this->m_logOut_OutputPort[0].isConnected()) {
459 #if FW_AMPCS_COMPATIBLE 461 _status = _logBuff.
serialize(static_cast<U8>(2));
464 static_cast<FwAssertArgType>(_status)
468 #if FW_AMPCS_COMPATIBLE 471 static_cast<U8>(
sizeof(U16))
475 static_cast<FwAssertArgType>(_status)
478 _status = _logBuff.
serialize(transmitted);
481 static_cast<FwAssertArgType>(_status)
484 #if FW_AMPCS_COMPATIBLE 487 static_cast<U8>(
sizeof(U16))
491 static_cast<FwAssertArgType>(_status)
497 static_cast<FwAssertArgType>(_status)
500 this->m_logOut_OutputPort[0].
invoke(
509 #if FW_ENABLE_TEXT_LOGGING 510 if (this->m_logTextOut_OutputPort[0].isConnected()) {
511 #if FW_OBJECT_NAMES == 1 512 const char* _formatString =
513 "(%s) %s: Unexpected sequence count received. Packets may have been dropped. Transmitted: %" PRIu16
" | Expected on board: %" PRIu16
"";
515 const char* _formatString =
516 "%s: Unexpected sequence count received. Packets may have been dropped. Transmitted: %" PRIu16
" | Expected on board: %" PRIu16
"";
523 this->m_objName.toChar(),
525 "UnexpectedSequenceCount ",
530 this->m_logTextOut_OutputPort[0].invoke(
545 if (this->m_timeCaller_OutputPort[0].isConnected()) {
546 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
554 if (this->m_logOut_OutputPort[0].isConnected()) {
558 #if FW_AMPCS_COMPATIBLE 560 _status = _logBuff.
serialize(static_cast<U8>(1));
563 static_cast<FwAssertArgType>(_status)
567 #if FW_AMPCS_COMPATIBLE 570 static_cast<U8>(
sizeof(U16))
574 static_cast<FwAssertArgType>(_status)
577 _status = _logBuff.
serialize(invalidApidValue);
580 static_cast<FwAssertArgType>(_status)
583 this->m_logOut_OutputPort[0].
invoke(
592 #if FW_ENABLE_TEXT_LOGGING 593 if (this->m_logTextOut_OutputPort[0].isConnected()) {
594 #if FW_OBJECT_NAMES == 1 595 const char* _formatString =
596 "(%s) %s: APID Table is full, cannot generate or check sequence counts for APID: %" PRIu16
"";
598 const char* _formatString =
599 "%s: APID Table is full, cannot generate or check sequence counts for APID: %" PRIu16
"";
606 this->m_objName.toChar(),
612 this->m_logTextOut_OutputPort[0].invoke(
629 if (this->m_timeCaller_OutputPort[0].isConnected()) {
631 this->m_timeCaller_OutputPort[0].
invoke(_time);
649 this->m_guardedPortMutex.
lock();
655 this->m_guardedPortMutex.
unLock();
662 U16 ApidManagerComponentBase ::
663 m_p_getApidSeqCountIn_in(
679 U16 ApidManagerComponentBase ::
680 m_p_validateApidSeqCountIn_in(
689 return compPtr->validateApidSeqCountIn_handlerBase(
Serialization/Deserialization operation was successful.
FwIndexType getNum_getApidSeqCountIn_InputPorts() const
void addCallPort(InputTimePort *callPort)
Register an input port.
FwIdType getIdBase() const
void log_WARNING_LO_UnexpectedSequenceCount(U16 transmitted, U16 expected) const
void log_WARNING_HI_ApidTableFull(U16 invalidApidValue) const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Svc::CCSDS::InputApidSequenceCountPort * get_validateApidSeqCountIn_InputPort(FwIndexType portNum)
void unLock()
unlock the mutex and assert success
virtual U16 validateApidSeqCountIn_handler(FwIndexType portNum, const ComCfg::APID &apid, U16 sequenceCount)=0
Handler for input port validateApidSeqCountIn.
virtual void unLock()
Unlock the guarded mutex.
Svc::CCSDS::InputApidSequenceCountPort * get_getApidSeqCountIn_InputPort(FwIndexType portNum)
void init()
Object initializer.
FwIndexType getNum_validateApidSeqCountIn_InputPorts() const
Received an unregistered APID.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
SerializeStatus
forward declaration for string
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
virtual U16 getApidSeqCountIn_handler(FwIndexType portNum, const ComCfg::APID &apid, U16 sequenceCount)=0
Handler for input port getApidSeqCountIn.
FwIdType FwEventIdType
The type of an event identifier.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
virtual void lock()
Lock the guarded mutex.
void init()
Initialization function.
A less serious but recoverable event.
void invoke(Fw::Time &time) const
Invoke a port interface.
const char * toChar() const
Deframing received an unexpected sequence count.
U16 validateApidSeqCountIn_handlerBase(FwIndexType portNum, const ComCfg::APID &apid, U16 sequenceCount)
Handler base-class function for input port validateApidSeqCountIn.
A serious but recoverable event.
Auto-generated base for ApidManager component.
FwIndexType getNum_logOut_OutputPorts() const
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
FwIndexType getNum_timeCaller_OutputPorts() const
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
virtual ~ApidManagerComponentBase()
Destroy ApidManagerComponentBase object.
No time base has been established.
PlatformIndexType FwIndexType
APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
ApidManagerComponentBase(const char *compName="")
Construct ApidManagerComponentBase object.
U16 getApidSeqCountIn_handlerBase(FwIndexType portNum, const ComCfg::APID &apid, U16 sequenceCount)
Handler base-class function for input port getApidSeqCountIn.
RateGroupDivider component implementation.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void lock()
lock the mutex and assert success