/* longArrayMonitor.h */ /** * Copyright - See the COPYRIGHT that is included with this distribution. * EPICS pvData is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ /** * @author mrk * @date 2013.08.09 */ #ifndef LONGARRAYMONITOR_H #define LONGARRAYMONITOR_H #include #include #include #include #include #include namespace epics { namespace pvDatabase { class LongArrayMonitor; typedef std::tr1::shared_ptr LongArrayMonitorPtr; class LAMChannelRequester; typedef std::tr1::shared_ptr LAMChannelRequesterPtr; class LAMMonitorRequester; typedef std::tr1::shared_ptr LAMMonitorRequesterPtr; class LongArrayMonitor : public std::tr1::enable_shared_from_this { public: POINTER_DEFINITIONS(LongArrayMonitor); static LongArrayMonitorPtr create( epics::pvData::String const & providerName, epics::pvData::String const & channelName, int queueSize = 1, double waitTime = 0.0); ~LongArrayMonitor(); void start(); void stop(); void destroy(); private: static epics::pvData::Mutex printMutex; bool init( epics::pvData::String const & providerName, epics::pvData::String const & channelName, int queueSize, double waitTime); LongArrayMonitorPtr getPtrSelf() { return shared_from_this(); } LongArrayMonitor(); LAMChannelRequesterPtr channelRequester; LAMMonitorRequesterPtr monitorRequester; epics::pvAccess::Channel::shared_pointer channel; epics::pvData::Monitor::shared_pointer monitor; epics::pvData::Event event; epics::pvData::Status status; friend class LAMChannelRequester; friend class LAMMonitorRequester; }; }} #endif /* LONGARRAYMONITOR_H */