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); } } } }
private void AddNewAnalyticsDataToDeviceMemory(Control changedControl) { if (changedControl.ShouldKeepAnalytics()) { List <byte> analyticsBuffer = HeepDeviceAnalytics.GetDeviceAnalyticsByteArray(changedControl, myID); HeepLanguage.AddBufferToBuffer(deviceMemory, analyticsBuffer); HeepCommunications.SendAnalytics(myID, deviceMemory); } }
private void AddNewAnalyticsDataToDeviceMemory(Control changedControl) { if (changedControl.ShouldKeepAnalytics()) { Console.WriteLine("Hello"); List <byte> analyticsBuffer = HeepDeviceAnalytics.GetDeviceAnalyticsByteArray(changedControl, myID); HeepLanguage.AddBufferToBuffer(deviceMemory, analyticsBuffer); NonVolatileData.WriteMemoryToFile(deviceMemory); HeepCommunications.SendAnalytics(myID, deviceMemory); } }
private static void DeviceSearchWorker(object currentIP) { Console.WriteLine((IPAddress)currentIP); List <byte> Buffer = new List <byte>(); Buffer.Add((byte)0x09); try{ List <byte> returnedCode = HeepCommunications.SendBufferToIP(Buffer, (IPAddress)currentIP); HeepParser.ParseROP(returnedCode); } catch (Exception e) { Console.Write("FAILED: "); Console.Write(e.Data); } }
public void StartListening() { HeepCommunications.SendDeviceContext(this); HeepCommunications.StartHeepServer(this, interruptServer); }
public HeepDevice(DeviceID theID) { SetDeviceID(theID); interruptServer = HeepCommunications.GetHeepInterruptServer(); }
public void StartListening() { HeepCommunications.StartHeepServer(this, interruptServer); }