Package com.cosylab.epics.caj.cas
Class BeaconEmitter
- java.lang.Object
-
- com.cosylab.epics.caj.cas.BeaconEmitter
-
- All Implemented Interfaces:
Timer.TimerRunnable
public class BeaconEmitter extends Object implements Timer.TimerRunnable
Beacon emitter.- Version:
- $id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected intbeaconPeriodBeacon period (in ms).protected intbeaconSequenceIDBeacon sequence ID.protected static floatEPICS_CA_MAX_BEACON_PERIODMaximal CA beacon period (in seconds).protected static floatEPICS_CA_MIN_BEACON_PERIODMinimal (initial) CA beacon period (in seconds).protected LoggerloggerLogger.protected intmaxBeaconPeriodMaximal beacon period (in ms).protected TimertimerTimer.protected BroadcastTransporttransportBroadcast (UDP) transport.
-
Constructor Summary
Constructors Constructor Description BeaconEmitter(BroadcastTransport transport, CAContext context, float beaconPeriod)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroy emitter.protected voidreschedule()Reschedule timer.protected voidstart()Start emitting.voidtimeout(long timeToRun)Method invoked by timer at requested time.
-
-
-
Field Detail
-
EPICS_CA_MAX_BEACON_PERIOD
protected static final float EPICS_CA_MAX_BEACON_PERIOD
Maximal CA beacon period (in seconds).- See Also:
- Constant Field Values
-
EPICS_CA_MIN_BEACON_PERIOD
protected static final float EPICS_CA_MIN_BEACON_PERIOD
Minimal (initial) CA beacon period (in seconds).- See Also:
- Constant Field Values
-
timer
protected Timer timer
Timer.
-
logger
protected Logger logger
Logger.
-
transport
protected BroadcastTransport transport
Broadcast (UDP) transport.
-
beaconSequenceID
protected int beaconSequenceID
Beacon sequence ID.
-
beaconPeriod
protected int beaconPeriod
Beacon period (in ms).
-
maxBeaconPeriod
protected int maxBeaconPeriod
Maximal beacon period (in ms).
-
-
Constructor Detail
-
BeaconEmitter
public BeaconEmitter(BroadcastTransport transport, CAContext context, float beaconPeriod)
Constructor.- Parameters:
transport- transport to be used to send beacons.context- CA context.beaconPeriod- configured (max) beacon period.
-
-
Method Detail
-
start
protected void start()
Start emitting.
-
reschedule
protected void reschedule()
Reschedule timer.
-
timeout
public void timeout(long timeToRun)
Description copied from interface:Timer.TimerRunnableMethod invoked by timer at requested time.- Specified by:
timeoutin interfaceTimer.TimerRunnable- Parameters:
timeToRun- time in ms to run.- See Also:
Timer.TimerRunnable.timeout(long)
-
destroy
public void destroy()
Destroy emitter.
-
-