OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
619 stars 107 forks source link

How to send custom data structure in c++ #302

Closed YesSanSan closed 2 months ago

YesSanSan commented 2 months ago

I want to send a custom data structure that has been converted to a uint8_t array, but SimpleBLE::Peripheral::write_request or SimpleBLE::PeripheralBase::write_request only accept a strange ByteArray type. In simpleble/Types.h:

using ByteArray = std::string;

So is there any way to write uint8_t * or winrt::Windows::Storage::Streams::IBuffer?