Skip to content

Add Filter message and add it to the ReceiveComponentDataStreamRequest #178

@matthias-wende-frequenz

Description

What's needed?

The ReceiveComponentDataStream rpc returns a stream of responses each of which containing a list of metric_samples in the data. The only parameter that can be passed is the component_id which implies that the returned stream contains all metrics that are streamable by this components.

From a user perspective not all of these metrics are used and thus are ignored. Still the user has to iterate over the full list.

Proposed solution

Instead the users could provide a filter with only the metrics that they need.

message ReceiveSensorDataStreamRequest {
  // The sensor ID to subscribe to.
  uint64 sensor_id = 1;
  repeated metric filter 
}

Use cases

Creating high level objects in the SDK that stream composed data but aren't interested in the full data stream. Among the metrics that might not be of interest are all kinds of harmonics, (re)active energy, power factor, total harmonic distortion.

Alternatives and workarounds

No response

Additional context

No response

Metadata

Metadata

Labels

part:protobufAffects the protocol buffer definition filespriority:❓We need to figure out how soon this should be addressedtype:enhancementNew feature or enhancement visitble to users

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions