#ifndef LLO_ASYN_DRIVER_H #define LLO_ASYN_DRIVER_H #include #include #include #include #include #include namespace TprLLO { class TprCore; class LockApp; class LockCore; }; class lloAsynDriver : public asynPortDriver { public: lloAsynDriver(const char *portName, const char *devString); ~lloAsynDriver(); asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value); int report(int i); int dump(void); // status dump for dbior report command int diagnosticsPolling(void); private: TprLLO::LockCore* reg; TprLLO::TprCore* scCache; TprLLO::TprCore* ncCache; TprLLO::LockApp* appCache; epicsMutex *plock; struct { unsigned diag; } poll_count; protected: // // parameter section for asynPortDriver // int firstParam; // constant section int p_fwVersion; /* asynInt32, ro */ int p_ncLinkUp; /* asynInt32, ro */ int p_ncFidCnt; /* asynInt32, ro */ int p_ncErrCnt; /* asynInt32, ro */ int p_scLinkUp; /* asynInt32, ro */ int p_scFidCnt; /* asynInt32, ro */ int p_scErrCnt; /* asynInt32, ro */ int p_ncDelay; /* asynInt32, rw */ int p_refMarkCnt; /* asynInt32, ro */ int p_testMarkCnt; /* asynInt32, ro */ int p_tmoCnt; /* asynInt32, ro */ int p_clocks; /* asynInt32, ro */ int p_phase; /* asynFloat64, ro */ int p_phaseN; /* asynFloat64, ro */ int lastParam; }; #define NUM_LLO_PARAMS ((int)(&lastParam - &firstParam -1)) // constant section #define fwVersionString "fwVersion" #define ncLinkUpString "ncLinkUp" #define ncFidCntString "ncFidCnt" #define ncErrCntString "ncErrCnt" #define scLinkUpString "scLinkUp" #define scFidCntString "scFidCnt" #define scErrCntString "scErrCnt" #define ncDelayString "ncDelay" #define refMarkString "refMarkCnt" #define testMarkString "testMarkCnt" #define tmoCntString "tmoCnt" #define clocksString "clocks" #define phaseString "phase" #define phaseNString "phaseN" #endif /* LLO_ASYN_DRIVER_H */