メインコンテンツまでスキップ

イベントチャンネル

デフォルトのイベント WebSocket URL は ws://localhost:10020 です。

ポート番号は設定で変更できます。

これは低頻度の一方向通信チャンネルであり、システム内のすべてのイベントを受信することが期待できます。 入力メッセージはサポートされていません。

このチャンネルは、イベントごとに1件のメッセージを必ず送信することを保証します。

正規フォーマット​

すべてのイベントは、以下に示す標準の構造に従います:

{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {},
"message": ""
}

フィールドの説明​

フィールド型説明
namestringイベントの一意の識別子です。
categorystringフィルタリングと整理に使用されるグループラベルです(有効なカテゴリを参照)。
levelstringイベントの重大度または重要度です(有効なレベルを参照)。
dataobjectイベント固有の詳細を含むペイロードです。
messagestringイベントに関する任意の、人が読める形式の説明またはコンテキストです。

イベントカテゴリ​

category フィールドは、イベントを次のグループに分類します:

値説明
systemコアまたは中核のシステム、グローバル設定など。
input外部入力の処理(例:コマンドなど)。
session特定のユーザーセッションに関連するイベント。
deviceデバイス管理、コントローラーとのやり取り、SerialPort 通信。
moduleサブシステムまたはモジュール式コンポーネントのイベント。
feature特定のサービス機能または能力に関連付けられたイベント。

イベントレベル​

イベントの level フィールドは、イベントの重大度または重要度を示します:

値説明
info情報提供のみ — ログ、メトリクス、または重要度の低い通知。
notice状態の変化または注目すべきイベント。
warning何らかの問題が発生したか、異常が見られますが、システムは安全に動作を継続できます。
errorシステムの動作または安定性に影響を与える可能性のある問題が発生しました。
criticalシステムの機能を大きく妨げる重大なエラーです。
panic致命的な障害 — クラッシュや回復不能な状態につながる可能性があります。

イベント​

備考

このリストは、システムが現在報告しているイベントの一覧です。現在、イベントの種類と報告内容を積極的に設計・拡充しています。

入力​

invalid-io-channel​

I/O チャンネルが、サポートされていない方法または意図しない方法で使用された場合に発生します。

データ

フィールド型説明
received_datastring受信した生データです。
{
"name": "invalid-io-channel",
"category": "input",
"level": "warning",
"data": {
"received_data": "<raw_input_here>"
}
}

http-route-deprecated​

HTTP のルートが非推奨となり、将来のバージョンで削除される場合に発行されます。

データ

フィールド型説明
routestring非推奨となったルートです。
substitutestring推奨される代替ルートです。
{
"name": "http-route-deprecated",
"category": "input",
"level": "warning",
"data": {
"route": "/the/old/way",
"substitute": "/the/new/way"
}
}

settings-invalid-key​

設定キーが無効である場合に発行されます。

データ

フィールド型説明
keystring見つからなかったキーです。
{
"name": "settings-invalid-key",
"category": "input",
"level": "warning",
"data": {
"key": "devices/none-existent/key"
}
}

command-deprecated​

受信したコマンドが非推奨となり、将来のバージョンで削除される場合に発行されます。

フィールド型説明
commandstring受信した非推奨のコマンドです
{
"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_familystringデバイスの種類:inverse または verse_grip。
device_idstringデバイスの一意の識別子です。
{
"name": "device-connected",
"category": "device",
"level": "notice",
"data": {
"device_family": "inverse",
"device_id": "04BA"
}
}

device-disconnected​

以前接続されていたデバイスの接続が切断されたことを示します。

フィールド型説明
device_familystringデバイスの種類:inverse または verse_grip。
device_idstringデバイスの一意の識別子です。
{
"name": "device-disconnected",
"category": "device",
"level": "notice",
"data": {
"device_family": "verse_grip",
"device_id": "61548"
}
}

セッション​

device-low-control-rate​

デバイスに対する直接制御コマンドの受信レートが低すぎて、安全上の制限に達した場合に発行されます。これは警告で、レートが カットオフレートに近づいていることを示します。

フィールド型説明
session_idint対象のシミュレーションセッション ID です。
device_familystringデバイスの種類:inverse または verse_grip。
device_idstringデバイスの一意の識別子です。
frequencyint現在の制御レート(ヘルツ単位)です。
{
"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_idint対象のシミュレーションセッション ID です。
device_familystringデバイスの種類:inverse または verse_grip。
device_idstringデバイスの一意の識別子です。
frequencyint現在の制御レート(ヘルツ単位)です。
{
"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_idint対象のシミュレーションセッション ID です。
device_idstringデバイスの一意の識別子です。
hfx_idstring作成時に使用された 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_idint対象のシミュレーションセッション ID です。
device_idstringデバイスの一意の識別子です。
hfx_idstring削除された 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_idint対象のシミュレーションセッション ID です。
device_idstringデバイスの一意の識別子です。
hfx_idstring更新された 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_idint対象のシミュレーションセッション ID です。
device_idstringデバイスの一意の識別子です。
hfx_idstringFX 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_idint対象のシミュレーションセッション ID です。
device_idstringデバイスの一意の識別子です。
hfx_idstringFX ID です。
{
"name": "sdf-sdf_hfx-range-exited",
"category": "feature",
"level": "notice",
"data": {
"session_id": 3,
"device_id": "1A2B",
"hfx_id": "my_fx_name"
},
"message": ""
}