Options
All
  • Public
  • Public/Protected
  • All
Menu

Class IndexedDevice

Hierarchy

Index

Constructors

constructor

  • new IndexedDevice(driverTypeDirName: string, nameConvention?: string, targetAddress?: string, targetDriverName?: string | string[]): IndexedDevice
  • Parameters

    • driverTypeDirName: string
    • Optional nameConvention: string
    • Optional targetAddress: string
    • Optional targetDriverName: string | string[]

    Returns IndexedDevice

Properties

Protected _deviceIndex

_deviceIndex: number

connected

connected: boolean

deviceDirName

deviceDirName: string

Protected deviceIndexRegex

deviceIndexRegex: RegExp

deviceRoot

deviceRoot: string

Static overrideSysClassDir

overrideSysClassDir: string

Accessors

deviceIndex

  • get deviceIndex(): number

Methods

connect

  • connect(driverName: string, nameConvention?: string, propertyConstraints?: object): void
  • Parameters

    • driverName: string
    • Optional nameConvention: string
    • Optional propertyConstraints: object
      • [propertyName: string]: any

    Returns void

Protected constructPropertyPath

  • constructPropertyPath(property: string, deviceRoot?: string): string

readNumber

  • readNumber(property: string, deviceRoot?: string): number
  • Parameters

    • property: string
    • Optional deviceRoot: string

    Returns number

readProperty

  • readProperty(property: string, deviceRoot?: string): any

readString

  • readString(property: string, deviceRoot?: string): string
  • Parameters

    • property: string
    • Optional deviceRoot: string

    Returns string

readStringArray

  • readStringArray(property: string, deviceRoot?: string): string[]

readStringArrayAsType

  • readStringArrayAsType<T>(property: string, deviceRoot?: string): T[]

readStringAsType

  • readStringAsType<T>(property: string, deviceRoot?: string): T

readStringSelector

  • readStringSelector(property: string, deviceRoot?: string): string

registerEventCallback

  • registerEventCallback(callbackFunction: function, eventPredicate: function, firstTriggerOnly?: boolean, userCallbackData?: any): void
  • Parameters

    • callbackFunction: function
        • (err?: Error, userData?: any): void
        • Parameters

          • Optional err: Error
          • Optional userData: any

          Returns void

    • eventPredicate: function
        • (userData?: any): boolean
        • Parameters

          • Optional userData: any

          Returns boolean

    • Default value firstTriggerOnly: boolean = false
    • Optional userCallbackData: any

    Returns void

registerEventPromise

  • registerEventPromise(eventPredicate: function, userCallbackData?: any): Promise<any>
  • Parameters

    • eventPredicate: function
        • (userData?: any): boolean
        • Parameters

          • Optional userData: any

          Returns boolean

    • Optional userCallbackData: any

    Returns Promise<any>

set

  • set(propertyDefs: any): void
  • Parameters

    • propertyDefs: any

    Returns void

setNumber

  • setNumber(property: string, value: number): void

setProperty

  • setProperty(property: string, value: any): any

setString

  • setString(property: string, value: string): void

Generated using TypeDoc