Skip to content

Commit b5039e1

Browse files
authored
Merge pull request #399 from lucaato/feature/get-properties
Feature/get properties
2 parents 55806cb + 29e5f71 commit b5039e1

File tree

26 files changed

+1146
-392
lines changed

26 files changed

+1146
-392
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ rustc-args = ["--cfg=docsrs"]
119119
[workspace.dependencies]
120120
astarte-device-sdk = { path = "./", version = "=0.9.6" }
121121
astarte-device-sdk-derive = { version = "=0.9.6", path = "./astarte-device-sdk-derive" }
122-
astarte-message-hub-proto = { git = "https://github.com/astarte-platform/astarte-message-hub-proto.git", rev = "5ff0672d8fdc8cba5a2ff023895ae505d75c3d1a" }
122+
astarte-message-hub-proto = { git = "https://github.com/astarte-platform/astarte-message-hub-proto.git", rev = "370be08ff90236a25b15af6e27d5363739566f2f" }
123123
async-trait = "0.1.67"
124124
base64 = "0.22.0"
125125
bson = "2.7.0"

docs/get-started.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,9 @@ async fn init() -> eyre::Result<(DeviceClient<SqliteStore>, DeviceConnection<Sql
166166
.store(store)
167167
// NOTE: here we are not defining any Astarte interface, thus the device will not be able to
168168
// send or receive data to/from Astarte
169-
.connect(mqtt_config)
170-
.await?
169+
.connection(mqtt_config)
171170
.build()
172-
.await;
171+
.await?;
173172
174173
Ok((client, connection))
175174
}
@@ -424,8 +423,7 @@ async fn main() -> eyre::Result<()> {
424423
let (client, connection) = DeviceBuilder::new()
425424
.store(store)
426425
.interface_directory("interfaces")?
427-
.connect(mqtt_config)
428-
.await?
426+
.connection(mqtt_config)
429427
.build()
430428
.await;
431429
*/

e2e-test/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,9 @@ async fn main() -> eyre::Result<()> {
170170
.store_dir(&test_cfg.store_directory)
171171
.await?
172172
.interface_directory(&test_cfg.interfaces_fld)?
173-
.connect(mqtt_config)
174-
.await?
173+
.connection(mqtt_config)
175174
.build()
176-
.await;
175+
.await?;
177176

178177
let rx_data_ind_datastream = Arc::new(Mutex::new(HashMap::new()));
179178
let rx_data_agg_datastream = Arc::new(Mutex::new((String::new(), HashMap::new())));

examples/individual_datastream/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ async fn main() -> Result<(), DynError> {
6060
let (client, connection) = DeviceBuilder::new()
6161
.store(MemoryStore::new())
6262
.interface_directory("./examples/individual_datastream/interfaces")?
63-
.connect(mqtt_config)
64-
.await?
63+
.connection(mqtt_config)
6564
.build()
66-
.await;
65+
.await?;
6766

6867
let client_cl = client.clone();
6968
println!("Connection to Astarte established.");

examples/individual_properties/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ async fn main() -> Result<(), DynError> {
8282
let (client, connection) = DeviceBuilder::new()
8383
.interface_directory("./examples/individual_properties/interfaces")?
8484
.store(db)
85-
.connect(mqtt_config)
86-
.await?
85+
.connection(mqtt_config)
8786
.build()
88-
.await;
87+
.await?;
8988
let device_cpy = client.clone();
9089

9190
println!("Connection to Astarte established.");

examples/object_datastream/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ async fn main() -> Result<(), Error> {
6565
let (client, connection) = DeviceBuilder::new()
6666
.store(MemoryStore::new())
6767
.interface_directory("./examples/object_datastream/interfaces")?
68-
.connect(mqtt_config)
69-
.await?
68+
.connection(mqtt_config)
7069
.build()
71-
.await;
70+
.await?;
7271

7372
// Create an thread to transmit
7473
tokio::task::spawn(async move {

examples/retention/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ async fn main() -> Result<(), DynError> {
7272
.await?
7373
.interface_str(INTERFACE_STORED)?
7474
.interface_str(INTERFACE_VOLATILE)?
75-
.connect(mqtt_config)
76-
.await?
75+
.connection(mqtt_config)
7776
.build()
78-
.await;
77+
.await?;
7978

8079
let mut tasks = tokio::task::JoinSet::new();
8180

0 commit comments

Comments
 (0)