예제 #1
0
 public CommsDecoder(string BaudRate, string COMport, Library.PacketStates.PacketState SendPacketState)
 {
     //Set Communication Properties
     _BaudRate = BaudRate;
     _COMport  = COMport;
     //Set Current Communication States
     CurrentState = SendPacketState;
     //Initialise timers
     timerClock = new System.Timers.Timer();
 }
예제 #2
0
 public CommsDecoder(string BaudRate, string COMport, Library.PacketStates.PacketState SendPacketState)
 {
     //Set Communication Properties
     _BaudRate = BaudRate;
     _COMport = COMport;
     //Set Current Communication States
     CurrentState = SendPacketState;
     //Initialise timers
     timerClock = new System.Timers.Timer();
 }
예제 #3
0
 public void Get_RTC()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.READ_RTC;
         Send_Command_Data("!B");
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #4
0
 public void Send_Download_EEPROM()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.DOWNLOAD_EEPROM;
         Send_Command_Data("!D");
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #5
0
 public void Send_Clear_EEPROM()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.CLEAR_EEPROM;
         Send_Command_Data("!A");
     }
     catch
     {
         throw;
     }
 }
예제 #6
0
 public void Set_RTC()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.WRITE_RTC;
         string YearMonthDay = DateTime.Now.ToString("yyMMdd");
         string DayoftheWeek = GetDayOfWeek();
         string HourMinute   = DateTime.Now.ToString("HHmm");
         // System.Diagnostics.Debug.WriteLine(DateTime.Now.);
         Send_Command_Data("!C" + YearMonthDay + DayoftheWeek + HourMinute);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #7
0
 public void ClearEEPROM()
 {
     //CLEAR EEPROM
     CurrentState = PacketStates.PacketState.CLEAR_EEPROM;
     _SerialInstance.WriteCLREEPROM();
 }
예제 #8
0
 public void Set_RTC()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.WRITE_RTC;
         string YearMonthDay = DateTime.Now.ToString("yyMMdd");
         string DayoftheWeek = GetDayOfWeek();
         string HourMinute = DateTime.Now.ToString("HHmm");
         // System.Diagnostics.Debug.WriteLine(DateTime.Now.);
         Send_Command_Data("!C" + YearMonthDay + DayoftheWeek + HourMinute);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #9
0
 public void Send_Download_EEPROM()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.DOWNLOAD_EEPROM;
         Send_Command_Data("!D");
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #10
0
 public void Send_Clear_EEPROM()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.CLEAR_EEPROM;
         Send_Command_Data("!A");
     }
     catch
     {
         throw;
     }
 }
예제 #11
0
 public void Get_RTC()
 {
     try
     {
         _SendPacketState = Library.PacketStates.PacketState.READ_RTC;
         Send_Command_Data("!B");
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #12
0
 public void ClearEEPROM()
 {
     //CLEAR EEPROM
     CurrentState = PacketStates.PacketState.CLEAR_EEPROM;
     _SerialInstance.WriteCLREEPROM();
 }