{"context": ["https://www.w3.org/2022/wot/td/v1.1"], "id": "simulations/oscilloscope", "title": "OscilloscopeSim", "description": "Simulates an oscilloscope using numpy's random number generator to generate random voltage values.X-axis is time and Y-axis is voltage, with 4 channels available. Set `value_range` to generate simulatedvoltage within the specified range. Adjust time range and time resolution to change the number of samplesand the gap between measurements to adjust the rate of data and events generated.        See links section in the TD to access this simulation device with a GUI.", "properties": {"channel_A": {"description": "Channel A data", "readOnly": true, "oneOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/channel-A", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "channel_B": {"description": "Channel B data", "readOnly": true, "oneOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/channel-B", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "channel_C": {"description": "Channel C data", "readOnly": true, "oneOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/channel-C", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "channel_D": {"description": "Channel D data", "readOnly": true, "oneOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/channel-D", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "channels": {"description": "Data of all available channels", "readOnly": true, "oneOf": [{"type": "null"}, {"type": "object", "properties": {"A": {"type": "array", "items": {"type": "number"}, "description": "Channel A data"}, "B": {"type": "array", "items": {"type": "number"}, "description": "Channel B data"}, "C": {"type": "array", "items": {"type": "number"}, "description": "Channel C data"}, "D": {"type": "array", "items": {"type": "number"}, "description": "Channel D data"}}}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/channels", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "gap_between_measurements": {"description": "Time gap between measurements, applies to all channels that are not hardware triggered. Use a comfortable value to prevent excessive data and event generation.", "default": 1, "unit": "s", "type": "number", "minimum": 0, "multipleOf": 0.001, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/gap-between-measurements", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/gap-between-measurements", "op": "writeproperty", "htv:methodName": "PUT", "contentType": "application/json"}]}, "number_of_samples": {"description": "Number of samples in the oscilloscope data (per channel), calculated from time range and time resolution", "readOnly": true, "oneOf": [{"type": "number"}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/number-of-samples", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}, "state": {"description": "current state machine's state if state machine present, `None` indicates absence of state machine.State machine returned state is always a string even if specified as an Enum in the state machine.", "readOnly": true, "oneOf": [{"type": "string"}, {"type": "null"}], "observable": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/state", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/state/change-event", "op": "observeproperty", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}, "time_range": {"description": "Time range of the oscilloscope", "default": 0.001, "unit": "s", "type": "number", "minimum": 0, "multipleOf": 1e-09, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/time-range", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/time-range", "op": "writeproperty", "htv:methodName": "PUT", "contentType": "application/json"}]}, "time_resolution": {"description": "Time resolution of the oscilloscope", "default": 1e-06, "unit": "s", "type": "number", "minimum": 0, "multipleOf": 1e-09, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/time-resolution", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/time-resolution", "op": "writeproperty", "htv:methodName": "PUT", "contentType": "application/json"}]}, "value_range": {"description": "Value range of the oscilloscope", "default": [0.7, 1], "unit": "V", "oneOf": [{"type": "array", "items": {"oneOf": [{"type": "number"}, {"type": "integer"}]}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/value-range", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/value-range", "op": "writeproperty", "htv:methodName": "PUT", "contentType": "application/json"}]}, "x_axis": {"description": "X-axis/time axis", "readOnly": true, "unit": "s", "oneOf": [{"type": "array", "items": {"type": "number"}}, {"type": "null"}], "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/x-axis", "op": "readproperty", "htv:methodName": "GET", "contentType": "application/json"}]}}, "actions": {"clear_data": {"description": "Clear data of all channels", "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/clear-data", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "exit": {"description": "overriding exit() from `Thing` parent class which implements a method to exit or stop the server.This simulation is not supposed to be stopped. This is a dummy method.", "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/exit", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "external_trigger": {"description": "External trigger method to simulate hardware trigger. This method ideally belongs to a trigger devicebut placed here for simplicity of simulation.", "input": {"type": "object", "properties": {"channel": {"type": "string", "description": "Channel to set the trigger", "enum": ["A", "B", "C", "D"]}, "voltage": {"type": "number", "description": "Voltage value for the trigger", "unit": "V", "default": 1, "minimum": 0.001}, "direction": {"type": "string", "description": "Trigger direction", "enum": ["above", "below", "rising", "falling", "rising_or_falling"]}, "delay": {"type": "integer", "description": "Delay in microseconds", "minimum": 0, "default": 0}}}, "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/external-trigger", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "get_thing_model": {"description": "generate the [Thing Model](https://www.w3.org/TR/wot-thing-description11/#introduction-tm) of the object.The model is a JSON that describes the object's properties, actions, events and their metadata, without theprotocol information. The model can be used by a client to understand the object's capabilities.", "input": {"properties": {"ignore_errors": {"default": false, "type": "boolean"}, "skip_names": {"default": [], "items": {"type": "string"}, "type": "array"}}, "type": "object"}, "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/resources/wot-tm", "op": "invokeaction", "htv:methodName": "GET", "contentType": "application/json"}]}, "ping": {"description": "ping to see if it is alive. Successful when action succeeds with no return value andno timeout or exception raised on the client side.", "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/ping", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "reset_device": {"description": "Reset all settings and clear data of all channels", "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/reset-device", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "set_channel": {"description": "Enable or disable a channel and set the simulation waveform", "input": {"type": "object", "properties": {"channel": {"type": "string", "description": "Channel to set", "enum": ["A", "B", "C", "D"]}, "enabled": {"type": "boolean", "description": "Enable or disable the channel", "default": true}, "simulation_waveform": {"description": "Waveform to simulate on the channel, phase and frequency are randomized and cannot be controlled", "default": "sine", "oneOf": [{"type": "null"}, {"type": "string", "enum": ["sine", "square", "triangle", "sawtooth", "random"]}]}}}, "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/set-channel", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "set_trigger": {"description": "Set oscilloscope trigger settings and use the trigger device's `trigger()` method to send a simulated hardware trigger to the oscilloscope. All settings are written at once,individual settings cannot be set without resetting the others.Shows usage of a schema to validate the input arguments.", "input": {"type": "object", "properties": {"enabled": {"type": "boolean", "description": "Enable or disable the trigger"}, "channel": {"type": "string", "description": "Channel to set the trigger", "enum": ["A", "B", "C", "D"]}, "threshold": {"description": "Threshold value for the trigger", "type": "number", "minimum": 0.1, "default": 0.5}, "direction": {"type": "string", "description": "Trigger direction", "enum": ["above", "below", "rising", "falling", "rising_or_falling"], "default": "rising"}, "delay": {"type": "integer", "description": "Delay in microseconds", "minimum": 0, "default": 0}, "auto_trigger": {"type": "integer", "description": "Auto trigger time in microseconds", "minimum": 0, "default": 10000000.0}}}, "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/set-trigger", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "start": {"description": "Start measuring all channels, with optional max_count to limit the number of measurements.Channels already capturing data will not be restarted.", "input": {"type": "object", "properties": {"max_count": {"oneOf": [{"type": "integer", "minimum": 1}, {"type": "null"}], "description": "Maximum number of measurements to take"}}}, "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/start", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}, "stop": {"description": "Stop measurement of all channels", "synchronous": true, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/stop", "op": "invokeaction", "htv:methodName": "POST", "contentType": "application/json"}]}}, "events": {"data_ready_event_chA": {"description": "Event to notify if data is ready for channel A", "data": {"type": "string", "format": "date-time"}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/data-ready-event-chA", "op": "subscribeevent", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}, "data_ready_event_chB": {"description": "Event to notify if data is ready for channel B", "data": {"type": "string", "format": "date-time"}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/data-ready-event-chB", "op": "subscribeevent", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}, "data_ready_event_chC": {"description": "Event to notify if data is ready for channel C", "data": {"type": "string", "format": "date-time"}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/data-ready-event-chC", "op": "subscribeevent", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}, "data_ready_event_chD": {"description": "Event to notify if data is ready for channel D", "data": {"type": "string", "format": "date-time"}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/data-ready-event-chD", "op": "subscribeevent", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}, "data_ready_event_x_axis": {"description": "Event to notify if x-axis is recalculated", "data": {"type": "string", "format": "date-time"}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/data-ready-event-x-axis", "op": "subscribeevent", "htv:methodName": "GET", "contentType": "application/json", "subprotocol": "sse"}]}}, "forms": [{"href": "https://examples.hololinked.dev/simulations/oscilloscope/properties", "op": "readallproperties", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/properties", "op": "writeallproperties", "htv:methodName": "PUT", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/properties", "op": "readmultipleproperties", "htv:methodName": "GET", "contentType": "application/json"}, {"href": "https://examples.hololinked.dev/simulations/oscilloscope/properties", "op": "writemultipleproperties", "htv:methodName": "PATCH", "contentType": "application/json"}], "securityDefinitions": {"nosec": {"scheme": "nosec", "description": "currently no security scheme supported"}}, "security": ["nosec"], "links": [{"href": "https://control-panel.hololinked.dev/#https://examples.hololinked.dev/simulations/oscilloscope/resources/wot-td", "type": "text/html", "rel": "manifest"}, {"href": "https://github.com/hololinked-dev/hololinked", "type": "text/html", "rel": "service-doc"}, {"href": "https://github.com/VigneshVSV", "type": "text/html", "rel": "external"}, {"href": "https://gitlab.com/hololinked/examples/servers/simulations/oscilloscope-simulator", "type": "text/html", "rel": "external"}]}