Class default

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

Hierarchy

Constructors

Properties

address: string
batteryService?: BleBatteryService
beaconData: null | number[]
beaconDataInScanResponse: null | number[]
genericAccess?: BleGenericAccess
onNotify?: ((data) => void)

Type declaration

ondisconnect?: ((reason) => void | Promise<void>)

Type declaration

    • (reason): void | Promise<void>
    • onDisconnect callback function.

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

      Parameters

      • reason: unknown

        Reason for being disconnected 切断された理由

      Returns void | Promise<void>

serviceData: null | number[]
Address?: ObnizPartsBleCompareWithNonNull<RegExp> = undefined

Used as a condition of isDevice() by default.

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

AvailableBleMode: "Beacon" | "Connectable" | "Pairing" | ("Beacon" | "Connectable" | "Pairing")[] = ...
BeaconDataLength: ObnizPartsBleCompare<number> = ...

Used as a condition of isDevice() by default.

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

BeaconDataLength_ScanResponse?: ObnizPartsBleCompare<number> = undefined

Overall length of manufacturer-specific data. Used as a condition of isDevice() by default.

製造者固有データ全体の長さ 標準でisDevice()の条件として使用

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

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

CompanyID: ObnizPartsBleCompare<number[]> = ...

Used as a condition of isDevice() by default.

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

CompanyID_ScanResponse?: ObnizPartsBleCompare<number[]> = undefined

Used as a condition of isDevice() by default.

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

LocalName: {
    Beacon: RegExp;
    Connectable: undefined;
} = ...

Used as a condition of isDevice() by default.

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

Type declaration

  • Beacon: RegExp
  • Connectable: undefined
PartsName: "Logtta_CO2" = 'Logtta_CO2'
ServiceDataLength?: ObnizPartsBleCompare<number> = undefined

Used as a condition of isDevice() by default.

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

ServiceDataStruct?: ObnizPartsBleCompare<ObnizBleBeaconStruct<unknown>>

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

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

ServiceDataUUID?: ObnizPartsBleCompare<number[]> = undefined

Used as a condition of isDevice() by default.

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

ServiceUuids: {
    Beacon: null;
    Connectable: string;
} = ...

Used as a condition of isDevice() by default.

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

Type declaration

  • Beacon: null
  • Connectable: string

Accessors

Methods

  • Authorize PIN code

    ピンコードを認証

    Parameters

    • code: string | number

      PIN code ピンコード

    Returns Promise<boolean>

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

  • Connect to the services of a device

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

    Parameters

    • Optional keys: string

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

    Returns Promise<void>

  • Returns Promise<null | number>

    CO2 concentration data from the Logtta_CO2

    Logtta_CO2から受け取ったCO2濃度データ

    Deprecated

    Get CO2 concentration data with connected state

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

  • Parameters

    • enable: boolean

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

    Returns 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 )

  • Notify when the CO2 concentration data have got from the Logtta_CO2 with connected state

    接続している状態でLogtta_CO2からCO2濃度データを取得したとき通知

    Parameters

    Returns Promise<void>

  • Available BLE modes (Beacon | Connectable | Pairing)

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

    Returns ("Beacon" | "Connectable" | "Pairing")[]

  • Get Peripheral Mode.

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

    Parameters

    Returns null | "Beacon" | "Connectable" | "Pairing"

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

  • Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Logtta_CO2

    Logtta_CO2かどうか

    Deprecated

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

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

  • Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns boolean

    Whether it is the Logtta_CO2

    Logtta_CO2かどうか

    Deprecated

    Verify that the received peripheral is from the Logtta_CO2

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

  • Check if peripherals and modes match the library.

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

    Parameters

    • peripheral: BleRemotePeripheral

      BleRemotePeripheral

    • mode: "Beacon" | "Connectable" | "Pairing"

      Beacon | Connectable | Pairing

    Returns boolean

    Whether to match 合致するかどうか

Generated using TypeDoc