Example #1
0
 /// <summary>
 /// Creates a hub instance that uses LibUsb or WinUSB as transport.
 /// </summary>
 /// <param name="usbVid">The VID of the BT4.0 dongle.</param>
 /// <param name="usbPid">The PID of the BT4.0 dongle.</param>
 public BeaconHub(int usbVid, int usbPid)
 {
     controller = new LibUsbLeController(usbVid, usbPid);
     controller.LeMetaEventReceived += controller_LeMetaEventReceived;
     controller.Open();
     controller.EnableScanning();
 }
Example #2
0
 /// <summary>
 /// Creates a hub instance that uses LibUsb or WinUSB as transport.
 /// </summary>
 /// <param name="usbVid">The VID of the BT4.0 dongle.</param>
 /// <param name="usbPid">The PID of the BT4.0 dongle.</param>
 public BeaconHub(int usbVid, int usbPid)
 {
     controller = new LibUsbLeController(usbVid, usbPid);
     controller.LeMetaEventReceived += controller_LeMetaEventReceived;
     controller.Open();
     controller.EnableScanning();
 }
Example #3
0
 /// <summary>
 /// Release used resources.
 /// </summary>
 public void Dispose()
 {
     if (controller != null)
     {
         controller.LeMetaEventReceived -= controller_LeMetaEventReceived;
         controller.Dispose();
     }
     controller = null;
 }
Example #4
0
 /// <summary>
 /// Release used resources.
 /// </summary>
 public void Dispose()
 {
     if (controller != null)
     {
         controller.LeMetaEventReceived -= controller_LeMetaEventReceived;
         controller.Dispose();
     }
     controller = null;
 }