イベントチャンネル
デフォルトのイベント 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": ""
}