summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* test scripts/run-*.sh: Add commented out example for env-var ↵Sven Gothel2020-09-167-0/+33
| | | | 'direct_bt_debug'; Echo COMMANDLINE and debug env-var.
* DBTAdapter: Atomic operation across discovered, connected and shared devicesSven Gothel2020-09-164-34/+35
| | | | | | | .. achieved via unique mutex lock. Hence perform DBTDevice::remove() within adapter to ensure disconnect and device reference removal is atomic covered by uniue lock.
* Correct API doc for DBTDevice::remove() (C++ and Java):Sven Gothel2020-09-162-8/+9
| | | | | | Fix order of explicitly removing shared reference: connected-devices, discovered-devices and shared-devices. Fix disconnect also removes its ref from discovered-devices, besides connected-devices, but not shared-devices.
* README.md Add Bluetooth Spec link and enhance Direct-BT description.Sven Gothel2020-09-162-15/+16
|
* Update README.mdSven Gothel2020-09-151-27/+30
|
* DBTEnv: Resolve using environment vars under Unix shells, e.g. try ↵Sven Gothel2020-09-153-6/+44
| | | | 'direct_bt_debug' if ''direct_bt.debug' wasn't found.
* CMake: Support full parallel build by adding target dependenciesSven Gothel2020-09-157-38/+66
| | | | | | | | | | | | | | | | C++ Libs -> none (2x) Java Jar -> none Java JNI Libs -> C++ Lib + Java Jar (2x) C++ Examples -> C++ Libs Java Examples -> Java Jar Test -> C++ Lib +++ scripts/[re]build.sh uses `getconf _NPROCESSORS_ONLN` for the make -j <number of parallel processes>.
* Only generate JNI headers when Java sources have been modified, i.e. when ↵Sven Gothel2020-09-151-9/+21
| | | | | | | | | | | | | Jar file is being build. JNI header generation is satisfied by 'add_jar(.. GENERATE_NATIVE_HEADERS <target> DESTINATION <dir>)', note that its GENERATE_NATIVE_HEADERS target is a dummy target, since jni/direct_bt defines target javadirect_bt. Weakness of not directly checking build dependency of javadirect_bt against generated headers exists, however, it is unrealistic to assume that the transient generated JNI header will be edited manually within the process. Therefor we can use the dummy target javadirect_bt_javah and JNI header generation will only occur when java sources have been modified, i.e. the jar file being actually build.
* C++ noexcept: DBTManager, DBTAdapter and DBTDevice (concluding for now)Sven Gothel2020-09-156-115/+115
| | | | | | | | | | | | | | | | | | RELEASE Builds w/ -O3: dist-amd64/lib/libdirect_bt.so.2.1.20 pre-opt: 2,131,720 post-opt: 74,424 bytes reduced: 3.5% 2,057,296 commit (this commit) Besides footprint and natural performance benefits, mostly quality regarding conscious managing of exception handling benefitted this last 'noexcept' changeset. Notable here *Octets and ATTPDU types range checking has been moved into the ctor to allow member access w/o range checks and hence avoiding potential exceptions.
* C++ noexcept: JavaUplink, DBTObject, JavaGlobalObjSven Gothel2020-09-153-26/+26
|
* C++ noexcept: JNIMem* (convert exception in dtor to abort)Sven Gothel2020-09-152-17/+19
|
* dbt_debug: Use namespace for macro resolution in case macro being used ↵Sven Gothel2020-09-151-2/+2
| | | | ex-namespace w/o 'using'
* C++ noexcept: GATT* Data TypesSven Gothel2020-09-158-99/+100
|
* C++ noexcept: DBTManagerSven Gothel2020-09-142-91/+100
|
* C++ noexcept: GATTHandlerSven Gothel2020-09-142-29/+29
| | | | We had to keep quite many methods due to 'exception bail out' usage on broken connection.
* C++ noexcept: HCITypes and MgmtTypesSven Gothel2020-09-142-21/+21
|
* C++ noexcept: ATTPDUTypes string methods; DBTEnv; HCIComm and HCIHandlerSven Gothel2020-09-147-132/+132
|
* C++ noexcept: Remaining BasicTypes getCurrentMilliseconds(), ↵Sven Gothel2020-09-142-16/+21
| | | | uintXHexString(..) using ERR_PRINT and abort for internal error
* C++ noexcept: uuid_t and its implementations; Make uuid_t::TypeSize and ↵Sven Gothel2020-09-148-77/+86
| | | | | | 'enum class' type In case of an internal error, simply ERR_PRINT and abort, usually the toString() implementations.
* C++ noexcept: Ringbuffer and its LFRingbuffer implementationSven Gothel2020-09-142-57/+70
|
* scripts/build.sh: Default to RELEASESven Gothel2020-09-141-2/+2
|
* C++ noexcept: Adjust all types and functions in DBTTypesSven Gothel2020-09-143-45/+45
|
* C++ noexcept: MgmtTypes: MgmtEvent ctor gets exp_param_size to validate data ↵Sven Gothel2020-09-143-192/+210
| | | | | | | | range, dropping checks on data usage... Also - Fix MgmtEvtNewConnectionParam's offset for getDataOffset() and getDataSize(): 14 -> 16 - HCIHandler: Use new IndexOutOfBoundsException ctor w/o bounds
* C++ noexcept: HCITypes: HCIEvent ctor gets exp_param_size to validate data ↵Sven Gothel2020-09-142-26/+26
| | | | range, dropping checks on data usage.
* C++ noexcept: FunctionDef.hppSven Gothel2020-09-141-53/+53
|
* C++ noexcept: Add missing 'AttPDUMsg::getSpecialized(..)'Sven Gothel2020-09-142-2/+2
|
* C++ IndexOutOfBoundsException: Add variant for just index + lengthSven Gothel2020-09-143-8/+11
|
* C++: Second round propagating noexcept and using OctetTypes nocheck '_nc'Sven Gothel2020-09-147-188/+191
| | | | | | | | | | | | | RELEASE Builds w/ -O3: pre-opt: 2,131,720 dist-amd64/lib/libdirect_bt.so.2.1.20 noexcept round-1: (added OctetTypes _nc methods, hence offsetting reduction) 2,132,112 dist-amd64/lib/libdirect_bt.so.2.1.20 noexcept round-2: (reductions only) ~20k less 2,111,632 dist-amd64/lib/libdirect_bt.so.2.1.20
* CMAKE_CXX_FLAGS_RELEASE: Add -Wextra and -O3Sven Gothel2020-09-141-1/+1
|
* C++: First round propagating noexcept: Adding nocheck '_nc' variants in ↵Sven Gothel2020-09-148-261/+350
| | | | OctetTypes and use them if allowed.
* Use [[fallthrough]] instead of commentSven Gothel2020-09-123-6/+6
|
* CMake Build: Use C++17 (C++20 not yet supported on all target platforms, ↵Sven Gothel2020-09-125-12/+25
| | | | | | | | | i.e. Debian 10 Buster with GCC 8.3) GCC 10.1 mostly covers C++20 and is default on Debian 11 Bullseye, we will move there when established. For now let's use C++17 at least, especially since GCC C++ ABI fixes a few code generation issues and we intend to further simplify our C++ codebase.
* Eclipse Settings: Use C++17 (C++20 not yet supported on all target ↵Sven Gothel2020-09-122-4/+28
| | | | platforms, i.e. Debian 10 Buster with GCC 8.3)
* README: Replace local doc refs w/ ICT source (oops)Sven Gothel2020-09-031-2/+2
|
* README: Add reference to examples as a potential starting point for new userSven Gothel2020-09-031-2/+10
|
* Fixing Example crossreference and Menu itemSven Gothel2020-09-0310-23/+68
| | | | The \example tag referring to the example code file must be added to the actual API (header) files.
* Doxygen: Adding source browser (w/o body comments in API doc), had to ↵Sven Gothel2020-09-032-14/+27
| | | | | | include examples to INPUT (TBD) Failed to get the EXAMPLES section produces still, hence added examples to INPUT.
* README: More detailed Direct-BT description (event driven, build ↵Sven Gothel2020-09-0311-29/+86
| | | | | | depenencies, build, ..); Add \example tag in examples. For unknown reason, examples are not visible in result.
* DBTAdapter: Utilize POWERED in AdapterSettings to determine if powered and ↵Sven Gothel2020-09-033-12/+56
| | | | | | (can be) enabled; Act upon power-off: Close all connections etc. ScannerTinyB10 also reacts on power-on, i.e. start discovery.
* Complete mapping of BTMode (C++, Java) and have Adapter recognize actual ↵Sven Gothel2020-09-0314-38/+250
| | | | | | BTMode from AdapterInfo's AdapterSettings Java property is 'org.tinyb.btmode' (not yet mapped to C++)
* Doxygen Doc: Enable full featured UML SVG graphs, incl CALL and CALLERSven Gothel2020-09-012-13/+13
|
* README: Use hardlinks of generated documentation to Zafena ICT serverSven Gothel2020-09-011-4/+8
|
* Update README.md, adding more details to Direct-BT (BREDR, provider, build)Sven Gothel2020-09-012-29/+63
|
* DBTEnv/direct_bt.debug: Aligning DBTManager alias to 'mgmt': ↵Sven Gothel2020-08-286-17/+8
| | | | 'direct_bt.debug.manager.event' -> 'direct_bt.debug.mgmt.event'
* DBTDevice::disconnectGATT: Use shared copy of GATTHandler to isse ↵Sven Gothel2020-08-281-4/+9
| | | | | | GATTHandler::disconnect() w/o locking, only then lock and null shared refs This avoids potential locking and increases responsiveness
* GATTHandler::disconnect: Have l2cap.disconnect() always perform ASAP w/o ↵Sven Gothel2020-08-281-5/+6
| | | | | | locking, pulling l2cap from read/write operations This avoids potential locking and increases responsiveness
* DBTDevice::pingGATT(): Disconnect and return false if: GATT not connected or ↵Sven Gothel2020-08-283-14/+14
| | | | | | | | | no GATTServices available This required getGATTServices() (C++) or getServices() (Java) to be completed, hence added remark in API doc. Reasoning is that pingGATT shall not initiated resource creation, but assumes all set set up well. If failing, it shall cause a disconnected.
* Inherit all *Env classes from DBTEnvironment, having them grouped for ↵Sven Gothel2020-08-284-19/+128
| | | | documentation. Also document the actual environment variable name for each entry.
* DBTEnv: Generalize 'exploding properties' and add optional '=value' support. ↵Sven Gothel2020-08-289-50/+126
| | | | | | | | Use exploding properties for DBTManager, HCIHandler and GATTHandler timeout+ settings Also support these via ScannerTinyB10.java, so a user may call: sh ../scripts/run-java-scanner10.sh -debug -dbt_debug hci.event=false,gatt.event=true -dbt_gatt cmd.read.timeout=10000,cmd.write.timeout=20000,cmd.init.timeout=9999,ringsize=512
* DBTManager, HCIHandler, GATTHandler: Move local environment debug flags to ↵Sven Gothel2020-08-286-53/+63
| | | | | | their respective singleton holder for efficacy This avoids retrieving the property more than once, thanks to the new singleton environment holder