Example #1
0
        public static unsafe WriteRequestHandler WriteCharastristicRequest(ulong addr, UuidHandler serviceUuid, UuidHandler charaUuid, byte[] data, int idx, int size)
        {
            IntPtr resultPtr;

            fixed(void *ptr = &data[idx])
            {
                var dataPtr = new IntPtr(ptr);

                resultPtr = _BlePluginWriteCharacteristicRequest(addr, serviceUuid.ptr, charaUuid.ptr, dataPtr, size);
            }

            var handle = new WriteRequestHandler(resultPtr);

            return(handle);
        }
Example #2
0
 public static void ReleaseWriteRequest(ulong deviceAddr, WriteRequestHandler handle)
 {
     _BlePluginReleaseWriteRequest(deviceAddr, handle.ptr);
 }
Example #3
0
 public static bool IsWriteRequestError(WriteRequestHandler handle)
 {
     return(_BlePluginIsWriteRequestError(handle.ptr));
 }
Example #4
0
 public static bool IsWriteRequestComplete(WriteRequestHandler handle)
 {
     return(_BlePluginIsWriteRequestComplete(handle.ptr));
 }