Skip to content

Commit

Permalink
Add GetValue and GetValues Support (#75)
Browse files Browse the repository at this point in the history
* Add GetValue and GetValues  Support
  • Loading branch information
erikbosch authored Oct 7, 2024
1 parent ea34809 commit 435e88f
Show file tree
Hide file tree
Showing 5 changed files with 924 additions and 127 deletions.
2 changes: 1 addition & 1 deletion data/vss-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ use the full name. When official release is created replace the copied *.json-fi
Build and run kuksa_databroker using the new VSS file according to [documentation](../../README.md), e.g.

```sh
$cargo run --bin databroker -- --metadata ../data/vss-core/vss_release_4.0.json
$cargo run --bin databroker -- --metadata ./data/vss-core/vss_release_4.0.json
```

Use the client to verify that changes in VSS are reflected, by doing e.g. set/get on some new or renamed signals.
Expand Down
5 changes: 4 additions & 1 deletion databroker/src/grpc/kuksa_val_v2/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ impl From<&proto::Datapoint> for broker::Datapoint {
impl From<broker::Datapoint> for Option<proto::Datapoint> {
fn from(from: broker::Datapoint) -> Self {
match from.value {
broker::DataValue::NotAvailable => None,
broker::DataValue::NotAvailable => Some(proto::Datapoint {
value: None,
timestamp: Some(from.ts.into()),
}),
broker::DataValue::Bool(value) => Some(proto::Datapoint {
timestamp: Some(from.ts.into()),
value: Some(proto::Value {
Expand Down
Loading

0 comments on commit 435e88f

Please sign in to comment.