public static void TestNonVolatileMemory() { HeepTest nonVolatileTest = new HeepTest("Non Volatile Memory Test"); String TestDeviceName = "Test Device"; List <byte> ID = new List <byte>(); for (byte i = 0; i < 4; i++) { ID.Add(i); } DeviceID myID = new DeviceID(ID); HeepDevice myDevice = new HeepDevice(myID); myDevice.SetDeviceName(TestDeviceName); List <byte> readMem = NonVolatileData.ReadMemoryFromFile(); int counter = 1; String foundName = HeepParser.parseDeviceNameMOP(readMem, ref counter); nonVolatileTest.AddTest(new TestData("Device Name", TestDeviceName, foundName)); nonVolatileTest.CheckTests(); }
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); } }
public void AddVertex(Vertex newVertex) { vertices.Add(newVertex); HeepLanguage.AddVertexToMemory(deviceMemory, newVertex); NonVolatileData.WriteMemoryToFile(deviceMemory); }
public void LoadDeviceMemoryFromFile() { deviceMemory = NonVolatileData.ReadMemoryFromFile(); }
public void SetDeviceName(String name) { HeepLanguage.AddNameToMemory(deviceMemory, myID, name); NonVolatileData.WriteMemoryToFile(deviceMemory); }
public void LoadDeviceMemoryFromFile() { deviceMemory = NonVolatileData.ReadMemoryFromFile(); vertices = HeepParser.GetVerticesFromBuffer(deviceMemory); }