pvAccessCPP 7.1.8
Loading...
Searching...
No Matches
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
29namespace
30{
31 class InternalClientContextImpl;
32}
33
34namespace epics {
35namespace pvAccess {
36namespace detail {
37 class BeaconCleanupHandler;
38}
39
44{
45public:
46 POINTER_DEFINITIONS(BeaconHandler);
47
51 BeaconHandler(Context::shared_pointer const & context,
52 const osiSockAddr* responseFrom);
53
54 virtual ~BeaconHandler();
55
65 void beaconNotify(osiSockAddr* from,
66 epics::pvData::int8 remoteTransportRevision,
67 epics::pvData::TimeStamp* timestamp,
68 ServerGUID const &guid,
69 epics::pvData::int16 sequentalID,
70 epics::pvData::int16 changeCount,
71 const epics::pvData::PVFieldPtr& data);
72private:
76 Context::weak_pointer _context;
83 epics::pvData::Mutex _mutex;
87 ServerGUID _serverGUID;
91 epics::pvData::int16 _serverChangeCount;
95 bool _first;
99 std::tr1::shared_ptr<detail::BeaconCleanupHandler> _callback;
100
110 bool updateBeacon(epics::pvData::int8 remoteTransportRevision,
111 epics::pvData::TimeStamp* timestamp,
112 ServerGUID const &guid,
113 epics::pvData::int16 sequentalID,
114 epics::pvData::int16 changeCount);
115
116 friend class ::InternalClientContextImpl;
117};
118
119}
120}
121
122#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....
std::tr1::shared_ptr< PVField > PVFieldPtr
Copyright - See the COPYRIGHT that is included with this distribution.
Globally unique ID.
Definition pvaDefs.h:14