Class default

MESH_100TH management class

Hierarchy

Constructors

Properties

address: string
beaconData: null | number[]
beaconDataInScanResponse: null | number[]
onBatteryLevel: null | ((battery) => void) = null

Type declaration

    • (battery): void
    • Parameters

      • battery: number

      Returns void

onSensorEvent: null | ((temperature, humidity) => void) = null

Type declaration

    • (temperature, humidity): void
    • Parameters

      • temperature: number
      • humidity: number

      Returns void

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

Type declaration

    • (): void
    • Returns void

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

Type declaration

    • (response): void
    • Parameters

      • response: boolean

      Returns void

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: "Connectable" = ...
BeaconDataLength?: ObnizPartsBleCompare<number> = undefined

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

BeaconDataStruct?: ObnizPartsBleCompare<ObnizBleBeaconStruct<unknown>>

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

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

CompanyID?: ObnizPartsBleCompare<number[]> = undefined

Used as a condition of isDevice() by default.

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

CompanyID_ScanResponse?: ObnizPartsBleCompare<number[]> = undefined

Used as a condition of isDevice() by default.

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

EmitCondition: {
    ABOVE_UPPER_OR_ABOVE_LOWER: 1;
    ABOVE_UPPER_OR_BELOW_LOWER: 0;
    BELOW_UPPER_OR_ABOVE_LOWER: 17;
    BELOW_UPPER_OR_BELOW_LOWER: 16;
} = TempHumid.EmitCondition

Type declaration

  • ABOVE_UPPER_OR_ABOVE_LOWER: 1
  • ABOVE_UPPER_OR_BELOW_LOWER: 0
  • BELOW_UPPER_OR_ABOVE_LOWER: 17
  • BELOW_UPPER_OR_BELOW_LOWER: 16
LocalName: RegExp = ...

Used as a condition of isDevice() by default.

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

NotifyMode: {
    ALWAYS: 32;
    EMIT_HUMIDITY: 2;
    EMIT_TEMPERATURE: 1;
    ONCE: 16;
    STOP: 0;
    UPDATE_HUMIDITY: 8;
    UPDATE_TEMPERATURE: 4;
} = TempHumid.NotifyMode

Type declaration

  • Readonly ALWAYS: 32
  • Readonly EMIT_HUMIDITY: 2
  • Readonly EMIT_TEMPERATURE: 1
  • Readonly ONCE: 16
  • Readonly STOP: 0
  • Readonly UPDATE_HUMIDITY: 8
  • Readonly UPDATE_TEMPERATURE: 4
PartsName: "MESH_100TH" = 'MESH_100TH'
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?: ObnizPartsBleCompare<string | string[]> = undefined

Used as a condition of isDevice() by default.

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

Accessors

Methods

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

    利用可能なモード: Beacon, Connectable(一部のみ)

    Form advertising data into an associative array

    Available modes: Beacon, Connectable(only part)

    Returns null

  • Get data during connection.

    接続中にデータを取得

    Returns Promise<{
        address: string;
        humidity: number;
        name: string;
        temperature: number;
    }>

  • getSensorDataWait

    Parameters

    • opt_timeoutMsec: 5000 = ...

    Returns Promise<{
        humidity: number;
        temperature: number;
    }>

  • setMode

    Parameters

    • temperatureUpper: number
    • temperatureLower: number
    • humidityUpper: number
    • humidityLower: number
    • temperatureCondition: number
    • humidityCondition: number
    • notifyMode: number

    Returns 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

  • 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