LogicalLabs External Accessories Module

API Docs for: 1.0.0
Show:

Accessory Class

Module: Readme

Objects of this class represent the external accessories.

Methods

equals

(
  • otherAccessory
)
Boolean

Available since 1.0.0

Compares this Accessory object to another.

Parameters:

Returns:

Boolean:

true if the two objects refer to the same accessory.

openSession

(
  • params
)
Session

Available since 1.0.0

Opens a session to the accessory.

Parameters:

  • params Object

    An object with the following properties:

    • protocol String

      The name of the protocol to be used for the connection.

Returns:

Session:

An object representing the session, or null if the session could not be opened.

Properties

connectionID

Number read-only

Available since 1.0.0

The accessory’s unique connection ID to the iOS-based device. The connection ID uniquely identifies this accessory to the device. If multiple accessories of the same type are connected to the device, you can use this information to distinguish between them.

The connection ID for an accessory persists only for the duration of the current connection. If the accessory is disconnected and reconnected, a new connection ID is assigned.

firmwareRevision

String read-only

Available since 1.0.0

Firmware revision of the accessory.

hardwareRevision

String read-only

Available since 1.0.0

Hardware revision of the accessory.

isConnected

Boolean read-only

Available since 1.0.0

Specifies whether or not the accessory is currently connected.

manufacturer

String read-only

Available since 1.0.0

Manufacturer of the accessory.

modelNumber

String read-only

Available since 1.0.0

Model number of the accessory.

name

String read-only

Available since 1.0.0

Name of the accessory.

protocolStrings

Array of Strings read-only

Available since 1.0.0

The name of the protocols supported by the accessory.

serialNumber

String read-only

Available since 1.0.0

Serial number of the accessory.