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

Contribute Smart Trailer Sample Applications #20

Merged
merged 29 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ff51830
Initial Sample Applications
ladatz Mar 12, 2024
6022878
Add workflow file for trailer properties provider and Updating bluech…
ladatz Mar 22, 2024
0f770e5
Add copyright headers
ladatz Mar 26, 2024
cd1b67f
README edits
ladatz Mar 26, 2024
b20bb71
Update scenarios/smart_trailer/README.md
ladatz Mar 27, 2024
4f5e925
Update scenarios/smart_trailer/applications/smart_trailer_application…
ladatz Mar 27, 2024
1c7afe0
Update scenarios/smart_trailer/applications/smart_trailer_application…
ladatz Mar 27, 2024
7276752
Update scenarios/smart_trailer/digital_twin_providers/trailer_propert…
ladatz Mar 28, 2024
4079dbe
Update scenarios/smart_trailer/applications/smart_trailer_application…
ladatz Mar 28, 2024
bcde5bc
Update scenarios/smart_trailer/digital_twin_providers/trailer_propert…
ladatz Mar 28, 2024
d05d348
Update scenarios/smart_trailer/applications/smart_trailer_application…
ladatz Mar 28, 2024
2f5cfad
Better error handling, move the rust flags, small fixes
ladatz Mar 29, 2024
6388fd9
updates
ladatz Apr 1, 2024
1d0b4bc
test workflow with public registry
ladatz Apr 1, 2024
8e5ce84
Revert local change
ladatz Apr 1, 2024
767b9f5
Fix image names in script
ladatz Apr 2, 2024
5abde80
Remove unused docker files
ladatz Apr 2, 2024
f7830d6
Update scenarios/smart_trailer/digital_twin_providers/trailer_propert…
ladatz Apr 8, 2024
10a5ce1
Update scenarios/smart_trailer/digital_twin_providers/trailer_propert…
ladatz Apr 8, 2024
2450e3c
Addressing comments
ladatz Apr 8, 2024
fd60887
Update scenarios/smart_trailer/digital_twin_providers/trailer_connect…
ladatz Apr 11, 2024
a37c141
Update scenarios/smart_trailer/Dockerfile.sample_workloads
ladatz Apr 11, 2024
257e1df
Update containerize-sample-workloads.yml
ladatz Apr 11, 2024
e0a6556
Update containerize-sample-workloads.yml
ladatz Apr 11, 2024
f85fd3c
Add Ibeji to script variables
ladatz Apr 11, 2024
ab9a2c8
Merge branch 'ladatz/sample_trailer' of https://github.com/ladatz/sof…
ladatz Apr 11, 2024
02f00af
Replace MIT with Apache 2 license
ladatz May 3, 2024
f1a2f5a
Updated License headers
ladatz May 13, 2024
5a53c90
Remove unnecessary file
ladatz May 13, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/containerize-invehicle-stack-chariott.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

name: Containerize In-Vehicle Stack - Chariott

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/containerize-sample-workloads.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

name: Containerize Sample Workloads - Smart Trailer

Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) Microsoft Corporation.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All -- do we want/ need a header for a .gitignore?

# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

**/target/**
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[workspace]
# The default resolver for workspaces is different than for regular packages, so use v2 to avoid warnings
Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/Dockerfile.sample_workloads
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "smart_trailer_application"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
digital-twin-model = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

use std::env;

Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/container/cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
Expand Down
6 changes: 3 additions & 3 deletions scenarios/smart_trailer/digital-twin-model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "digital-twin-model"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
serde = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/digital-twin-model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

pub mod trailer_v1;

Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/digital-twin-model/src/trailer_v1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

// Note: This code was manually written based on the structure of the
// vehicle model in "../dtdl/trailer.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "digital-twin-providers-common"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
invehicle-stack-interfaces = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

/// Supported digital twin operations.
pub mod digital_twin_operation {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

pub mod constants;
pub mod utils;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

use invehicle_stack_interfaces::invehicle_digital_twin::v1::invehicle_digital_twin_client::InvehicleDigitalTwinClient;
use invehicle_stack_interfaces::invehicle_digital_twin::v1::{EndpointInfo, FindByIdRequest};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "trailer_connected_provider"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
digital-twin-model = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

// Digital Twin "Get" Provider definition
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "smart-trailer-interfaces"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
prost = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::compile_protos("../interfaces/digital_twin_get_provider.proto")?;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

pub mod digital_twin_get_provider {
pub mod v1 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

use digital_twin_model::trailer_v1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

//! Module containing gRPC service implementation based on [`invehicle_stack_interfaces::digital_twin_get_provider.proto`].
//!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "trailer_properties_provider"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
digital-twin-model = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

mod trailer_properties_provider_impl;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

use std::collections::HashMap;
use std::str::FromStr;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";
package service_registry;
Expand Down
6 changes: 3 additions & 3 deletions scenarios/smart_trailer/proto_build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

[package]
name = "invehicle-stack-interfaces"
version = "0.1.0"
edition = "2021"
license = "MIT"
license = "Apache-2.0"

[dependencies]
prost = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/proto_build/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure()
Expand Down
4 changes: 2 additions & 2 deletions scenarios/smart_trailer/proto_build/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// SPDX-License-Identifier: MIT
// Licensed under the Apache License 2.0 license.
// SPDX-License-Identifier: Apache-2.0

pub mod invehicle_digital_twin {
pub mod v1 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

set -eu

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT
# Licensed under the Apache License 2.0 license.
# SPDX-License-Identifier: Apache-2.0

set -eu

Expand Down