Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logtta_TH

Logtta_TH(Logtta_Temp) management class

Logtta_TH(Logtta_Temp)を管理するクラス

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_TH_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[] = ['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_TH" = "Logtta_TH"

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 with connected state

    接続している状態で全てのデータを取得

    Returns Promise<Logtta_TH_Connected_Data | null>

    all data from the Logtta_TH(Logtta_Temp)

    Logtta_TH(Logtta_Temp)から受け取った全てのデータ

getData

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

    Returns Logtta_TH_Data

getDataWait

  • Get data with connected state

    接続状態でデータを取得

    Returns Promise<Logtta_TH_Connected_Data>

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

getHumidityWait

  • getHumidityWait(): Promise<number>
  • Get the humidity data with connected state

    接続している状態で湿度のデータを取得

    Returns Promise<number>

    humidity data from the Logtta_TH(Logtta_Temp)

    Logtta_TH(Logtta_Temp)から受け取った湿度データ

getTemperatureWait

  • getTemperatureWait(): Promise<number>
  • Get the temperature data with connected state

    接続している状態で温度のデータを取得

    Returns Promise<number>

    temperature data from the Logtta_TH(Logtta_Temp)

    Logtta_TH(Logtta_Temp)から受け取った温度データ

setBeaconMode

  • setBeaconMode(enable: boolean): Promise<boolean>
  • deprecated

    Set enable / disable for beacon mode (periodic beacon transmission)

    Call this function after authenticating with the sensor

    After setting, disconnect once to enable it

    To stop beacon mode, you need to hold the button on the sensor for more than 2 seconds

    (For more detail, please see http://www.uni-elec.co.jp/logtta_page.html )

    ビーコンモード(定期的なビーコン発信)の有効/無効の設定

    センサとの認証を済ませた状態で実行してください

    設定後に切断した後から有効になります

    ビーコンモードの終了は、デバイスのボタンを2秒以上長押しする操作が必要です(詳しくは http://www.uni-elec.co.jp/logtta_page.html )

    Parameters

    • enable: boolean

      enable the beacon mode or not ビーコンモードを有効にするかどうか

    Returns Promise<boolean>

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 isAdvDevice

  • deprecated

    Verify that the received advertisement is from the Logtta_TH(Logtta_Temp) (in Beacon Mode)

    受け取ったAdvertisementがLogtta_TH(Logtta_Temp)のものかどうか確認する(ビーコンモード中)

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Logtta_TH(Logtta_Temp)

    Logtta_TH(Logtta_Temp)かどうか

Static isDevice

  • deprecated

    Verify that the received peripheral is from the Logtta_TH(Logtta_Temp)

    受け取ったPeripheralがLogtta_TH(Logtta_Temp)のものかどうかを確認する

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Logtta_TH(Logtta_Temp)

    Logtta_TH(Logtta_Temp)かどうか

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

address

address: object

index

index: number = 0

type

type: "custom" = "custom"

func

  • Parameters

    Returns string

appearance

appearance: object

data

data: number = 1

index

index: number = 0

type

type: "check" = "check"

battery

battery: object

index

index: number = 5

type

type: "unsignedNumBE" = "unsignedNumBE"

humidity

humidity: object

index

index: number = 3

length

length: number = 2

type

type: "custom" = "custom"

func

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

    • data: number[]

    Returns number

interval

interval: object

index

index: number = 6

length

length: number = 2

type

type: "unsignedNumBE" = "unsignedNumBE"

temperature

temperature: 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 = "f7eeaa20-276e-4165-aa69-7e3de7fc627e"

Generated using TypeDoc