Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

UUIDS

UUIDS: { CHARACTERISTICS: { INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"; NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"; WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"; WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e" }; SERVICE_ID: "72c90001-57a9-4d40-b746-534e22ec9f9e" } = {SERVICE_ID: '72c90001-57a9-4d40-b746-534e22ec9f9e' as const,CHARACTERISTICS: {INDICATE: '72c90005-57a9-4d40-b746-534e22ec9f9e' as const,NOTIFY: '72c90003-57a9-4d40-b746-534e22ec9f9e' as const,WRITE: '72c90004-57a9-4d40-b746-534e22ec9f9e' as const,WRITE_WO_RESPONSE: '72c90002-57a9-4d40-b746-534e22ec9f9e' as const,} as const,} as const

Type declaration

  • CHARACTERISTICS: { INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"; NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"; WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"; WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e" }
    • INDICATE: "72c90005-57a9-4d40-b746-534e22ec9f9e"
    • NOTIFY: "72c90003-57a9-4d40-b746-534e22ec9f9e"
    • WRITE: "72c90004-57a9-4d40-b746-534e22ec9f9e"
    • WRITE_WO_RESPONSE: "72c90002-57a9-4d40-b746-534e22ec9f9e"
  • SERVICE_ID: "72c90001-57a9-4d40-b746-534e22ec9f9e"

onBatteryLevel

onBatteryLevel: ((battery: number) => void) | null = null

Battery level event

onFlipped

onFlipped: ((accele: Move["accele"]) => void) | null = null

Flipped event

onOrientationChanged

onOrientationChanged: ((face: number, accele: Move["accele"]) => void) | null = null

Orientation changed event

onShaked

onShaked: ((accele: Move["accele"]) => void) | null = null

Shaked event

onStatusButtonPressed

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

Status button pressed event

onTapped

onTapped: ((accele: Move["accele"]) => void) | null = null

Tapped event

Accessors

battery

  • get battery(): number
  • Get battery level

    Returns number

featureCommand

  • get featureCommand(): number[]
  • Get command of feature behavior

    Returns number[]

Methods

checkVersion

  • checkVersion(): boolean
  • Check software version of MESH block

    Returns boolean

createStatusbarLedCommand

  • createStatusbarLedCommand(power: boolean, red: boolean, green: boolean, blue: boolean): number[]
  • Create command of statusbar LED

    Parameters

    • power: boolean
    • red: boolean
    • green: boolean
    • blue: boolean

    Returns number[]

    command

indicate

  • indicate(data: number[]): void
  • Set result of indicate

    Parameters

    • data: number[]

    Returns void

    void

notify

  • notify(data: number[]): void
  • Parse data that received from MESH block, and emit event

    Parameters

    • data: number[]

    Returns void

Static isMESHblock

  • isMESHblock(name: string | null, opt_serialnumber?: string): boolean
  • Verify that the device is MESH block

    Parameters

    • name: string | null
    • Default value opt_serialnumber: string = ""

    Returns boolean

Generated using TypeDoc