Range Scaling
Jul 19 2024 at 12:00 AM
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 Name | Description |
|---|---|
| FunctionType | The value for this function is “RangeScaling”. |
| Enabled | Sets whether this Transform Function is enabled. Defaults to true. |
| RangeMin | The minimum range of the scaled value. |
| RangeMax | The maximum range of the scaled value. |
