Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to the latest Freyja version #33

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
514 changes: 48 additions & 466 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ core-protobuf-data-access = { git = "https://github.com/eclipse-ibeji/ibeji" }
freyja = { git = "https://github.com/eclipse-ibeji/freyja" }
freyja-build-common = { git = "https://github.com/eclipse-ibeji/freyja" }
freyja-common = { git = "https://github.com/eclipse-ibeji/freyja" }
grpc-data-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
in-memory-mock-cloud-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
in-memory-mock-digital-twin-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
in-memory-mock-mapping-client = { git = "https://github.com/eclipse-ibeji/freyja" }
in-memory-mock-mapping-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
in-memory-mock-data-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
managed-subscribe-data-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
mqtt-data-adapter = { git = "https://github.com/eclipse-ibeji/freyja" }
proc-macros = { git = "https://github.com/eclipse-ibeji/freyja" }

## Chariott
Expand Down
8 changes: 6 additions & 2 deletions freyja_apps/e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ edition = "2021"
license = "MIT"

[dependencies]
# These two dependencies are required for anyone implementing a Freyja application
# These dependencies are required for anyone implementing a Freyja application
freyja = { workspace = true }
freyja-common = { workspace = true }
tokio = { workspace = true, features = ["macros"] }

# Put any dependencies that you need for your adapters down here.
# This samples utilizes the in-memory mock adapters.
azure-cloud-connector-adapter = { workspace = true }
ibeji-adapter = { workspace = true }
in-memory-mock-mapping-client = { workspace = true }
in-memory-mock-mapping-adapter = { workspace = true }
grpc-data-adapter = { workspace = true }
managed-subscribe-data-adapter = { workspace = true }
mqtt-data-adapter = { workspace = true }

