Exemple #1
0
        public int lowPassFilterFreq(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            switch (behavior)
            {
            case Behavior.lowPassFilterNoFFreq:
                _dseObj.LowPassFilterMode     = LowPassFilter.No_Filter;
                _dseObj.LowPasCutOffFrequency = 0;
                break;

            case Behavior.lowPassFilterIIRFreq:
                _dseObj.LowPassFilterMode     = LowPassFilter.IIR_Filter;
                _dseObj.LowPasCutOffFrequency = 400;
                break;

            case Behavior.lowPassFilterFIRFreq:
                _dseObj.LowPassFilterMode     = LowPassFilter.FIR_Filter;
                _dseObj.LowPasCutOffFrequency = 200;
                break;

            default:
                break;
            }
            return(_dseObj.LowPasCutOffFrequency);
        }
        public string test_LimitValues(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.ProcessData.UpdateData(this, new EventArgs());

            if (_dseObj.ProcessData.Underload == false && _dseObj.ProcessData.Overload == false && _dseObj.ProcessData.HigherSafeLoadLimit == false)
            {
                return("WeightWithinLimits");
            }
            else
            if (_dseObj.ProcessData.Underload == true && _dseObj.ProcessData.Overload == false && _dseObj.ProcessData.HigherSafeLoadLimit == false)
            {
                return("Underload");
            }
            else
            if (_dseObj.ProcessData.Underload == false && _dseObj.ProcessData.Overload == true && _dseObj.ProcessData.HigherSafeLoadLimit == false)
            {
                return("Overload");
            }
            else
            if (_dseObj.ProcessData.Underload == false && _dseObj.ProcessData.Overload == false && _dseObj.ProcessData.HigherSafeLoadLimit == true)
            {
                return("HigherSafeLoadLimit");
            }
            else
            {
                return("");
            }
        }
Exemple #3
0
        public bool readWriteScaleRangeModeTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.ProcessData.UpdateData(this, new EventArgs());

            bool cond = false;

            _dseObj.ScaleRangeMode = ScaleRangeMode.None;

            if (_dseObj.ScaleRangeMode == ScaleRangeMode.None)
            {
                cond = true;
            }

            _dseObj.ScaleRangeMode = ScaleRangeMode.MultiRange;

            if (_dseObj.ScaleRangeMode == ScaleRangeMode.MultiRange && cond == true)
            {
                cond = true;
            }

            _dseObj.ScaleRangeMode = ScaleRangeMode.MultiInterval;

            if (_dseObj.ScaleRangeMode == ScaleRangeMode.MultiInterval && cond == true)
            {
                cond = true;
            }

            return(cond);
        }
Exemple #4
0
        public bool readWeightTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.ProcessData.UpdateData(this, new EventArgs());

            double expGross = 413.96;
            double expNet   = 463.96;
            double expTare  = 50;

            WeightType readWeight = _dseObj.Weight;

            if (readWeight.Gross == expGross && readWeight.Net == expNet && readWeight.Tare == expTare)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #5
0
        public void additionalFilterTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.FilterStage2Mode = FilterTypes.FIR_Comb_Filter;

            _dseObj.FilterStage2Mode = FilterTypes.No_Filter;

            Assert.AreEqual(FilterTypes.No_Filter, _dseObj.FilterStage2Mode);

            _dseObj.FilterStage3Mode = FilterTypes.No_Filter;

            _dseObj.FilterStage3Mode = FilterTypes.FIR_Comb_Filter;

            Assert.AreEqual(FilterTypes.FIR_Comb_Filter, _dseObj.FilterStage3Mode);

            _dseObj.FilterStage4Mode = FilterTypes.No_Filter;

            _dseObj.FilterStage4Mode = FilterTypes.FIR_Moving_Average;

            Assert.AreEqual(FilterTypes.FIR_Moving_Average, _dseObj.FilterStage4Mode);

            _dseObj.FilterStage5Mode = FilterTypes.FIR_Moving_Average;

            _dseObj.FilterStage5Mode = FilterTypes.No_Filter;

            Assert.AreEqual(FilterTypes.No_Filter, _dseObj.FilterStage5Mode);
        }
        public TestJetPeer(Behavior _behaviorParameter, TestJetbusConnection _connectionParameter)
        {
            _connection   = _connectionParameter;
            this.behavior = _behaviorParameter;

            path  = "";
            Event = "";
            data  = 0;
        }
