Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logtta_AD

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

Hierarchy

Index

Constructors

constructor

Properties

address

address: string

Optional batteryService

batteryService: BleBatteryService

beaconData

beaconData: number[] | null

beaconDataInScanResponse

beaconDataInScanResponse: number[] | null

Optional genericAccess

genericAccess: BleGenericAccess

Optional onNotify

onNotify: undefined | ((data: Logtta_AD_Connected_Data) => void)

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: ObnizPartsBleMode | ObnizPartsBleMode[] = ['Connectable', 'Beacon']

Static Optional BeaconDataLength_ScanResponse

BeaconDataLength_ScanResponse: 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 PartsName

PartsName: "Logtta_AD" = "Logtta_AD"

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()の条件として使用

Accessors

mode

Methods

authPinCodeWait

  • authPinCodeWait(code: string | number): Promise<boolean>
  • Authorize PIN code

    ピンコードを認証

    Parameters

    • code: string | number

      PIN code ピンコード

    Returns Promise<boolean>

    Whether authentication was/is passed 認証が通った/通っているかどうか

checkMode

connectWait

  • connectWait(keys?: undefined | string): Promise<void>
  • Connect to the services of a device

    デバイスのサービスに接続

    Parameters

    • Optional keys: undefined | string

      Key acquired when pairing previously 以前にペアリングしたときに取得されたキー

    Returns Promise<void>

disconnectWait

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

    ペリフェラルから切断

    Returns Promise<void>

getAllWait

  • deprecated

    Get all data available from the Logtta_AD

    Logtta_ADから取得可能なデータを全て取得

    Returns Promise<Logtta_AD_Connected_Data | null>

    all data available from the Logtta_AD

    Logtta_ADから受け取った全てのデータ

getAmpereWait

  • getAmpereWait(): Promise<number>
  • Get the current value from the Logtta_AD

    Logtta_ADから電流値を取得

    Returns Promise<number>

    the current value from the Logtta_AD

    Logtta_ADから受け取った電流値

getCountWait

  • getCountWait(): Promise<number>
  • Get the count data from the Logtta_AD

    Logtta_ADからカウントデータを取得

    Returns Promise<number>

    the count data from the Logtta_AD

    Logtta_ADから受け取ったカウントデータ

getData

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

    Returns Logtta_AD_Data

getDataWait

  • Get data with connected state

    接続状態でデータを取得

    Returns Promise<Logtta_AD_Connected_Data>

    received value from each sensor それぞれのセンサから取得した値

getVoltWait

  • getVoltWait(): Promise<number>
  • Get the voltage value from the Logtta_AD

    Logtta_ADから電圧値を取得

    Returns Promise<number>

    the voltage value from the Logtta_AD

    Logtta_ADから受け取った電圧値

setBeaconModeWait

  • setBeaconModeWait(enable: boolean): Promise<boolean>
  • Set / unset to Beacon Mode

    ビーコンモードに設定/解除

    Parameters

    • enable: boolean

      enable / disable 有効 / 無効

    Returns Promise<boolean>

    data write result

startNotifyWait

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

  • deprecated

    Verify that the received peripheral is from the Logtta_AD

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

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Logtta_AD

    Logtta_ADかどうか

Static isDeviceWithMode

  • Check if peripherals and modes match the library.

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

    Parameters

    Returns boolean

    Whether to match 合致するかどうか

Object literals

Static BeaconDataLength

BeaconDataLength: object

Beacon

Beacon: number = 27

Connectable

Connectable: null = null

Static BeaconDataStruct

BeaconDataStruct: object

Connectable

Connectable: null = null

Beacon

Beacon: object

ampere

ampere: object

index

index: number = 1

length

length: number = 2

type

type: "custom" = "custom"

func

  • func(data: number[]): number
  • Parameters

    • data: number[]

    Returns number

appearance

appearance: object

data

data: number = 4

index

index: number = 0

type

type: "check" = "check"

battery

battery: object

index

index: number = 5

type

type: "unsignedNumBE" = "unsignedNumBE"

count

count: object

index

index: number = 3

length

length: number = 2

type

type: "unsignedNumBE" = "unsignedNumBE"

interval

interval: object

index

index: number = 6

length

length: number = 2

type

type: "unsignedNumBE" = "unsignedNumBE"

volt

volt: object

index

index: number = 1

length

length: number = 2

type

type: "custom" = "custom"

func

  • func(data: number[]): number
  • Parameters

    • data: number[]

    Returns number

Static CompanyID

CompanyID: object

Beacon

Beacon: number[] = [0x10, 0x05]

Connectable

Connectable: null = null

Static LocalName

LocalName: object

Beacon

Beacon: RegExp = /null/

Connectable

Connectable: undefined = undefined

Static ServiceUuids

ServiceUuids: object

Beacon

Beacon: null = null

Connectable

Connectable: string = "4e43ae20-6687-4f3c-a1c3-1c327583f29d"

Generated using TypeDoc