7 #ifndef BEACONEMITTER_H
8 #define BEACONEMITTER_H
10 #ifdef epicsExportSharedSymbols
11 # define beaconEmitterEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
18 #include <pv/timeStamp.h>
19 #include <pv/sharedPtr.h>
21 #ifdef beaconEmitterEpicsExportSharedSymbols
22 # define epicsExportSharedSymbols
23 # undef beaconEmitterEpicsExportSharedSymbols
26 #include <pv/remote.h>
27 #include <pv/beaconServerStatusProvider.h>
33 class ServerContextImpl;
42 public epics::pvData::TimerCallback,
43 public std::tr1::enable_shared_from_this<BeaconEmitter>
46 typedef std::tr1::shared_ptr<BeaconEmitter> shared_pointer;
47 typedef std::tr1::shared_ptr<const BeaconEmitter> const_shared_pointer;
58 Transport::shared_pointer
const & transport, std::tr1::shared_ptr<ServerContextImpl>& context);
88 static const float EPICS_PVA_MIN_BEACON_PERIOD;
93 static const float EPICS_PVA_MIN_BEACON_COUNT_LIMIT;
103 Transport::shared_pointer _transport;
108 epics::pvData::int8 _beaconSequenceID;
118 const double _fastBeaconPeriod;
123 const double _slowBeaconPeriod;
128 const epics::pvData::int16 _beaconCountLimit;
133 const osiSockAddr _serverAddress;
138 const epics::pvData::int32 _serverPort;
143 BeaconServerStatusProvider::shared_pointer _serverStatusProvider;
149 epics::pvData::Timer::weak_pointer _timer;
void send(epics::pvData::ByteBuffer *buffer, TransportSendControl *control)
Called by transport.
void reschedule()
Reschedule timer.
Interface defining transport send control.
void start()
Start emitting.
void callback()
Timer callback.
BeaconEmitter(std::string const &protocol, Transport::shared_pointer const &transport, std::tr1::shared_ptr< ServerContextImpl > &context)
Constructor.
Interface defining transport sender (instance sending data over transport).