Options
All
  • Public
  • Public/Protected
  • All
Menu

PLAYBULB_candle management class PLAYBULB_candleを管理するクラス

Hierarchy

  • PLAYBULB_candle

Implements

Index

Constructors

constructor

Properties

_peripheral

_peripheral: BleRemotePeripheral

Optional batteryService

batteryService: BleBatteryService

Optional ondisconnect

ondisconnect: undefined | ((reason: any) => void)

Static CANDLE_COLOR_UUID

CANDLE_COLOR_UUID: string = "FFFC"

Static CANDLE_DEVICE_NAME_UUID

CANDLE_DEVICE_NAME_UUID: string = "FFFF"

Static CANDLE_EFFECT_UUID

CANDLE_EFFECT_UUID: string = "FFFB"

Static CANDLE_SERVICE_UUID

CANDLE_SERVICE_UUID: string = "FF02"

Static _deviceAdvAnalyzerType

_deviceAdvAnalyzerType: BleAdvBinaryAnalyzer<"" | "flag" | "length" | "type" | "candle_service_uuid", "" | "manufacture"> = new BleAdvBinaryAnalyzer().addTarget('flag', [0x02, 0x01, 0x06]).groupStart('manufacture').addTarget('length', [3]).addTarget('type', [3]).addTarget('candle_service_uuid', [0x02, 0xff]) // この後にも続いてる.groupEnd()

Methods

connectWait

  • connectWait(setting?: Pick<BleConnectSetting, "retry" | "forceConnect">): Promise<void>
  • Parameters

    Returns Promise<void>

getBatteryLevelWait

  • getBatteryLevelWait(): Promise<null | number>
  • Returns Promise<null | number>

getDeviceNameWait

  • getDeviceNameWait(): Promise<null | string>
  • Returns Promise<null | string>

setCandleEffectColorWait

  • setCandleEffectColorWait(red: number, green: number, blue: number): Promise<boolean>
  • Parameters

    • red: number
    • green: number
    • blue: number

    Returns Promise<boolean>

setColorWait

  • setColorWait(r: number, g: number, b: number): Promise<boolean>
  • Parameters

    • r: number
    • g: number
    • b: number

    Returns Promise<boolean>

setEffectWait

  • Parameters

    Returns Promise<boolean>

setFlashingColorWait

  • setFlashingColorWait(red: number, green: number, blue: number): Promise<boolean>
  • Parameters

    • red: number
    • green: number
    • blue: number

    Returns Promise<boolean>

Static info

Static isDevice

  • Verify that the received peripheral is from the PLAYBULB_candle

    受け取ったPeripheralがPLAYBULB_candleのものかどうかを確認する

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the PLAYBULB_candle

    PLAYBULB_candleかどうか

Generated using TypeDoc