Darien Figueroa / Mbed 2 deprecated repo3

Dependencies:   mbed MAX14720 MAX30205 USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Logging.cs Source File

Logging.cs

00001 using System;
00002 using System.Collections.Generic;
00003 using System.Linq;
00004 using System.Text;
00005 using RPCSupport.Devices;
00006 using System.Globalization;
00007 
00008 namespace RPCSupport.Logging
00009 {
00010     public class Logging : ClientDevice
00011     {
00012 
00013         public bool enabledEcg;
00014         public bool enabledBioz;
00015         public bool enabledRtoR;
00016         public bool enabledPace;
00017         public bool enabledTemp1;
00018         public bool enabledTemp2;
00019         public bool enabledPressure;
00020         public bool enabledAccel;
00021         public struct parametersEcg_Struct
00022         {
00023         }
00024         public struct parametersBioz_Struct
00025         {
00026         }
00027         public struct parametersRtoR_Struct
00028         {
00029         }
00030         public struct parametersPace_Struct
00031         {
00032         }
00033         public struct parametersTemp1_Struct
00034         {
00035             public int sampleRate;  // seconds
00036         } 
00037         public parametersTemp1_Struct parametersTemp1;
00038 
00039         public struct parametersTemp2_Struct
00040         {
00041             public int sampleRate;  // seconds
00042         }
00043         public struct parametersPressure_Struct
00044         {
00045             public int sampleRate;  // seconds
00046         }
00047         public struct parametersAccel_Struct
00048         {
00049             public int sampleRate;  // seconds
00050         }
00051 
00052 
00053         const string CLASSNAME = "Logging";
00054         public Logging(RPCClient client)
00055             : base(client)
00056         {
00057 
00058         }
00059         public void ReadMission()
00060         {
00061             int val;
00062             string cmd;
00063             string reply;
00064 
00065             reply = Call(CLASSNAME, "ReadMission");
00066 
00067             // parse through reply string here
00068             //
00069             //
00070 
00071         }
00072         public void WriteMission()
00073         {
00074             int val;
00075             string cmd;
00076             string reply;
00077 
00078             reply = Call(CLASSNAME, "StartMissionDefine");
00079             enabledTemp1 = true;
00080             //if (enabledTemp1)
00081             //{
00082             parametersTemp1.sampleRate = 1;
00083             cmd = String.Format("\"/BMP280/InitStart {0}\"", 1);
00084             reply = Call(CLASSNAME, "AppendMissionCmd", cmd);
00085             cmd = String.Format("\"/MAX31725/InitStart {0}\"", 2);
00086             reply = Call(CLASSNAME, "AppendMissionCmd", cmd);
00087             cmd = String.Format("\"/BMP280/InitStart {0}\"", 3);
00088             reply = Call(CLASSNAME, "AppendMissionCmd", cmd);
00089             //}
00090             reply = Call(CLASSNAME, "EndMissionDefine");
00091             reply = Call(CLASSNAME, "WriteMission");
00092 
00093             //reply = Call(CLASSNAME, "ReadReg", addr.ToString("X2"));
00094             //int.TryParse(reply, NumberStyles.HexNumber, CultureInfo.CurrentCulture, out val);
00095         }
00096 
00097 
00098         public void EraseMission()
00099         {
00100             int val;
00101             string cmd;
00102             string reply;
00103 
00104             reply = Call(CLASSNAME, "EraseMission");
00105         }
00106 
00107         public void TestMission()
00108         {
00109             int val;
00110             string cmd;
00111             string reply;
00112 
00113             reply = Call(CLASSNAME, "TestStartMission");
00114         }
00115 
00116         public void TestWriteLog()
00117         {
00118             throw new NotImplementedException();
00119         }
00120 
00121         public void TestReadLog()
00122         {
00123             throw new NotImplementedException();
00124         }
00125 
00126         public void TestBulkErase()
00127         {
00128             throw new NotImplementedException();
00129         }
00130 
00131         public void TestLogSectorsErase()
00132         {
00133             throw new NotImplementedException();
00134         }
00135     }
00136 }