Skip to content

eclipse-uprotocol/symphony-target-example-rust

Eclipse Symphony Target Example

This repository contains an example implementation of a remote Eclipse Symphony™ Target which can be used by means of Symphony's uProtocol Target Provider.

The example application is implemented as a uProtocol service and simulates functionality for updating firmware of vehicle ECUs. The exposed API operates on some simple in-memory deployment state and allows the Symphony control plane to (remotely) query the currently installed firmware versions and to update firmware on ECUs.

The Symphony uProtocol Target Provider expects target implementations to implement the Target Provider uService contract. The example application uses uProtocol's Communication Level API to expose the three operations defined in the contract.

Getting Started

The symphony-example folder contains a Docker Compose file which illustrates the usage of the ECU Updater together with a Symphony API server using Eclipse Zenoh™ as the uProtocol transport layer.

Building from Source Code

The example application is implemented in Rust and therefore requires a Rust toolchain to be installed for building.

cargo build

Running from the Command Line

The application supports using either Eclipse Zenoh or MQTT 5 for exchanging messages. The transport can be selected on the command line.

./target/debug/ecu-updater

will display all available command line options.

In order to use the MQTT 5 based transport and connect to a local MQTT 5 broker (mqtt://localhost:1883) which doesn't require authentication:

./target/debug/ecu-updater mqtt5

In order to enable informational log statements being printed to the console, the RUST_LOG environment variable can be used:

RUST_LOG=INFO ./target/debug/ecu-updater mqtt5

To enable debug logging for the app, use:

RUST_LOG=INFO,ecu_updater=DEBUG ./target/debug/ecu-updater mqtt5

About

Example implementation of Eclipse Symphony Target using Rust

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published