1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! The `tosca-controller` library crate provides a set of APIs for managing,
//! orchestrating, and interacting with all `tosca` devices within a
//! network.
//!
//! A device is considered compliant with `tosca` if its firmware is built
//! using the APIs of the `tosca` framework designed for the device's underlying
//! hardware architecture.
//!
//! Core functionalities of this crate include:
//!
//! - Discovering all devices within the network that are compliant with the
//! `tosca` architecture
//! - Constructing and sending `REST` requests to `tosca` devices to trigger
//! their tasks
//! - Defining privacy policies to allow or block requests to a device
//! - Intercepting device events by subscribing to the brokers where
//! they are published
//!
//! To optimize system resource usage, `tosca-controller` leverages `tokio` as
//! an asynchronous executor, allowing concurrent execution of independent
//! tasks. This approach improves performance, especially when running on
//! multi-threaded systems, where tasks are distributed across
//! multiple threads for additional efficiency.
/// A controller for interacting with `tosca` devices.
/// Device data along with its associated methods.
/// A service for discovering all `tosca` devices within a network.
/// Error management.
/// All events data.
/// A privacy policy manager that blocks or allows the requests to devices
/// based on a set of privacy rules.
/// Request data and the associated methods.
/// All supported methods and data for handling `tosca` device responses.