diff --git a/G3Simulator/G3Simulator.cs b/G3Simulator/G3Simulator.cs index e3ee82c..15b800e 100644 --- a/G3Simulator/G3Simulator.cs +++ b/G3Simulator/G3Simulator.cs @@ -863,6 +863,7 @@ public Task RecordingInProgress() public class SettingsSimulator : ISettings { private bool _gazeOverlay; + private bool _muteAudio; private readonly SignalSimulator _changed; private int _gazeFrequency; @@ -874,6 +875,7 @@ public SettingsSimulator(G3Simulator g3Simulator) public IG3Observable Changed => _changed; public Task GazeOverlay => Task.FromResult(_gazeOverlay); + public Task MuteAudio => Task.FromResult(_muteAudio); public Task GazeFrequency => Task.FromResult(_gazeFrequency); public Task SetGazeOverlay(bool value) { @@ -882,6 +884,13 @@ public Task SetGazeOverlay(bool value) return Task.FromResult(true); } + public Task SetMuteAudio(bool value) + { + _muteAudio = value; + _changed.Emit("mute-audio"); + return Task.FromResult(true); + } + public Task SetGazeFrequency(int value) { _gazeFrequency = value; diff --git a/examples/G3DocumentExtractor/miniweb/htdocs/2.2.4.json b/examples/G3DocumentExtractor/miniweb/htdocs/2.2.4.json new file mode 100644 index 0000000..1bc6b9a --- /dev/null +++ b/examples/G3DocumentExtractor/miniweb/htdocs/2.2.4.json @@ -0,0 +1,2343 @@ +{ + "/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "remote-host": { + "return": "string", + "args": [], + "help": "Look up the remote (requesting) host or address.\n\nArguments:\nReturn:\nThe host or address of the caller." + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "webrtc", + "recordings", + "calibrate", + "rudimentary", + "recorder", + "upgrade", + "network", + "neighborhood", + "system", + "settings" + ] + }, + "/calibrate": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "run": { + "return": "boolean", + "args": [], + "help": "Perform a personal calibration with a marker. Equivalent of using: calibrate(true)\n\nReturn:\ntrue if calibration succeeded, false otherwise." + }, + "calibrate": { + "return": "string", + "args": [ + "boolean" + ], + "help": "Perform a personal calibration with or without a marker.\n\nArguments:\nuse-marker: true if a marker should be used.\nReturn:\ncalibration result string." + }, + "emit-markers": { + "return": "boolean", + "args": [], + "help": "Emit markers for 3 seconds.\n\nReturn:\ntrue if emission of markers was started." + } + }, + "signals": { + "marker": { + "args": [ + "real", + "array", + "array" + ], + "help": "Send out calibration markers when found.\n\nArguments:\ntimestamp: The calibration marker timestamp.\nposition3D: The 3D position of the marker.\nposition2D: The normalized 2D position of the marker." + } + }, + "children": [] + }, + "/neighborhood": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": {}, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "ethernet", + "wifi" + ] + }, + "/neighborhood/ethernet": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": {}, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "TG03B-080109051261", + "TG03B-080200004381" + ] + }, + "/neighborhood/ethernet/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "domain": { + "type": "string", + "range": [], + "mode": "r", + "help": "The domain registered for this host." + }, + "ipv4": { + "type": "string", + "range": [], + "mode": "r", + "help": "Host is registered with IPv4." + }, + "ipv6": { + "type": "string", + "range": [], + "mode": "r", + "help": "Host is registered with IPv6." + }, + "port": { + "type": "int", + "range": [ + 0, + 65535 + ], + "mode": "r", + "help": "The port registered for this host." + }, + "hostname": { + "type": "string", + "range": [], + "mode": "r", + "help": "The hostname registered for this host." + } + }, + "actions": {}, + "signals": {}, + "children": [] + }, + "/neighborhood/wifi": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": {}, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "TG03B-080200004381" + ] + }, + "/neighborhood/wifi/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "domain": { + "type": "string", + "range": [], + "mode": "r", + "help": "The domain registered for this host." + }, + "ipv4": { + "type": "string", + "range": [], + "mode": "r", + "help": "Host is registered with IPv4." + }, + "ipv6": { + "type": "string", + "range": [], + "mode": "r", + "help": "Host is registered with IPv6." + }, + "port": { + "type": "int", + "range": [ + 0, + 65535 + ], + "mode": "r", + "help": "The port registered for this host." + }, + "hostname": { + "type": "string", + "range": [], + "mode": "r", + "help": "The hostname registered for this host." + } + }, + "actions": {}, + "signals": {}, + "children": [] + }, + "/network": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "wifi-enable": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Enable or disable Wi-Fi networking." + }, + "wifi-hw-enabled": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "Check the state of the Wi-Fi hardware." + } + }, + "actions": { + "reset": { + "return": null, + "args": [], + "help": "Reset the whole network setup.\n" + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "wifi", + "ethernet" + ] + }, + "/network/ethernet": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "state": { + "type": "enum", + "range": [ + "unknown", + "disconnected", + "config", + "auth", + "ip-config", + "connected", + "disconnecting", + "failed" + ], + "mode": "r", + "help": "The current state of the device." + }, + "state-reason": { + "type": "enum", + "range": [ + "unknown", + "none", + "config-fail", + "auth-fail", + "dhcp-fail", + "config-ip-fail", + "connection-removed", + "user-request", + "carrier", + "access-point-fail" + ], + "mode": "r", + "help": "The reason for the current state of the device." + }, + "type": { + "type": "enum", + "range": [ + "unknown", + "ethernet", + "wifi" + ], + "mode": "r", + "help": "The network device type." + }, + "mac-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The network device MAC address." + }, + "speed": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "The current network speed (kbit/s)." + }, + "auto-connect": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "If automatic activation should be performed." + }, + "active-configuration": { + "type": "string", + "range": [], + "mode": "r", + "help": "The UUID of the active configuration, null if not active." + }, + "connected-network": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the current network." + }, + "ipv4-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv4 Address." + }, + "ipv4-gateway": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv4 Gateway." + }, + "ipv4-name-servers": { + "type": "array", + "range": [], + "mode": "r", + "help": "The current IPv4 name servers." + }, + "ipv6-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv6 Address." + }, + "ipv6-gateway": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv6 gateway." + }, + "ipv6-name-servers": { + "type": "array", + "range": [], + "mode": "r", + "help": "The current IPv6 name servers." + } + }, + "actions": { + "create-config": { + "return": "string", + "args": [ + "string" + ], + "help": "Create a configuration for this device.\n\nArguments:\nname: The name of the configuration.\nReturn:\nThe UUID of the new configuration, null on error." + }, + "connect": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Connect device using specific configuration.\n\nArguments:\nuuid: UUID of the configuration to use.\nReturn:\ntrue on success, false otherwise." + }, + "disconnect": { + "return": null, + "args": [], + "help": "Disconnect device.\n" + } + }, + "signals": { + "connected": { + "args": [], + "help": "Emitted when the active connection changes (connection, disconnection).\n" + }, + "state-change": { + "args": [ + "enum", + "enum" + ], + "help": "Emitted when the network device state is changed.\n\nArguments:\nstate: The new state of the device.\nreason: The reason for the new state change." + }, + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "configurations" + ] + }, + "/network/ethernet/configurations": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "find-by-id": { + "return": "array", + "args": [ + "string" + ], + "help": "Find configurations with a matching id.\n\nArguments:\nid: The name of the id to search for.\nReturn:\nArray of configuration UUIDs with matching id." + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "0c8cd06a-8ab6-4724-9c4f-36be7abd6e0c", + "1476456d-cf22-47e4-a986-033356f377a7" + ] + }, + "/network/ethernet/configurations/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "default": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "If the configuration is a default, read-only, configuration." + }, + "id": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The network connection name." + }, + "autoconnect": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Autoconnect to this configuration." + }, + "ipv4-method": { + "type": "enum", + "range": [ + "manual", + "dhcp", + "link-local", + "disable" + ], + "mode": "rw", + "help": "IPv4 connection method." + }, + "ipv4-address": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 address." + }, + "ipv4-gateway": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 gateway." + }, + "ipv4-name-servers": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 DNS" + }, + "ipv6-method": { + "type": "enum", + "range": [ + "manual", + "automatic", + "dhcp", + "link-local", + "ignore" + ], + "mode": "rw", + "help": "IPv6 connection method." + }, + "ipv6-address": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 address." + }, + "ipv6-gateway": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 gateway." + }, + "ipv6-name-servers": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 DNS." + }, + "dhcp-server-enable": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Enable dhcp server." + }, + "dhcp-server-range-low": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The start of the leased ip range (NULL to auto-select)." + }, + "dhcp-server-range-high": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The end of the leased ip range (NULL to auto-select)." + }, + "dhcp-server-lease-time": { + "type": "int", + "range": [ + 0, + 2147483647 + ], + "mode": "rw", + "help": "The time, in hours, for a dhcp lease (0 to auto-select)." + } + }, + "actions": { + "save": { + "return": "boolean", + "args": [], + "help": "Save any changed settings in the configuration.\n\nReturn:\ntrue if the changes were saved, false otherwise." + }, + "restore": { + "return": null, + "args": [], + "help": "Restore to current configuration.\n" + }, + "delete": { + "return": "boolean", + "args": [], + "help": "Delete configuration.\n\nReturn:\ntrue if the configuration was deleted, false otherwise." + } + }, + "signals": {}, + "children": [] + }, + "/network/wifi": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "state": { + "type": "enum", + "range": [ + "unknown", + "disconnected", + "config", + "auth", + "ip-config", + "connected", + "disconnecting", + "failed" + ], + "mode": "r", + "help": "The current state of the device." + }, + "state-reason": { + "type": "enum", + "range": [ + "unknown", + "none", + "config-fail", + "auth-fail", + "dhcp-fail", + "config-ip-fail", + "connection-removed", + "user-request", + "carrier", + "access-point-fail" + ], + "mode": "r", + "help": "The reason for the current state of the device." + }, + "type": { + "type": "enum", + "range": [ + "unknown", + "ethernet", + "wifi" + ], + "mode": "r", + "help": "The network device type." + }, + "mac-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The network device MAC address." + }, + "speed": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "The current network speed (kbit/s)." + }, + "auto-connect": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "If automatic activation should be performed." + }, + "active-configuration": { + "type": "string", + "range": [], + "mode": "r", + "help": "The UUID of the active configuration, null if not active." + }, + "connected-network": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the current network." + }, + "ipv4-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv4 Address." + }, + "ipv4-gateway": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv4 Gateway." + }, + "ipv4-name-servers": { + "type": "array", + "range": [], + "mode": "r", + "help": "The current IPv4 name servers." + }, + "ipv6-address": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv6 Address." + }, + "ipv6-gateway": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current IPv6 gateway." + }, + "ipv6-name-servers": { + "type": "array", + "range": [], + "mode": "r", + "help": "The current IPv6 name servers." + } + }, + "actions": { + "connect-network": { + "return": "boolean", + "args": [ + "string", + "string" + ], + "help": "Connect to a Network, creating a new configuration if needed.\nTo reuse the pre-shared key, or to connect to an open network, supply NULL as the PSK argument.\n\nArguments:\nuuid: The UUID of the access point to connect to.\npsk: Pre-shared key to use for connection.\nReturn:\ntrue if the connection succeeded, false otherwise." + }, + "scan": { + "return": "boolean", + "args": [], + "help": "Start a scan for Wi-Fi access points.\n\nReturn:\ntrue if scan was started, false otherwise." + }, + "create-config": { + "return": "string", + "args": [ + "string" + ], + "help": "Create a configuration for this device.\n\nArguments:\nname: The name of the configuration.\nReturn:\nThe UUID of the new configuration, null on error." + }, + "connect": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Connect device using specific configuration.\n\nArguments:\nuuid: UUID of the configuration to use.\nReturn:\ntrue on success, false otherwise." + }, + "disconnect": { + "return": null, + "args": [], + "help": "Disconnect device.\n" + } + }, + "signals": { + "connected": { + "args": [], + "help": "Emitted when the active connection changes (connection, disconnection).\n" + }, + "state-change": { + "args": [ + "enum", + "enum" + ], + "help": "Emitted when the network device state is changed.\n\nArguments:\nstate: The new state of the device.\nreason: The reason for the new state change." + }, + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "networks", + "configurations" + ] + }, + "/network/wifi/configurations": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "find-by-id": { + "return": "array", + "args": [ + "string" + ], + "help": "Find configurations with a matching id.\n\nArguments:\nid: The name of the id to search for.\nReturn:\nArray of configuration UUIDs with matching id." + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "db599a72-c590-4b73-83e1-d4a25027dc54" + ] + }, + "/network/wifi/configurations/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "default": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "If the configuration is a default, read-only, configuration." + }, + "id": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The network connection name." + }, + "autoconnect": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Autoconnect to this configuration." + }, + "ipv4-method": { + "type": "enum", + "range": [ + "manual", + "dhcp", + "link-local", + "disable" + ], + "mode": "rw", + "help": "IPv4 connection method." + }, + "ipv4-address": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 address." + }, + "ipv4-gateway": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 gateway." + }, + "ipv4-name-servers": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv4 DNS" + }, + "ipv6-method": { + "type": "enum", + "range": [ + "manual", + "automatic", + "dhcp", + "link-local", + "ignore" + ], + "mode": "rw", + "help": "IPv6 connection method." + }, + "ipv6-address": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 address." + }, + "ipv6-gateway": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 gateway." + }, + "ipv6-name-servers": { + "type": "string", + "range": [], + "mode": "rw", + "help": "IPv6 DNS." + }, + "dhcp-server-enable": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Enable dhcp server." + }, + "dhcp-server-range-low": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The start of the leased ip range (NULL to auto-select)." + }, + "dhcp-server-range-high": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The end of the leased ip range (NULL to auto-select)." + }, + "dhcp-server-lease-time": { + "type": "int", + "range": [ + 0, + 2147483647 + ], + "mode": "rw", + "help": "The time, in hours, for a dhcp lease (0 to auto-select)." + }, + "access-point": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "If the network should act as an access point." + }, + "ssid": { + "type": "bytes", + "range": [], + "mode": "rw", + "help": "The SSID of the configured network." + }, + "ssid-name": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The SSID of the configured network as a string.\nWi-Fi SSIDs are byte arrays, they are _not_ strings, so may contain embedded NULLs and other unprintable characters. This property only be used for debugging and display only." + }, + "security": { + "type": "enum", + "range": [ + "open", + "wpa-psk", + "unknown" + ], + "mode": "rw", + "help": "Configuration security." + }, + "psk": { + "type": "string", + "range": [], + "mode": "rw", + "help": "Pre-Shared-Key of the network." + }, + "channel": { + "type": "int", + "range": [ + 0, + 11 + ], + "mode": "rw", + "help": "Wifi channel to use" + } + }, + "actions": { + "save": { + "return": "boolean", + "args": [], + "help": "Save any changed settings in the configuration.\n\nReturn:\ntrue if the changes were saved, false otherwise." + }, + "restore": { + "return": null, + "args": [], + "help": "Restore to current configuration.\n" + }, + "delete": { + "return": "boolean", + "args": [], + "help": "Delete configuration.\n\nReturn:\ntrue if the configuration was deleted, false otherwise." + } + }, + "signals": {}, + "children": [] + }, + "/network/wifi/networks": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "find-by-ssid": { + "return": "array", + "args": [ + "bytes" + ], + "help": "Find networks with a matching SSID.\nFilter the list of networks by ssid.\n\nArguments:\nssid: Base64 encoded SSID to search for.\nReturn:\nArray of UUIDs with matching SSID" + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "7cc32809-30fe-4ab9-95a0-3b2a0d21cc2c" + ] + }, + "/network/wifi/networks/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "ssid": { + "type": "bytes", + "range": [], + "mode": "r", + "help": "The SSID of the access point." + }, + "ssid-name": { + "type": "string", + "range": [], + "mode": "r", + "help": "Parsed name of the SSID as a string." + }, + "wifi-mode": { + "type": "enum", + "range": [ + "infrastructure", + "access-point", + "unknown" + ], + "mode": "r", + "help": "Network Wi-Fi mode." + }, + "max-bitrate": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "Max speed of the access point in kbit/s." + }, + "strength": { + "type": "int", + "range": [ + 0, + 100 + ], + "mode": "r", + "help": "The current strength in percent of the access point." + }, + "security": { + "type": "enum", + "range": [ + "open", + "wpa-psk", + "unknown" + ], + "mode": "r", + "help": "The access point security mode." + } + }, + "actions": {}, + "signals": {}, + "children": [] + }, + "/recorder": { + "properties": { + "current-gaze-frequency": { + "type": "int", + "range": [ + 0, + 100 + ], + "mode": "r", + "help": "Get the current gaze frequency." + }, + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "visible-name": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The visible name of a new or ongoing recording." + }, + "duration": { + "type": "real", + "range": [ + -1.0, + "Double.Max" + ], + "mode": "r", + "help": "The current duration of an ongoing recording." + }, + "created": { + "type": "string", + "range": [], + "mode": "r", + "help": "The creation time of the recording." + }, + "timezone": { + "type": "string", + "range": [], + "mode": "r", + "help": "The timezone at recording creation." + }, + "folder": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The name of the folder that holds the recording." + }, + "gaze-samples": { + "type": "int", + "range": [ + -1, + 9223372036854775807 + ], + "mode": "r", + "help": "The total number of gaze samples in the recording (-1 if not found)." + }, + "valid-gaze-samples": { + "type": "int", + "range": [ + -1, + 9223372036854775807 + ], + "mode": "r", + "help": "The number of valid gaze samples in the recording (-1 if not found)." + }, + "gaze-overlay": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "If the recording was started with Gaze Overlay." + }, + "uuid": { + "type": "string", + "range": [], + "mode": "r", + "help": "Get the UUID of an ongoing recording (null if not ongoing)." + }, + "remaining-time": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "The approximate number of seconds left for a recording." + } + }, + "actions": { + "start": { + "return": "boolean", + "args": [], + "help": "Create and start a new recording.\nIf action returns false, action-error is set.\n\nArguments:\nReturn:\ntrue if recording could be started, false otherwise." + }, + "stop": { + "return": "boolean", + "args": [], + "help": "Stop and save an ongoing recording.\n\nReturn:\ntrue if stopping succeeded, false otherwise." + }, + "cancel": { + "return": null, + "args": [], + "help": "Cancel and delete an ongoing recording.\n" + }, + "snapshot": { + "return": "boolean", + "args": [], + "help": "Store a snapshot JPEG image of the current scene.\n\nReturn:\ntrue if snapshot was started, false otherwise" + }, + "send-event": { + "return": "boolean", + "args": [ + "string", + "object" + ], + "help": "Send event to recording.\nRecording must be running to send events.\n\nArguments:\ntag: Tag name of the event.\nobject: Object data for the event.\nReturn:\ntrue if event was sent, otherwise false" + }, + "meta-insert": { + "return": "boolean", + "args": [ + "string", + "bytes" + ], + "help": "Insert a key-value pair into the meta data.\n\nArguments:\nkey: Name of meta object.\nmeta: Value base64 meta data, supply null to remove key.\nReturn:\ntrue if the key-value pair was inserted, false otherwise." + }, + "meta-lookup": { + "return": "bytes", + "args": [ + "string" + ], + "help": "Get the meta data associated with the specific key.\n\nArguments:\nkey: The name of meta object.\nReturn:\nBase64 meta data, null if not found." + }, + "meta-keys": { + "return": "array", + "args": [], + "help": "Get an array of available meta data keys.\n\nReturn:\nArray of meta data keys." + } + }, + "signals": { + "started": { + "args": [ + "string" + ], + "help": "Signal emitted when a recording is started.\n\nArguments:\nuuid: The UUID that is associated with the started recording." + }, + "stopped": { + "args": [ + "string" + ], + "help": "Signal emitted when a recording is completed.\n\nArguments:\nfolder: The folder the recording was stored in, null on cancel or error." + } + }, + "children": [] + }, + "/recordings": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "delete": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Delete recording by UUID.\nThis only marks the recording for deletion and removes it from the list of recordings, the recording is deleted when the last viewer has closed the connection to the recording (see deleted signal).\n\nArguments:\nuuid: The UUID of the recording to delete.\nReturn:\ntrue if recording was marked for deletion, false otherwise." + } + }, + "signals": { + "scan-done": { + "args": [], + "help": "Emitted at the end of a complete scan of the SD card.\nSee scan-start.\n" + }, + "scan-start": { + "args": [], + "help": "Emitted at start of a complete scan of the SD card.\nThis usually happens after the card has been inserted or during startup.\n" + }, + "deleted": { + "args": [ + "string" + ], + "help": "Emitted when a recording has been deleted.\nRecordings are deleted when it has been marked for deletion by the delete action and the last viewer has closed the recording.\n\nArguments:\nuuid: The UUID of the recording that was deleted." + }, + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "738d517a-c3b2-4108-bc9a-6046c1bd4a38", + "7adc9954-32af-4e29-b7b8-235381d09c37", + "e36a2f19-315e-4bf6-a709-e433316e6fb8", + "3d99f7b0-b013-4089-a129-a4dcc92c1c5d", + "bdea24d2-df97-49e9-a050-b1c22fb20789", + "96b33c4d-2e7f-4a38-9538-daae63b41001", + "ee7d50c0-bc4d-473d-ab98-98309ddfd61f", + "87e5aa6b-293a-4ec6-8df4-492b0f079c7c", + "a18dab86-dacd-4b00-a442-faec309317b5", + "a4c3927f-9dd8-4b95-bc5b-4c98bae46ffe", + "78005d85-e4f0-4bc9-90e7-3b0c7baa1b8d", + "7609e6ea-5903-49da-9105-8ae1a6caa305", + "335696e5-ea65-4a75-955a-b2cd89e5f16e", + "842b063d-733e-40a6-a9c5-7d1de7e1a353", + "2ed3e11e-f84b-458e-90f5-4135283381a2", + "aefa3ac5-68f9-4231-87b6-8eb2e19b6726", + "9bf9eaf5-057d-4f11-9507-d8fd2da5ef95", + "a6cfc054-149e-45bc-ba85-ead78acd6190", + "1611079d-c9d6-4e75-875a-449e26f1526b", + "4724884a-94ab-471f-9788-8e0cc7060da2", + "9278ca7e-44be-42f6-87e0-241cf6ac98ff", + "1b14148e-4b66-46b0-bbf5-960ba149ebc1", + "9610255c-5d86-49fb-96cb-0fcb40f86ad9", + "d37ff0a1-1313-4ba6-bce5-09df32249ce1", + "9da08ed0-f043-47df-b8c4-09497127db6f", + "ba929cda-fcfb-49f7-9bc8-09ae20756f69", + "fa439a03-d556-4bf8-a583-27367db74584", + "de3f9a36-97f5-48ad-aa1f-95b1293e92ee", + "14452258-560f-441f-9c79-646b1709514c", + "0e1c0b33-f25d-4780-b6ea-6873844ddafa", + "e7fe6867-a3d3-472d-babf-5fb27dcf3cbf", + "1aad29d6-e40d-4a09-a101-c4d4765220d1", + "435d0984-0df1-4c45-a1cf-3bac3f9918cb", + "fa5a2a57-4afe-449b-8c60-e03b93d5dc1e", + "ba4dec1f-d424-47b2-954d-2e93f89c5645", + "b78c2b3d-d028-483d-9d78-cbaac46d4b21", + "a1e3934a-c183-4238-8d0b-cbc5bffd1fa5", + "692f6966-a837-465c-a826-826081d3ab47", + "1525811e-11a7-4628-93e1-6e0712a2bc6b", + "840fe40e-fb47-4db8-9ae7-afd7a3c61ff9", + "587f8467-9f4f-4149-adba-8e635fea9858", + "c554901e-71a7-4e3b-9bcd-964300fd4af0", + "3d4eee94-4796-4a4d-9204-3bf04c2c29ca", + "59989cbd-e38b-4008-9599-9e52c0f5206d", + "766f7e90-5610-4c3e-8b98-e9b50663ba38", + "f301f635-5988-4cdd-ae9a-5386c6efdf1e", + "991156f2-7e08-4769-980e-d22e49bba1c5", + "5e92d266-7056-4a30-8fa7-0a7cf7e6e572", + "44bd824a-95f0-42e5-bc62-c43b41a4dee1", + "816b9b2f-cd78-4422-a985-59f11cc19462", + "a8579e95-3035-47f6-b09a-c096d641e3ba", + "f936dd1f-a0c6-48b8-953c-e78a9f4e16d2", + "73fccf4a-eb9e-4104-a9d3-3cb213fb08e3", + "807daa09-5528-422d-9e0b-652dbdd13108", + "bd7afedf-1efe-4353-ae1c-4e68f46acd10", + "39ca0f42-e7cb-4a61-a583-0c479253f719", + "93c0bf05-ef4b-4bf8-bf20-8bb4113e25dc", + "1bfff8f2-a075-49b6-812a-0115ccd7ef6b", + "284a38c1-1779-4d1d-a599-46f48b902c8c", + "78518536-dad2-446b-944b-b19156573c8d", + "aeaf619b-4064-40c4-b7c8-ba5ca41287d7", + "62090d2f-6985-444c-a5e7-43aeba304d1d", + "3f19e80c-a208-49d8-9961-6eee3f298691", + "a41237cb-80d1-4b86-b77b-3b145cc5555b", + "21e8e9af-3a20-4dd2-b7bb-9bcd196e4bf6", + "ec3f199c-9dbf-46f7-b417-2848d0ac6803", + "65b5e587-8842-4263-94d0-7171a6e6178b", + "670d87df-d761-44db-b10c-f23dd4d3b08b", + "e3161878-1e82-43e1-9c8f-87bc8bcf22f8" + ] + }, + "/recordings/": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "visible-name": { + "type": "string", + "range": [], + "mode": "rw", + "help": "The visible name of a new or ongoing recording." + }, + "duration": { + "type": "real", + "range": [ + -1.0, + "Double.Max" + ], + "mode": "r", + "help": "The current duration of an ongoing recording." + }, + "created": { + "type": "string", + "range": [], + "mode": "r", + "help": "The creation time of the recording." + }, + "timezone": { + "type": "string", + "range": [], + "mode": "r", + "help": "The timezone at recording creation." + }, + "gaze-samples": { + "type": "int", + "range": [ + -1, + 9223372036854775807 + ], + "mode": "r", + "help": "The total number of gaze samples in the recording (-1 if not found)." + }, + "valid-gaze-samples": { + "type": "int", + "range": [ + -1, + 9223372036854775807 + ], + "mode": "r", + "help": "The number of valid gaze samples in the recording (-1 if not found)." + }, + "gaze-overlay": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "If the recording was started with Gaze Overlay." + }, + "folder": { + "type": "string", + "range": [], + "mode": "r", + "help": "Get the recording folder name." + }, + "http-path": { + "type": "string", + "range": [], + "mode": "r", + "help": "Get the HTTP path to the recording." + }, + "rtsp-path": { + "type": "string", + "range": [], + "mode": "r", + "help": "Get the RTSP path to the recording." + } + }, + "actions": { + "move": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Move recording to a new location on the SD card.\n\nArguments:\nfolder: The new folder name to move to.\nReturn:\ntrue if the recording was moved, false otherwise." + }, + "meta-insert": { + "return": "boolean", + "args": [ + "string", + "bytes" + ], + "help": "Insert a key-value pair into the meta data.\n\nArguments:\nkey: Name of meta object.\nmeta: Value base64 meta data, supply null to remove key.\nReturn:\ntrue if the key-value pair was inserted, false otherwise." + }, + "meta-lookup": { + "return": "bytes", + "args": [ + "string" + ], + "help": "Get the meta data associated with the specific key.\n\nArguments:\nkey: The name of meta object.\nReturn:\nBase64 meta data, null if not found." + }, + "meta-keys": { + "return": "array", + "args": [], + "help": "Get an array of available meta data keys.\n\nReturn:\nArray of meta data keys." + } + }, + "signals": {}, + "children": [] + }, + "/rudimentary": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "scene-scale": { + "type": "int", + "range": [ + 1, + 32 + ], + "mode": "rw", + "help": "The scale factor for scene camera images." + }, + "scene-quality": { + "type": "int", + "range": [ + 15, + 100 + ], + "mode": "rw", + "help": "The JPEG quality for scene camera images." + }, + "gaze-sample": { + "type": "object", + "range": [], + "mode": "r", + "help": "Get the latest gaze sample." + }, + "sync-port-sample": { + "type": "object", + "range": [], + "mode": "r", + "help": "Get the latest sync port sample." + }, + "imu-sample": { + "type": "object", + "range": [], + "mode": "r", + "help": "Get the latest IMU sample." + }, + "event-sample": { + "type": "object", + "range": [], + "mode": "r", + "help": "Get the latest event sample." + } + }, + "actions": { + "keepalive": { + "return": "boolean", + "args": [], + "help": "Start and keep Rudimentary streams alive.\nEnsure signal emission for 6 seconds.\n\nReturn:\ntrue if signal emission will take place, false otherwise." + }, + "send-event": { + "return": "boolean", + "args": [ + "string", + "object" + ], + "help": "Send an event.\nNote; Streams must be started with keep alive signal to be able to send events.\n\nArguments:\ntag: Tag for the event.\nobject: Object data for the event.\nReturn:\ntrue on success, false otherwise." + }, + "calibrate": { + "return": "boolean", + "args": [], + "help": "Perform a personal calibration.\n\nReturn:\ntrue if the calibration succeeded, false otherwise." + } + }, + "signals": { + "event": { + "args": [ + "real", + "object" + ], + "help": "Emits event objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The supplied object." + }, + "scene": { + "args": [ + "real", + "bytes" + ], + "help": "Emits down-scaled JPEG images from the scene camera.\nThis is a heavy task by the recording unit and will greatly reduce battery time and processing time for gaze data. Use only if absolutely needed.\n\nArguments:\ntimestamp: The timestamp in seconds.\nimage: Base64 encoded JPEG image." + }, + "gaze": { + "args": [ + "real", + "object" + ], + "help": "Emits gaze objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The supplied object." + }, + "sync-port": { + "args": [ + "real", + "object" + ], + "help": "Emits sync port objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The supplied object." + }, + "imu": { + "args": [ + "real", + "object" + ], + "help": "Emits IMU sample objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The supplied object." + } + }, + "children": [] + }, + "/settings": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "gaze-frequency": { + "type": "int", + "range": [ + 50, + 50 + ], + "mode": "rw", + "help": "Selected gaze frequency for the Recording Unit." + }, + "gaze-overlay": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Select to draw gaze marker on the scene-camera video." + }, + "mute-audio": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "Select to disable audio recording from Glasses. No audio will be present in live stream or recording." + } + }, + "actions": {}, + "signals": { + "changed": { + "args": [ + "string" + ], + "help": "Emitted after a settings property is changed.\n\nArguments:\nproperty: The name of the property that was changed." + } + }, + "children": [] + }, + "/system": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "version": { + "type": "string", + "range": [], + "mode": "r", + "help": "The current version of the recording unit firmware." + }, + "recording-unit-serial": { + "type": "string", + "range": [], + "mode": "r", + "help": "The serial number of the recording unit (null if not detected)." + }, + "head-unit-serial": { + "type": "string", + "range": [], + "mode": "r", + "help": "The serial number of the head unit." + }, + "time": { + "type": "string", + "range": [], + "mode": "r", + "help": "The system time of the recording unit in ISO 8601 format." + }, + "timezone": { + "type": "string", + "range": [], + "mode": "r", + "help": "The time zone of the recording unit." + }, + "ntp-is-enabled": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "true if NTP is enabled, false otherwise." + }, + "ntp-is-synchronized": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "true if the system clock is synchronized by NTP, false otherwise." + } + }, + "actions": { + "set-time": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Set the system time of the recording unit.\n\nArguments:\ntime: An ISO 8601 formatted time string.\nReturn:\ntrue if the system time was set, false otherwise." + }, + "set-timezone": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Set the system timezone of the recording unit.\n\nArguments:\ntimezone: A valid ISO 8601 timezone string.\nReturn:\ntrue if the timezone was set, false otherwise." + }, + "use-ntp": { + "return": "boolean", + "args": [ + "boolean" + ], + "help": "Set NTP synchronization usage.\n\nArguments:\nuse: true to switch NTP on, otherwise false.\nReturn:\ntrue if the NTP state was set, false otherwise." + }, + "available-gaze-frequencies": { + "return": "array", + "args": [], + "help": "Read the available gaze frequencies from the Head Unit.\n\nReturn:\nInteger array of available gaze frequencies" + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "scenecamera", + "hwtests", + "headunit", + "battery", + "storage" + ] + }, + "/system/battery": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "level": { + "type": "real", + "range": [ + 0.0, + 1.0 + ], + "mode": "r", + "help": "The remaining battery level." + }, + "remaining-time": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "The remaining battery time in seconds." + }, + "charging": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "The battery charging state." + }, + "state": { + "type": "enum", + "range": [ + "full", + "good", + "low", + "verylow", + "unknown" + ], + "mode": "r", + "help": "The state of the battery." + } + }, + "actions": {}, + "signals": { + "state-changed": { + "args": [ + "enum", + "boolean" + ], + "help": "Signal emitted when the battery state has changed.\n\nArguments:\nstate: The new battery state.\ncharging: true if the charger is connected, false otherwise." + } + }, + "children": [] + }, + "/system/headunit": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "connection-state": { + "type": "enum", + "range": [ + "connected", + "disconnected", + "unknown" + ], + "mode": "r", + "help": "The head unit connection state." + } + }, + "actions": {}, + "signals": { + "connection-state-changed": { + "args": [ + "enum" + ], + "help": "Signal emitted when the head unit connection state has changed.\n\nArguments:\nconnection-state: The new head unit connection state." + } + }, + "children": [] + }, + "/system/hwtests": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "running": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "The hwtests running state." + }, + "result": { + "type": "object", + "range": [], + "mode": "r", + "help": "Get the result" + } + }, + "actions": { + "run": { + "return": "boolean", + "args": [], + "help": "Run self tests.\n\nReturn:\ntrue if self tests were started, false otherwise" + } + }, + "signals": { + "done": { + "args": [ + "int" + ], + "help": "Signal emitted when the hwtests are done.\n\nArguments:\nstatuscode: 0 if successful, >0 otherwise" + } + }, + "children": [] + }, + "/system/scenecamera": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "autoexposure-change-speed": { + "type": "real", + "range": [ + 0.0, + 1.0 + ], + "mode": "rw", + "help": "How fast the scene camera adapts to new lighting conditions, from 0.0 (not at all) to 1.0 (fast)." + }, + "autoexposure-gaze-spot-size": { + "type": "real", + "range": [ + 5.0, + 15.0 + ], + "mode": "rw", + "help": "(Only applicable when gaze spot weight > 0) Radius (in visual degrees) of the metering circle around the gaze point." + }, + "autoexposure-gaze-spot-weight": { + "type": "real", + "range": [ + 0.0, + 1.0 + ], + "mode": "rw", + "help": "How much attention should we pay to the light level inside gaze spot circle as opposed to the whole image, from 0.0 (zero) to 1.0 (a lot)." + }, + "zoomed": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "Zoom on or off." + }, + "zoom-x": { + "type": "real", + "range": [ + 0.0, + 1.0 + ], + "mode": "r", + "help": "Normalized X coordinate of center of zoom within sensor image area, 0 = to the left, 1 = to the right, 0.5 = the horizontal middle." + }, + "zoom-y": { + "type": "real", + "range": [ + 0.0, + 1.0 + ], + "mode": "r", + "help": "Normalized Y coordinate of center of zoom within sensor image area, 0 = at the top, 1 = at the bottom, 0.5 = the vertical middle" + } + }, + "actions": { + "zoom-on": { + "return": "string", + "args": [ + "real", + "real" + ], + "help": "Switch zoom on.\n\nArguments:\nx: normalized x-coordinate of center of zoom within unzoomed area.\ny: normalized y-coordinate of center of zoom within unzoomed area.\nReturn:\n\"success\" if zoom was switched on, otherwise an error message." + }, + "zoom-off": { + "return": "string", + "args": [], + "help": "Disable zoom mode\n\nReturn:\n\"success\" if zoom was switched off, otherwise an error message" + } + }, + "signals": { + "changed": { + "args": [ + "string" + ], + "help": "Emitted after a scenecamera property is changed.\n\nArguments:\nproperty: The name of the property that was changed." + } + }, + "children": [] + }, + "/system/storage": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "free": { + "type": "int", + "range": [ + 0, + 9223372036854775807 + ], + "mode": "r", + "help": "The available free space in bytes of the inserted SD card." + }, + "size": { + "type": "int", + "range": [ + 0, + 9223372036854775807 + ], + "mode": "r", + "help": "The size in bytes of the inserted SD card." + }, + "remaining-time": { + "type": "int", + "range": [ + 0, + 4294967295 + ], + "mode": "r", + "help": "The approximate number of seconds until there is no space left on the SD card if the recording unit is recording." + }, + "space-state": { + "type": "enum", + "range": [ + "good", + "low", + "verylow", + "unknown" + ], + "mode": "r", + "help": "Recording availability on the inserted SD card." + }, + "card-state": { + "type": "enum", + "range": [ + "not-inserted", + "not-available", + "read-only", + "available", + "failure" + ], + "mode": "r", + "help": "The detected partition of the inserted SD card." + }, + "busy": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "If true the recording unit is utilizing the SD card.\nUser may only remove the SD card when this property is false." + } + }, + "actions": {}, + "signals": { + "state-changed": { + "args": [ + "enum", + "enum" + ], + "help": "Signal emitted after card or space state has changed.\n\nArguments:\nspace-state: The new space state.\ncard-state: The new state of the SD card." + }, + "busy-changed": { + "args": [ + "boolean" + ], + "help": "Signal emitted to indicate usage of the SD card.\n\nArguments:\nbusy: New busy state." + } + }, + "children": [] + }, + "/upgrade": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "in-progress": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "r", + "help": "true if upgrade is in progress, false otherwise." + } + }, + "actions": {}, + "signals": { + "progress": { + "args": [ + "real", + "real" + ], + "help": "Progress reporter for upgrade.\n\nArguments:\nupload: Upload progress.\nupgrade: Upgrade progress." + }, + "completed": { + "args": [ + "boolean" + ], + "help": "Upgrade completion signal.\n\nArguments:\nsuccess: true if upgrade succeeded, false otherwise." + } + }, + "children": [] + }, + "/webrtc": { + "properties": { + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + } + }, + "actions": { + "delete": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Delete a WebRTC instance.\n\nArguments:\nuuid: The UUID of the WebRTC instance to delete\nReturn:\ntrue on success, false otherwise." + }, + "create": { + "return": "string", + "args": [], + "help": "Create a new WebRTC live instance.\n\nReturn:\nThe UUID of the new live instance on success, null on failure." + }, + "play": { + "return": "string", + "args": [ + "string" + ], + "help": "Create a new WebRTC replay instance.\n\nArguments:\nuuid: The UUID of the recording to replay.\nReturn:\nThe UUID of the new replay instance on success, null on failure." + } + }, + "signals": { + "child-added": { + "args": [ + "string" + ], + "help": "Signal is emitted when a new object has been added.\n\nArguments:\nchild: The name of the added child object." + }, + "child-removed": { + "args": [ + "string" + ], + "help": "Signal is emitted when an object was removed.\n\nArguments:\nchild: The name of the removed child object." + } + }, + "children": [ + "f942ae1e-1578-460e-b3a0-3e922ef5b79f" + ] + }, + "/webrtc/": { + "properties": { + "current-gaze-frequency": { + "type": "int", + "range": [ + 0, + 100 + ], + "mode": "r", + "help": "Get the current gaze frequency." + }, + "name": { + "type": "string", + "range": [], + "mode": "r", + "help": "The name of the object." + }, + "turn-server": { + "type": "string", + "range": [], + "mode": "rw", + "help": "TURN server (turn(s)://username:password@host:port) to use." + }, + "stun-server": { + "type": "string", + "range": [], + "mode": "rw", + "help": "STUN server (stun://hostname:port) to use." + }, + "iframe-stream": { + "type": "boolean", + "range": [ + false, + true + ], + "mode": "rw", + "help": "If the supplied stream should only use iframes to lower bitrate." + } + }, + "actions": { + "send-event": { + "return": "boolean", + "args": [ + "string", + "object" + ], + "help": "Send an event to the running WebRTC session.\n\nArguments:\ntag: The name of the event.\nobject: JSON Object data for the event.\nReturn:\ntrue if the event was sent, false otherwise." + }, + "start": { + "return": "boolean", + "args": [ + "string" + ], + "help": "Start the WebRTC session using the supplied SDP offer from the client.\n\nArguments:\nsdp: The client SDP to use for streaming.\nReturn:\ntrue if the session was started, false on error." + }, + "keepalive": { + "return": null, + "args": [], + "help": "Should be called with a set interval to keep the session alive.\nIf not called, the WebRTC session will timeout after 20 seconds.\n" + }, + "setup": { + "return": "string", + "args": [], + "help": "Setup the WebRTC system and generate an SDP offer.\n\nArguments:\nReturn:\nThe RU SDP offer." + }, + "add-ice-candidate": { + "return": null, + "args": [ + "int", + "string" + ], + "help": "Add a remote ICE candidate to the session.\n\nArguments:\nid: The ICE ID.\ncandidate: The ICE candidate definition." + }, + "get-ice-candidates": { + "return": "array", + "args": [], + "help": "Returns the collected list of ICE candidates.\nThe list is then cleared between calls. \nThis option may be used instead of the \"new-ice-candidate\" signal.\n\nReturn:\nA JSON array of candidates" + } + }, + "signals": { + "event": { + "args": [ + "real", + "object" + ], + "help": "Emits event objects on event messages.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The object for the signal." + }, + "gaze": { + "args": [ + "real", + "object" + ], + "help": "Emits gaze point objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The object for the signal." + }, + "sync-port": { + "args": [ + "real", + "object" + ], + "help": "Emits sync port objects.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The object for the signal." + }, + "imu": { + "args": [ + "real", + "object" + ], + "help": "Emits IMU objects.\nNote; these come in chunks.\n\nArguments:\ntimestamp: The timestamp in seconds.\nobject: The object for the signal." + }, + "timed-out": { + "args": [], + "help": "Emitted once the WebRTC session has timed out.\n" + }, + "new-ice-candidate": { + "args": [ + "int", + "string" + ], + "help": "Emitted on new ICE candidates.\n\nArguments:\nid: The ID of the ICE candidate.\ncandidate: The ICE candidate definition." + } + }, + "children": [] + } +} \ No newline at end of file diff --git a/examples/G3DocumentExtractor/miniweb/htdocs/doc-index.json b/examples/G3DocumentExtractor/miniweb/htdocs/doc-index.json index 99a338b..dfd8454 100644 --- a/examples/G3DocumentExtractor/miniweb/htdocs/doc-index.json +++ b/examples/G3DocumentExtractor/miniweb/htdocs/doc-index.json @@ -9,6 +9,7 @@ "1.26.2-cremla", "1.29.4-sarek", "1.33.1-grandcanyon", - "1.36.1-oxkind" + "1.36.1-oxkind", + "2.2.4" ] } \ No newline at end of file diff --git a/source/Objects/G3Version.cs b/source/Objects/G3Version.cs index 14d2fdc..49e24ce 100644 --- a/source/Objects/G3Version.cs +++ b/source/Objects/G3Version.cs @@ -51,8 +51,9 @@ public static G3Version ReadFromFile(string fileName) return new G3Version(v); } - public static G3Version Latest => Version_1_32; + public static G3Version Latest => Version_2_2_4; + public static G3Version Version_2_2_4 { get; } = new G3Version("2.2.4"); public static G3Version Version_1_32 { get; } = new G3Version("1.32"); public static G3Version Version_1_29_Sarek { get; } = new G3Version("1.29+sarek"); public static G3Version Version_1_28_Granskott { get; } = new G3Version("1.28+granskott"); diff --git a/source/Objects/Settings.cs b/source/Objects/Settings.cs index 8c6715b..29d8b24 100644 --- a/source/Objects/Settings.cs +++ b/source/Objects/Settings.cs @@ -10,6 +10,7 @@ namespace G3SDK public class Settings : G3Object, ISettings { private readonly RWProperty _gazeOverlay; + private readonly RWProperty _muteAudio; private readonly RWProperty _gazeFrequency; private readonly StringEnumConverter _converter = new StringEnumConverter(); private readonly JsonSerializer x = JsonSerializer.Create(); @@ -29,6 +30,7 @@ private string ConvertJsonEnumToString(object value) public Settings(G3Api g3Api) : base(g3Api, "settings") { _gazeOverlay = AddRWProperty_bool("gaze-overlay"); + _muteAudio = AddRWProperty_bool("mute-audio"); _gazeFrequency = AddRWProperty("gaze-frequency", int.Parse); Changed = AddSignal("changed", ParserHelpers.SignalToString); } @@ -36,11 +38,16 @@ public Settings(G3Api g3Api) : base(g3Api, "settings") public IG3Observable Changed { get; } public Task GazeOverlay => _gazeOverlay.Value(); + public Task MuteAudio => _muteAudio.Value(); public Task SetGazeOverlay(bool value) { return _gazeOverlay.Set(value); } + public Task SetMuteAudio(bool value) + { + return _muteAudio.Set(value); + } public Task GazeFrequency => _gazeFrequency.Value(); public Task SetGazeFrequency(int value) @@ -53,8 +60,10 @@ public interface ISettings { IG3Observable Changed { get; } Task GazeOverlay { get; } + Task MuteAudio { get; } Task GazeFrequency { get; } Task SetGazeOverlay(bool value); + Task SetMuteAudio(bool value); Task SetGazeFrequency(int value); } } \ No newline at end of file diff --git a/tests/G3ApiTests.cs b/tests/G3ApiTests.cs index 911f086..ca90256 100644 --- a/tests/G3ApiTests.cs +++ b/tests/G3ApiTests.cs @@ -516,6 +516,34 @@ public async Task CanManipulateGazeOverlay() token.Dispose(); } + [Test] + public async Task CanManipulateMuteAudio() + { + await EnsureApi(); + if (FwVersion.LessThan(G3Version.Version_2_2_4)) + Assert.Ignore("Test only supports v2.2.4+"); + await EnsureSDCard(); + var signals = new List(); + + // verify mute notifications + var token = await G3Api.Settings.Changed.SubscribeAsync(s => signals.Add(s)); + + // make sure it is false; + var res = await G3Api.Settings.SetMuteAudio(false); + Assert.That(res, Is.True, "unable to set mute-audio, to false"); + Assert.That(await G3Api.Settings.MuteAudio, Is.EqualTo(false).After(200, 50)); + signals.Clear(); + + // try to set it to true + res = await G3Api.Settings.SetMuteAudio(true); + Assert.That(res, Is.True, "unable to set mute-audio, to true"); + Assert.That(await G3Api.Settings.MuteAudio, Is.EqualTo(true).After(200, 50)); + Assert.That(signals, Has.Member("mute-audio").After(200, 50)); + signals.Clear(); + + token.Dispose(); + } + [Test] public async Task CheckRoundtripTimesForPropertyAccess() {