/// <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; }
/// <summary> /// /// </summary> /// <returns></returns> public DateTime ReadLastDataDateTime() { ToDBI dbi = this.DBI as ToDBI; DateTime dt = dbi.ReadLastGateDataDateTime(this.Name); return(dt); }
/// <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); }
/// <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; }
/// <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); }