イベントチャンネル
デフォルトのイベント WebSocket URL は ws://localhost:10020 です。
ポート番号は設定で変更できます。
これは低頻度の片方向通信チャネルであり、システム内のすべてのイベントを受信できると見込まれます。 入力メッセージはサポートされていません。
このチャンネルでは、イベントごとに必ず1件のメッセージを送信することを保証します。
正規のフォーマット
すべてのイベントは、以下に示す標準的な構成に従います:
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {},
"message": ""
}
フィールドの説明
| フィールド | 型 | 説明 |
|---|---|---|
name | string | イベントを一意に識別するための識別子です。 |
category | string | フィルタリングや整理に使用されるグループラベルです(有効なカテゴリを参照)。 |
level | string | イベントの重大度または重要度です(有効なレベルを参照)。 |
data | object | このペイロードには、イベント固有の詳細が含まれています。 |
message | string | イベントに関する、任意の、人間が読み取れる形式の説明または背景情報です。 |
イベントカテゴリ
category フィールドは、イベントを次のグループに分類します:
| 値 | 説明 |
|---|---|
system | コアまたは中核となるシステム、グローバル設定など。 |
input | 外部入力の処理(例:コマンドなど)。 |
session | 特定のユーザーセッションに関連するイベント。 |
device | デバイス管理、コントローラとのやり取り、SerialPort 通信。 |
module | サブシステムまたはモジュール式コンポーネントのイベント。 |
feature | 特定のサービス機能または能力に関連付けられたイベント。 |
イベントレベル
イベントの level フィールドは、イベントの重大度または重要度を示します:
| 値 | 説明 |
|---|---|
info | 情報提供のみ — ログ、メトリクス、または重要度の低い通知。 |
notice | 状態の変化または注目すべき出来事。 |
warning | 何らかの問題が発生したか、異常が見られますが、システムは安全に動作を継続できます。 |
error | システムの動作または安定性に影響を及ぼす可能性のある問題が発生しました。 |
critical | システムの機能を著しく妨げる重大なエラーです。 |
panic | 致命的な障害 — クラッシュや回復不能な状態につながる可能性があります。 |
イベント
このリストは、システムが現在報告しているイベントの一覧です。現在、イベントの種類や報告内容について、積極的に設計・拡充を進めています。
入力
invalid-io-channel
I/O チャンネルが、サポートされていない方法または意図しない方法で使用された場合に発生します。
データ
| フィールド | 型 | 説明 |
|---|---|---|
received_data | string | 受信した生データです。 |
{
"name": "invalid-io-channel",
"category": "input",
"level": "warning",
"data": {
"received_data": "<raw_input_here>"
}
}
http-route-deprecated
HTTP のルートが非推奨となり、将来のバージョンで削除される場合に発行されます。
データ
| フィールド | 型 | 説明 |
|---|---|---|
route | string | 非推奨となったルートです。 |
substitute | string | 推奨される迂回ルートです。 |
{
"name": "http-route-deprecated",
"category": "input",
"level": "warning",
"data": {
"route": "/the/old/way",
"substitute": "/the/new/way"
}
}
settings-invalid-key
設定キーが無効な場合に発行されます。
データ
| フィールド | 型 | 説明 |
|---|---|---|
key | string | 見つからなかったキーです。 |
{
"name": "settings-invalid-key",
"category": "input",
"level": "warning",
"data": {
"key": "devices/none-existent/key"
}
}
command-deprecated
受信したコマンドが非推奨となり、将来のバージョンで削除される場合に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
command | string | 受信した非推奨のコマンドです |
{
"name": "command-deprecated",
"category": "input",
"level": "warning",
"data": {
"command": "example_cmd"
},
"message": "The command `example_cmd` is deprecated and is replaced by `this_one`."
}
デバイス
device-connected
デバイスが接続され、完全に動作可能な状態になったことを示します。
| フィールド | 型 | 説明 |
|---|---|---|
device_family | string | デバイスの種類:inverse または verse_grip。 |
device_id | string | デバイス固有の識別子です。 |
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {
"device_family": "inverse",
"device_id": "04BA"
}
}
device-disconnected
以前に接続されていたデバイスとの接続が切断されたことを示します。
| フィールド | 型 | 説明 |
|---|---|---|
device_family | string | デバイスの種類:inverse または verse_grip。 |
device_id | string | デバイス固有の識別子です。 |
{
"name": "device-disconnected",
"category": "device",
"level": "notice",
"data": {
"device_family": "verse_grip",
"device_id": "61548"
}
}
セッション
device-low-control-rate
デバイスに対する直接制御コマンドの受信レートが低すぎて、安全上の制限に達した場合に発行されます。これは警告であり、レートが カットオフレートに近づいていることを示しています。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_family | string | デバイスの種類:inverse または verse_grip。 |
device_id | string | デバイス固有の識別子です。 |
frequency | int | 現在の制御レート(ヘルツ単位)です。 |
{
"name": "device-low-control-rate",
"category": "session",
"level": "warning",
"data": {
"session_id": 3,
"device_family": "inverse",
"device_id": "1A2B",
"frequency": 260
},
"message": ""
}
device-critical-control-rate
デバイスに対する直接制御コマンドの受信レートが低すぎて、安全上の制限に達した場合に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_family | string | デバイスの種類:inverse または verse_grip。 |
device_id | string | デバイス固有の識別子です。 |
frequency | int | 現在の制御レート(ヘルツ単位)です。 |
{
"name": "device-critical-control-rate",
"category": "session",
"level": "error",
"data": {
"session_id": 3,
"device_family": "inverse",
"device_id": "1A2B",
"frequency": 82
},
"message": ""
}
機能
sdf-sdf_hfx-created
SDFエンティティ「FX」が作成された際に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_id | string | デバイス固有の識別子です。 |
hfx_id | string | 作成時に使用された FX ID です。 |
{
"name": "sdf-sdf_hfx-created",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-deleted
SDFエンティティ「FX」が削除された場合に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_id | string | デバイス固有の識別子です。 |
hfx_id | string | 削除された FX ID です。 |
{
"name": "sdf-sdf_hfx-deleted",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-updated
SDFエンティティ「FX」が更新された場合に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_id | string | デバイス固有の識別子です。 |
hfx_id | string | 更新された FX ID です。 |
{
"name": "sdf-sdf_hfx-updated",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-range-entered
指定されたデバイスのカーソルが SDF エンティティの範囲内に入ったときに発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_id | string | デバイス固有の識別子です。 |
hfx_id | string | FX ID です。 |
{
"name": "sdf-sdf_hfx-range-entered",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}
sdf-sdf_hfx-range-exited
指定されたデバイスのカーソルが SDF エンティティの範囲外に出た場合に発行されます。
| フィールド | 型 | 説明 |
|---|---|---|
session_id | int | 対象のシミュレーションセッション ID です。 |
device_id | string | デバイス固有の識別子です。 |
hfx_id | string | FX ID です。 |
{
"name": "sdf-sdf_hfx-range-exited",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}