Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • S

Hierarchy

Index

Constructors

constructor

Properties

address

address: string

beaconData

beaconData: number[] | null

beaconDataInScanResponse

beaconDataInScanResponse: number[] | null

onBatteryLevel

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

onStatusButtonPressed

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

onWriteResponse

onWriteResponse: ((response: boolean) => void) | null = null

Optional ondisconnect

ondisconnect: undefined | ((reason: unknown) => void | Promise<void>)

onDisconnect callback function.

切断された時に呼ばれるコールバック関数

param

Reason for being disconnected 切断された理由

peripheral

serviceData

serviceData: number[] | null

Static Optional Address

Address: ObnizPartsBleCompare<RegExp> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static AvailableBleMode

AvailableBleMode: "Connectable" = 'Connectable' as const

Static Optional BeaconDataLength

BeaconDataLength: ObnizPartsBleCompare<number | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional BeaconDataLength_ScanResponse

BeaconDataLength_ScanResponse: ObnizPartsBleCompare<number | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional BeaconDataStruct

BeaconDataStruct: ObnizPartsBleCompare<ObnizBleBeaconStruct<unknown> | null>

Used as a condition of isDevice() by default. Compare with data after Company ID.

標準でisDevice()の条件として使用 CompanyID以降のデータと比較

Static Optional CompanyID

CompanyID: ObnizPartsBleCompare<number[] | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional CompanyID_ScanResponse

CompanyID_ScanResponse: ObnizPartsBleCompare<number[] | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional LocalName

LocalName: ObnizPartsBleCompare<RegExp> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional ServiceDataLength

ServiceDataLength: ObnizPartsBleCompare<number | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional ServiceDataStruct

ServiceDataStruct: ObnizPartsBleCompare<ObnizBleBeaconStruct<unknown> | null>

Used as a condition of isDevice() by default. Compare with data after Service UUID.

標準でisDevice()の条件として使用 ServiceUUID以降のデータと比較

Static Optional ServiceDataUUID

ServiceDataUUID: ObnizPartsBleCompare<number[] | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Static Optional ServiceUuids

ServiceUuids: ObnizPartsBleCompare<string | string[] | null> = undefined

Used as a condition of isDevice() by default.

標準でisDevice()の条件として使用

Accessors

mode

Methods

checkMode

connectWait

  • connectWait(): Promise<void>

disconnectWait

  • disconnectWait(): Promise<void>
  • Disconnect from peripheral.

    ペリフェラルから切断

    Returns Promise<void>

getData

  • getData(): null
  • アドバタイジングデータを連想配列に成形 利用可能なモード: Beacon, Connectable(一部のみ) Form advertising data into an associative array Available modes: Beacon, Connectable(only part)

    Returns null

Abstract getDataWait

  • getDataWait(): Promise<S>
  • Get data during connection.

    接続中にデータを取得

    Returns Promise<S>

setStatusbarLed

  • setStatusbarLed(power: boolean, red: boolean, green: boolean, blue: boolean): void
  • Control statusbar LED

    Parameters

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

    Returns void

Static getAvailableBleMode

  • Available BLE modes (Beacon | Connectable | Pairing)

    利用可能なBLEのモード (Beacon | Connectable | Pairing)

    Returns ObnizPartsBleMode[]

Static getData

  • Form advertising data into an associative array.

    アドバタイジングデータを連想配列に成形

    deprecated

    Parameters

    Returns unknown | null

Static getDeviceMode

  • Get Peripheral Mode.

    ペリフェラルのモードを取得

    Parameters

    Returns ObnizPartsBleMode | null

    If the corresponding device is that mode, it must be null if not applicable 該当するデバイスならばそのモード、該当しなければnull

Static getServiceUuids

Static info

  • Information of parts. name: PartsName

    Returns ObnizPartsInfo

Static isDevice

Static isDeviceWithMode

  • Check if peripherals and modes match the library.

    ペリフェラルとモードがライブラリと合致するかチェック

    Parameters

    Returns boolean

    Whether to match 合致するかどうか

Static isMESHblock

  • Check MESH block

    Parameters

    Returns boolean

Generated using TypeDoc