Files
SimpleBLE/docs/simpleble/api.rst
Tobías Lifschitz 39cc358693 Refactor ByteArray from std::string alias to class implementation (#319)
* Refactor ByteArray from string alias to class implementation

- Converted ByteArray from an alias of std::string to a class implementation.
- Added multiple constructors to support initialization from various sources:
  - std::vector<uint8_t>
  - uint8_t pointer with size
  - std::string
  - C-string with and without null termination
- Implemented static methods fromHex() to construct from hex strings.
- Implemented c_str() method to return a C-string representation.
- Overloaded the stream operator to support pretty printing ByteArrays.

* Use an internal std::vector instead of inheriting from it

* Access directly to internal bytes of ByteArray

* Remove c_str methods

* Add slicing methods to ByteArray

* Fix data slicing in Windows backend

* Simplify ByteArray::fromHex

* Rename ByteArray::toHexString to toHex

so as to be consistent with fromHex

* Share ByteArray with simplebluez using common directory

* Remove unnecessary cast from ByteArray to string

* Extend use of ByteArray in simplebluez

* Revert changes in build script

* Remove subdirectory and rename namespace

* Allow hex prefix in 'fromHex' and clarify documentation

* Explicitly build ByteArray from py::bytes in python wrapper

* Add ByteArray to documentation

* Rename common dir to external

And rename kvn::ByteArray to kvn::bytearray

* Fix include path and format

* Use preprocessor guards instead of pragma
2024-07-27 16:25:56 -07:00

69 lines
1.2 KiB
ReStructuredText

=============
API Reference
=============
The following notes provide an overview of the architecture of some of
the higher-level classes in the library, as to facilitate their
understanding.
Standard API
============
.. doxygenclass:: SimpleBLE::Adapter
:project: simpleble
:members:
:undoc-members:
.. doxygenclass:: SimpleBLE::Peripheral
:project: simpleble
:members:
:undoc-members:
.. doxygenclass:: SimpleBLE::Service
:project: simpleble
:members:
:undoc-members:
.. doxygenclass:: SimpleBLE::Characteristic
:project: simpleble
:members:
:undoc-members:
.. doxygenclass:: SimpleBLE::Descriptor
:project: simpleble
:members:
:undoc-members:
.. doxygentypedef:: SimpleBLE::ByteArray
:project: simpleble
Safe API
========
.. doxygenclass:: SimpleBLE::Safe::Adapter
:project: simpleble
:members:
:undoc-members:
.. doxygenclass:: SimpleBLE::Safe::Peripheral
:project: simpleble
:members:
:undoc-members:
C API
========
.. doxygenfile:: adapter.h
:project: simpleble
.. doxygenfile:: peripheral.h
:project: simpleble
External API
============
.. doxygenclass:: kvn::bytearray
:project: external
:members:
:undoc-members: