private bool Authenticate() { bool result = false; try { double fixedMsec = 500; DateTime begin = DateTime.Now; result = (ProtoController.Authenticate() == 1); //SimpleConsole.Write(string.Format(" try time {0},result {1}", 5 - tryTimes, result)); DateTime end = DateTime.Now; double totalMsecs = (end - begin).TotalMilliseconds; fixedMsec = fixedMsec - totalMsecs; Thread.Sleep((int)fixedMsec); SimpleConsole.WriteLine("RID Use Time:" + totalMsecs); } catch (Exception exception) { SimpleConsole.Write(exception); } return(result); }
private string GetSamId() { string result; try { result = ProtoController.GetSAMID(); } catch (Exception exception) { throw exception; } return(result); }
private int Realase() { int result; try { result = ProtoController.CloseComm(); } catch (Exception exception) { throw exception; } return(result); }
private int InitCommExt() { int result; try { result = ProtoController.InitCommExt(); } catch (Exception exception) { throw exception; } return(result); }
private int Init(int serialPort = 1001) { int result = 0; try { result = ProtoController.InitComm(serialPort); } catch (Exception exception) { throw exception; } return(result); }
private int GetContentItem() { int result = -999; try { result = ProtoController.Read_Content_Path(ProtoController.Dir, 1); } catch (Exception exception) { throw exception; } return(result); }