# If built for aarch64, enable the 'vendored-ssl' feature.
[target.'cfg(target_arch = "aarch64")'.dependencies]
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 @@ -6,7 +6,7 @@ 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 for the samples listed under [Supported Samples](../../README.md#supported-ibeji-samples).
1. (Optional) If necessary, author configuration overrides for the [`InMemoryMockMappingAdapter`](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/mapping/in_memory_mock_mapping_adapter). Refer to the adapter README files for instructions on how to do this. This repository provides overrides for the samples listed under [Supported Samples](../../README.md#supported-ibeji-samples).

1. Set the `$FREYJA_HOME` environment variable. For example, to use the provided overrides for the [Ibeji mixed sample](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/mixed), you can run the command below.

Expand Down
8 changes: 6 additions & 2 deletions freyja_apps/e2e/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
// SPDX-License-Identifier: MIT

use azure_cloud_connector_adapter::azure_cloud_connector_adapter::AzureCloudConnectorAdapter;
use grpc_data_adapter::grpc_data_adapter_factory::GRPCDataAdapterFactory;
use ibeji_adapter::ibeji_adapter::IbejiAdapter;
use in_memory_mock_mapping_client::in_memory_mock_mapping_client::InMemoryMockMappingClient;
use in_memory_mock_mapping_adapter::in_memory_mock_mapping_adapter::InMemoryMockMappingAdapter;
use managed_subscribe_data_adapter::managed_subscribe_data_adapter_factory::ManagedSubscribeDataAdapterFactory;
use mqtt_data_adapter::mqtt_data_adapter_factory::MqttDataAdapterFactory;

freyja::freyja_main! {
IbejiAdapter,
AzureCloudConnectorAdapter,
InMemoryMockMappingClient
InMemoryMockMappingAdapter,
[GRPCDataAdapterFactory, ManagedSubscribeDataAdapterFactory, MqttDataAdapterFactory],
}
8 changes: 6 additions & 2 deletions freyja_apps/ibeji_adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ edition = "2021"
license = "MIT"

[dependencies]
# These two dependencies are required for anyone implementing a Freyja application
# These dependencies are required for anyone implementing a Freyja application
freyja = { workspace = true }
freyja-common = { workspace = true }
tokio = { workspace = true, features = ["macros"] }

# Put any dependencies that you need for your adapters down here.
# This samples utilizes the in-memory mock adapters.
in-memory-mock-cloud-adapter = { workspace = true }
ibeji-adapter = { workspace = true }
in-memory-mock-mapping-client = { workspace = true }
in-memory-mock-mapping-adapter = { workspace = true }
grpc-data-adapter = { workspace = true }
managed-subscribe-data-adapter = { workspace = true }
mqtt-data-adapter = { workspace = true }

# If built for aarch64, enable the 'vendored-ssl' feature.
[target.'cfg(target_arch = "aarch64")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion freyja_apps/ibeji_adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 for the samples listed under [Supported Ibeji Samples](../../README.md#supported-ibeji-samples).
1. (Optional) If necessary, author configuration overrides for the [`InMemoryMockMappingAdapter`](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/mapping/in_memory_mock_mapping_adapter). Refer to the adapter README files for instructions on how to do this. This repository provides overrides for the samples listed under [Supported Ibeji Samples](../../README.md#supported-ibeji-samples).

1. Set the `$FREYJA_HOME` environment variable. For example, to use the provided overrides for the [Ibeji mixed sample](https://github.com/eclipse-ibeji/ibeji/tree/main/samples/mixed), you can run the command below.

Expand Down
8 changes: 6 additions & 2 deletions freyja_apps/ibeji_adapter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT

use grpc_data_adapter::grpc_data_adapter_factory::GRPCDataAdapterFactory;
use ibeji_adapter::ibeji_adapter::IbejiAdapter;
use in_memory_mock_cloud_adapter::in_memory_mock_cloud_adapter::InMemoryMockCloudAdapter;
use in_memory_mock_mapping_client::in_memory_mock_mapping_client::InMemoryMockMappingClient;
use in_memory_mock_mapping_adapter::in_memory_mock_mapping_adapter::InMemoryMockMappingAdapter;
use managed_subscribe_data_adapter::managed_subscribe_data_adapter_factory::ManagedSubscribeDataAdapterFactory;
use mqtt_data_adapter::mqtt_data_adapter_factory::MqttDataAdapterFactory;

freyja::freyja_main! {
IbejiAdapter,
InMemoryMockCloudAdapter,
InMemoryMockMappingClient
InMemoryMockMappingAdapter,
[GRPCDataAdapterFactory, ManagedSubscribeDataAdapterFactory, MqttDataAdapterFactory],
}
6 changes: 4 additions & 2 deletions freyja_apps/in_memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ edition = "2021"
license = "MIT"

[dependencies]
# These two dependencies are required for anyone implementing a Freyja application
# These dependencies are required for anyone implementing a Freyja application
freyja = { workspace = true }
freyja-common = { workspace = true }
tokio = { workspace = true, features = ["macros"] }

# Put any dependencies that you need for your adapters down here.
# This samples utilizes the in-memory mock adapters.
in-memory-mock-cloud-adapter = { workspace = true }
in-memory-mock-digital-twin-adapter = { workspace = true }
in-memory-mock-mapping-client = { workspace = true }
in-memory-mock-mapping-adapter = { workspace = true }
in-memory-mock-data-adapter = { workspace = true }

[features]
containerize = []
10 changes: 8 additions & 2 deletions freyja_apps/in_memory/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
// SPDX-License-Identifier: MIT

use in_memory_mock_cloud_adapter::in_memory_mock_cloud_adapter::InMemoryMockCloudAdapter;
use in_memory_mock_data_adapter::in_memory_mock_data_adapter_factory::InMemoryMockDataAdapterFactory;
use in_memory_mock_digital_twin_adapter::in_memory_mock_digital_twin_adapter::InMemoryMockDigitalTwinAdapter;
use in_memory_mock_mapping_client::in_memory_mock_mapping_client::InMemoryMockMappingClient;
use in_memory_mock_mapping_adapter::in_memory_mock_mapping_adapter::InMemoryMockMappingAdapter;

freyja::freyja_main! {InMemoryMockDigitalTwinAdapter, InMemoryMockCloudAdapter, InMemoryMockMappingClient}
freyja::freyja_main! {
InMemoryMockDigitalTwinAdapter,
InMemoryMockCloudAdapter,
InMemoryMockMappingAdapter,
[InMemoryMockDataAdapterFactory],
}
3 changes: 2 additions & 1 deletion freyja_apps/template/Cargo.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ edition = "2021"
license = "MIT"

[dependencies]
# These two dependencies are required for anyone implementing a Freyja application
# These dependencies are required for anyone implementing a Freyja application
freyja = { git = "https://github.com/eclipse-ibeji/freyja" }
freyja-common = { git = "https://github.com/eclipse-ibeji/freyja" }
tokio = { version = "1.0", features = ["macros"] }

# Put any dependencies that you need for your adapters down here.
Expand Down
2 changes: 1 addition & 1 deletion freyja_apps/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a template for creating a Freyja application. For more information about

To create your own Freyja application, you can copy this template and make the following changes:

1. Choose the adapters to use. Freyja requires users to select a Cloud Adapter, a Digital Twin Adapter, and a Mapping Client. Some potential choices are:
1. Choose the adapters to use. Freyja requires users to select a Cloud Adapter, a Digital Twin Adapter, a Mapping Adapter, and at least one Data Adapter Factory. Some potential choices are:
1. Freyja mocks. These are enumerated [here](https://github.com/eclipse-ibeji/freyja/blob/main/docs/quickstart.md#appendix-a) and are generally only suitable for tests or demos.
1. [Example adapters from this repository](../../freyja_adapters/).
1. A custom adapter implementation. For more information on how to write and use these, see the see the [Freyja documentation on custom adapters](https://github.com/eclipse-ibeji/freyja/blob/main/docs/custom-adapters.md).
Expand Down
8 changes: 7 additions & 1 deletion freyja_apps/template/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@
use my_adapters::MyCloudAdapter;
use my_adapters::MyDigitaTwinAdapter;
use my_adapters::MyMappingClient;
use my_adapters::MyDataAdapterFactory;

freyja::freyja_main! {MyDigitaTwinAdapter, MyCloudAdapter, MyMappingClient}
freyja::freyja_main! {
MyDigitaTwinAdapter,
MyCloudAdapter,
MyMappingClient,
[MyDataAdapterFactory],
}
Loading