feat: define shared event and IPC contracts
This commit is contained in:
1 parent
e0a7e35674
commit
0745c5e767
15 files changed
+1214
-14
No files matched your search
@@ -0,0 +1,171 @@
|
||||
[
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000001",
|
||||
"sequence": 1,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "RUNNING",
|
||||
"origin": "rpi",
|
||||
"source": "rfid",
|
||||
"event_type": "RFID_SCAN",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"channel": 2,
|
||||
"device": "director_lock",
|
||||
"uid": "2EF588F2",
|
||||
"role": "employee",
|
||||
"result": "denied",
|
||||
"reason": "uid_not_authorized_for_channel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000002",
|
||||
"sequence": 2,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "RUNNING",
|
||||
"origin": "rpi",
|
||||
"source": "ir",
|
||||
"event_type": "IR_COMMAND",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"code": 3108437760,
|
||||
"action": "toggle_enabled",
|
||||
"result": "executed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000003",
|
||||
"sequence": 3,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "RUNNING",
|
||||
"origin": "rpi",
|
||||
"source": "radio",
|
||||
"event_type": "RADIO_COMMAND",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"code": 460769,
|
||||
"burst_id": "30000000-0000-4000-8000-000000000001",
|
||||
"count": 4,
|
||||
"recognized": true,
|
||||
"action": "toggle_barrier",
|
||||
"result": "executed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000004",
|
||||
"sequence": 4,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "RUNNING",
|
||||
"origin": "rpi",
|
||||
"source": "usb",
|
||||
"event_type": "USB_CONNECTED",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"pc_id": 1,
|
||||
"usb_session_id": "30000000-0000-4000-8000-000000000001",
|
||||
"device_type": "keyboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000005",
|
||||
"sequence": 5,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "FROZEN",
|
||||
"origin": "rpi",
|
||||
"source": "system",
|
||||
"event_type": "SYSTEM_STOP_REQUEST",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"reason": "system_tag",
|
||||
"uid": "A1CE8B0D",
|
||||
"channel": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000001",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000001",
|
||||
"event_id": "40000000-0000-4000-8000-000000000006",
|
||||
"sequence": 6,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": "2026-12-03T12:30:00+03:00",
|
||||
"sim_epoch": 0,
|
||||
"stand_mode": "RUNNING",
|
||||
"origin": "rpi",
|
||||
"source": "esp",
|
||||
"event_type": "ESP_DISCONNECTED",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"component": "esp32",
|
||||
"code": "heartbeat_timeout",
|
||||
"message": "Нет heartbeat от ESP32",
|
||||
"state": "unavailable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schema_version": 1,
|
||||
"stand_id": "labstand-01",
|
||||
"session_id": "10000000-0000-4000-8000-000000000002",
|
||||
"journal_generation": "20000000-0000-4000-8000-000000000002",
|
||||
"event_id": "40000000-0000-4000-8000-000000000007",
|
||||
"sequence": 1,
|
||||
"monotonic_ms": 1000,
|
||||
"timestamp_sys": "2026-12-03T09:30:00Z",
|
||||
"timestamp_sim": null,
|
||||
"sim_epoch": null,
|
||||
"stand_mode": "UNKNOWN",
|
||||
"origin": "windows",
|
||||
"source": "collector",
|
||||
"event_type": "COLLECTOR_HEALTH",
|
||||
"correlation_id": "30000000-0000-4000-8000-000000000001",
|
||||
"policy_version": "access-1",
|
||||
"details": {
|
||||
"component": "sftp",
|
||||
"code": "connection_lost",
|
||||
"message": "Соединение недоступно",
|
||||
"state": "unavailable"
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user