Link Search Menu Expand Document

Range Scaling

Jul 19 2024 at 12:00 AM

  1. Overview
  2. Installation
  3. Example Options File
  4. Property Details

Overview

This function restricts (clamps) the Raw value to a value range. If the raw value is less than the minimum range value, then the current value is set to the minimum. If the raw value is greater than the maximum range value, then the current value is set to the maximum.

Installation

The required NuGet Package for this function is: IoTnxt.Raptor.TransformManager

    .AddRaptorTransformManager("TransformSets", (services, configuration, builder) =>
    {
        builder.AddDefaultTransformationFunctions(services);
    })

Example Options File

{
  "TransformSets": {
    "Scale": {
      "F1":  {
        "Enabled": true,
        "FunctionType": "RangeScaling",
        "RangeMin": 1,
        "RangeMax": 100
      }
    }
  } 
}

Property Details

Property NameDescription
FunctionTypeThe value for this function is “RangeScaling”.
EnabledSets whether this Transform Function is enabled. Defaults to true.
RangeMinThe minimum range of the scaled value.
RangeMaxThe maximum range of the scaled value.