A device container is a wrapper around a device in ThreadedClass class, it keeps a local property of some basic information about the device (like names and id's) to prevent a costly round trip over IPC.

Type Parameters

Hierarchy

  • BaseRemoteDeviceIntegration<TOptions>
    • DeviceContainer

Constructors

Properties

_details: DeviceDetails = ...
_device: Promisify<Device<TOptions>>
_initialized: boolean = false
_onEventListeners: {
    stop: (() => void);
}[] = []
onChildClose: undefined | (() => void)

Accessors

Methods

  • Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • fn: ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)
        • (...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]): void
        • Parameters

          • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

          Returns void

    • Optional context: any

    Returns DeviceContainer<TOptions>

  • Calls each of the listeners registered for a given event.

    Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns "error"[]

  • Parameters

    • initOptions: TOptions["options"]
    • activeRundownPlaylistId: undefined | string

    Returns Promise<boolean>

  • Return the number of listeners listening to a given event.

    Parameters

    • event: "error"

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    • T extends "error"

    Parameters

    • event: T

    Returns ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)[]

  • Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • Optional fn: ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)
        • (...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]): void
        • Parameters

          • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns DeviceContainer<TOptions>

  • Add a listener for a given event.

    Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • fn: ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)
        • (...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]): void
        • Parameters

          • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

          Returns void

    • Optional context: any

    Returns DeviceContainer<TOptions>

  • Add a one-time listener for a given event.

    Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • fn: ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)
        • (...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]): void
        • Parameters

          • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

          Returns void

    • Optional context: any

    Returns DeviceContainer<TOptions>

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: "error"

    Returns DeviceContainer<TOptions>

  • Remove the listeners of a given event.

    Type Parameters

    • T extends "error"

    Parameters

    • event: T
    • Optional fn: ((...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]) => void)
        • (...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]): void
        • Parameters

          • Rest ...args: ArgumentMap<DeviceContainerEvents>[Extract<T, "error">]

          Returns void

    • Optional context: any
    • Optional once: boolean

    Returns DeviceContainer<TOptions>

  • Type Parameters

    Parameters

    • orgModule: string
    • orgClassExport: string
    • deviceId: string
    • deviceOptions: TOptions
    • getCurrentTime: (() => number)
        • (): number
        • Returns number

    • Optional threadConfig: ThreadedClassConfig

    Returns Promise<DeviceContainer<TOptions>>

Generated using TypeDoc