Class FrontPanelPeriodicUpdateTimer

Class representing a timer that periodically updates WireOuts and TriggerOuts and dispatches events to notify subscribers of changes.

Implements

Constructors

  • Creates a new instance of the FrontPanelPeriodicUpdateTimer.

    Parameters

    • device: IFrontPanel

      The interface to the FrontPanel device that is the source of WireOuts and TriggerOuts.

    • periodMilliseconds: number

      The period in milliseconds between updates.

    Returns FrontPanelPeriodicUpdateTimer

Properties

_CancelTimeout?: (() => void)

Function that cancels the timeout used to wait for the next update period.

Type declaration

    • (): void
    • Returns void

_Device: IFrontPanel

Event that is dispatched when WireOut values change.

_IsRunning: boolean = false

Flag indicating whether the timer loop is currently running.

_IsStopPending: boolean = false

Flag indicating that the timer loop should exit on the next iteration.

_TriggerOutValuesChangedEvent: FrontPanelEvent = ...

Event that notifies subscribers when TriggerOut values change.

_UpdatePeriodMilliseconds: number

The period in milliseconds between updates.

_UpdateTimer: null | Promise<void> = null

Reference to the update timer loop used to identify when the timer loop has started and when it has exited.

_WireOutValuesChangedEvent: FrontPanelEvent = ...

Event that notifies subscribers when WireOut values change.

Accessors

  • get TriggerOutValuesChangedEvent(): IFrontPanelEvent
  • Event that notifies subscribers when TriggerOut values change.

    Returns IFrontPanelEvent

  • get WireOutValuesChangedEvent(): IFrontPanelEvent
  • Event that notifies subscribers when WireOut values change.

    Returns IFrontPanelEvent

Methods

  • Starts the update timer loop if it is not already running.

    Returns Promise<boolean>

    true if the timer loop was successfully started; false if the timer loop was already started.

  • Stops the update timer loop and returns a promise that resolves when the loop has exited.

    Returns Promise<void>

    A promise that resolves when the timer loop has exited.

  • The main loop for the update timer. It periodically updates WireOuts and TriggerOuts, and dispatches the events.

    Returns Promise<void>

    A promise that resolves when the timer loop has exited.

  • Updates the TriggerOuts and dispatches the TriggerOutValuesChangedEvent.

    Returns Promise<void>

  • Updates the WireOuts and dispatches the WireOutValuesChangedEvent.

    Returns Promise<void>

Generated using TypeDoc