Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wilyle committed Feb 16, 2024
1 parent 846cca9 commit 365ec11
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .accepted_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ hvac
HybridBatteryRemaining
Ibeji
ibeji
IDs
img
Impl
InMemoryMockDigitalTwinAdapter
Expand Down Expand Up @@ -160,6 +161,7 @@ sdk
SDV
SecretUri
seiðr
ServiceDiscoveryAdapter
sha
signkey
snapd
Expand All @@ -179,6 +181,7 @@ toml
toolchain
URI
uri
URIs
url
USERPROFILE
westus
Expand Down
3 changes: 3 additions & 0 deletions adapters/digital_twin/ibeji_adapter/src/ibeji_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ pub struct IbejiAdapter {
#[async_trait]
impl DigitalTwinAdapter for IbejiAdapter {
/// Creates a new instance of a DigitalTwinAdapter with default settings
///
/// # Arguments
/// - `selector`: the service discovery adapter selector to use
fn create_new(
selector: Arc<Mutex<dyn ServiceDiscoveryAdapterSelector>>,
) -> Result<Self, DigitalTwinAdapterError> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ impl InMemoryMockDigitalTwinAdapter {
#[async_trait]
impl DigitalTwinAdapter for InMemoryMockDigitalTwinAdapter {
/// Creates a new instance of a DigitalTwinAdapter with default settings
///
/// # Arguments
/// - `_selector`: the service discovery adapter selector to use (unused by this adapter)
fn create_new(
_selector: Arc<Mutex<dyn ServiceDiscoveryAdapterSelector>>,
) -> Result<Self, DigitalTwinAdapterError> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ impl MockDigitalTwinAdapter {
#[async_trait]
impl DigitalTwinAdapter for MockDigitalTwinAdapter {
/// Creates a new instance of a MockDigitalTwinAdapter
///
/// # Arguments
/// - `_selector`: the service discovery adapter selector to use (unused by this adapter)
fn create_new(
_selector: Arc<Mutex<dyn ServiceDiscoveryAdapterSelector>>,
) -> Result<Self, DigitalTwinAdapterError> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The Chariott Service Discovery Adapter integrates with the [Chariott Service Dis

The Chariott Service Discovery Adapter expects service IDs to be in the following format:

<!-- markdownlint-disable-next-line fenced-code-language -->
```
{namespace}/{name}/{version}
```
Expand Down
2 changes: 1 addition & 1 deletion common/src/digital_twin_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub trait DigitalTwinAdapter {
/// Creates a new instance of a DigitalTwinAdapter with default settings
///
/// # Arguments
/// - `selector`: the service dicovery adapter selector to use
/// - `selector`: the service discovery adapter selector to use
fn create_new(
selector: Arc<Mutex<dyn ServiceDiscoveryAdapterSelector>>,
) -> Result<Self, DigitalTwinAdapterError>
Expand Down
4 changes: 2 additions & 2 deletions docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Software-Defined Vehicle will need to connect to the cloud for scenarios suc

## Architecture

At its core, Freyja consists of the following primary components: the **cartographer**, the **emitter**, the **data adapter selector**, the **service discovery adapter selector**, and the **signal store**. In addition to these core components, there are multiple interfaces with external components that define how Freyja interacts with the cloud and the rest of the Software Defined Vehicle. There are interfaces for the in-vehicle digital twin service (such as Ibeji), the mapping service (authored by users), the cloud digital twin provider (such as Azure or AWS), the digital twin providers (authored by users), and the service discovery system (such as Chariott). Each of these interfaces is fully customizable, and Freyja provides a set of standard interfaces suitable for testing, demos, and basic production scenarios.
At its core, Freyja consists of the following primary components: the **cartographer**, the **emitter**, the **data adapter selector**, the **service discovery adapter selector**, and the **signal store**. In addition to these core components, there are multiple interfaces with external components that define how Freyja interacts with the cloud and the rest of the Software Defined Vehicle. There are interfaces for the in-vehicle digital twin service (such as Ibeji), the mapping service (authored by users), the cloud digital twin provider (such as Azure or AWS), the digital twin providers (authored by users), and the service discovery system (such as Chariott). Each of these interfaces is fully customizable, and Freyja provides a set of standard interfaces suitable for testing, demos, and basic production scenarios.

The following is a high-level diagram of the Freyja components. This diagram assumes integration with Chariott and Ibeji, though note that everything outside of the box labelled "Freyja" can be exchanged for another component with a different implementation:

Expand Down Expand Up @@ -60,7 +60,7 @@ The service discovery adapter selector is the core component responsible for man

A shared instance of the service discovery adapter is passed to most adapter types so that they can leverage this functionality. The exception is the Data Adapters, which will have URIs that are already determined by the Digital Twin Adapter.

The data adapter selector's main interface is the `get_service_uri` function, which accepts a service ID as an argument. Since service IDs may be different across different implementations of service discovery systems, it's recommended to make these as consistent as possible to avoid configuration churn when exchanging service discovery adapters. At minimum, a given service should be addressible by the same ID for every service discovery adapter that's used together in a Freyja application.
The data adapter selector's main interface is the `get_service_uri` function, which accepts a service ID as an argument. Since service IDs may be different across different implementations of service discovery systems, it's recommended to make these as consistent as possible to avoid configuration churn when exchanging service discovery adapters. At minimum, a given service should be addressable by the same ID for every service discovery adapter that's used together in a Freyja application.

### Signal Store

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ This appendix lists the adapters that are provided in this repository.
## Service Discovery Adapters

- [File Service Discovery Adapter](../../adapters/service_discovery/file_service_discovery_adapter/README.md): Uses a static config file to define service URIs.
- [Chariott Service Discovery Adapter](../../adapters/service_discovery/chariott_service_discovery_adapter/README.md): Interfaces with [Eclipse Chariott](https://github.com/eclipse-chariott/chariott/) to retrieve service URIs.
- [Chariott Service Discovery Adapter](../../adapters/service_discovery/chariott_service_discovery_adapter/README.md): Interfaces with [Eclipse Chariott](https://github.com/eclipse-chariott/chariott/) to retrieve service URIs.
1 change: 0 additions & 1 deletion proc_macros/src/freyja_main/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ mod freyja_main_parse_tests {
let service_discovery_idents = vec![format_ident!("SDA1"), format_ident!("SDA2")];

let input = quote! { #foo_ident, #bar_ident, #baz_ident, [#(#factory_idents),*], [#(#service_discovery_idents),*] };
println!("{input}");
let output = parse(input);

assert_eq!(output.dt_adapter_type, foo_ident);
Expand Down

0 comments on commit 365ec11

Please sign in to comment.