Skip to content

Split relay handling and service implementation #768

@williampMSFT

Description

@williampMSFT

For relayable services (battery, thermal, TAD, debug), we currently have 'messages' crates that describe the set of messages that can be sent to/from the service.

This made sense and provided a good separation between interface and implementation when we were using the comms system to pass messages between services, but with the move to direct async calls, the messages crates no longer represent the interface for the service.

We need to do the following for all relayable services:

  • Split the 'messages' crate into separate 'interface' and 'relay' crates
  • Define traits for each service interface in the 'interface' crates
  • Define new 'relay handler' types in the 'relay' crates that take references to instances of the interface traits and implement the 'RelayServiceHandler' trait on those new types

An example of this pattern for TAD is available here: #748
We need to do this for thermal and battery. This is predicated on the uniform-init thing, i.e. #759

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions