60 likes | 190 Views
GET SET. MonitorON-OFF. LISTENERS. Device Server. Subscription Manager. Server Framework. Subscriptions. Polling Engine. Forwarding Engine. Get Set Poll. Any Polling Mechanism. MonitorOn Active Device Subscriber. Active Device Listener. Adapter.
E N D
GET SET MonitorON-OFF LISTENERS Device Server Subscription Manager Server Framework Subscriptions Polling Engine Forwarding Engine Get Set Poll Any Polling Mechanism MonitorOn Active Device Subscriber Active Device Listener Adapter
Polling Engine & Interfaces(Passive Device) SERVER API • Polling Engine & Interfaces • Poller getPoller (IOPoint iop) • void run() • void stop() • Boolean isRunning() • Polling Interface • void poll(IOPoint iop, Data value, ValueQualifier vq) • ValueQualifer signals that the value changed, unchanged, or ask to use the default comparison algorithm
Server Framework Poll Method(Passive Device Only - DRAFT) SERVER API • poll() • It is called by the Poller upon reception of an event • It walks through the his subscription list and, for each entry, it executes the implementation of the poll(IOPoint iop, Data value,…)interface • It then validates and pushes the operation results to the listeners • We will provide some common polling engine implementations: • e.g. Periodic poller, PLS poller, SL timing poller
MonitorOn / Off Interfaces & Push Method(Active Devices Only) SERVER API • Device Adapter (Subscriber) • monitorOn(IOPoint iop) • It executes the device specific subscription & activates the listener • monitorOff(IOPoint iop) • It executes the device specific unsubscribe • Active Device Listener (Publisher) • push(IOPoint iop, Data value, ValueQualifier vq)
Passive Adapter API Methods written by the user • get(IOPoint* iop, Data* value, Data* ctxt) • set(IOPoint* iop, Data* value, Data* ctxt) • poller* getPoller(IOPoint* iop = 0) • void poll(IOPoint* iop, Data* value, ValueQualifier* qualifier) • Poller methods run(), stop(), isRunning()
Active Adapter API Methods written by the user • monitorOn(IOPoint* iop) • monitorOff(IOPoint* iop) • get(IOPoint* iop, Data* value, Data* ctxt) • set(IOPoint* iop, Data* value, Data* ctxt) Called by user to push • void push(IOPoint* iop, Data* value, ValueQualifier* qualifier, cmwDeviceServer*srv_ptr = 0)