pvAccessCPP  7.1.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
beaconHandler.h
1 
7 #ifndef BEACONHANDLER_H
8 #define BEACONHANDLER_H
9 
10 #ifdef epicsExportSharedSymbols
11 # define beaconHandlerEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
13 #endif
14 
15 #include <osiSock.h>
16 
17 #include <pv/timeStamp.h>
18 #include <pv/lock.h>
19 
20 #ifdef beaconHandlerEpicsExportSharedSymbols
21 # define epicsExportSharedSymbols
22 # undef beaconHandlerEpicsExportSharedSymbols
23 #endif
24 
25 #include <pv/pvaDefs.h>
26 #include <pv/remote.h>
27 #include <pv/pvAccess.h>
28 
29 namespace epics {
30 namespace pvAccess {
31 
36 {
37 public:
38  POINTER_DEFINITIONS(BeaconHandler);
39 
43  BeaconHandler(Context::shared_pointer const & context,
44  const osiSockAddr* responseFrom);
45 
46  virtual ~BeaconHandler();
47 
57  void beaconNotify(osiSockAddr* from,
58  epics::pvData::int8 remoteTransportRevision,
59  epics::pvData::TimeStamp* timestamp,
60  ServerGUID const &guid,
61  epics::pvData::int16 sequentalID,
62  epics::pvData::int16 changeCount,
63  const epics::pvData::PVFieldPtr& data);
64 private:
68  Context::weak_pointer _context;
75  epics::pvData::Mutex _mutex;
79  ServerGUID _serverGUID;
83  epics::pvData::int16 _serverChangeCount;
87  bool _first;
88 
98  bool updateBeacon(epics::pvData::int8 remoteTransportRevision,
99  epics::pvData::TimeStamp* timestamp,
100  ServerGUID const &guid,
101  epics::pvData::int16 sequentalID,
102  epics::pvData::int16 changeCount);
103 };
104 
105 }
106 }
107 
108 #endif /* INTROSPECTIONREGISTRY_H */
BeaconHandler(Context::shared_pointer const &context, const osiSockAddr *responseFrom)
Constructor.
void beaconNotify(osiSockAddr *from, epics::pvData::int8 remoteTransportRevision, epics::pvData::TimeStamp *timestamp, ServerGUID const &guid, epics::pvData::int16 sequentalID, epics::pvData::int16 changeCount, const epics::pvData::PVFieldPtr &data)
Update beacon period and do analitical checks (server restared, routing problems, etc...
Globally unique ID.
Definition: pvaDefs.h:14