Esempio n. 1
0
 private void ModuleTest()
 {
     _isModuleSet = false;
     byte[] by = PortAgreement.GetSetModule("ABCDEF");
     if (PortHelper.IsConnection)
     {
         PortHelper.SerialPortWrite(by);
         Thread.Sleep(150);
     }
 }
Esempio n. 2
0
 private void SetModuleTid(int id)
 {
     _isModuleSet = false;
     byte[] by = PortAgreement.GetSetModule(string.Format("AT+TID=01{0}", id.ToString().PadLeft(8, '0')));
     if (PortHelper.IsConnection)
     {
         PortHelper.SerialPortWrite(by);
         Thread.Sleep(150);
     }
 }
Esempio n. 3
0
 private void SetModuleComesBack(int value)
 {
     _isModuleSet = false;
     byte[] by = PortAgreement.GetSetModule(string.Format("AT+BACK={0}", value));
     if (PortHelper.IsConnection)
     {
         PortHelper.SerialPortWrite(by);
         Thread.Sleep(150);
     }
 }
Esempio n. 4
0
 private void SetModuleFrequency(int frequency)
 {
     _isModuleSet = false;
     frequency    = 127 - (frequency * 2 - 1);
     byte[] by = PortAgreement.GetSetModule(string.Format("AT+FREQ={0:X2}", frequency));
     if (PortHelper.IsConnection)
     {
         PortHelper.SerialPortWrite(by);
         Thread.Sleep(150);
     }
 }