public SensorInfoImpl(int aId, string aName, SensorType aSensorType, SensorSide aSide, double aShift) { if (string.IsNullOrEmpty(aName)) { throw new ArgumentNullException("aName"); } id = aId; name = aName; sType = aSensorType; side = aSide; shift = aShift; }
private string ConvertSensorSideToSrt(SensorSide aSize) { switch (aSize) { case SensorSide.BOTTOM: return "Нижняя"; case SensorSide.LEFT: return "Левая"; case SensorSide.RIGHT: return "Правая"; default: return "Верхняя"; } }
private List<ISensorInfo> GetProximitySensors(SensorSide aSensorSide) { var sensors = new List<ISensorInfo>(); var sensorCount = configuration.GetSensorInfoCount(); for (var i = 0; i < sensorCount; ++i) { var sensorInfo = configuration.ReadSensorInfoByIndex(i); if (sensorInfo.GetSensorSide() == aSensorSide && sensorInfo.GetSensorType() == SensorType.PROXIMITY) { sensors.Add(sensorInfo); } } return sensors; }