Beispiel #1
0
        /// <summary>
        /// 获取UPS数据
        /// </summary>
        /// <returns></returns>
        public static List <DynamicDataOfUps3onedata> GetUpsData()
        {
            List <DynamicDataOfUps3onedata> tmpGetUpsData = new List <DynamicDataOfUps3onedata>();

            foreach (DynamicDataOfUps3onedata mc in DynamicDataOfUps3onedata_Dictionary.Values)
            {
                DynamicDataOfUps3onedata tmp = new DynamicDataOfUps3onedata();
                tmp = mc;
                tmpGetUpsData.Add(tmp);
            }
            return(tmpGetUpsData);
        }
Beispiel #2
0
 /// <summary>
 /// 初始化UPS信息数据
 /// </summary>
 public static void Ups3onedataInit()
 {
     _UPSList = tmpUPSList.GetList();
     for (int i = 0; i < _UPSList.Count; i++)
     {
         DynamicDataOfUps3onedata tmp = new DynamicDataOfUps3onedata();
         tmp.UpsGuid           = _UPSList[i].DeviceID;
         tmp.UpsName           = _UPSList[i].Name;
         tmp.CommunicationType = _UPSList[i].CommunicationType; /**协议类型*/
         tmp.CommunicationID   = _UPSList[i].CommunicationID;   /**通信ID*/
         DynamicDataOfUps3onedata_Dictionary.Add(_UPSList[i].DeviceID, tmp);
     }
 }