Skip to content

Commit

Permalink
Update freyja and add mapping configs for various samples
Browse files Browse the repository at this point in the history
  • Loading branch information
devkelley committed Nov 16, 2023
1 parent 8783de4 commit cf0eb2e
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 30 deletions.
22 changes: 22 additions & 0 deletions .freyja/managed_subscribe_sample/config/mock_mapping_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"values": [
{
"begin": 2,
"end": null,
"value": {
"source": "dtmi:sdv:HVAC:AmbientAirTemperature;1",
"target": {
"model_id": "dtmi:sdv:Cloud:Vehicle:Cabin:HVAC:AmbientAirTemperature;1",
"instance_id": "hvac",
"instance_property_path": "/AmbientAirTemperature"
},
"interval_ms": 3000,
"conversion": {
"mul": 0.5556,
"offset": -17.7778
},
"emit_on_change": false
}
}
]
}
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions .freyja/property_sample/config/mock_mapping_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"values": [
{
"begin": 2,
"end": null,
"value": {
"source": "dtmi:sdv:HVAC:AmbientAirTemperature;1",
"target": {
"model_id": "dtmi:sdv:Cloud:Vehicle:Cabin:HVAC:AmbientAirTemperature;1",
"instance_id": "hvac",
"instance_property_path": "/AmbientAirTemperature"
},
"interval_ms": 3000,
"conversion": {
"mul": 0.5556,
"offset": -17.7778
},
"emit_on_change": false
}
}
]
}
19 changes: 19 additions & 0 deletions .freyja/smart_trailer/config/mock_mapping_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"values": [
{
"begin": 2,
"end": null,
"value": {
"source": "dtmi:sdv:Trailer:Weight;1",
"target": {
"model_id": "dtmi:sdv:Cloud:Trailer:Weight;1",
"instance_id": "trailer",
"instance_property_path": "/Weight"
},
"interval_ms": 3000,
"conversion": null,
"emit_on_change": false
}
}
]
}
106 changes: 79 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ impl DigitalTwinAdapter for IbejiAdapter {
protocol: e.protocol,
operations: e.operations,
uri: e.uri,
context: e.context,
})
.collect(),
},
Expand Down
2 changes: 1 addition & 1 deletion freyja_apps/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To build and run the application, follow these steps:

1. Set the `$FREYJA_HOME` environment variable. If you are using the provided overrides, you can run the following command to set the variable:

export FREYJA_HOME={path-to-repo-root}/.freyja
export FREYJA_HOME={path-to-repo-root}/.freyja/mixed_sample

Alternatively, you can set the variable in a [Cargo configuration file](https://doc.rust-lang.org/cargo/reference/config.html) to only enable the variable while running a Cargo command.

Expand Down
4 changes: 2 additions & 2 deletions freyja_apps/ibeji_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This Freyja Example Application utilizes the [Ibeji Digital Twin Adapter](../../

To build and run the application, follow these steps:

1. (Optional) If necessary, author configuration overrides for the [`InMemoryMockMappingClient`](https://github.com/eclipse-ibeji/freyja/tree/main/mapping_clients/in_memory_mock_mapping_client). Refer to the adapter README files for instructions on how to do this. This repository provides overrides in the [`.freyja`](../../.freyja/) directory that can be used with the [`mixed` sample provided by Ibeji](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/mixed).
1. (Optional) If necessary, author configuration overrides for the [`InMemoryMockMappingClient`](https://github.com/eclipse-ibeji/freyja/tree/main/mapping_clients/in_memory_mock_mapping_client). Refer to the adapter README files for instructions on how to do this. This repository provides overrides in the [`.freyja`](../../.freyja/) directory that can be used with the [`mixed` sample`](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/mixed), [`managed subscribe` sample](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/manages_subscribe), and ['property' sample](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/property) found in Ibeji.

1. Set the `$FREYJA_HOME` environment variable. If you are using the provided overrides, you can run the following command to set the variable:

export FREYJA_HOME={path-to-repo-root}/.freyja
export FREYJA_HOME={path-to-repo-root}/.freyja/{sample-folder}

Alternatively, you can set the variable in a [Cargo configuration file](https://doc.rust-lang.org/cargo/reference/config.html) to only enable the variable while running a Cargo command.

Expand Down

0 comments on commit cf0eb2e

Please sign in to comment.