示例#1
0
 public DevModelConfig(string mdName)
 {
     this.firmwareVer                   = "n/a";
     this.autoBasicInfo                 = string.Empty;
     this.autoRatingInfo                = string.Empty;
     this.modelName                     = mdName;
     this.portNum                       = 0;
     this.sensorNum                     = 0;
     this.bankNum                       = 0;
     this.lineNum                       = 0;
     this.bankCtrlflg                   = 0u;
     this.bankOpt_nameempty             = 0u;
     this.switchable                    = 1;
     this.perportreading                = 1;
     this.perbankReading                = 1;
     this.perlineReading                = 1;
     this.leakCurrent                   = 1;
     this.popNewRule                    = 1;
     this.popPrioritySupport            = 1;
     this.popReading                    = 1;
     this.popDefault                    = 32;
     this.popUdefmax                    = 32;
     this.doorReading                   = 1;
     this.devcapacity                   = "0";
     this.commonThresholdFlag           = 0;
     this.energyboxVoltage              = 0f;
     this.switchableOutlets             = 0uL;
     this.killPowerDisableRebootOutlets = 0uL;
     this.perportreadingOutlets         = 0uL;
     this.deviceMeasureOpt              = 0u;
     this.bankMeasureOpt                = 0u;
     this.outletMeasureOpt              = 0u;
     this.lineMeasureOpt                = 0u;
     this.maxDevThresholdOpt            = 0u;
     this.minDevThresholdOpt            = 0u;
     this.maxBankThresholdOpt           = 0u;
     this.minBankThresholdOpt           = 0u;
     this.maxPortThresholdOpt           = 0u;
     this.minPortThresholdOpt           = 0u;
     this.maxLineThresholdOpt           = 0u;
     this.minLineThresholdOpt           = 0u;
     this.bankStatusSupport             = 1;
     this.outletStatusSupport           = 1;
     this.ampcapicity                   = new System.Collections.Generic.List <stru_CommRange>();
     this.devThresholds                 = default(DevThreshold);
     this.bankOutlets                   = new System.Collections.Generic.List <BankOutlets>();
     this.m_FW = default(FW_stru);
     this.m_FW.init();
 }
示例#2
0
 public void copy(DevModelConfig src)
 {
     this.firmwareVer         = src.firmwareVer;
     this.autoBasicInfo       = src.autoBasicInfo;
     this.autoRatingInfo      = src.autoRatingInfo;
     this.modelName           = src.modelName;
     this.portNum             = src.portNum;
     this.sensorNum           = src.sensorNum;
     this.bankNum             = src.bankNum;
     this.lineNum             = src.lineNum;
     this.bankCtrlflg         = src.bankCtrlflg;
     this.bankOpt_nameempty   = src.bankOpt_nameempty;
     this.switchable          = src.switchable;
     this.perportreading      = src.perportreading;
     this.perbankReading      = src.perbankReading;
     this.perlineReading      = src.perlineReading;
     this.leakCurrent         = src.leakCurrent;
     this.popNewRule          = src.popNewRule;
     this.popPrioritySupport  = src.popPrioritySupport;
     this.popReading          = src.popReading;
     this.popDefault          = src.popDefault;
     this.popUdefmax          = src.popUdefmax;
     this.doorReading         = src.doorReading;
     this.devcapacity         = src.devcapacity;
     this.deviceMeasureOpt    = src.deviceMeasureOpt;
     this.bankMeasureOpt      = src.bankMeasureOpt;
     this.outletMeasureOpt    = src.outletMeasureOpt;
     this.lineMeasureOpt      = src.lineMeasureOpt;
     this.maxDevThresholdOpt  = src.maxDevThresholdOpt;
     this.minDevThresholdOpt  = src.minDevThresholdOpt;
     this.maxBankThresholdOpt = src.maxBankThresholdOpt;
     this.minBankThresholdOpt = src.minBankThresholdOpt;
     this.maxPortThresholdOpt = src.maxPortThresholdOpt;
     this.minPortThresholdOpt = src.minPortThresholdOpt;
     this.maxLineThresholdOpt = src.maxLineThresholdOpt;
     this.minLineThresholdOpt = src.minLineThresholdOpt;
     this.bankStatusSupport   = src.bankStatusSupport;
     this.outletStatusSupport = src.outletStatusSupport;
     this.ampcapicity         = new System.Collections.Generic.List <stru_CommRange>();
     for (int i = 0; i < src.ampcapicity.Count; i++)
     {
         stru_CommRange src2 = src.ampcapicity[i];
         stru_CommRange item = default(stru_CommRange);
         item.copy(src2);
         this.ampcapicity.Add(item);
     }
     this.commonThresholdFlag           = src.commonThresholdFlag;
     this.energyboxVoltage              = src.energyboxVoltage;
     this.switchableOutlets             = src.switchableOutlets;
     this.killPowerDisableRebootOutlets = src.killPowerDisableRebootOutlets;
     this.perportreadingOutlets         = src.perportreadingOutlets;
     this.devThresholds = default(DevThreshold);
     this.devThresholds.copy(src.devThresholds);
     this.bankOutlets = new System.Collections.Generic.List <BankOutlets>();
     for (int j = 0; j < src.bankOutlets.Count; j++)
     {
         BankOutlets src3  = src.bankOutlets[j];
         BankOutlets item2 = default(BankOutlets);
         item2.copy(src3);
         this.bankOutlets.Add(item2);
     }
     this.m_FW = default(FW_stru);
     this.m_FW.copy(src.m_FW);
 }
