Module processor

Module processor 

Source
Expand description

Processing strategies for combining source data into signal values.

This module provides processors that transform multiple input values from various sources into a single output value. Each processor implements a different strategy for combining these values, such as taking the median or weighted median.

The module provides:

  • The Processor enum which represents different processing strategies
  • Specialized processor implementations in submodules
  • Error handling for the processing operations

§Available Processors

The following processing strategies are available:

  • Median - Computes the median of the input values
  • WeightedMedian - Computes a weighted median based on configurable weights

§Extensibility

This module is designed to be extensible. New processing strategies can be added by:

  1. Creating a new processor implementation in a submodule
  2. Adding a new variant to the Processor enum
  3. Implementing the necessary logic in the name and process methods

§Usage in Registry

Processors are used within the registry system to define how source data should be combined into a single value for each signal. Each signal specifies a processor and its configuration parameters.

Modules§

median
This module provides a processor that calculates the median of multiple input values. Median calculation provides a robust measure of central tendency that is less affected by outliers compared to the arithmetic mean.
weighted_median
This module provides a processor that calculates the weighted median of multiple input values. Unlike a standard median, a weighted median takes into account the relative importance (weight) of each data source when determining the central value.

Structs§

ProcessError
Error type for processor operations.

Enums§

Processor
Represents different strategies for processing source data into a signal value.