Files
remote-ui/protocol.jsonc
T
sani7 6185786f61 update protocol
follow update of message parser
2024-08-23 00:48:57 +02:00

130 lines
3.6 KiB
JSON

{
"commands":
[
{
"name": "get_UI_element",
"description": "Get the UI element by id",
"parameters": [
{
"name": "id",
"type": "string",
"description": "The id of the UI element"
}
],
"response": [
{
"name": "UI_element",
"type": "UIElements",
"description": "The UI element"
},
{
"response": "get_UI_element",
"type": "string",
"description": "The command name"
}
]
},
{
"name": "get_UI_elements",
"description": "Get the UI elements",
"parameters": [],
"response": [
{
"name": "UIElements",
"type": "List<UIElements>",
"description": "List of UI elements"
},
{
"response": "get_UI_elements",
"type": "string",
"description": "The command name"
}
]
},
{
"name": "switch_simulator",
"description": "Switch the simulator",
"parameters": [
{
"name": "simulator",
"type": "string",
"description": "The simulator to switch to"
}
],
"response": [
{
"response": "switch_simulator",
"type": "string",
"description": "The command name"
}
]
},
{
"name": "get_active_simulator_name",
"description": "Get the name of the active simulator",
"parameters": [],
"response": [
{
"name": "simulator",
"type": "string",
"description": "The name of the active simulator"
},
{
"response": "get_active_simulator_name",
"type": "string",
"description": "The command name"
}
]
},
{
"name": "get_simulators",
"description": "Get the list of simulators",
"parameters": [],
"response": [
{
"name": "simulators",
"type": "List<string>",
"description": "List of simulators"
},
{
"response": "get_simulators",
"type": "string",
"description": "The command name"
}
]
}
],
"events":
[
{
"type": "clicked",
"id": "name"
},
{
"type": "value_changed",
"id": "name",
"value": 0
},
{
"type": "text_changed",
"id": "name",
"text": "text"
},
{
"type": "selected",
"id": "name",
"item": "name"
},
{
// Server to client
"type": "ui_changed",
"UI_elements": [
{
"id": "name",
"type": "type"
// ,...
}
]
}
]
}