using System;
|
using System.Collections.Generic;
|
using Shared.SimpleControl;
|
|
namespace Shared
|
{
|
[Serializable]
|
public class LongXiModule : AC
|
{
|
public LongXiModule ()
|
{
|
Type = DeviceType.LongXiAC;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.AC;
|
}
|
|
public string[] LongXiDevicePaths = new string[7];
|
|
public LongXiAC[] LongXiACs {
|
get{
|
LongXiAC [] longXiACs = new LongXiAC [7];
|
LongXiAC lxAC1 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [0])));
|
if (lxAC1 == null) {
|
lxAC1 = new LongXiAC (){
|
LongXiDeviceType = 1
|
};
|
}
|
LongXiAC lxAC2 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [1])));
|
if (lxAC2 == null) {
|
lxAC2 = new LongXiAC (){
|
LongXiDeviceType = 2
|
};
|
}
|
LongXiAC lxAC3 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [2])));
|
if (lxAC3 == null) {
|
lxAC3 = new LongXiAC (){
|
LongXiDeviceType = 3
|
};
|
}
|
LongXiAC lxAC4 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [3])));
|
if (lxAC4 == null) {
|
lxAC4 = new LongXiAC (){
|
LongXiDeviceType = 4
|
};
|
}
|
LongXiAC lxAC5 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [4])));
|
if (lxAC4 == null) {
|
lxAC4 = new LongXiAC () {
|
LongXiDeviceType = 5
|
};
|
}
|
LongXiAC lxAC6 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [5])));
|
if (lxAC4 == null) {
|
lxAC4 = new LongXiAC () {
|
LongXiDeviceType = 6
|
};
|
}
|
LongXiAC lxAC7 = Newtonsoft.Json.JsonConvert.DeserializeObject<LongXiAC> (CommonPage.MyEncodingUTF8.GetString (IO.FileUtils.ReadFile (LongXiDevicePaths [6])));
|
if (lxAC4 == null) {
|
lxAC4 = new LongXiAC () {
|
LongXiDeviceType = 7
|
};
|
}
|
longXiACs [0] = lxAC1;
|
longXiACs [1] = lxAC2;
|
longXiACs [2] = lxAC3;
|
longXiACs [3] = lxAC4;
|
longXiACs [4] = lxAC5;
|
longXiACs [5] = lxAC6;
|
longXiACs [6] = lxAC7;
|
return longXiACs;
|
}
|
}
|
}
|
|
[Serializable]
|
public class LongXiAC : AC
|
{
|
|
public LongXiAC(){
|
Type = DeviceType.LongXiAC;
|
DeviceTextID = SimpleControl.R.MyInternationalizationString.AC;
|
}
|
|
/// <summary>
|
/// 1 : 新风空调
|
/// 2-7 : 二次过滤
|
/// </summary>
|
public int LongXiDeviceType = 0;
|
|
//[0]=AIR_STRUCT [air_NO].HDL_AIR_NO ; //空调号
|
//[1]=TEMP_MODE;//0
|
//[2]=AIR_STRUCT [air_NO].ROOM_TEMP; //室内温度
|
//[3]=AIR_STRUCT [air_NO].SET_COOL_T;
|
//[4]=AIR_STRUCT [air_NO].SET_HOT_T;
|
//[5]=AIR_STRUCT [air_NO].SET_AUTO_T;
|
//[6]=AIR_STRUCT [air_NO].SET_DRY_T;
|
//[7]=AIR_STRUCT [air_NO].fact_MODE_FAN;
|
//[8]=AIR_STRUCT [air_NO].POWER>>7; //新风开关
|
//[9]=AIR_STRUCT [air_NO].SET_MODE; //新风模式
|
//[10]=AIR_STRUCT [air_NO].SET_FAN; //新风风速
|
//[11]=0;
|
/// <summary>
|
/// [12]=AIR_STRUCT [air_NO].wave;
|
/// 自动开1 手动关 0
|
/// The wave.
|
/// </summary>
|
public byte Wave =0;
|
//[13]=0XAB;
|
//[14]=0xCD;
|
|
/// <summary>
|
/// [15] =AIR_STRUCT [air_NO].HEAT_LEVEL;
|
/// 电加热状态 1开 0关
|
/// </summary>
|
public byte ElectricHeating =0;
|
|
//[16] =AIR_STRUCT [air_NO].FANG_DONG; //防冻开关 1开 0关
|
public byte Antifreeze = 0;
|
//[17] =AIR_STRUCT [air_NO].OUTDOOR_TEMP;//室外温度
|
public byte OutTemp;
|
|
/// <summary>
|
/// [18] =AIR_STRUCT [air_NO].SHI_DU;
|
/// 湿度
|
/// </summary>
|
public byte Humidity;
|
/// <summary>
|
/// [19] =AIR_STRUCT [air_NO].VOC_H;
|
/// [20] =AIR_STRUCT [air_NO].VOC_L;
|
/// The tvoc.
|
/// </summary>
|
public int TVOC;
|
/// <summary>
|
/// [21]=AIR_STRUCT [air_NO].PM25_H;
|
/// [22]=AIR_STRUCT [air_NO].PM25_L;
|
/// The PM 25.
|
/// </summary>
|
public int PM25;
|
|
public string modeText {
|
get{//0 制冷1制热,2通风,3自动,4除湿
|
if(SetMode == 0){
|
return "制冷";
|
}else{
|
return "自动";
|
}
|
}
|
}
|
|
public string windText {
|
get{// 0 自动,1高风2中风,3低风
|
if(SetFanSpeed == 3)
|
{
|
return "低风";
|
}else if(SetFanSpeed == 2){
|
return "中风";
|
}else {
|
return "高风";
|
}
|
}
|
}
|
}
|
}
|