-
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump simpleble version to v0.3.0 (#435)
* bump simpleble version to v0.3.0 Signed-off-by: Andrey Parfenov <[email protected]> * update simpleble Signed-off-by: Andrey Parfenov <[email protected]> * update simpleble to latest main Signed-off-by: Andrey Parfenov <[email protected]> * update simplebluez Signed-off-by: Andrey Parfenov <[email protected]>
- Loading branch information
1 parent
ecb7fb4
commit 1cf8c56
Showing
126 changed files
with
2,927 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,39 +13,54 @@ jobs: | |
max-parallel: 4 | ||
matrix: | ||
os: [windows-2019] | ||
# For windows-2022, the generator is for "Visual Studio 17 2022" | ||
|
||
steps: | ||
- name: Clone Repository | ||
uses: actions/checkout@v2 | ||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
- name: Compile Lib for Windows x86 - Windows SDK 10.0.19041.0 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build32_19041 | ||
cd %GITHUB_WORKSPACE%\build32_19041 | ||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 .. | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
- name: Compile Lib for Windows x64 - Windows SDK 10.0.19041.0 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build64_19041 | ||
cd %GITHUB_WORKSPACE%\build64_19041 | ||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19401.0 .. | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
- name: Compile Lib for Windows x86 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build32 | ||
cd %GITHUB_WORKSPACE%\build32 | ||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 .. | ||
cmake --build . --config Release -j 2 --parallel 2 | ||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 .. | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
- name: Compile Lib for Windows x64 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build64 | ||
cd %GITHUB_WORKSPACE%\build64 | ||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 .. | ||
cmake --build . --config Release -j 2 --parallel 2 | ||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 .. | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
- name: Compile Examples for Windows x86 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build32examples | ||
cd %GITHUB_WORKSPACE%\build32examples | ||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 ../examples | ||
cmake --build . --config Release -j 2 --parallel 2 | ||
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 ../examples | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
- name: Compile Examples for Windows x64 | ||
run: | | ||
mkdir %GITHUB_WORKSPACE%\build64examples | ||
cd %GITHUB_WORKSPACE%\build64examples | ||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 ../examples | ||
cmake --build . --config Release -j 2 --parallel 2 | ||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 ../examples | ||
cmake --build . --config Release --parallel 4 | ||
shell: cmd | ||
|
||
# ------------------------------------------------------------ | ||
|
@@ -71,25 +86,25 @@ jobs: | |
mkdir $GITHUB_WORKSPACE/build_arm64 | ||
cd $GITHUB_WORKSPACE/build_arm64 | ||
cmake -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release .. | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile Examples for MacOS arm64 | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_examples_arm64 | ||
cd $GITHUB_WORKSPACE/build_examples_arm64 | ||
cmake -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release ../examples | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile Lib for MacOS x86 | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_x86 | ||
cd $GITHUB_WORKSPACE/build_x86 | ||
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release .. | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile Examples for MacOS x86 | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_examples_x86 | ||
cd $GITHUB_WORKSPACE/build_examples_x86 | ||
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release ../examples | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
# ------------------------------------------------------------ | ||
|
||
|
@@ -120,22 +135,22 @@ jobs: | |
mkdir $GITHUB_WORKSPACE/build | ||
cd $GITHUB_WORKSPACE/build | ||
cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release .. | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile Examples for Ubuntu | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_examples | ||
cd $GITHUB_WORKSPACE/build_examples | ||
cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release ../examples | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile ASAN for Ubuntu | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_asan | ||
cd $GITHUB_WORKSPACE/build_asan | ||
cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release -DSIMPLEBLE_SANITIZE=Address .. | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 | ||
- name: Compile TSAN for Ubuntu | ||
run: | | ||
mkdir $GITHUB_WORKSPACE/build_tsan | ||
cd $GITHUB_WORKSPACE/build_tsan | ||
cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed -DCMAKE_BUILD_TYPE=Release -DSIMPLEBLE_SANITIZE=Thread .. | ||
make -j2 | ||
cmake --build . --config Release --parallel 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.vscode | ||
*.binlog | ||
.DS_Store | ||
docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Kevin Dewald | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
SimpleBLE | ||
========== | ||
|
||
The ultimate fully-fledged cross-platform library for Bluetooth Low Energy (BLE). | ||
|
||
|Latest Documentation Status| | ||
|
||
Overview | ||
-------- | ||
|
||
SimpleBLE is a C++ fully cross-platform BLE library designed for simplicity | ||
and ease of use. All specific operating system quirks are handled to provide | ||
a consistent behavior across all platforms. Each major version of the library | ||
will have a stable API that will be fully forwards compatible. | ||
|
||
If you want to use SimpleBLE and need help. **Please do not hesitate to reach out!** | ||
|
||
* Visit our `ReadTheDocs`_ page. | ||
* Join our `Discord`_ server. | ||
* Contact me: ``kevin at dewald dot me`` | ||
|
||
Are you using SimpleBLE on your own project? Reach out and I'll add a link to it below! | ||
|
||
Supported platforms | ||
------------------- | ||
=========== ============= =================================== ===== | ||
Windows Linux MacOS iOS | ||
=========== ============= =================================== ===== | ||
Windows 10+ Ubuntu 20.04+ 10.15+ (except 12.0, 12.1 and 12.2) 15.0+ | ||
=========== ============= =================================== ===== | ||
|
||
Vendorization | ||
------------- | ||
If you are interested in using SimpleBLE as a dependency in your project, | ||
there is currently first-class support for vendorization of all 3rd-party | ||
dependencies. Currently, the following libraries are included as part of | ||
SimpleBLE: | ||
|
||
* `fmtlib`_ | ||
* `SimpleBluez`_ | ||
* `SimpleDBus`_ | ||
|
||
Please visit our **Security** page for more information on how to vendorize | ||
3rd-party libraries for SimpleBLE. | ||
|
||
License | ||
------- | ||
|
||
All components within this project that have not been bundled from | ||
external creators, are licensed under the terms of the `MIT Licence`_. | ||
|
||
.. Links | ||
.. _MIT Licence: LICENCE.md | ||
|
||
.. _fmtlib: https://github.com/fmtlib/fmt | ||
|
||
.. _Discord: https://discord.gg/N9HqNEcvP3 | ||
|
||
.. _ReadTheDocs: https://simpleble.readthedocs.io/en/latest/ | ||
|
||
.. _SimpleBluez: https://github.com/OpenBluetoothToolbox/SimpleBluez | ||
|
||
.. _SimpleDBus: https://github.com/OpenBluetoothToolbox/SimpleDBus | ||
|
||
.. |Latest Documentation Status| image:: https://readthedocs.org/projects/simpleble/badge?version=latest | ||
:target: http://simpleble.readthedocs.org/en/latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Architecture | ||
============ | ||
|
||
Layers and their responsibilities | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
- External layer | ||
|
||
- ``SimpleBLE::Adapter`` and ``SimpleBLE::Peripheral`` classes. | ||
- These objects hold a shared pointer to ``SimpleBLE::AdapterBase`` | ||
and ``SimpleBLE::PeripheralBase`` respectively. | ||
|
||
- C-style wrapper layer | ||
|
||
- This layer is a C-style wrapper around the safe C++, designed to | ||
allow integration of SimpleBLE into other languages that have | ||
support for C bindings. | ||
|
||
- Safe layer | ||
|
||
- ``SimpleBLE::AdapterSafe`` and ``SimpleBLE::PeripheralSafe`` | ||
classes. | ||
- These objects wrap all ``SimpleBLE::Adapter`` and | ||
``SimpleBLE::Peripheral`` objects and provide an interface that | ||
does not throw exceptions. Instead, it will return an | ||
``std::optional<T>`` object if the function returns a value, or a | ||
boolean indicating whether the function succeeded if the original | ||
function did not return a value. The usage is functionally | ||
equivalent to their respective counterparts in the external layer. | ||
|
||
- API layer (OS-dependent) | ||
|
||
- ``SimpleBLE::AdapterBase`` and ``SimpleBLE::PeripheralBase`` | ||
classes. | ||
- These classes specify the API of the library on top of which the | ||
external layer is actually wrapping. | ||
- Each OS target has to implement the full public API specified in | ||
the external layer, using private methods and properties for the | ||
specific requirements of each environment. | ||
- Two convenience classes, ``SimpleBLE::AdapterBuilder`` and | ||
``SimpleBLE::PeripheralBuilder`` are provided for the case of | ||
allowing access to private methods during the build process. | ||
|
||
Coding & Naming Conventions | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
- This project follows the coding style guidelines specified in the | ||
``.clang-format`` file. They are roughly derived from Google's coding | ||
standard with a few differences, outlined here: | ||
|
||
- Class function names are expressed in ``snake_case``. | ||
- Class protected and private property names must end with an underscore (``_``). | ||
- Class protected and private method names must start with an underscore (``_``). |
Oops, something went wrong.