Exemplo n.º 1
0
        public static void StopGenerator(ref Generator gen, ref ElectricParameters ep)
        {
            //gen = new Generator(0, 0);
            //ep = new ElectricParameters(0, 0);

            gen.OutputVoltage = 0;
            gen.OutputCurrent = 0;

            ep.Voltage = 3;
            ep.Current = 3;
        }
Exemplo n.º 2
0
        static void RestartGenerator(Generator gen, ElectricParameters ep)
        {
            //gen = new Generator(new ElectricParameters(0, 3));
            //ep = new ElectricParameters(0, 3);

            gen.OutputVoltage = 10;
            gen.OutputCurrent = 0;

            ep.Voltage = 3;
            ep.Current = 3;
        }
 public static double MeasureCurrentInMilliamps(Generator gen)
 {
     return gen.OutputVoltage / 1000;
 }
Exemplo n.º 4
0
 public static void MaxOutGenerator(out Generator gen, out ElectricParameters ep)
 {
     gen = new Generator(double.MaxValue, double.MaxValue);
     ep = new ElectricParameters(double.MaxValue, double.MaxValue);
 }
 public static double MeasureVoltageInMillivolts(Generator gen)
 {
     return gen.OutputVoltage / 1000;
 }