Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DeviceState

Hierarchy

Index

Properties

name

name: string

Name of the device.

state

state: string

Devices state.

Methods

addListener

delete

  • delete(callback: (err: Error) => void): void
  • delete(): Promise<void>
  • Destroy a device-state controlled by ARI.

    Parameters

    • callback: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns void

  • Destroy a device-state controlled by ARI.

    Returns Promise<void>

get

  • Retrieve the current state of a device.

    Parameters

    Returns void

  • Retrieve the current state of a device.

    Returns Promise<DeviceState>

list

  • List all ARI controlled device states.

    Parameters

    • callback: (err: Error, devicestates: DeviceState[]) => void
        • Parameters

          Returns void

    Returns void

  • List all ARI controlled device states.

    Returns Promise<DeviceState[]>

on

once

removeAllListeners

removeListener

  • removeListener(event: AnyEventType, handler: (...args: any[]) => void): void
  • Removes the event listener for the specified event type.

    Parameters

    • event: AnyEventType

      The event type.

    • handler: (...args: any[]) => void

      The event listener function.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

update

  • update(params: { deviceState: string }, callback: (err: Error) => void): void
  • update(params: { deviceState: string }): Promise<void>
  • Change the state of a device controlled by ARI. (Note - implicitly creates the device state).

    Parameters

    • params: { deviceState: string }
      • deviceState: string

        Device state value.

    • callback: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns void

  • Change the state of a device controlled by ARI. (Note - implicitly creates the device state).

    Parameters

    • params: { deviceState: string }
      • deviceState: string

        Device state value.

    Returns Promise<void>

Generated using TypeDoc