public string test_LimitValues(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.ProcessData.UpdateData(this, new EventArgs()); if (_wtxObj.ProcessData.Underload == false && _wtxObj.ProcessData.Overload == false && _wtxObj.ProcessData.HigherSafeLoadLimit == false) { return("WeightWithinLimits"); } else if (_wtxObj.ProcessData.Underload == true && _wtxObj.ProcessData.Overload == false && _wtxObj.ProcessData.HigherSafeLoadLimit == false) { return("Underload"); } else if (_wtxObj.ProcessData.Underload == false && _wtxObj.ProcessData.Overload == true && _wtxObj.ProcessData.HigherSafeLoadLimit == false) { return("Overload"); } else if (_wtxObj.ProcessData.Underload == false && _wtxObj.ProcessData.Overload == false && _wtxObj.ProcessData.HigherSafeLoadLimit == true) { return("HigherSafeLoadLimit"); } else { return(""); } }
public TestJetPeer(Behavior _behaviorParameter, TestJetbusConnection _connectionParameter) { _connection = _connectionParameter; this.behavior = _behaviorParameter; path = ""; Event = ""; data = 0; }
public void test_NetGrossValueStringComment_0Decimals(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); double dValue = _wtxObj.ProcessData.Weight.Gross / Math.Pow(10, 0); Assert.AreEqual(dValue.ToString(), _wtxObj.PrintableWeight.Net); }
public void testDecimals(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.Decimals; Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6013/01")); }
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")); }
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")); }
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 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")); }
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")); }
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")); }
public void testWeightInZeroRange(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.InsideZero; Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01")); }
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")); }
public void testScaleSealIsOpen(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.LegalForTrade; Assert.IsTrue(_jetTestConnection.getDataBuffer.ContainsKey("6012/01")); }
public void test_NetGrossValueStringComment_6Decimals(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.ProcessData.PrintableWeight.Update(0, 0, 0, 6); double dValue = _wtxObj.ProcessData.Weight.Net / Math.Pow(10, 6); Assert.AreEqual(dValue.ToString("0.000000", CultureInfo.InvariantCulture), _wtxObj.PrintableWeight.Net.Replace(",", ".")); }
public bool SetActivationTimeTest(Behavior behavior) { TestJetbusConnection _jetTestConnection = new TestJetbusConnection(behavior, "wss://172.19.103.8:443/jet/canopen", "Administrator", "wtx", delegate { return(true); }); WTXJet _wtxObj = new WTXJet(_jetTestConnection, 200, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.LimitSwitch.LimitSwitch1Source = LimitSwitchSource.Gross; _wtxObj.LimitSwitch.LimitSwitch2Source = LimitSwitchSource.Net; _wtxObj.LimitSwitch.LimitSwitch3Source = LimitSwitchSource.Gross; _wtxObj.LimitSwitch.LimitSwitch4Source = LimitSwitchSource.Net; ((IDataFillerExtended)_wtxObj.Filler).CoarseFlowMonitoring = 10; ((IDataFillerExtended)_wtxObj.Filler).CoarseFlowMonitoringTime = 101; ((IDataFillerExtended)_wtxObj.Filler).CoarseLockoutTime = 110; ((IDataFillerExtended)_wtxObj.Filler).EmptyingMode = 1000; ((IDataFillerExtended)_wtxObj.Filler).EmptyWeight = 1001; ((IDataFillerExtended)_wtxObj.Filler).FineFlowMonitoring = 1011; ((IDataFillerExtended)_wtxObj.Filler).FineFlowMonitoringTime = 1100; ((IDataFillerExtended)_wtxObj.Filler).FineLockoutTime = 1111; ((IDataFillerExtended)_wtxObj.Filler).LowerToleranceLimit = 11000; ((IDataFillerExtended)_wtxObj.Filler).MinimumFineFlow = 11001; ((IDataFillerExtended)_wtxObj.Filler).MinimumStartWeight = 11010; ((IDataFillerExtended)_wtxObj.Filler).ResidualFlowTime = 11101; ((IDataFillerExtended)_wtxObj.Filler).SystematicDifference = 11110; ((IDataFillerExtended)_wtxObj.Filler).TareDelay = 11111; ((IDataFillerExtended)_wtxObj.Filler).TareMode = 100000; ((IDataFillerExtended)_wtxObj.Filler).UpperToleranceLimit = 100001; ((IDataFillerExtended)_wtxObj.Filler).ValveControl = 100010; if (_jetTestConnection.getDataBuffer.ContainsKey("VCT") && _jetTestConnection.getDataBuffer.ContainsValue(100010)) { return(true); } else if (_jetTestConnection.getDataBuffer.ContainsKey("6002/02") && _jetTestConnection.getDataBuffer.ContainsValue(1230)) { return(false); } return(false); }
public bool testNetGrossTareValues(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.ProcessData.UpdateData(this, new EventArgs()); if (_wtxObj.ProcessData.Weight.Net == 0.0011 && _wtxObj.ProcessData.Weight.Tare == 0.0011 && _wtxObj.ProcessData.Weight.Gross == 0) { return(true); } else { return(false); } }
public bool WriteTareTest(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 200, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.Tare(); // Write in index(address) "6002/01" value 1701994868 if (_jetTestConnection.getDataBuffer.ContainsKey("6002/01") && _jetTestConnection.getDataBuffer.ContainsValue(1701994868)) { return(true); } else { return(false); } }
public bool testUnit_N(Behavior behavior) { _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); _wtxObj.ProcessData.UpdateData(this, new EventArgs()); value = _wtxObj.ProcessData.Unit; if (value.Equals("N")) { return(true); } else { return(false); } }
public void testLimitSwitchStatusLVS1(Behavior behavior) { bool testVar = false; _jetTestConnection = new TestJetbusConnection(behavior, ipaddress, "Administrator", "wtx", delegate { return(true); }); _wtxObj = new WTXJet(_jetTestConnection, 100, update); _wtxObj.Connect(this.OnConnect, 100); bool LimitSwitch1 = _wtxObj.LimitSwitch.LimitStatus1; if (_jetTestConnection.getDataBuffer.ContainsKey("2020/25") == true && !LimitSwitch1) { testVar = true; } else { testVar = false; } Assert.IsTrue(testVar); }