/**
  * retrieve the deviceInfo object matching to its ISktScanDevice interface
  * @param iDevice ScanAPI device interface
  * @return a deviceInfo object if it finds a matching device interface null
  * otherwise
  */
 private DeviceInfo GetDeviceInfo(ISktScanDevice iDevice)
 {
     DeviceInfo deviceInfo = null;
     lock (_devicesList)
     {
         foreach (DeviceInfo device in _devicesList)
         {
             if (device.SktScanDevice == iDevice)
             {
                 deviceInfo = device;
                 break;
             }
         }
     }
     return deviceInfo;
 }
 public CommandContext(bool getOperation,ISktScanObject scanObj,ISktScanDevice scanDevice,DeviceInfo deviceInfo,ICommandContextCallback callback)
 {
     this._getOperation=getOperation;
     scanObj.Property.Context=this;
     this._scanObj=scanObj;
     this._callback=callback;
     this._status=statusReady;
     this._scanDevice=scanDevice;
     this._retries=0;
     this._deviceInfo=deviceInfo;
     this.SymbologyId=0;
 }
 public DeviceInfo(String name, ISktScanDevice device, long type)
 {
     _device = device;
     _name = name;
     _bdAddress = "Not available";
     _type = type;
     _version = "Unknown";
     _batteryLevel = "Unknown";
     _decodeValue = 0;
     _rumble = true;
     _suffix = "\n";
     _notification = null;
     _symbologyInfo=new SymbologyInfo[ISktScanSymbology.id.kSktScanSymbologyLastSymbologyID];
     for (int i = 0; i < _symbologyInfo.Length; i++)
     {
         _symbologyInfo[i] = new SymbologyInfo();
     }
 }