예제 #1
0
    public void ReceiveData()
    {
        if (ubwByteDataReceiver != null && ubwByteDataReceiver.IsBusy)
        {
            ubwByteDataReceiver.Abort();
        }

        ubwDataReceiver.Run();
    }
예제 #2
0
 /**
  * Permet d'arreter la recherche
  */
 public void StopFindDevices()
 {
     if (isDevicesSearching)
     {
         ubw.Abort();
     }
     isDevicesSearching = false;
 }
예제 #3
0
    void OnApplicationQuit()
    {
        Disconnect();

        if (ubwDeviceFinder != null && ubwDeviceFinder.IsBusy)
        {
            ubwDeviceFinder.Abort();
        }

        Thread.Sleep(1000);
    }
예제 #4
0
    public void ReceiveByteData()
    {
        if (ubwDataReceiver != null && ubwDataReceiver.IsBusy)
        {
            ubwDataReceiver.Abort();
        }

        ubwByteDataReceiver.Run();

        //int maxLength = 512;
        //byte[] data = new byte[maxLength];
        //int byteArrayLength=BTM_ReceiveByteDataFast(data, maxLength);
        //if(byteArrayLength==-1)
        //{
        //    Debug.Log("Error!");
        //}
        //for(int i=0;i<byteArrayLength;i++)
        //{
        //    Debug.Log(i + ": " +(int)data[i]);
        //}
    }