コード例 #1
0
 public IGH615MDeviceInfo GetDeviceInfo()
 {
     if (_deviceInfo == null)
     {
         if (!IsConnected)
         {
             return(null);
         }
         using (var session = new SerialPortSession(_commport))
         {
             var cmd = new GetDeviceInfoCommand();
             cmd.Execute(session.Port);
             _deviceInfo = cmd.GetDeviceInfo();
         }
     }
     return(_deviceInfo);
 }
コード例 #2
0
 public IGH615MDeviceInfo GetDeviceInfo()
 {
     if (_deviceInfo == null)
     {
         if (!IsConnected)
         {
             return null;
         }
         using (var session = new SerialPortSession(_commport))
         {
             var cmd = new GetDeviceInfoCommand();
             cmd.Execute(session.Port);
             _deviceInfo = cmd.GetDeviceInfo();
         }
     }
     return _deviceInfo;
 }