Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public DateTime ReadLastDataDateTime()
        {
            ToDBI    dbi = this.DBI as ToDBI;
            DateTime dt  = dbi.ReadLastDitchDataDateTime(this.Name);

            return(dt);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param deviceType="nm"></param>
 /// <returns></returns>
 public static TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI, WriteDelegate writeDelegate)
 {
     TransItem item = new TransItem(writeDelegate);
     item.FromDevice = CreateFromDevice(nm.FromName, fromDBI);
     item.ToDevice = CreateToDevice(nm.ToName, toDBI, nm.Elvation, writeDelegate);
     return item;
 }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param deviceType="nm"></param>
        /// <returns></returns>
        static public TransItem Create(NameMap nm, FromDBI fromDBI, ToDBI toDBI, WriteDelegate writeDelegate)
        {
            TransItem item = new TransItem(writeDelegate);

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

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