pvAccessCPP 7.1.8
Loading...
Searching...
No Matches
beaconEmitter.h
1
7#ifndef BEACONEMITTER_H
8#define BEACONEMITTER_H
9
10#ifdef epicsExportSharedSymbols
11# define beaconEmitterEpicsExportSharedSymbols
12# undef epicsExportSharedSymbols
13#endif
14
15#include <osiSock.h>
16
17#include <pv/timer.h>
18#include <pv/timeStamp.h>
19#include <pv/sharedPtr.h>
20
21#ifdef beaconEmitterEpicsExportSharedSymbols
22# define epicsExportSharedSymbols
23# undef beaconEmitterEpicsExportSharedSymbols
24#endif
25
26#include <pv/remote.h>
27#include <pv/beaconServerStatusProvider.h>
28//#include <pv/serverContext.h>
29
30namespace epics {
31namespace pvAccess {
32
33class ServerContextImpl;
34
41 public TransportSender,
43 public std::tr1::enable_shared_from_this<BeaconEmitter>
44{
45public:
46 typedef std::tr1::shared_ptr<BeaconEmitter> shared_pointer;
47 typedef std::tr1::shared_ptr<const BeaconEmitter> const_shared_pointer;
48
55// BeaconEmitter(std::sting const & protocol,
56// Transport::shared_pointer const & transport, ServerContextImpl::shared_pointer const & context);
57 BeaconEmitter(std::string const & protocol,
58 Transport::shared_pointer const & transport, std::tr1::shared_ptr<ServerContextImpl>& context);
59
60 virtual ~BeaconEmitter();
61
63
64 void timerStopped();
65
69 void start();
70
74 void reschedule();
75
79 void callback();
80
81 void destroy();
82
83private:
84
88 static const float EPICS_PVA_MIN_BEACON_PERIOD;
89
93 static const float EPICS_PVA_MIN_BEACON_COUNT_LIMIT;
94
98 const std::string _protocol;
99
103 Transport::shared_pointer _transport;
104
108 epics::pvData::int8 _beaconSequenceID;
109
113 const ServerGUID _guid;
114
118 const double _fastBeaconPeriod;
119
123 const double _slowBeaconPeriod;
124
128 const epics::pvData::int16 _beaconCountLimit;
129
133 const osiSockAddr _serverAddress;
134
138 const epics::pvData::int32 _serverPort;
139
143 BeaconServerStatusProvider::shared_pointer _serverStatusProvider;
144
149 epics::pvData::Timer::weak_pointer _timer;
150};
151
152}
153}
154
155#endif /* BEACONEMITTER_H */
void start()
Start emitting.
BeaconEmitter(std::string const &protocol, Transport::shared_pointer const &transport, std::tr1::shared_ptr< ServerContextImpl > &context)
Constructor.
void callback()
Timer callback.
void reschedule()
Reschedule timer.
void send(epics::pvData::ByteBuffer *buffer, TransportSendControl *control)
Called by transport.
Interface defining transport send control.
Definition remote.h:122
Interface defining transport sender (instance sending data over transport).
Definition remote.h:139
Copyright - See the COPYRIGHT that is included with this distribution.
Globally unique ID.
Definition pvaDefs.h:14