10 RateGroupDriverComponentBase(compName),
11 m_numDividers(0),m_ticks(0),m_rollover(1) {
21 this->m_numDividers = numDividers;
28 this->getNum_CycleOut_OutputPorts());
30 ::memset(this->m_dividers,0,
sizeof(this->m_dividers));
33 this->m_dividers[entry] = dividers[entry];
36 if (dividers[entry] != 0) {
37 this->m_rollover *= dividers[entry];
48 RateGroupDriverComponentBase::init(instanceId);
61 if (this->m_dividers[entry] != 0) {
62 if (this->isConnected_CycleOut_OutputPort(entry)) {
63 if ((this->m_ticks % this->m_dividers[entry]) == 0) {
64 this->CycleOut_out(entry,cycleStart);
72 this->m_ticks = (this->m_ticks + 1) % this->m_rollover;
PlatformIntType NATIVE_INT_TYPE
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
C++-compatible configuration header for fprime configuration.
RateGroupDivider component implementation.
void configure(NATIVE_INT_TYPE dividers[], NATIVE_INT_TYPE numDividers)
RateGroupDriver configuration function.
~RateGroupDriver()
RateGroupDriverImpl destructor.
void init(NATIVE_INT_TYPE instanceId=0)
RateGroupDriver initialization function.
RateGroupDriver(const char *compName)
RateGroupDriver constructor.
Serializable class for carrying timer values.