Exemple #7
0
        public void additionalFilterFrequencyTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.FilterStage2Mode = FilterTypes.No_Filter;
            _dseObj.FilterStage3Mode = FilterTypes.No_Filter;
            _dseObj.FilterStage4Mode = FilterTypes.No_Filter;
            _dseObj.FilterStage5Mode = FilterTypes.No_Filter;



            if (behavior == Behavior.additionalFilterFrequencyTestSuccess)
            {
                Assert.AreEqual(0, _dseObj.FilterCutOffFrequencyStage2);
                Assert.AreEqual(0, _dseObj.FilterCutOffFrequencyStage3);
                Assert.AreEqual(0, _dseObj.FilterCutOffFrequencyStage4);
                Assert.AreEqual(0, _dseObj.FilterCutOffFrequencyStage5);

                _dseObj.FilterStage2Mode            = FilterTypes.FIR_Comb_Filter;
                _dseObj.FilterCutOffFrequencyStage2 = 200;
                _dseObj.FilterStage3Mode            = FilterTypes.FIR_Comb_Filter;
                _dseObj.FilterCutOffFrequencyStage3 = 300;
                _dseObj.FilterStage4Mode            = FilterTypes.FIR_Comb_Filter;
                _dseObj.FilterCutOffFrequencyStage4 = 400;
                _dseObj.FilterStage5Mode            = FilterTypes.FIR_Comb_Filter;
                _dseObj.FilterCutOffFrequencyStage5 = 500;
                Assert.AreEqual(200, _dseObj.FilterCutOffFrequencyStage2);
                Assert.AreEqual(300, _dseObj.FilterCutOffFrequencyStage3);
                Assert.AreEqual(400, _dseObj.FilterCutOffFrequencyStage4);
                Assert.AreEqual(500, _dseObj.FilterCutOffFrequencyStage5);

                _dseObj.FilterStage2Mode            = FilterTypes.FIR_Moving_Average;
                _dseObj.FilterCutOffFrequencyStage2 = 300;
                _dseObj.FilterStage3Mode            = FilterTypes.FIR_Moving_Average;
                _dseObj.FilterCutOffFrequencyStage3 = 400;
                _dseObj.FilterStage4Mode            = FilterTypes.FIR_Moving_Average;
                _dseObj.FilterCutOffFrequencyStage4 = 500;
                _dseObj.FilterStage5Mode            = FilterTypes.FIR_Moving_Average;
                _dseObj.FilterCutOffFrequencyStage5 = 600;
                Assert.AreEqual(300, _dseObj.FilterCutOffFrequencyStage2);
                Assert.AreEqual(400, _dseObj.FilterCutOffFrequencyStage3);
                Assert.AreEqual(500, _dseObj.FilterCutOffFrequencyStage4);
                Assert.AreEqual(600, _dseObj.FilterCutOffFrequencyStage5);
            }
            else if (behavior == Behavior.additionalFilterFrequencyTestFail)
            {
                Assert.AreNotEqual(100, _dseObj.FilterCutOffFrequencyStage2);
                Assert.AreNotEqual(100, _dseObj.FilterCutOffFrequencyStage3);
                Assert.AreNotEqual(100, _dseObj.FilterCutOffFrequencyStage4);
                Assert.AreNotEqual(100, _dseObj.FilterCutOffFrequencyStage5);
            }
        }
Exemple #8
0
        public void serialNumber(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            Assert.IsTrue(_dseObj.SerialNumber.Equals("DSEtest123"));
        }
Exemple #9
0
        public void testConnectionType(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            Assert.AreEqual("Jetbus", _dseObj.ConnectionType);
        }
