// TODO: public override opcuaNode CheckInteraction(List <Vector2> storedInteraction) { // Validate string result = validator.ValidateInteraktion_dxdy_diff(storedInteraction, deltaX, deltaY, epsilon); opcuaNode local = new opcuaNode("", "", ""); switch (result) { case "negativ": sollWert.setValue("false"); local = sollWert; writeValue++; break; case "positiv": sollWert.setValue("true"); local = sollWert; writeValue++; break; default: //writeValue = false; break; } return(local); }
/// <summary> /// Checks if interaction matches to Mixer. /// </summary> /// <param name="storedInteraction"></param> /// <returns></returns> public override opcuaNode CheckInteraction(List <Vector2> storedInteraction) { // Validate input string result = validator.ValidateInteraktion_dxdy_same(storedInteraction, deltaX, deltaY, epsilon); // Build retun value opcuaNode local = new opcuaNode("", "", ""); // TODO: In eigene Funktion auslagern, wegen codedopplung switch (result) { case "negativ": sollWert.setValue("false"); local = sollWert; break; case "positiv": sollWert.setValue("true"); local = sollWert; break; } //writeValue = true; return(local); }
/// <summary> /// Check if interaction request for sub device of the tank. /// </summary> /// <param name="storedInteraction">List of 2D vectors. Holds the complete interaction.</param> /// <returns>Returns a opc ua node. Contains all data to write the new value on the opc ua server.</returns> public override opcuaNode CheckInteraction(List <Vector2> storedInteraction) { // Check if interaction hints on subdevice. opcuaNode local = new opcuaNode("", "", ""); foreach (KeyValuePair <string, Device> entry in subDevices) { local = entry.Value.CheckInteraction(storedInteraction); // Hit? Than break and continue. if (local.Nodeid != "") { break; } } return(local); }
/// <summary> /// Same like initOPCUAData, but no double code in inharitaded classes. /// </summary> /// <param name="resultIst">Result ist.</param> /// <param name="resultSoll">Result soll.</param> protected void safeInformation(RestAPIRequestObject resultIst, RestAPIRequestObject resultSoll) { if (resultIst == null) { istWert = new opcuaNode(null, null, null); } else { istWert = new opcuaNode(resultIst.NodeId, resultIst.Value, resultIst.DataType); } if (resultIst == null) { sollWert = new opcuaNode(null, null, null); } else { sollWert = new opcuaNode(resultSoll.NodeId, resultSoll.Value, resultSoll.DataType); } }
// TODO: public override opcuaNode CheckInteraction(List <Vector2> storedInteraction) { // Validate - Care it's cup interaction // string result = validator.ValidateInteraktion_dxdy_diff(storedInteraction, deltaX, deltaY, epsilon); // TODO: Go on with the result. opcuaNode local = new opcuaNode("", "", ""); /*switch (result) { * case "negativ": * sollWert.setValue ("false"); * local = sollWert; * break; * case "positiv": * sollWert.setValue ("true"); * local = sollWert; * break; * }*/ return(null); }
/// <summary> /// For sensors. /// </summary> /// <param name="resultIst">Result ist.</param> public virtual void InitOPCUAData(RestAPIRequestObject resultIst) { istWert = new opcuaNode(resultIst.NodeId, resultIst.Value, resultIst.DataType); }