orphe-core-insole - v0.4.0
    Preparing search index...

    Class InsoleProfile

    デバイス固有差分(CORE / INSOLE)の注入点。 OrpheCoreInsole はこの interface だけに依存し、接続シーケンスとパースを委譲する。

    Implements

    Index
    defaultNotificationType: "SENSOR_VALUES" = 'SENSOR_VALUES'

    begin() の type 省略時に使う notification type

    device_information: InsoleDeviceInformation | null = null

    begin() で取得したデバイス設定。parse() の換算レンジに使う

    kind: "insole" = 'insole'

    'core' | 'insole' など

    pressure_calibrations: (PressureCalibration | null)[] | null = null

    begin() で取得した個体別圧力校正係数(index = センサー番号 0..5)。 旧 FW・未取得は null。FW に値が書かれていない ch はプレースホルダとして null になり、 その ch だけ既定式(全 ch 共通の指数関数)で換算する。 接続中は ble.commands.fetchPressureCalibrations() で取り直せる。

    streaming_mode: number | null = null

    最後に設定した streaming mode

    • 接続シーケンス。transport の read/write/startNotify だけで記述する。 resolve = 成功(値は begin() の戻り値になる)/ reject = 失敗。 自動再接続時にも同じシーケンスが再実行される。

      Parameters

      Returns Promise<string>

    • このデバイスが提供しうる取得モードの一覧(FW による絞り込み前)。 未実装なら FW によるモード制限を行わない。

      Returns DeviceMode[]

    • 通知パケットをパースする。対象外の uuid や不正パケットは null を返す。 返したサンプル列(TFields の部分集合)は SampleEmitter へそのまま配送される。

      Parameters

      • uuid: string
      • data: DataView

      Returns Partial<InsoleSensorFields>[] | null

    • streaming mode(1/3/4)を書き込む。接続中の切替にも使える

      Parameters

      Returns Promise<void>

    • デバイス記憶の localStorage キー(スロット id ごとに一意)

      Parameters

      • id: number

      Returns string