15#include <Svc/ActiveRateGroup/ActiveRateGroupImpl.hpp>
16#include <ActiveRateGroupImplCfg.hpp>
24 ActiveRateGroupComponentBase(compName),
27 m_cycleStarted(false),
31 FW_ASSERT(numContexts ==
static_cast<NATIVE_UINT_TYPE>(this->getNum_RateGroupMemberOut_OutputPorts()),numContexts,this->getNum_RateGroupMemberOut_OutputPorts());
34 this->getNum_RateGroupMemberOut_OutputPorts());
37 for (
NATIVE_INT_TYPE entry = 0; entry < this->getNum_RateGroupMemberOut_OutputPorts(); entry++) {
38 this->m_contexts[entry] = contexts[entry];
43 ActiveRateGroupComponentBase::init(queueDepth,instance);
46 ActiveRateGroupImpl::~ActiveRateGroupImpl() {
50 void ActiveRateGroupImpl::preamble() {
51 this->log_DIAGNOSTIC_RateGroupStarted();
58 this->m_cycleStarted =
false;
61 for (
NATIVE_INT_TYPE port = 0; port < this->getNum_RateGroupMemberOut_OutputPorts(); port++) {
62 if (this->isConnected_RateGroupMemberOut_OutputPort(port)) {
63 this->RateGroupMemberOut_out(port,this->m_contexts[port]);
71 U32 cycle_time = end.diffUSec(cycleStart);
74 if (cycle_time > this->m_maxTime) {
75 this->m_maxTime = cycle_time;
79 this->tlmWrite_RgMaxTime(this->m_maxTime);
83 if (this->m_cycleStarted) {
85 if (this->m_overrunThrottle < ACTIVE_RATE_GROUP_OVERRUN_THROTTLE) {
86 this->log_WARNING_HI_RateGroupCycleSlip(this->m_cycles);
87 this->m_overrunThrottle++;
90 this->tlmWrite_RgCycleSlips(this->m_cycleSlips);
92 if (this->m_overrunThrottle > 0) {
93 this->m_overrunThrottle--;
104 this->m_cycleStarted =
true;
107 void ActiveRateGroupImpl::PingIn_handler(
NATIVE_INT_TYPE portNum, U32 key) {
109 this->PingOut_out(0,key);
PlatformIntType NATIVE_INT_TYPE
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
C++-compatible configuration header for fprime configuration.
Serializable class for carrying timer values.