private void SendOutput(Control toSend) { // Send the current value of the control if (toSend.GetControlDirection() == Control.CtrlInputOutput.output) { for (int i = 0; i < vertices.Count; i++) { if (vertices [i].GetTXControlID() == toSend.GetID()) { List <byte> sendBuffer; if (toSend.GetType().Equals(typeof(BufferControl))) { sendBuffer = HeepLanguage.GetSetValCOPBufferControlBuffer(vertices[i].GetRXControlID(), ((BufferControl)(toSend)).GetBuffer()); } else { sendBuffer = HeepLanguage.GetSetValCOPBuffer(vertices [i].GetRXControlID(), toSend.GetCurValue()); } IPAddress sendIP = vertices [i].GetDestIP(); HeepCommunications.SendBufferToIP(sendBuffer, sendIP); } } } }