Expand description
The communication interface among a tosca device and its controller.
This crate provides APIs to:
- Encode and decode information about a device structure and its routes. A route is a path that allows a controller to start one or more tasks on a device. Each route is always associated with a response.
- Manage hazards that may arise during the execution of a route. Hazards describe safety, privacy, and financial risks, and are always associated with a route.
- Manage route parameters. Parameters may represent external information required for device tasks or conditions that control whether instructions are executed. For example, a boolean parameter might control the on/off state of a light, while a float range might adjust its brightness state.
Data exchange between the device and controller requires structures to be
serializable and deserializable. A device serializes these structures
while the controller deserializes them and uses the data for its tasks.
A device can avoid importing deserialization functions by disabling the
deserialize feature at compile time.
This crate can be compiled for both std and no_std environments.
Modulesยง
- device
- Description of a device and its associated routes.
- economy
- Economic information about a device.
- energy
- Energy information about a device.
- events
- Event descriptions and methods.
- hazards
- Hazard descriptions and methods.
- parameters
- Route parameters.
- response
- All possible responses from a device.
- route
- Route definitions.