Exemple #10
0
        public bool generalScaleErrorTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            return(_dseObj.GeneralScaleError);
        }
Exemple #11
0
        public void ident(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            Assert.IsTrue(_dseObj.Identification.Equals("testIdent"));
        }
Exemple #12
0
        public void filterTypeMethod(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            Assert.AreEqual((FilterTypes)13105, _dseObj.FilterType(13109));
            Assert.AreEqual((FilterTypes)13089, _dseObj.FilterType(13093));
            Assert.AreEqual((FilterTypes)0, _dseObj.FilterType(0));
        }
Exemple #13
0
        public void testWeightInZeroRange(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _testBoolean = _dseObj.ProcessData.InsideZero;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01"));
        }
Exemple #14
0
        public void testOutput3(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testBoolean = _wtxObj.DigitalIO.Output3;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("OM3"));
        }
Exemple #15
0
        public bool weightStableTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _dseObj.ProcessData.UpdateData(this, new EventArgs());

            return(_dseObj.WeightStable);
        }
Exemple #16
0
        public void testLimitStatus4(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testBoolean = _wtxObj.LimitSwitch.LimitStatus4;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("OS4"));
        }
Exemple #17
0
        public void testMeanValueDosingResults(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testDouble = ((IDataFillerExtended)_wtxObj.Filler).FillingResultMeanValue;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("SDM"));
        }
Exemple #18
0
        public void maxZeroingTimeTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect();

            _dseObj.MaximumZeroingTime = 5;

            Assert.AreEqual(5, _dseObj.MaximumZeroingTime);
        }
Exemple #19
0
        public void testWeightWithinTheCenterOfZero(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testBoolean = _wtxObj.ProcessData.CenterOfZero;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01"));
        }
Exemple #20
0
        public void testCoarseFlowCutOffPoint(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testDouble = ((IDataFillerExtended)_wtxObj.Filler).CoarseFlowCutOffLevel;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("CFD"));
        }
        public void test_NetGrossValueStringComment_0Decimals(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            double dValue = _dseObj.ProcessData.Weight.Gross / Math.Pow(10, 0);

            Assert.AreEqual(dValue.ToString(), _dseObj.PrintableWeight.Net);
        }
Exemple #22
0
        public void testOptimizationOfCutOffPoints(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testInteger = ((IDataFillerExtended)_wtxObj.Filler).OptimizationMode;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("OSN"));
        }
Exemple #23
0
        public void testSystematicDifference(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testDouble = ((IDataFillerExtended)_wtxObj.Filler).SystematicDifference;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("SYD"));
        }
Exemple #24
0
        public void testActivationTimeAfterFineFlow(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testInteger = ((IDataFillerExtended)_wtxObj.Filler).ActivationTimeAfterFilling;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("FFL"));
        }
Exemple #25
0
        public void testDecimals(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _testInteger = _dseObj.ProcessData.Decimals;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6013/01"));
        }
Exemple #26
0
        public void dateTimeTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect();

            _dseObj.DateTime = 18012021;

            Assert.AreEqual(18012021, _dseObj.DateTime);
        }
Exemple #27
0
        public void testScaleSealIsOpen(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            _testBoolean = _dseObj.ProcessData.LegalForTrade;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01"));
        }
Exemple #28
0
        public void testScaleRange(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _wtxObj = new WTXJet(_jetTestConnection, 100, update);

            _wtxObj.Connect(this.OnConnect, 100);

            _testInteger = _wtxObj.ProcessData.ScaleRange;

            Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01"));
        }
Exemple #29
0
        public void zeroSignalTest(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            int setZero = 600;

            _dseObj.ZeroSignal = setZero;

            Assert.AreEqual(setZero, _dseObj.ZeroSignal);
        }
Exemple #30
0
        public double weightStep(Behavior behavior)
        {
            _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); });

            _dseObj = new DSEJet(_jetTestConnection, 100, update);

            _dseObj.Connect(this.OnConnect, 100);

            double ws = 10;

            _dseObj.WeightStep = ws;

            return(_dseObj.WeightStep);
        }