Hierarchy

Constructors

Properties

UUIDS: {
    CHARACTERISTICS: {
        INDICATE: string;
        NOTIFY: string;
        WRITE: string;
        WRITE_WO_RESPONSE: string;
    };
    SERVICE_ID: string;
} = ...

Type declaration

  • Readonly CHARACTERISTICS: {
        INDICATE: string;
        NOTIFY: string;
        WRITE: string;
        WRITE_WO_RESPONSE: string;
    }
    • Readonly INDICATE: string
    • Readonly NOTIFY: string
    • Readonly WRITE: string
    • Readonly WRITE_WO_RESPONSE: string
  • Readonly SERVICE_ID: string
onBatteryLevel: null | ((battery) => void) = null

Battery level event

Type declaration

    • (battery): void
    • Parameters

      • battery: number

      Returns void

onSensorEvent: null | ((motionState, notifyMode, requestId) => void) = null

Sensing event

Type declaration

    • (motionState, notifyMode, requestId): void
    • Parameters

      • motionState: number
      • notifyMode: number
      • requestId: number

      Returns void

onStatusButtonPressed: null | (() => void) = null

Status button pressed event

Type declaration

    • (): void
    • Returns void

MotionState: {
    DETECTED: 1;
    NOT_DETECTED: 2;
    SETUP: 0;
} = ...

Type declaration

  • Readonly DETECTED: 1
  • Readonly NOT_DETECTED: 2
  • Readonly SETUP: 0
NotifyMode: {
    ALWAYS: 32;
    DETECTED: 1;
    NOT_DETECTED: 2;
    ONCE: 16;
} = ...

Type declaration

  • Readonly ALWAYS: 32
  • Readonly DETECTED: 1
  • Readonly NOT_DETECTED: 2
  • Readonly ONCE: 16

Accessors

Methods

  • Create command of set-mode

    Parameters

    • notifyMode: number
    • opt_holdingTime: number = 500
    • opt_detectionTime: number = 500
    • opt_requestId: number = 0

    Returns number[]

    command

Generated using TypeDoc