feat: add serialMonitorPorts interface header#17
Closed
Katze719 wants to merge 104 commits into
Closed
Conversation
…settings, and core library headers
…ect description, add requirements, and include quick start guide for usage with CPM.cmake and find_package.
…definition for header-only usage
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
…irectory and adjust include directories for cpp_core library
…include paths for version header
…n CPM.cmake integration
…ence, and update README for clarity on library usage
…eaders - Replaced individual sequential header inclusions in `serial_sequential.h` with a single inclusion of `sequential.h` for improved organization. - Introduced a new `sequential.h` header that consolidates all sequential interface headers, enhancing maintainability and accessibility. These changes streamline the header management in the serial interface, aligning with ongoing refactoring efforts.
Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
… `cpp_core.h` - Deleted the `serial_sequential.h` header to streamline the codebase and eliminate unused functionality. - Updated `cpp_core.h` to include the new `sequential.h` header, enhancing organization and maintainability of the serial interface. These changes align with ongoing refactoring efforts to improve header management and code clarity.
…cution Add sequential execution support for serial interface functions
* Remove sequential interface headers and related functionality - Deleted multiple sequential interface headers to streamline the codebase and eliminate unused functionality. - Updated `cpp_core.h` to remove references to the deleted headers, enhancing organization and maintainability. These changes are part of ongoing refactoring efforts to improve header management and code clarity. * Add CMake presets and toolchain files for GCC, Clang, and MSVC - Introduced `CMakePresets.json` to define build configurations for GCC, Clang, and MSVC compilers. - Added toolchain files for GCC (`gcc-toolchain.cmake`), Clang (`clang-toolchain.cmake`), and MSVC (`msvc-toolchain.cmake`) to specify compiler settings and flags. - Each toolchain file sets the C++ standard to C++23 and includes appropriate compiler flags for different build types (Debug and Release). These additions enhance the build system's flexibility and support for multiple compilers, facilitating easier project setup and configuration. * Update CMake configuration and add module support - Increased minimum CMake version requirement to 3.30. - Enabled export of compile commands and added support for C++23 modules in CMake configuration. - Introduced a new static library `hello_module` with a simple module implementation and a corresponding test executable. - Updated `.gitignore` to include `compile_commands.json` for better build management. These changes enhance the build system's capabilities and introduce modular programming support. * Remove unnecessary processor setting from toolchain files - Deleted the line setting CMAKE_SYSTEM_PROCESSOR in the GCC, Clang, and MSVC toolchain files to simplify configuration. - This change streamlines the toolchain setup without affecting the build process. These modifications enhance the clarity and maintainability of the CMake configuration. * Refactor CMake configuration to automate versioning and enhance toolchain files - Introduced a new script `get_version_from_git.cmake` to automatically determine versioning from Git tags, replacing manual version settings. - Updated `CMakeLists.txt` to utilize the new versioning system and removed redundant version definitions. - Simplified toolchain files for GCC, Clang, and MSVC by removing unnecessary settings and ensuring consistent C++ standard enforcement. - Updated `cpp_core_config.cmake.in` to set version variables for parent projects. These changes improve the maintainability and clarity of the CMake configuration while ensuring accurate versioning based on Git history. * Revise README.md for clarity and detail on library features - Updated the description to reflect the library's purpose as a header-only API definition for cross-platform serial communication. - Enhanced the features section to highlight key functionalities, including C++23 compatibility and centralized version information. - Improved instructions for obtaining platform-specific bindings and clarified versioning details. - Removed the outdated overview documentation file to streamline the repository. These changes aim to provide clearer guidance and improve the overall presentation of the library's capabilities. * Add serial port enumeration functionality - Introduced a new header file `serial_list_ports.h` to provide a function for enumerating available serial ports on the system. - Updated `serial.h` to include the new `serial_list_ports.h` header, enhancing the library's capabilities for serial communication. These changes expand the API to facilitate easier access to serial port information. * Update cmake/get_version_from_git.cmake Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CMakeLists.txt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com> * fix: format --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Mqx <62719703+Mqxx@users.noreply.github.com>
- Replaced the manual versioning system with automated versioning using the `cmake-git-versioning` module, enhancing maintainability. - Updated `CMakeLists.txt` to utilize the new versioning approach and removed the obsolete `get_version_from_git.cmake` script. - Changed the version header from `version.h` to `version.hpp` to align with C++ naming conventions. - Added `CPM.cmake` for improved package management and dependency handling. These changes streamline the build process and improve version management based on Git tags.
- Changed header file references from `version.h` to `version.hpp` in `cpp_core.h`, `serial.h`, and `get_version.h` to maintain consistency with C++ naming conventions. - Added a new `Version` struct in `get_version.h` to encapsulate version information, improving clarity and usability when accessing version details. These modifications enhance code organization and align with recent refactoring efforts.
- Added new fields to the Version struct, including commit hash (short and full), commit date, branch, and version string, to provide comprehensive versioning information. - This update improves the usability of version details within the codebase, aligning with recent enhancements in version management.
Refactor CMake configuration and versioning system
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…r-debugging Enhance Version struct in get_version.h
…ersion and refine compile commands condition
- Changed the output directory for the generated git version from `${CMAKE_SOURCE_DIR}` to `${CMAKE_CURRENT_SOURCE_DIR}` to ensure proper path resolution.
- Updated the condition for exporting compile commands to check if the project is top-level, enhancing the build configuration logic.
Update CMakeLists.txt to correct output directory for generated git v…
- Updated .clang-format settings to align after open brackets and enable alignment for trailing comments and consecutive declarations. - Simplified function signatures in multiple header files by removing unnecessary line breaks, enhancing code readability. - Adjusted the formatting of enum values in status_codes.h for consistency. These changes aim to improve code clarity and maintainability across the codebase.
Refactor code formatting and improve readability
Update cmake-git-versioning to version 1.0.1 in CMakeLists.txt
Fix export macro name for Windows bindings in module_api.h
…meter is a UTF-8 encoded null-terminated string on all platforms.
Clarify documentation for serial_open.h to specify that the port para…
* Enhance error handling and serial configuration support - Added new headers for error handling, result management, and scope guard utilities. - Introduced strong types for serial parameters and compile-time validated serial configuration. - Updated CMakeLists.txt to use cmake-git-versioning version 1.1.0. - Configured clangd for C++23 support and improved clang-tidy checks for better code quality. * Refine documentation and formatting across multiple files - Updated comments in Doxyfile, cpp_core.h, and various serial interface headers to standardize punctuation and formatting. - Adjusted README.md to use consistent comparison operators for clarity. - These changes enhance readability and maintain consistency in documentation style. * Refactor ScopeGuard constructor for improved readability * Remove deprecated helpers.hpp file, consolidating utility headers for cpp-core implementors. * Update comments for consistency and clarity across multiple headers - Changed documentation comments to use consistent formatting and punctuation in error_handling.hpp, result.hpp, scope_guard.hpp, serial_config.hpp, status_codes.hpp, strong_types.hpp, and unique_resource.hpp. - These updates enhance readability and maintain a uniform style throughout the codebase. * Add validation utilities for handle and parameter checks - Introduced new header file validation.hpp containing functions to validate handles, open parameters, and buffers. - Added clamping function for timeout values to ensure non-negative timeouts. - These utilities enhance error handling and improve the robustness of the cpp_core library. * Remove unnecessary blank lines in result.hpp, status_codes.hpp, and validation.hpp for improved code clarity and consistency. * Enhance documentation comments across multiple headers - Updated comments in error_handling.hpp, result.hpp, scope_guard.hpp, serial_config.hpp, status_codes.hpp, unique_resource.hpp, and validation.hpp to use consistent formatting and punctuation. - These changes improve readability and maintain a uniform style throughout the codebase. * Create block_pr_check_labels.yml * Update block_pr_check_labels.yml --------- Co-authored-by: Mqxx <62719703+Mqxx@users.noreply.github.com>
Adds hot-plug monitoring API for serial port connect/disconnect events. Uses a background thread with a callback-based notification model.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds hot-plug monitoring API for serial port connect/disconnect events. Uses a background thread with a callback-based notification model.