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

Hierarchy

  • default

Implements

Constructors

  • Constructor.

    If you want to change the RTC auto-configuration option from the default,

    set it as an argument at this time.

    コンストラクタ

    RTC自動設定オプションをデフォルトから変更する場合は、このタイミングで引数に設定

    Parameters

    Returns default

Properties

_peripheral: BleRemotePeripheral
keys: string[] = ...
ondisconnect?: ((reason) => void)

Type declaration

    • (reason): void
    • Parameters

      • reason: any

      Returns void

params: any
requiredKeys: string[] = []

Methods

  • Connect to the target device with pairing key

    ペアリングキーを用いてデバイスと接続

    Parameters

    • keys: string

      pairing key ペアリングキー

    Returns Promise<void>

  • Get the pairing key under pairing mode

    ペアリングモード中にペアリングキーを取得

    Returns Promise<string>

    pairing key ペアリングキー

  • Get current relay state

    現在のリレーの状態を取得

    Returns Promise<boolean>

    the relay in set or not

    リレーが設定されているかどうか

  • Get realtime measurement data(voltage[Vrms]・electric current[Irms]・electric power[Wa]) and relay state

    リアルタイム計測データ(電圧[Vrms]・電流[Irms]・電力[Wa])とリレーの状態を取得

    Returns Promise<RS_BTWATTCH2RealtimeData>

    received realtime measurement data and relay state

    受けとったリアルタイム計測データとリレーの状態

  • Check if device is under pairing mode(over 3 seconds button pressing)

    デバイスがペアリングモード中であることを検出する (3秒間本体のボタンを押してください)

    Returns boolean

    Whether there is a device under pairing mode

    ペアリングモード中のデバイスがあるかどうか

  • Set relay ON/OFF

    リレーのON/OFFを設定する

    Parameters

    • isOn: boolean

      set relay or not

      リレーを設定するかどうか

    Returns Promise<void>

  • Set device RTC (date)

    デバイスのRTC(日時)の設定

    Parameters

    • Optional date: Date

      instance of Date Dateのインスタンス

    Returns Promise<void>

  • Verify that the received peripheral is from the RS_BTWATTCH2

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

    Parameters

    • peripheral: BleRemotePeripheral

      instance of BleRemotePeripheral BleRemotePeripheralのインスタンス

    Returns null | boolean | ""

    Whether it is the RS_BTWATTCH2

    RS_BTWATTCH2かどうか

Generated using TypeDoc