Files
remote-ui/protocol.jsonc
T
sani7 97700658e1 update protocol
now resembles the changes to the protocol I made
2026-02-14 14:32:48 +01:00

170 lines
5.1 KiB
JSON

{
"commands":
[
{
"name": "get_UI_element",
"description": "Get the UI element by id",
"parameters": [
{
"name": "id",
"type": "size_t",
"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",
"description": "Someone clicked on a UI elements",
"parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
}
]
},
{
"type": "value_changed",
"description": "Someone changed a value on a UI elements",
"parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
},
{
"name": "value",
"type": "double",
"description": "The value that changed"
}
]
},
{
"type": "text_changed",
"description": "Someone changed text on a UI elements",
"parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
},
{
"name": "text",
"type": "string",
"description": "The text that changed"
}
]
},
{
"type": "selected",
"description": "Someone changed selection on a UI elements",
"parameters": [
{
"name": "id",
"type": "size_t",
"description": "The id of the UI element"
},
{
"name": "selected",
"type": "size_t",
"description": "The index of the selected item"
}
]
},
{
"type": "ui_changed",
"description": "A message from Server to client to notify that the UI changed with the changed UI elements",
"parameters": [
{
"name": "UIElements",
"type": "List<UIElements>",
"description": "List of UI elements"
}
]
}
]
}