Commit Graph

4 Commits

Author SHA1 Message Date
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
Kevin Dewald
60e087b0da Cleanup in preparation for v0.5.0 release. (#108)
* Add support to run Doxygen on SimpleBLE source code.

* Merged changelogs and dropped old messages.

* Added tutorial page

* Add tutorial to index

* Minor tweaks in changelog

* Initial tutorial

* Minor fixes

* Clean lint job, add docs build job

* Fix indentation error

* Fix indentation error, again...

* Doxygen now works fine

* Added a lot of documentation
2022-09-20 13:17:43 -07:00
Kevin Dewald
232e81d193 Finalized documentation for a first pass. 2022-08-26 22:17:07 -07:00
Kevin Dewald
4133ae9b01 First complete pass at docs 2022-08-20 17:43:48 -07:00