Exemple #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="nm"></param>
 /// <returns></returns>
 public static TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI)
 {
     TransItem item = new TransItem();
     item.FromDevice = CreateFromDevice(nm.FromName, fromDBI);
     item.ToDevice = CreateToDevice(nm.ToName, toDBI, nm.Elvation );
     return item;
 }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DateTime ReadLastDataDateTime()
        {
            ToDBI    dbi = this.DBI as ToDBI;
            DateTime dt  = dbi.ReadLastGateDataDateTime(this.Name);

            return(dt);
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="nm"></param>
        /// <returns></returns>
        static public TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI)
        {
            TransItem item = new TransItem();

            item.FromDevice = CreateFromDevice(nm.FromName, fromDBI);
            item.ToDevice   = CreateToDevice(nm.ToName, toDBI, nm.Elvation);
            return(item);
        }
Exemple #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 private static ToDevice CreateToDevice(string name, ToDBI toDBI, float elvation)
 {
     ToDevice to = new ToDevice();
     to.DBI = toDBI;
     to.Name = name;
     to.ID = toDBI.ReadToDeviceID(name);
     to.ComAdr = toDBI.ReadToDeviceComAdr(to.ID);
     to.Elvation = elvation;
     return to;
 }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        private static ToDevice CreateToDevice(string name, ToDBI toDBI, float elvation)
        {
            ToDevice to = new ToDevice();

            to.DBI      = toDBI;
            to.Name     = name;
            to.ID       = toDBI.ReadToDeviceID(name);
            to.ComAdr   = toDBI.ReadToDeviceComAdr(to.ID);
            to.Elvation = elvation;
            return(to);
        }