/// <summary> /// Base class of Meter /// </summary> /// <param name="xElement"> /// xElement to create device /// </param> protected ModbusMeterBase(PACSimulator simulator, XElement xElement) { this.Simulator = simulator; this.Sampler = new Sampler(this); SetFromXML(xElement); }
/// <summary> /// Base class of Meter /// </summary> /// <param name="simulator">Simulator associated with meter</param> /// <param name="name">Name of device</param> /// <param name="portNumber">Port number of device</param> protected ModbusMeterBase(PACSimulator simulator, string name, Int32 portNumber, byte unitId) { this.Simulator = simulator; this.Sampler = new Sampler(this); this.Device = ModbusFactory.CreateNewDevice(portNumber, unitId); this.Name = name; }
/// <summary> /// Standard PAC meter /// </summary> /// <param name="simulator">Simulator object</param> /// <param name="name">Name of PAC meter</param> /// <param name="portNumber">Port number</param> /// <param name="unitId">UnitID</param> /// <param name="nominalCurrent">Nominal current</param> /// <param name="nominalPowerFactor">Nominal power factor</param> public StandardPAC(PACSimulator simulator, string name, Int32 portNumber = 502, Byte unitId = 1, float nominalCurrent = 100, float nominalPowerFactor = 0.8f) : base(simulator, name, portNumber, unitId) { this.NominalCurrent = nominalCurrent; this.NominalPowerFactor = nominalPowerFactor; AssignVariables(); InitVariableMechanism(); }
/// <summary> /// Method for initializing window /// </summary> /// <param name="simulator"> /// Simulator connected with window /// </param> public void Init(PACSimulator simulator) { this.Simulator = simulator; this.AllPACTypes = new List <string>() { PACSimulator.pac3200String, PACSimulator.pac3220String, PACSimulator.pac3100String, PACSimulator.pac3120String, PACSimulator.pac4200String }; this.SelectedPACType = AllPACTypes.First(); this.DataContext = this; }
public PAC3220(PACSimulator simulator, XElement xElement) : base(simulator, xElement) { }
/// <summary> /// PAC3200 meter /// </summary> /// <param name="simulator">Simulator object</param> /// <param name="name">Name of PAC meter</param> /// <param name="portNumber">Port number</param> /// <param name="nominalCurrent">Nominal current</param> /// <param name="nominalPowerFactor">Nominal power factor</param> public PAC3220(PACSimulator simulator, string name = "", Int32 portNumber = 502, Byte unitId = 1, float nominalCurrent = 100, float nominalPowerFactor = 0.8f) : base(simulator, name, portNumber, unitId, nominalCurrent, nominalPowerFactor) { }
public StandardPAC(PACSimulator simulator, XElement xElement) : base(simulator, xElement) { AssignVariables(); InitVariableMechanism(); }
/// <summary> /// Method for initialzing user control /// </summary> private void Init() { this.Simulator = new PACSimulator(); this.Simulator.Init(); }