com.cosylab.epics.caj.cas
Class BeaconEmitter

java.lang.Object
  extended by 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
protected  int beaconPeriod
          Beacon period (in ms).
protected  int beaconSequenceID
          Beacon sequence ID.
protected static float EPICS_CA_MAX_BEACON_PERIOD
          Maximal CA beacon period (in seconds).
protected static float EPICS_CA_MIN_BEACON_PERIOD
          Minimal (initial) CA beacon period (in seconds).
protected  Logger logger
          Logger.
protected  int maxBeaconPeriod
          Maximal beacon period (in ms).
protected  Timer timer
          Timer.
protected  BroadcastTransport transport
          Broadcast (UDP) transport.
 
Constructor Summary
BeaconEmitter(BroadcastTransport transport, CAContext context, float beaconPeriod)
          Constructor.
 
Method Summary
 void destroy()
          Destroy emitter.
protected  void reschedule()
          Reschedule timer.
protected  void start()
          Start emitting.
 void timeout(long timeToRun)
          Method invoked by timer at requested time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.TimerRunnable
Method invoked by timer at requested time.

Specified by:
timeout in interface Timer.TimerRunnable
Parameters:
timeToRun - time in ms to run.
See Also:
Timer.TimerRunnable.timeout(long)

destroy

public void destroy()
Destroy emitter.



Copyright © 2004-2013 Cosylab. All Rights Reserved.