9 #if FW_ENABLE_TEXT_LOGGING 28 #if !FW_DIRECT_PORT_CALLS 35 this->m_getApidSeqCountIn_InputPort[port].
init();
36 this->m_getApidSeqCountIn_InputPort[port].
addCallComp(
38 m_p_getApidSeqCountIn_in
40 this->m_getApidSeqCountIn_InputPort[port].
setPortNum(port);
42 #if FW_OBJECT_NAMES == 1 46 this->m_objName.toChar(),
49 this->m_getApidSeqCountIn_InputPort[port].setObjName(portName.
toChar());
54 #if !FW_DIRECT_PORT_CALLS 61 this->m_validateApidSeqCountIn_InputPort[port].
init();
62 this->m_validateApidSeqCountIn_InputPort[port].
addCallComp(
64 m_p_validateApidSeqCountIn_in
66 this->m_validateApidSeqCountIn_InputPort[port].
setPortNum(port);
68 #if FW_OBJECT_NAMES == 1 72 this->m_objName.toChar(),
75 this->m_validateApidSeqCountIn_InputPort[port].setObjName(portName.
toChar());
80 #if !FW_DIRECT_PORT_CALLS 87 this->m_logOut_OutputPort[port].
init();
89 #if FW_OBJECT_NAMES == 1 93 this->m_objName.toChar(),
96 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
101 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 105 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
108 this->m_logTextOut_OutputPort[port].
init();
110 #if FW_OBJECT_NAMES == 1 114 this->m_objName.toChar(),
117 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
122 #if !FW_DIRECT_PORT_CALLS 129 this->m_timeCaller_OutputPort[port].
init();
131 #if FW_OBJECT_NAMES == 1 135 this->m_objName.toChar(),
138 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
144 #if !FW_DIRECT_PORT_CALLS 155 static_cast<FwAssertArgType>(portNum)
158 return &this->m_getApidSeqCountIn_InputPort[portNum];
166 static_cast<FwAssertArgType>(portNum)
169 return &this->m_validateApidSeqCountIn_InputPort[portNum];
174 #if !FW_DIRECT_PORT_CALLS 188 static_cast<FwAssertArgType>(portNum)
191 this->m_logOut_OutputPort[portNum].
addCallPort(port);
194 #if FW_ENABLE_TEXT_LOGGING == 1 196 void ApidManagerComponentBase ::
197 set_logTextOut_OutputPort(
203 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
204 static_cast<FwAssertArgType>(portNum)
207 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
220 static_cast<FwAssertArgType>(portNum)
223 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
228 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 237 Fw::InputSerializePort* port
242 static_cast<FwAssertArgType>(portNum)
245 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
248 #if FW_ENABLE_TEXT_LOGGING == 1 250 void ApidManagerComponentBase ::
251 set_logTextOut_OutputPort(
253 Fw::InputSerializePort* port
257 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
258 static_cast<FwAssertArgType>(portNum)
261 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
269 Fw::InputSerializePort* port
274 static_cast<FwAssertArgType>(portNum)
277 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
288 Fw::PassiveComponentBase(compName)
299 #if !FW_DIRECT_PORT_CALLS 310 static_cast<FwAssertArgType>(portNum)
313 return this->m_logOut_OutputPort[portNum].
isConnected();
316 #if FW_ENABLE_TEXT_LOGGING == 1 318 bool ApidManagerComponentBase ::
319 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
const 322 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
323 static_cast<FwAssertArgType>(portNum)
326 return this->m_logTextOut_OutputPort[portNum].isConnected();
336 static_cast<FwAssertArgType>(portNum)
339 return this->m_timeCaller_OutputPort[portNum].
isConnected();
360 static_cast<FwAssertArgType>(portNum)
391 static_cast<FwAssertArgType>(portNum)
425 this->timeCaller_out(0, _logTime);
435 #if FW_AMPCS_COMPATIBLE 440 static_cast<FwAssertArgType>(_status)
444 #if FW_AMPCS_COMPATIBLE 447 static_cast<U8>(
sizeof(U16))
451 static_cast<FwAssertArgType>(_status)
457 static_cast<FwAssertArgType>(_status)
460 #if FW_AMPCS_COMPATIBLE 463 static_cast<U8>(
sizeof(U16))
467 static_cast<FwAssertArgType>(_status)
473 static_cast<FwAssertArgType>(_status)
486 #if FW_ENABLE_TEXT_LOGGING 487 if (this->isConnected_logTextOut_OutputPort(0)) {
488 #if FW_OBJECT_NAMES == 1 489 const char* _formatString =
490 "(%s) %s: Unexpected sequence count received. Packets may have been dropped. Transmitted: %" PRIu16
" | Expected on board: %" PRIu16
"";
492 const char* _formatString =
493 "%s: Unexpected sequence count received. Packets may have been dropped. Transmitted: %" PRIu16
" | Expected on board: %" PRIu16
"";
500 this->m_objName.toChar(),
502 "UnexpectedSequenceCount ",
507 this->logTextOut_out(
524 this->timeCaller_out(0, _logTime);
534 #if FW_AMPCS_COMPATIBLE 539 static_cast<FwAssertArgType>(_status)
543 #if FW_AMPCS_COMPATIBLE 546 static_cast<U8>(
sizeof(U16))
550 static_cast<FwAssertArgType>(_status)
556 static_cast<FwAssertArgType>(_status)
569 #if FW_ENABLE_TEXT_LOGGING 570 if (this->isConnected_logTextOut_OutputPort(0)) {
571 #if FW_OBJECT_NAMES == 1 572 const char* _formatString =
573 "(%s) %s: APID Table is full, cannot generate or check sequence counts for APID: %" PRIu16
"";
575 const char* _formatString =
576 "%s: APID Table is full, cannot generate or check sequence counts for APID: %" PRIu16
"";
583 this->m_objName.toChar(),
589 this->logTextOut_out(
609 this->timeCaller_out(0, _time);
627 this->m_guardedPortMutex.
lock();
633 this->m_guardedPortMutex.
unLock();
640 U16 ApidManagerComponentBase ::
641 m_p_getApidSeqCountIn_in(
657 U16 ApidManagerComponentBase ::
658 m_p_validateApidSeqCountIn_in(
667 return compPtr->validateApidSeqCountIn_handlerBase(
674 #if !FW_DIRECT_PORT_CALLS 680 void ApidManagerComponentBase ::
691 static_cast<FwAssertArgType>(portNum)
695 this->m_logOut_OutputPort[portNum].isConnected(),
696 static_cast<FwAssertArgType>(portNum)
698 this->m_logOut_OutputPort[portNum].
invoke(
706 #if FW_ENABLE_TEXT_LOGGING 708 void ApidManagerComponentBase ::
718 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
719 static_cast<FwAssertArgType>(portNum)
723 this->m_logTextOut_OutputPort[portNum].isConnected(),
724 static_cast<FwAssertArgType>(portNum)
726 this->m_logTextOut_OutputPort[portNum].invoke(
736 void ApidManagerComponentBase ::
744 static_cast<FwAssertArgType>(portNum)
748 this->m_timeCaller_OutputPort[portNum].isConnected(),
749 static_cast<FwAssertArgType>(portNum)
751 this->m_timeCaller_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void addCallPort(InputTimePort *callPort)
Register an input port.
Deframing received an unexpected sequence count.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
virtual void unLock()
Unlock the guarded mutex.
void unLock()
unlock the mutex and assert success
Received an unregistered APID.
virtual ~ApidManagerComponentBase()
Destroy ApidManagerComponentBase object.
No time base has been established (Required)
static constexpr FwIndexType getNum_getApidSeqCountIn_InputPorts()
void init()
Object initializer.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Svc::Ccsds::InputApidSequenceCountPort * get_validateApidSeqCountIn_InputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
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) ...
void init()
Initialization function.
A less serious but recoverable event.
void invoke(Fw::Time &time) const
Invoke a port connection.
const char * toChar() const
Convert to a C-style char*.
ApidManagerComponentBase(const char *compName="")
Construct ApidManagerComponentBase object.
A serious but recoverable event.
virtual U16 validateApidSeqCountIn_handler(FwIndexType portNum, const ComCfg::Apid &apid, U16 sequenceCount)=0
Handler for input port validateApidSeqCountIn.
Enum representing event severity.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void log_WARNING_HI_ApidTableFull(U16 invalidApidValue) const
void log_WARNING_LO_UnexpectedSequenceCount(U16 transmitted, U16 expected) const
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
virtual void lock()
Lock the guarded mutex.
static constexpr FwIndexType getNum_logOut_OutputPorts()
U16 getApidSeqCountIn_handlerBase(FwIndexType portNum, const ComCfg::Apid &apid, U16 sequenceCount)
Handler base-class function for input port getApidSeqCountIn.
PlatformIndexType FwIndexType
U16 validateApidSeqCountIn_handlerBase(FwIndexType portNum, const ComCfg::Apid &apid, U16 sequenceCount)
Handler base-class function for input port validateApidSeqCountIn.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputLogPort *callPort)
Register an input port.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
RateGroupDivider component implementation.
Auto-generated base for ApidManager component.
Implementation of malloc based allocator.
static constexpr FwIndexType getNum_validateApidSeqCountIn_InputPorts()
Svc::Ccsds::InputApidSequenceCountPort * get_getApidSeqCountIn_InputPort(FwIndexType portNum)
APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
virtual U16 getApidSeqCountIn_handler(FwIndexType portNum, const ComCfg::Apid &apid, U16 sequenceCount)=0
Handler for input port getApidSeqCountIn.
void lock()
lock the mutex and assert success