示例#3
0
 public void copy(DevThreshold src)
 {
     this.ThresholdsFlg = new System.Collections.Generic.List <ThresholdFlg>();
     for (int i = 0; i < src.ThresholdsFlg.Count; i++)
     {
         ThresholdFlg src2 = src.ThresholdsFlg[i];
         ThresholdFlg item = default(ThresholdFlg);
         item.copy(src2);
         this.ThresholdsFlg.Add(item);
     }
     this.UIEditFlg = new System.Collections.Generic.List <ThresholdFlg>();
     for (int j = 0; j < src.UIEditFlg.Count; j++)
     {
         ThresholdFlg src2 = src.UIEditFlg[j];
         ThresholdFlg item = default(ThresholdFlg);
         item.copy(src2);
         this.UIEditFlg.Add(item);
     }
     this.currentThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int k = 0; k < src.currentThresholds.Count; k++)
     {
         stru_CommRange src3  = src.currentThresholds[k];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.currentThresholds.Add(item2);
     }
     this.voltageThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int l = 0; l < src.voltageThresholds.Count; l++)
     {
         stru_CommRange src3  = src.voltageThresholds[l];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.voltageThresholds.Add(item2);
     }
     this.powerThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int m = 0; m < src.powerThresholds.Count; m++)
     {
         stru_CommRange src3  = src.powerThresholds[m];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.powerThresholds.Add(item2);
     }
     this.powerDissThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int n = 0; n < src.powerDissThresholds.Count; n++)
     {
         stru_CommRange src3  = src.powerDissThresholds[n];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.powerDissThresholds.Add(item2);
     }
     this.tempThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int num = 0; num < src.tempThresholds.Count; num++)
     {
         stru_CommRange src3  = src.tempThresholds[num];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.tempThresholds.Add(item2);
     }
     this.HumiThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int num2 = 0; num2 < src.HumiThresholds.Count; num2++)
     {
         stru_CommRange src3  = src.HumiThresholds[num2];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.HumiThresholds.Add(item2);
     }
     this.PressThresholds = new System.Collections.Generic.List <stru_CommRange>();
     for (int num3 = 0; num3 < src.PressThresholds.Count; num3++)
     {
         stru_CommRange src3  = src.PressThresholds[num3];
         stru_CommRange item2 = default(stru_CommRange);
         item2.copy(src3);
         this.PressThresholds.Add(item2);
     }
     this.commonThresholds = default(DevCommonThreshold);
     this.commonThresholds.copy(src.commonThresholds);
 }