12 #ifndef __EIOT2SRFIF_H
13 #define __EIOT2SRFIF_H
16 #include "eiot2srfi2.h"
24 #include "eio_t25srm.h"
34 EIO_T2500FI2_FAST_STATE_MODULE_NEEDS_RESET,
35 EIO_T2500FI2_FAST_STATE_INITIALISING,
36 EIO_T2500FI2_FAST_STATE_RUNTIME,
37 EIO_T2500FI2_FAST_STATE_DELETE,
38 EIO_T2500FI2_FAST_STATE_SECONDARY,
39 EIO_T2500FI2_FAST_STATE_BECOMING_PRIMARY,
42 #define FI2_FAST_NUMBER_OF_MESSAGES (EUROTHERM_SPI_MESSAGE_SCHEDULER_NUMBER_OF_SLOTS/EIO_T2500_FAST_MODULE_TICK_INTERLIEVE)
47 EioT2500FI2FastModule(
unsigned char moduleNumber, EioT2500CycleEnum z_expectedCycleNumber);
48 virtual ~EioT2500FI2FastModule();
51 virtual void update62_5mS();
52 virtual void update125mS();
53 virtual void updateFast(
unsigned short slot);
54 virtual void updateFastBuffers(
unsigned int z_thisSlot);
55 virtual void cycleCompleteFast(
unsigned int z_thisSlot);
58 void handleModuleError();
60 void configureUpdateData(
int channel);
61 void driveModuleLEDs();
76 float filter(
float sample,
float polep,
float divisor)
78 return polep + ( (sample - polep) / divisor );
81 Fi2FastRunStates m_state;
82 bool m_messagesScheduled;
83 EioUint16 m_initialisingCount;
85 bool m_updateMessageChanged[FI2_NUMBER_OF_CHANNELS][FI2_FAST_NUMBER_OF_MESSAGES];
86 EioFIData m_inputData[FI2_NUMBER_OF_CHANNELS];
88 bool m_badConfig[FI2_NUMBER_OF_CHANNELS];
89 bool m_resetFilter[FI2_NUMBER_OF_CHANNELS];
90 EioUint32 m_updatesSinceLastPulse[FI2_NUMBER_OF_CHANNELS];
91 float m_divisor[FI2_NUMBER_OF_CHANNELS];
92 float m_rawFrequency[FI2_NUMBER_OF_CHANNELS];
94 EioUint8 m_moduleVersion;
95 unsigned char m_debounceCode[FI2_NUMBER_OF_CHANNELS];
96 unsigned char m_supply[FI2_NUMBER_OF_CHANNELS];
97 unsigned char m_threshold[FI2_NUMBER_OF_CHANNELS];
98 unsigned char m_holdoffCount[FI2_NUMBER_OF_CHANNELS];
99 EioFIStatus m_holdoffStatus[FI2_NUMBER_OF_CHANNELS];
Definition: eio_t25srm.h:58