Class BeaconEmitter

    • Field Detail

      • EPICS_PVA_MIN_BEACON_PERIOD

        protected static final float EPICS_PVA_MIN_BEACON_PERIOD
        Minimal (initial) PVA beacon period (in seconds).
        See Also:
        Constant Field Values
      • EPICS_PVA_MIN_BEACON_COUNT_LIMIT

        protected static final float EPICS_PVA_MIN_BEACON_COUNT_LIMIT
        Minimal PVA beacon count limit.
        See Also:
        Constant Field Values
      • timer

        protected final org.epics.pvdata.misc.Timer timer
        Timer.
      • logger

        protected final Logger logger
        Logger.
      • protocol

        protected final String protocol
        Protocol.
      • transport

        protected final Transport transport
        Transport.
      • beaconSequenceID

        protected byte beaconSequenceID
        Beacon sequence ID.
      • fastBeaconPeriod

        protected final double fastBeaconPeriod
        Fast (at startup) beacon period (in sec).
      • slowBeaconPeriod

        protected final double slowBeaconPeriod
        Slow (after beaconCountLimit is reached) beacon period (in sec).
      • beaconCountLimit

        protected final short beaconCountLimit
        Limit on number of beacons issued.
      • guid

        protected final byte[] guid
        Server GUID.
      • serverAddress

        protected final InetAddress serverAddress
        Server address.
      • serverPort

        protected final int serverPort
        Server port.
    • Constructor Detail

      • BeaconEmitter

        public BeaconEmitter​(String protocol,
                             Transport transport,
                             ServerContextImpl context)
        Constructor.
        Parameters:
        protocol - what protocol to "beacon".
        transport - transport to be used to send beacons.
        context - PVA context.
    • Method Detail

      • start

        protected void start()
        Start emitting.
      • reschedule

        protected void reschedule()
        Reschedule timer.
      • callback

        public void callback()
        Specified by:
        callback in interface org.epics.pvdata.misc.Timer.TimerCallback
      • lock

        public void lock()
        Specified by:
        lock in interface Lockable
      • send

        public void send​(ByteBuffer buffer,
                         TransportSendControl control)
        Description copied from interface: TransportSender
        Called by transport. By this call transport gives callee ownership over the buffer. Calls on TransportSendControl instance must be made from calling thread. Moreover, ownership is valid only for the time of call of this method. NOTE: these limitations allow efficient implementation.
        Specified by:
        send in interface TransportSender
        Parameters:
        buffer - buffer to send.
        control - transport send control instance.
      • unlock

        public void unlock()
        Specified by:
        unlock in interface Lockable
      • timerStopped

        public void timerStopped()
        Specified by:
        timerStopped in interface org.epics.pvdata.misc.Timer.TimerCallback
      • destroy

        public void destroy()
        Destroy emitter.