using System;
|
using System.Collections.Generic;
|
namespace Shared
|
{
|
/// <summary>
|
/// 传感器
|
/// </summary>
|
[System.Serializable]
|
public class Sensor : Common
|
{
|
public Sensor ()
|
{
|
Type = DeviceType.Sensor;
|
DeviceTextID = 314; //SimpleControl.R.MyInternationalizationString.Sensor;
|
}
|
|
public int SensorTypeTestID = SimpleControl.R.MyInternationalizationString.Sensor;
|
|
}
|
|
|
[System.Serializable]
|
public class SensorMobileDetection : Sensor
|
{
|
public SensorMobileDetection ()
|
{
|
// 移动探测(01)增加状态广播项设置, 通道号,备注,使能位,灵敏度,状态,
|
Type = DeviceType.SensorMobileDetection;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorMobileDetection;
|
}
|
|
public bool Enable = true;
|
|
public byte Sensitivity;
|
|
public byte Status;
|
|
}
|
|
[System.Serializable]
|
public class SensorTemperature : Sensor
|
{
|
public SensorTemperature ()
|
{
|
//温度(02)增加状态广播项设置,详见操作码4.29 通道号,备注,当前温度(同时支持整形,浮点类型)E3E5的返回数据
|
Type = DeviceType.SensorTemperature;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorTemperature;
|
|
}
|
|
public double CurrentTemperature;
|
|
}
|
|
|
[System.Serializable]
|
public class SensorHumidity : Sensor
|
{
|
public SensorHumidity ()
|
{
|
//湿度(03)增加状态广播项设置,详见操作码4.29 通道号,备注,使能位,当前湿度
|
Type = DeviceType.SensorHumidity;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorHumidity;
|
|
}
|
public bool Enable = true;
|
|
public double CurrentHumidity;
|
|
}
|
|
[System.Serializable]
|
public class SensorIllumination : Sensor
|
{
|
public SensorIllumination ()
|
{
|
//照度(04)增加状态广播项设置,详见操作码4.29 通道号,备注,使能位,当前照度
|
Type = DeviceType.SensorIllumination;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorIllumination;
|
|
}
|
public bool Enable = true;
|
|
public int CurrentIllumination;
|
|
}
|
|
[System.Serializable]
|
public class SensorTVOC : Sensor
|
{
|
public SensorTVOC ()
|
{
|
//TVOC(05) 通道号,备注,使能位,当前空气质量等级
|
Type = DeviceType.SensorTVOC;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorTVOC;
|
|
}
|
public bool Enable = true;
|
|
public double CurrentTVOC;
|
|
}
|
|
[System.Serializable]
|
public class SensorPM25 : Sensor
|
{
|
public SensorPM25 ()
|
{
|
//PM2.5(06) 通道号,备注,使能位,当前空气PM2.5值
|
Type = DeviceType.SensorPM25;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorPM25;
|
|
}
|
public bool Enable = true;
|
|
public int CurrentPM25;
|
|
}
|
|
[System.Serializable]
|
public class SensorCO2 : Sensor
|
{
|
public SensorCO2 ()
|
{
|
//CO2(07) 通道号,备注,使能位,当前CO2 ppm值
|
Type = DeviceType.SensorCO2;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Environmental;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCO2;
|
|
}
|
public bool Enable = true;
|
|
public int CurrentCO2;
|
|
}
|
|
[System.Serializable]
|
public class SensorLPG : Sensor
|
{
|
public SensorLPG ()
|
{
|
//液化石油气(LPG)(08) 通道号,备注,使能位,当前LPG ppm值
|
Type = DeviceType.SensorLPG;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLPG;
|
|
//人工煤气(CO,H2)(09) 通道号,备注,使能位,当前综合ppm值
|
//天然气(CH4)(10) 通道号,备注,使能位,当前综合ppm值
|
}
|
public bool Enable = true;
|
|
public byte CurrentLPG;
|
}
|
|
[System.Serializable]
|
public class SensorCOH2 : Sensor
|
{
|
public SensorCOH2 ()
|
{
|
//人工煤气(CO,H2)(09) 通道号,备注,使能位,当前综合ppm值
|
Type = DeviceType.SensorCOH2;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCOH2;
|
}
|
public bool Enable = true;
|
|
public int CurrentCOH2;
|
}
|
|
[System.Serializable]
|
public class SensorCH4 : Sensor
|
{
|
public SensorCH4 ()
|
{
|
//天然气(CH4)(10) 通道号,备注,使能位,当前综合ppm值
|
Type = DeviceType.SensorCH4;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCH4;
|
}
|
public bool Enable = true;
|
|
public int CurrentCH4;
|
}
|
|
[System.Serializable]
|
public class SensorSmoke : Sensor
|
{
|
public SensorSmoke ()
|
{
|
// 烟雾(11) 通道号,备注,使能位,当前状态
|
Type = DeviceType.SensorSmoke;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorSmoke;
|
}
|
public bool Enable = true;
|
|
public int CurrentStatus;
|
}
|
|
[System.Serializable]
|
public class SensorWindSpeed : Sensor
|
{
|
public SensorWindSpeed ()
|
{
|
//风速(12) 通道号,备注,使能位,当前风速
|
Type = DeviceType.SensorWindSpeed;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWindSpeed;
|
}
|
public bool Enable = true;
|
|
public int CurrentWindSpeed;
|
}
|
|
[System.Serializable]
|
public class SensorWindPressure : Sensor
|
{
|
public SensorWindPressure ()
|
{
|
//风压(13) 通道号,备注,使能位,当前风压
|
Type = DeviceType.SensorWindPressure;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWindPressure;
|
}
|
public bool Enable = true;
|
|
public int CurrentWindPressure;
|
}
|
|
[System.Serializable]
|
public class SensorLiquidFlow : Sensor
|
{
|
public SensorLiquidFlow ()
|
{
|
//液体流量(14) 通道号,备注,使能位,当前液体流量
|
Type = DeviceType.SensorLiquidFlow;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidFlow;
|
}
|
public bool Enable = true;
|
|
public int CurrentLiquidFlow;
|
}
|
|
[System.Serializable]
|
public class SensorLiquidPressure : Sensor
|
{
|
public SensorLiquidPressure ()
|
{
|
//液体压力(15) 通道号,备注,使能位,当前液体压力
|
Type = DeviceType.SensorLiquidPressure;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidPressure;
|
}
|
public bool Enable = true;
|
|
public int CurrentLiquidPressure;
|
}
|
|
[System.Serializable]
|
public class SensorLiquidDepth : Sensor
|
{
|
public SensorLiquidDepth ()
|
{
|
//液体深度(16) 通道号,备注,使能位,当前液体深度(mm)
|
Type = DeviceType.SensorLiquidDepth;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorLiquidDepth;
|
}
|
public bool Enable = true;
|
|
public int CurrentLiquidDepth;
|
}
|
|
[System.Serializable]
|
public class SensorRainfall : Sensor
|
{
|
public SensorRainfall ()
|
{
|
//雨量(17) 通道号,备注,使能位,当前雨量(无雨,小雨,大雨)
|
Type = DeviceType.SensorRainfall;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorRainfall;
|
}
|
public bool Enable = true;
|
|
public int CurrentRainfall;
|
}
|
|
[System.Serializable]
|
public class SensorWeight : Sensor
|
{
|
public SensorWeight ()
|
{
|
//重量(18) 通道号,备注,使能位,当前物体重量(KG)
|
Type = DeviceType.SensorWeight;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorWeight;
|
}
|
public bool Enable = true;
|
|
public int CurrentWeight;
|
}
|
[System.Serializable]
|
public class SensorHeightLength : Sensor
|
{
|
public SensorHeightLength ()
|
{
|
//高度/长度(19) 通道号,备注,使能位,测量高度/长度(mm)
|
Type = DeviceType.SensorHeightLength;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorHeightLength;
|
}
|
public bool Enable = true;
|
|
public int CurrentHeightLength;
|
}
|
[System.Serializable]
|
public class SensorVelocity : Sensor
|
{
|
public SensorVelocity ()
|
{
|
//物体速度(20) 通道号,备注,当前物体速度(m/s)
|
Type = DeviceType.SensorHeightLength;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVelocity;
|
}
|
public bool Enable = true;
|
|
public int CurrentVelocity;
|
}
|
[System.Serializable]
|
public class SensorVibration : Sensor
|
{
|
public SensorVibration ()
|
{
|
//震动(21) 通道号,备注,使能位,震动状态
|
Type = DeviceType.SensorVibration;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVibration;
|
}
|
public bool Enable = true;
|
|
public int CurrentVibration;
|
}
|
[System.Serializable]
|
public class SensorVoltage : Sensor
|
{
|
public SensorVoltage ()
|
{
|
//电压(22) 通道号,备注,使能位,当前电压
|
Type = DeviceType.SensorVoltage;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorVoltage;
|
}
|
public bool Enable = true;
|
|
public int CurrentVoltage;
|
}
|
[System.Serializable]
|
public class SensorCurrent : Sensor
|
{
|
public SensorCurrent ()
|
{
|
//电流(23) 通道号,备注,使能位,当前电流
|
Type = DeviceType.SensorVoltage;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorCurrent;
|
}
|
public bool Enable = true;
|
|
public int CurrentCurrent;
|
}
|
[System.Serializable]
|
public class SensorPower : Sensor
|
{
|
public SensorPower ()
|
{
|
//功率(24) 通道号,备注,使能位,当前功率
|
Type = DeviceType.SensorPower;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.Sensor;
|
SensorTypeTestID = SimpleControl.R.MyInternationalizationString.SensorPower;
|
}
|
public bool Enable = true;
|
|
public int CurrentPower;
|
}
|
}
|