27 lines
484 B
C#
27 lines
484 B
C#
|
namespace Aitex.Core.RT.IOCore;
|
||
|
|
||
|
public class InterlockLimitRangeInt: IAnalogInterlockLimitRange<int>
|
||
|
{
|
||
|
#region Constructors
|
||
|
|
||
|
public InterlockLimitRangeInt(short min, short max)
|
||
|
{
|
||
|
Min = min;
|
||
|
Max = max;
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
#region Properties
|
||
|
|
||
|
public int Min { get; }
|
||
|
|
||
|
public int Max { get; }
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
public virtual bool CheckIsInRange(int currentValue)
|
||
|
{
|
||
|
return currentValue >= Min && currentValue <= Max;
|
||
|
}
|
||
|
}
|