Class DeviceStatsMonitor

Collects packet statistics about the device

Hierarchy

JDOM

eventStats: Record<string, number> = {}

Gets a counter of event emit calls.

newListenerStats: Record<string, number> = undefined

Gets a counter map from events to new listener counts

nodeId: number = ...

Gets an internal unique node identifier, mostly used for debugging.

  • get changeId(): number
  • Gets a counter for the CHANGE event.

    Returns number

  • Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Parameters

    • eventName: string
    • Rest ...args: unknown[]

    Returns boolean

  • Gets the list stack trace where an event was registered. Only enabled if Flags.debug is true.

    Parameters

    • eventName: string

      name of the event

    Returns string[]

    stack traces where a listener was added

  • Creates an observable from the given event

    Type Parameters

    • T

    Parameters

    • eventName: string | string[]

    Returns Observable<T>

  • Subscribes to an event and returns the unsubscription handler

    Type Parameters

    • T

    Parameters

    • eventName: string | string[]
    • next: ((value) => void)
        • (value): void
        • Parameters

          • value: T

          Returns void

    Returns (() => void)

      • (): void
      • Subscribes to an event and returns the unsubscription handler

        Returns void

        Category

        JDOM

Other

  • get announce(): number
  • Number of announce packets received by the device

    Returns number

  • get restarts(): number
  • Number of restarts within the last 64 announce packets

    Returns number

Statistics

  • get dropped(): number
  • Average packet dropped per announce period

    Returns number

Generated using TypeDoc