diff --git a/.appveyor.yml b/.appveyor.yml index f20860c56..907d0184b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -18,6 +18,8 @@ configuration: - Release environment: + COMMS_BRANCH: master + COMMSDSL_BRANCH: master matrix: - CPP_STD: 11 - CPP_STD: 14 @@ -36,14 +38,18 @@ matrix: install: - call script\appveyor_install.bat - - set PATH=%PATH%;%QTDIR%\bin - -build_script: - set BUILD_DIR=%APPVEYOR_BUILD_FOLDER%\build.%PLATFORM%.%CONFIGURATION%.%TOOLCHAIN% - if exist %BUILD_DIR% rmdir /S /Q %BUILD_DIR% - - mkdir %BUILD_DIR% + - set COMMS_TAG=%COMMS_BRANCH% + - set COMMSDSL_TAG=%COMMSDSL_BRANCH% + - set COMMON_INSTALL_DIR=%BUILD_DIR%\install + - set COMMON_BUILD_TYPE=%CONFIGURATION% + - set COMMON_CXX_STANDARD=%CPP_STD% + - call script\prepare_externals.bat + +build_script: - cd %BUILD_DIR% - - cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles" -DBOOST_ROOT="%BOOST_DIR%" -DBoost_USE_STATIC_LIBS=ON -DCMAKE_CXX_STANDARD=%CPP_STD% -DCMAKE_INSTALL_PREFIX=install -DFORCE_EXTRA_BOOST_LIBS=ON + - cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles" -DBOOST_ROOT="%BOOST_DIR%" -DBoost_USE_STATIC_LIBS=ON -DCMAKE_CXX_STANDARD=%CPP_STD% -DCMAKE_INSTALL_PREFIX=install -DFORCE_EXTRA_BOOST_LIBS=ON -DCMAKE_PREFIX_PATH="%COMMON_INSTALL_DIR%" - nmake install diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 47f6fbfd9..550aa9d04 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -2,6 +2,10 @@ name: Github Actions Build on: [push] +env: + COMMS_BRANCH: master + COMMSDSL_BRANCH: master + jobs: build_gcc_ubuntu_18_04: runs-on: ubuntu-18.04 @@ -24,10 +28,29 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + CC_COMMSDSL: gcc-8 + CXX_COMMSDSL: g++-8 + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCOMMSDSL_C_COMPILER=gcc-8 -DCOMMSDSL_CXX_COMPILER=g++-8 + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install env: CC: gcc-${{matrix.cc_ver}} CXX: g++-${{matrix.cc_ver}} @@ -45,11 +68,60 @@ jobs: fail-fast: false matrix: type: [Debug, Release, MinSizeRel] - cc_ver: [8, 9, 10, 11] + cc_ver: [8] + cpp: [11, 14, 17] + + steps: + - uses: actions/checkout@v2 + + - name: Prepare Install + run: sudo apt-get update --fix-missing + + - name: Install Packages + run: sudo apt install libqt5gui5 libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install + env: + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config ${{matrix.type}} --target install + env: + VERBOSE: 1 + + build_gcc_ubuntu_22_04: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + type: [Debug, Release, MinSizeRel] + cc_ver: [9, 10, 11, 12] cpp: [11, 14, 17, 20] - exclude: - - cc_ver: 8 - cpp: 20 steps: - uses: actions/checkout@v2 @@ -63,10 +135,26 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: gcc-${{matrix.cc_ver}} + CXX: g++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_INSTALL_PREFIX=install + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install env: CC: gcc-${{matrix.cc_ver}} CXX: g++-${{matrix.cc_ver}} @@ -78,6 +166,7 @@ jobs: env: VERBOSE: 1 + build_clang_ubuntu_18_04: runs-on: ubuntu-18.04 strategy: @@ -102,10 +191,30 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + CC_COMMSDSL: clang-6.0 + CXX_COMMSDSL: clang++-6.0 + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCOMMSDSL_C_COMPILER=clang-6.0 -DCOMMSDSL_CXX_COMPILER=clang++-6.0 + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold \ + -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install + env: CC: clang-${{matrix.cc_ver}} CXX: clang++-${{matrix.cc_ver}} @@ -123,7 +232,7 @@ jobs: fail-fast: false matrix: type: [Debug, Release, MinSizeRel] - cc_ver: [7, 8, 9, 10, 11, 12] + cc_ver: [7, 8, 9, 10, 11] cpp: [11, 14, 17, 20] exclude: - cc_ver: 7 @@ -143,10 +252,26 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DCMAKE_INSTALL_PREFIX=install + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install env: CC: clang-${{matrix.cc_ver}} CXX: clang++-${{matrix.cc_ver}} @@ -157,3 +282,55 @@ jobs: run: cmake --build . --config ${{matrix.type}} --target install env: VERBOSE: 1 + + build_clang_ubuntu_22_04: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + type: [Debug, Release, MinSizeRel] + cc_ver: [12, 13, 14] + cpp: [11, 14, 17, 20] + + steps: + - uses: actions/checkout@v2 + + - name: Prepare Install + run: sudo apt-get update --fix-missing + + - name: Install Packages + run: sudo apt install libqt5gui5 libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}} + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Prepare externals + shell: bash + run: $GITHUB_WORKSPACE/script/prepare_externals.sh + env: + BUILD_DIR: ${{runner.workspace}}/build + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + EXTERNALS_DIR: ${{runner.workspace}}/externals + COMMON_INSTALL_DIR: ${{runner.workspace}}/build/install + COMMON_BUILD_TYPE: ${{matrix.type}} + COMMON_CXX_STANDARD: ${{matrix.cpp}} + COMMS_TAG: ${{env.COMMS_BRANCH}} + COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}} + + - name: Configure CMake + shell: bash + working-directory: ${{runner.workspace}}/build + run: | + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \ + -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install + env: + CC: clang-${{matrix.cc_ver}} + CXX: clang++-${{matrix.cc_ver}} + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config ${{matrix.type}} --target install + env: + VERBOSE: 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index ad3d9bef6..50b0ee71c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,31 +6,13 @@ option (UNIX_USE_CCACHE "Treat warnings as error" ON) option (FORCE_EXTRA_BOOST_LIBS "Force linking to extra boost libraries" OFF) option (USE_SANITIZERS "Compile with sanitizers." OFF) -# Additional variables to be used if needed -# --------------------------- -# COMMSDSL2COMMS - Path to "commsdsl2comms" binary if such is already built. -# CC_COMMS_INSTALL_DIR - Path to CommsChampion external install directory (if such already built). -# COMMSDSL_TAG - Tag / branch of commsdsl project (if built internally) -# CC_COMMS_TAG - Tag / branch of COMMS library project (if built internally) -# COMMSDSL_C_COMPILER - "C" Compiler for commsdsl project -# COMMSDSL_CXX_COMPILER - "C++" Compiler for commsdsl project - -if ("${COMMSDSL_TAG}" STREQUAL "") - set (COMMSDSL_TAG "v5.0") -endif () - -if ("${CC_COMMS_TAG}" STREQUAL "") - set (CC_COMMS_TAG "v5.0") -endif () - if (NOT CMAKE_CXX_STANDARD) set (CMAKE_CXX_STANDARD 11) endif () include(GNUInstallDirs) -find_package(Boost REQUIRED - COMPONENTS system) +find_package(Boost REQUIRED COMPONENTS system) if (FORCE_EXTRA_BOOST_LIBS) set (EXTRA_BOOST_TARGETS Boost::date_time Boost::regex) @@ -38,42 +20,15 @@ if (FORCE_EXTRA_BOOST_LIBS) endif () find_package(Threads REQUIRED) +find_package(LibComms REQUIRED) +find_program(COMMSDSL2COMMS commsdsl2comms PATH_SUFFIXES bin REQUIRED) set (COMMON_SERVER_LIB "common_server") set (COMMON_CLIENT_LIB "common_client") -set (EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/externals") - ####################################################### -if ("${CC_COMMS_INSTALL_DIR}" STREQUAL "") - execute_process ( - COMMAND ${CMAKE_COMMAND} -E make_directory "${EXTERNALS_DIR}" - ) - - set (cc_src_dir "${EXTERNALS_DIR}/comms") - set (cc_bin_dir "${PROJECT_BINARY_DIR}/comms") - set (CC_COMMS_INSTALL_DIR "${cc_bin_dir}/install") - - include (${PROJECT_SOURCE_DIR}/cmake/CC_Prefetch.cmake) - cc_prefetch(SRC_DIR "${cc_src_dir}" TAG "${CC_COMMS_TAG}") - include(${cc_src_dir}/cmake/CC_CommsExternal.cmake) - - cc_comms_build_during_config( - SRC_DIR ${cc_src_dir} - BUILD_DIR ${cc_bin_dir} - TAG ${CC_COMMS_TAG} - CMAKE_ARGS - -DCC_BUILD_UNIT_TESTS=OFF - -DCMAKE_INSTALL_PREFIX=${CC_COMMS_INSTALL_DIR} - ) - -endif () - -list (APPEND CMAKE_PREFIX_PATH "${CC_COMMS_INSTALL_DIR}") -find_package(LibComms NO_MODULE REQUIRED) - -set (cc_compile_file ${CC_COMMS_INSTALL_DIR}/lib/LibComms/cmake/CC_Compile.cmake) +set (cc_compile_file ${LibComms_DIR}/CC_Compile.cmake) if (EXISTS ${cc_compile_file}) set (warn_as_err_opt) if (WARN_AS_ERR) @@ -100,46 +55,6 @@ if (USE_SANITIZERS AND (NOT ${CMAKE_VERSION} VERSION_LESS "3.13") AND -fsanitize=undefined) endif () -####################################################### -set (COMMSDSL_TGT "commsdsl_tgt") -if ("${COMMSDSL2COMMS}" STREQUAL "") - execute_process ( - COMMAND ${CMAKE_COMMAND} -E make_directory "${EXTERNALS_DIR}" - ) - include(ExternalProject) - set (commsdsl2comms_tag "${COMMSDSL_TAG}") - set (commsdsl2comms_main_dir "${PROJECT_BINARY_DIR}/commsdsl") - set (commsdsl2comms_src_dir "${EXTERNALS_DIR}/commsdsl") - set (commsdsl2comms_bin_dir "${commsdsl2comms_main_dir}/build") - set (commsdsl2comms_install_dir "${commsdsl2comms_main_dir}/install") - - if ("${COMMSDSL_C_COMPILER}" STREQUAL "") - set (COMMSDSL_C_COMPILER ${CMAKE_C_COMPILER}) - endif () - - if ("${COMMSDSL_CXX_COMPILER}" STREQUAL "") - set (COMMSDSL_CXX_COMPILER ${CMAKE_CXX_COMPILER}) - endif () - - ExternalProject_Add( - "${COMMSDSL_TGT}" - PREFIX "${commsdsl2comms_bin_dir}" - STAMP_DIR "${commsdsl2comms_bin_dir}" - GIT_REPOSITORY "https://github.com/commschamp/commsdsl.git" - GIT_TAG "${commsdsl2comms_tag}" - SOURCE_DIR "${commsdsl2comms_src_dir}" - CMAKE_ARGS - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${commsdsl2comms_install_dir} - -DCOMMSDSL_NO_TESTS=ON -DCMAKE_C_COMPILER=${COMMSDSL_C_COMPILER} - -DCMAKE_CXX_COMPILER=${COMMSDSL_CXX_COMPILER} - -DCOMMSDSL_INSTALL_LIBRARY=OFF - -DCOMMSDSL_EXTERNALS_DIR=${EXTERNALS_DIR} - BINARY_DIR "${commsdsl2comms_bin_dir}" - ) - - set (COMMSDSL2COMMS "${commsdsl2comms_install_dir}/bin/commsdsl2comms") -endif () - ####################################################### function (dsl_parse type name) @@ -165,11 +80,6 @@ function (dsl_parse type name) set (multi_schema_param "-s") endif () - set (commsdsl_tgt_dep) - if (TARGET ${COMMSDSL_TGT}) - set (commsdsl_tgt_dep ${COMMSDSL_TGT}) - endif () - set (output_dir "${CMAKE_CURRENT_BINARY_DIR}/${name}/output") string(REPLACE ";" "\n" schema_files "${DSL_PARSE_SCHEMAS}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${name}/schema_files.txt "${schema_files}") @@ -180,7 +90,7 @@ function (dsl_parse type name) add_custom_command( OUTPUT ${output_dir} - DEPENDS ${DSL_PARSE_SCHEMAS} ${src_files} ${commsdsl_tgt_dep} ${name}_prot_rm + DEPENDS ${DSL_PARSE_SCHEMAS} ${src_files} ${name}_prot_rm COMMAND ${CMAKE_COMMAND} -E remove_directory ${output_dir} COMMAND ${COMMSDSL2COMMS} --warn-as-err ${multi_schema_param} ${code_input_param} "--comms-tag=${CC_COMMS_TAG}" -o ${output_dir} -i ${CMAKE_CURRENT_BINARY_DIR}/${name}/schema_files.txt @@ -190,7 +100,7 @@ function (dsl_parse type name) COMMAND ${CMAKE_COMMAND} -DGENERATED="${output_dir}/include" -DOUTPUT="${PROJECT_SOURCE_DIR}/${type}/${name}/include" -P "${PROJECT_SOURCE_DIR}/CopyGenerated.cmake" - DEPENDS ${name}_prot_rm ${output_dir} "${PROJECT_SOURCE_DIR}/CopyGenerated.cmake" ${DSL_PARSE_SCHEMAS} ${src_files} ${commsdsl_tgt_dep} + DEPENDS ${name}_prot_rm ${output_dir} "${PROJECT_SOURCE_DIR}/CopyGenerated.cmake" ${DSL_PARSE_SCHEMAS} ${src_files} ) endfunction () diff --git a/README.md b/README.md index 3920a7458..77cfa26a8 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,18 @@ This project uses CMake as its build system. Please open main mentioned available parameters, which can be used in addition to standard ones provided by CMake itself, to modify the default build. +This project also has external dependencies, it requires an access to +the [COMMS Library](https://github.com/commschamp/commsdsl) and +code generators from [commsdsl](https://github.com/commschamp/commsdsl) projects. +These dependencies are expected to be built independenty and access to them provided +via standard **CMAKE_PREFIX_PATH** and/or **CMAKE_PROGRAM_PATH** (for the binaries of +the code generators). There are also scripts ( +[script/prepare_externals.sh](script/prepare_externals.sh) for Linux and +[script/prepare_externals.bat](script/prepare_externals.bat) for Windows) +which can help in preparation of these dependencies. They are also used +in configuration of the [github actions](.github/workflows/actions_build.yml) and +[appveyor](.appveyor.yml). + **NOTE**, that [Boost](https://www.boost.org) libraries are also required. In case Boost libraries are not installed in expected default location (mostly happens on Windows systems), use variables described in @@ -125,7 +137,8 @@ linkage with static Boost libraries. ``` $> cd /source/of/this/project $> mkdir build && cd build -$> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install .. +$> cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install \ + -DCMAKE_PREFIX_PATH=/path/to/comms -DCMAKE_PROGRAM_PATH=/path/to/commsdsl $> make install ``` ### Windows Build @@ -133,9 +146,10 @@ $> make install $> cd C:\source\of\this\project $> mkdir build $> cd build -$> cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=%cd%/install \ - -DBOOST_ROOT="C:\Libraries\boost_1_65_1" -DBoost_USE_STATIC_LIBS=ON .. +$> cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX=%cd%/install ^ + -DBOOST_ROOT="C:\Libraries\boost_1_65_1" -DBoost_USE_STATIC_LIBS=ON ^ + -DCMAKE_PREFIX_PATH=C:\path\to\comms -DCMAKE_PROGRAM_PATH=C:\path\to\commsdsl $> nmake install ``` diff --git a/howtos/howto1/include/howto1/Interface.h b/howtos/howto1/include/howto1/Interface.h index 251e245e6..c40875fa0 100644 --- a/howtos/howto1/include/howto1/Interface.h +++ b/howtos/howto1/include/howto1/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace howto1 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile howto1/Interface.h @@ -38,11 +37,8 @@ struct InterfaceFields { return howto1::InterfaceFieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -81,10 +77,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/InterfaceCommon.h b/howtos/howto1/include/howto1/InterfaceCommon.h index dbe56109e..767753830 100644 --- a/howtos/howto1/include/howto1/InterfaceCommon.h +++ b/howtos/howto1/include/howto1/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace howto1 { - /// @brief Common types and functions for fields of /// @ref howto1::Interface interface. /// @see howto1::InterfaceFields @@ -26,10 +25,6 @@ struct InterfaceFieldsCommon { return "Flags"; } - }; - }; } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/MsgId.h b/howtos/howto1/include/howto1/MsgId.h index 5a4b04862..19f333736 100644 --- a/howtos/howto1/include/howto1/MsgId.h +++ b/howtos/howto1/include/howto1/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/Version.h b/howtos/howto1/include/howto1/Version.h index 1dbce9148..48a2cfbc9 100644 --- a/howtos/howto1/include/howto1/Version.h +++ b/howtos/howto1/include/howto1/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto1 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto1/include/howto1/dispatch/DispatchClientInputMessage.h b/howtos/howto1/include/howto1/dispatch/DispatchClientInputMessage.h index a80ca9596..1a2f6e3a2 100644 --- a/howtos/howto1/include/howto1/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto1/include/howto1/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto1::options::DefaultOptions. /// @headerfile howto1/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref howto1::options::DefaultOptions as template parameter. /// @note Defined in howto1/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto1/include/howto1/dispatch/DispatchMessage.h b/howtos/howto1/include/howto1/dispatch/DispatchMessage.h index e62159f86..1ff4fb887 100644 --- a/howtos/howto1/include/howto1/dispatch/DispatchMessage.h +++ b/howtos/howto1/include/howto1/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto1::options::DefaultOptions. /// @headerfile howto1/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref howto1::options::DefaultOptions as template parameter. /// @note Defined in howto1/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto1/include/howto1/dispatch/DispatchServerInputMessage.h b/howtos/howto1/include/howto1/dispatch/DispatchServerInputMessage.h index 34de03112..d616c48c4 100644 --- a/howtos/howto1/include/howto1/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto1/include/howto1/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto1::options::DefaultOptions. /// @headerfile howto1/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref howto1::options::DefaultOptions as template parameter. /// @note Defined in howto1/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto1/include/howto1/field/FieldBase.h b/howtos/howto1/include/howto1/field/FieldBase.h index 15026bf0d..3e3136266 100644 --- a/howtos/howto1/include/howto1/field/FieldBase.h +++ b/howtos/howto1/include/howto1/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/field/InterfaceFlags.h b/howtos/howto1/include/howto1/field/InterfaceFlags.h index b279c1f8f..0c2f28b97 100644 --- a/howtos/howto1/include/howto1/field/InterfaceFlags.h +++ b/howtos/howto1/include/howto1/field/InterfaceFlags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "InterfaceFlags" field. @@ -17,7 +17,6 @@ namespace howto1 namespace field { - /// @brief Definition of "InterfaceFlags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -50,7 +49,7 @@ class InterfaceFlags : public B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref howto1::field::InterfaceFlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -59,18 +58,14 @@ class InterfaceFlags : public howto1::field::InterfaceFlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return howto1::field::InterfaceFlagsCommon::name(); } - - }; - } // namespace field } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h b/howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h index 1f50af09b..b7e3db8b7 100644 --- a/howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h +++ b/howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto1 namespace field { - /// @brief Common types and functions for /// @ref howto1::field::InterfaceFlags field. struct InterfaceFlagsCommon @@ -24,7 +23,7 @@ struct InterfaceFlagsCommon { return "InterfaceFlags"; } - + /// @brief Retrieve name of the bit of /// @ref howto1::field::InterfaceFlags field. static const char* bitName(std::size_t idx) @@ -33,19 +32,16 @@ struct InterfaceFlagsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/field/MsgId.h b/howtos/howto1/include/howto1/field/MsgId.h index 1a15555da..df626f07d 100644 --- a/howtos/howto1/include/howto1/field/MsgId.h +++ b/howtos/howto1/include/howto1/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto1 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto1::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto1::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto1::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto1::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto1::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto1::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto1::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto1::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto1::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto1::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto1::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/field/MsgIdCommon.h b/howtos/howto1/include/howto1/field/MsgIdCommon.h index a4ce26f12..420480143 100644 --- a/howtos/howto1/include/howto1/field/MsgIdCommon.h +++ b/howtos/howto1/include/howto1/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto1/MsgId.h" @@ -19,7 +17,6 @@ namespace howto1 namespace field { - /// @brief Common types and functions for /// @ref howto1::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto1::field::MsgId field. using ValueType = howto1::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto1::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto1::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto1 - diff --git a/howtos/howto1/include/howto1/frame/Frame.h b/howtos/howto1/include/howto1/frame/Frame.h index 047c8153b..08e7a8272 100644 --- a/howtos/howto1/include/howto1/frame/Frame.h +++ b/howtos/howto1/include/howto1/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -27,7 +27,6 @@ namespace howto1 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -40,7 +39,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Flags". using Flags = comms::protocol::TransportValueLayer< @@ -52,7 +51,7 @@ struct FrameLayers Data, comms::option::def::PseudoValue >; - + /// @brief Definition of layer "Id". template using Id = @@ -65,7 +64,7 @@ struct FrameLayers Flags, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref SizeWithFlags layer. struct SizeWithFlagsMembers { @@ -90,24 +89,20 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::SizeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::SizeCommon::name(); } - - }; - - + /// @brief Definition of "Flags" field. class Flags : public howto1::field::InterfaceFlags< @@ -126,11 +121,8 @@ struct FrameLayers { return howto1::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -138,7 +130,7 @@ struct FrameLayers Flags >; }; - + /// @brief Definition of "Field" field. class Field : public comms::field::Bitfield< @@ -166,19 +158,15 @@ struct FrameLayers size, flags ); - + /// @brief Name of the field. static const char* name() { return howto1::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "SizeWithFlags". template using SizeWithFlags = @@ -187,11 +175,10 @@ struct FrameLayers Id, typename TOpt::frame::FrameLayers::SizeWithFlags >; - + /// @brief Final protocol stack definition. template using Stack = SizeWithFlags; - }; /// @brief Definition of "Frame" frame class. @@ -230,5 +217,3 @@ class Frame : public } // namespace frame } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/frame/FrameCommon.h b/howtos/howto1/include/howto1/frame/FrameCommon.h index f90c234ef..1d93613db 100644 --- a/howtos/howto1/include/howto1/frame/FrameCommon.h +++ b/howtos/howto1/include/howto1/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace howto1 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto1::frame::Frame frame. /// @see howto1::frame::FrameLayers @@ -36,22 +35,20 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto1::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Size field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto1::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Size field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto1::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Flags field. struct FlagsCommon : public howto1::field::InterfaceFlagsCommon @@ -61,11 +58,9 @@ struct FrameLayersCommon { return "Flags"; } - }; - }; - + /// @brief Common types and functions for /// @ref howto1::frame::FrameLayers::SizeWithFlagsMembers::Field field. struct FieldCommon @@ -75,15 +70,10 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - }; } // namespace frame } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/input/AllMessages.h b/howtos/howto1/include/howto1/input/AllMessages.h index 4f8c9bdbf..4d9b25246 100644 --- a/howtos/howto1/include/howto1/input/AllMessages.h +++ b/howtos/howto1/include/howto1/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto1/include/howto1/input/ClientInputMessages.h b/howtos/howto1/include/howto1/input/ClientInputMessages.h index bc0ffc134..2e87f62b9 100644 --- a/howtos/howto1/include/howto1/input/ClientInputMessages.h +++ b/howtos/howto1/include/howto1/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto1/include/howto1/input/ServerInputMessages.h b/howtos/howto1/include/howto1/input/ServerInputMessages.h index fba710359..41e0f6cc5 100644 --- a/howtos/howto1/include/howto1/input/ServerInputMessages.h +++ b/howtos/howto1/include/howto1/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto1/include/howto1/message/Msg1.h b/howtos/howto1/include/howto1/message/Msg1.h index f3d6e999c..02a57f4d2 100644 --- a/howtos/howto1/include/howto1/message/Msg1.h +++ b/howtos/howto1/include/howto1/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "howto1/message/Msg1Common.h" #include "howto1/options/DefaultOptions.h" - namespace howto1 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,24 +44,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -79,24 +73,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -116,26 +106,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. /// @details /// The field exists only when B0 in interface flags is set. @@ -156,11 +141,8 @@ struct Msg1Fields { return howto1::message::Msg1FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -215,19 +197,19 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto1::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -235,31 +217,26 @@ class Msg1 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF3Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B0()) { expF3Mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == expF3Mode) { return updated; } - + field_f3().setMode(expF3Mode); return true; } - - }; } // namespace message } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/message/Msg1Common.h b/howtos/howto1/include/howto1/message/Msg1Common.h index 3f6d21588..beb84f1a0 100644 --- a/howtos/howto1/include/howto1/message/Msg1Common.h +++ b/howtos/howto1/include/howto1/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto1 namespace message { - /// @brief Common types and functions for fields of /// @ref howto1::message::Msg1 message. /// @see howto1::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto1::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto1::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto1::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto1::message::Msg1Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto1::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto1::message::Msg1Fields::F3 field. struct F3MembersCommon @@ -77,24 +72,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto1::message::Msg1Fields::F3Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto1::message::Msg1Fields::F3Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto1::message::Msg1Fields::F3 field. struct F3Common @@ -104,9 +96,7 @@ struct Msg1FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -118,12 +108,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto1 - - - diff --git a/howtos/howto1/include/howto1/message/Msg2.h b/howtos/howto1/include/howto1/message/Msg2.h index 0a1e44557..b463f5db6 100644 --- a/howtos/howto1/include/howto1/message/Msg2.h +++ b/howtos/howto1/include/howto1/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -17,14 +17,12 @@ #include "howto1/message/Msg2Common.h" #include "howto1/options/DefaultOptions.h" - namespace howto1 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -51,26 +49,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -93,17 +86,14 @@ struct Msg2Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -123,26 +113,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto1::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto1::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// The field exists only when B1 in interface flags is set. @@ -163,11 +148,8 @@ struct Msg2Fields { return howto1::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -218,17 +200,17 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto1::message::Msg2Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -236,31 +218,26 @@ class Msg2 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B1()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace howto1 - - diff --git a/howtos/howto1/include/howto1/message/Msg2Common.h b/howtos/howto1/include/howto1/message/Msg2Common.h index 2e7aa6d4f..7a6753101 100644 --- a/howtos/howto1/include/howto1/message/Msg2Common.h +++ b/howtos/howto1/include/howto1/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto1 namespace message { - /// @brief Common types and functions for fields of /// @ref howto1::message::Msg2 message. /// @see howto1::message::Msg2Fields @@ -31,24 +30,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto1::message::Msg2Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto1::message::Msg2Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto1::message::Msg2Fields::F1 field. struct F1Common @@ -58,9 +54,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto1::message::Msg2Fields::F2 field. struct F2MembersCommon @@ -72,24 +67,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto1::message::Msg2Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto1::message::Msg2Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto1::message::Msg2Fields::F2 field. struct F2Common @@ -99,9 +91,7 @@ struct Msg2FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -113,12 +103,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto1 - - - diff --git a/howtos/howto1/include/howto1/options/BareMetalDefaultOptions.h b/howtos/howto1/include/howto1/options/BareMetalDefaultOptions.h index 760ca09c8..a5009b0d8 100644 --- a/howtos/howto1/include/howto1/options/BareMetalDefaultOptions.h +++ b/howtos/howto1/include/howto1/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto1::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto1/include/howto1/options/ClientDefaultOptions.h b/howtos/howto1/include/howto1/options/ClientDefaultOptions.h index 54f1da723..19fa0055d 100644 --- a/howtos/howto1/include/howto1/options/ClientDefaultOptions.h +++ b/howtos/howto1/include/howto1/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto1/include/howto1/options/DataViewDefaultOptions.h b/howtos/howto1/include/howto1/options/DataViewDefaultOptions.h index 8de34ae64..a36203cbd 100644 --- a/howtos/howto1/include/howto1/options/DataViewDefaultOptions.h +++ b/howtos/howto1/include/howto1/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto1/include/howto1/options/DefaultOptions.h b/howtos/howto1/include/howto1/options/DefaultOptions.h index ef896405c..532379c4d 100644 --- a/howtos/howto1/include/howto1/options/DefaultOptions.h +++ b/howtos/howto1/include/howto1/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto1::message::Msg2Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto1::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto1::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto1::frame::FrameLayers::SizeWithFlags /// layer. using SizeWithFlags = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto1/include/howto1/options/ServerDefaultOptions.h b/howtos/howto1/include/howto1/options/ServerDefaultOptions.h index abe920851..f12a5f9c9 100644 --- a/howtos/howto1/include/howto1/options/ServerDefaultOptions.h +++ b/howtos/howto1/include/howto1/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto10/include/howto10/Interface.h b/howtos/howto10/include/howto10/Interface.h index 8144b81d1..fe2c53db3 100644 --- a/howtos/howto10/include/howto10/Interface.h +++ b/howtos/howto10/include/howto10/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace howto10 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile howto10/Interface.h @@ -27,8 +26,7 @@ struct InterfaceFields howto10::field::Flags< howto10::options::DefaultOptions >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -66,10 +64,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/InterfaceCommon.h b/howtos/howto10/include/howto10/InterfaceCommon.h index da3402609..a87396c5a 100644 --- a/howtos/howto10/include/howto10/InterfaceCommon.h +++ b/howtos/howto10/include/howto10/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace howto10 { - /// @brief Common types and functions for fields of /// @ref howto10::Interface interface. /// @see howto10::InterfaceFields @@ -20,8 +19,5 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref howto10::InterfaceFields::Flags field. using FlagsCommon = howto10::field::FlagsCommon; - }; } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/MsgId.h b/howtos/howto10/include/howto10/MsgId.h index 9d632337d..4a187fc40 100644 --- a/howtos/howto10/include/howto10/MsgId.h +++ b/howtos/howto10/include/howto10/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/Version.h b/howtos/howto10/include/howto10/Version.h index 8c08b2858..ef7f4f2f4 100644 --- a/howtos/howto10/include/howto10/Version.h +++ b/howtos/howto10/include/howto10/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto10 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto10/include/howto10/dispatch/DispatchClientInputMessage.h b/howtos/howto10/include/howto10/dispatch/DispatchClientInputMessage.h index f4cb0ca3f..06962e997 100644 --- a/howtos/howto10/include/howto10/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto10/include/howto10/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto10::options::DefaultOptions. /// @headerfile howto10/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref howto10::options::DefaultOptions as template parameter. /// @note Defined in howto10/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto10/include/howto10/dispatch/DispatchMessage.h b/howtos/howto10/include/howto10/dispatch/DispatchMessage.h index bb4edbdaf..398aee113 100644 --- a/howtos/howto10/include/howto10/dispatch/DispatchMessage.h +++ b/howtos/howto10/include/howto10/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto10::options::DefaultOptions. /// @headerfile howto10/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref howto10::options::DefaultOptions as template parameter. /// @note Defined in howto10/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto10/include/howto10/dispatch/DispatchServerInputMessage.h b/howtos/howto10/include/howto10/dispatch/DispatchServerInputMessage.h index 888253c1b..93ac606c2 100644 --- a/howtos/howto10/include/howto10/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto10/include/howto10/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto10::options::DefaultOptions. /// @headerfile howto10/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref howto10::options::DefaultOptions as template parameter. /// @note Defined in howto10/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto10/include/howto10/field/FieldBase.h b/howtos/howto10/include/howto10/field/FieldBase.h index e1f148410..82f364120 100644 --- a/howtos/howto10/include/howto10/field/FieldBase.h +++ b/howtos/howto10/include/howto10/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/field/Flags.h b/howtos/howto10/include/howto10/field/Flags.h index 3baba0d9c..d14048cd0 100644 --- a/howtos/howto10/include/howto10/field/Flags.h +++ b/howtos/howto10/include/howto10/field/Flags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Flags" field. @@ -17,7 +17,6 @@ namespace howto10 namespace field { - /// @brief Definition of "Flags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -50,7 +49,7 @@ class Flags : public B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref howto10::field::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -59,18 +58,14 @@ class Flags : public howto10::field::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return howto10::field::FlagsCommon::name(); } - - }; - } // namespace field } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/field/FlagsCommon.h b/howtos/howto10/include/howto10/field/FlagsCommon.h index ad888bec8..06b896ea2 100644 --- a/howtos/howto10/include/howto10/field/FlagsCommon.h +++ b/howtos/howto10/include/howto10/field/FlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto10 namespace field { - /// @brief Common types and functions for /// @ref howto10::field::Flags field. struct FlagsCommon @@ -24,7 +23,7 @@ struct FlagsCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref howto10::field::Flags field. static const char* bitName(std::size_t idx) @@ -33,19 +32,16 @@ struct FlagsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/field/MsgId.h b/howtos/howto10/include/howto10/field/MsgId.h index 2e30bdd09..7d341f1a0 100644 --- a/howtos/howto10/include/howto10/field/MsgId.h +++ b/howtos/howto10/include/howto10/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto10 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto10::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto10::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto10::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto10::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto10::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto10::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto10::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto10::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto10::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto10::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto10::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/field/MsgIdCommon.h b/howtos/howto10/include/howto10/field/MsgIdCommon.h index 1d2920d29..8c0022acb 100644 --- a/howtos/howto10/include/howto10/field/MsgIdCommon.h +++ b/howtos/howto10/include/howto10/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto10/MsgId.h" @@ -19,7 +17,6 @@ namespace howto10 namespace field { - /// @brief Common types and functions for /// @ref howto10::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto10::field::MsgId field. using ValueType = howto10::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto10::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto10::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto10 - diff --git a/howtos/howto10/include/howto10/frame/Frame.h b/howtos/howto10/include/howto10/frame/Frame.h index 295b877e5..09c9840f9 100644 --- a/howtos/howto10/include/howto10/frame/Frame.h +++ b/howtos/howto10/include/howto10/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -29,7 +29,6 @@ namespace howto10 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -42,7 +41,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -61,26 +60,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". using Checksum = comms::protocol::ChecksumLayer< @@ -89,7 +83,7 @@ struct FrameLayers Data, comms::option::def::ChecksumLayerVerifyBeforeRead >; - + /// @brief Definition of layer "PseudoFlags". using PseudoFlags = comms::protocol::TransportValueLayer< @@ -101,7 +95,7 @@ struct FrameLayers Checksum, comms::option::def::PseudoValue >; - + /// @brief Definition of layer "Id". template using Id = @@ -114,7 +108,7 @@ struct FrameLayers PseudoFlags, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Definition of layer "Flags". template using Flags = @@ -125,7 +119,7 @@ struct FrameLayers Id, typename TOpt::frame::FrameLayers::Flags >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -144,26 +138,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -171,7 +160,7 @@ struct FrameLayers typename SizeMembers::SizeField, Flags >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -194,26 +183,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -221,11 +205,10 @@ struct FrameLayers typename SyncMembers::SyncField, Size >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -270,5 +253,3 @@ class Frame : public } // namespace frame } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/frame/FrameCommon.h b/howtos/howto10/include/howto10/frame/FrameCommon.h index f71d2fb8b..a9e6ca73e 100644 --- a/howtos/howto10/include/howto10/frame/FrameCommon.h +++ b/howtos/howto10/include/howto10/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto10 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto10::frame::Frame frame. /// @see howto10::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto10::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto10::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto10::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -60,24 +56,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto10::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto10::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto10::frame::FrameLayers::ChecksumMembers struct. struct ChecksumMembersCommon @@ -89,28 +82,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto10::frame::FrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto10::frame::FrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/input/AllMessages.h b/howtos/howto10/include/howto10/input/AllMessages.h index 30c4751cd..9fd10df7d 100644 --- a/howtos/howto10/include/howto10/input/AllMessages.h +++ b/howtos/howto10/include/howto10/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto10/include/howto10/input/ClientInputMessages.h b/howtos/howto10/include/howto10/input/ClientInputMessages.h index 050f8d5cf..18be6e593 100644 --- a/howtos/howto10/include/howto10/input/ClientInputMessages.h +++ b/howtos/howto10/include/howto10/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto10/include/howto10/input/ServerInputMessages.h b/howtos/howto10/include/howto10/input/ServerInputMessages.h index fa54bf380..5c0855b44 100644 --- a/howtos/howto10/include/howto10/input/ServerInputMessages.h +++ b/howtos/howto10/include/howto10/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto10/include/howto10/message/Msg1.h b/howtos/howto10/include/howto10/message/Msg1.h index c68d500e5..256f0ad88 100644 --- a/howtos/howto10/include/howto10/message/Msg1.h +++ b/howtos/howto10/include/howto10/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "howto10/message/Msg1Common.h" #include "howto10/options/DefaultOptions.h" - namespace howto10 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -45,24 +43,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto10::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/message/Msg1Common.h b/howtos/howto10/include/howto10/message/Msg1Common.h index 1c1093001..e28480508 100644 --- a/howtos/howto10/include/howto10/message/Msg1Common.h +++ b/howtos/howto10/include/howto10/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto10 namespace message { - /// @brief Common types and functions for fields of /// @ref howto10::message::Msg1 message. /// @see howto10::message::Msg1Fields @@ -27,22 +26,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto10::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto10::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto10 - - - diff --git a/howtos/howto10/include/howto10/message/Msg2.h b/howtos/howto10/include/howto10/message/Msg2.h index 78e869b12..714bcd4c3 100644 --- a/howtos/howto10/include/howto10/message/Msg2.h +++ b/howtos/howto10/include/howto10/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto10/message/Msg2Common.h" #include "howto10/options/DefaultOptions.h" - namespace howto10 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -45,24 +43,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto10::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/message/Msg2Common.h b/howtos/howto10/include/howto10/message/Msg2Common.h index b2b791ecf..4a77fb9ee 100644 --- a/howtos/howto10/include/howto10/message/Msg2Common.h +++ b/howtos/howto10/include/howto10/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto10 namespace message { - /// @brief Common types and functions for fields of /// @ref howto10::message::Msg2 message. /// @see howto10::message::Msg2Fields @@ -27,22 +26,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto10::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto10::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto10 - - - diff --git a/howtos/howto10/include/howto10/message/Msg3.h b/howtos/howto10/include/howto10/message/Msg3.h index 801f832ac..722c7b9f3 100644 --- a/howtos/howto10/include/howto10/message/Msg3.h +++ b/howtos/howto10/include/howto10/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -16,14 +16,12 @@ #include "howto10/message/Msg3Common.h" #include "howto10/options/DefaultOptions.h" - namespace howto10 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -50,26 +48,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto10::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto10::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -90,11 +83,8 @@ struct Msg3Fields { return howto10::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -139,22 +129,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto10::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto10 - - diff --git a/howtos/howto10/include/howto10/message/Msg3Common.h b/howtos/howto10/include/howto10/message/Msg3Common.h index a6e229cbd..f38a7c813 100644 --- a/howtos/howto10/include/howto10/message/Msg3Common.h +++ b/howtos/howto10/include/howto10/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto10 namespace message { - /// @brief Common types and functions for fields of /// @ref howto10::message::Msg3 message. /// @see howto10::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// howto10::message::Msg3Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto10::message::Msg3Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto10::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto10 - - - diff --git a/howtos/howto10/include/howto10/options/BareMetalDefaultOptions.h b/howtos/howto10/include/howto10/options/BareMetalDefaultOptions.h index 9cf0460d3..fac3af572 100644 --- a/howtos/howto10/include/howto10/options/BareMetalDefaultOptions.h +++ b/howtos/howto10/include/howto10/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto10::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto10/include/howto10/options/ClientDefaultOptions.h b/howtos/howto10/include/howto10/options/ClientDefaultOptions.h index 035189ce9..b6ed51e03 100644 --- a/howtos/howto10/include/howto10/options/ClientDefaultOptions.h +++ b/howtos/howto10/include/howto10/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto10/include/howto10/options/DataViewDefaultOptions.h b/howtos/howto10/include/howto10/options/DataViewDefaultOptions.h index 9d8d846ad..67d608d58 100644 --- a/howtos/howto10/include/howto10/options/DataViewDefaultOptions.h +++ b/howtos/howto10/include/howto10/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto10/include/howto10/options/DefaultOptions.h b/howtos/howto10/include/howto10/options/DefaultOptions.h index a4a09b0cd..0b0d82ed4 100644 --- a/howtos/howto10/include/howto10/options/DefaultOptions.h +++ b/howtos/howto10/include/howto10/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto10::message::Msg3Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto10::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto10::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto10::frame::FrameLayers::Flags /// layer. using Flags = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto10/include/howto10/options/ServerDefaultOptions.h b/howtos/howto10/include/howto10/options/ServerDefaultOptions.h index 8318657f7..57fa8e7af 100644 --- a/howtos/howto10/include/howto10/options/ServerDefaultOptions.h +++ b/howtos/howto10/include/howto10/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto2/include/howto2/Message.h b/howtos/howto2/include/howto2/Message.h index 0e9961a69..1093da895 100644 --- a/howtos/howto2/include/howto2/Message.h +++ b/howtos/howto2/include/howto2/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace howto2 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile howto2/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/MsgId.h b/howtos/howto2/include/howto2/MsgId.h index 476639e6f..ffef2cdbb 100644 --- a/howtos/howto2/include/howto2/MsgId.h +++ b/howtos/howto2/include/howto2/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -17,7 +17,7 @@ enum MsgId : std::uint8_t MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , MsgId_M4 = 4, ///< message id of Message 4 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 4, ///< Last defined value., @@ -25,4 +25,3 @@ enum MsgId : std::uint8_t }; } // namespace howto2 - diff --git a/howtos/howto2/include/howto2/Version.h b/howtos/howto2/include/howto2/Version.h index e7dd1d74a..cd519c205 100644 --- a/howtos/howto2/include/howto2/Version.h +++ b/howtos/howto2/include/howto2/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto2 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto2/include/howto2/dispatch/DispatchClientInputMessage.h b/howtos/howto2/include/howto2/dispatch/DispatchClientInputMessage.h index 339edf93a..6e8d5c1a1 100644 --- a/howtos/howto2/include/howto2/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto2/include/howto2/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -139,7 +139,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto2::options::DefaultOptions. /// @headerfile howto2/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct ClientInputMsgDispatcher /// @ref howto2::options::DefaultOptions as template parameter. /// @note Defined in howto2/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto2/include/howto2/dispatch/DispatchMessage.h b/howtos/howto2/include/howto2/dispatch/DispatchMessage.h index 3ad061ce5..7f6dc879c 100644 --- a/howtos/howto2/include/howto2/dispatch/DispatchMessage.h +++ b/howtos/howto2/include/howto2/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -139,7 +139,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto2::options::DefaultOptions. /// @headerfile howto2/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct MsgDispatcher /// @ref howto2::options::DefaultOptions as template parameter. /// @note Defined in howto2/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto2/include/howto2/dispatch/DispatchServerInputMessage.h b/howtos/howto2/include/howto2/dispatch/DispatchServerInputMessage.h index 55a0437b8..b72dda921 100644 --- a/howtos/howto2/include/howto2/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto2/include/howto2/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -139,7 +139,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto2::options::DefaultOptions. /// @headerfile howto2/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct ServerInputMsgDispatcher /// @ref howto2::options::DefaultOptions as template parameter. /// @note Defined in howto2/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto2/include/howto2/field/FieldBase.h b/howtos/howto2/include/howto2/field/FieldBase.h index 2f7b21784..4724b77aa 100644 --- a/howtos/howto2/include/howto2/field/FieldBase.h +++ b/howtos/howto2/include/howto2/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto2 - diff --git a/howtos/howto2/include/howto2/field/MsgId.h b/howtos/howto2/include/howto2/field/MsgId.h index 34e8eb630..9f6342d3c 100644 --- a/howtos/howto2/include/howto2/field/MsgId.h +++ b/howtos/howto2/include/howto2/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto2 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto2::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto2::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto2::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto2::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto2::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto2::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto2::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto2::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto2::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto2::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto2::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto2 - diff --git a/howtos/howto2/include/howto2/field/MsgIdCommon.h b/howtos/howto2/include/howto2/field/MsgIdCommon.h index 416ed6ab1..0db6ba938 100644 --- a/howtos/howto2/include/howto2/field/MsgIdCommon.h +++ b/howtos/howto2/include/howto2/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto2/MsgId.h" @@ -19,7 +17,6 @@ namespace howto2 namespace field { - /// @brief Common types and functions for /// @ref howto2::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto2::field::MsgId field. using ValueType = howto2::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto2::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -64,19 +61,15 @@ struct MsgIdCommon "Message 4" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto2::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto2 - diff --git a/howtos/howto2/include/howto2/frame/Frame.h b/howtos/howto2/include/howto2/frame/Frame.h index 46f4eb50a..3bbdb6d9b 100644 --- a/howtos/howto2/include/howto2/frame/Frame.h +++ b/howtos/howto2/include/howto2/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -24,7 +24,6 @@ namespace howto2 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -37,7 +36,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref IdWithSize layer. struct IdWithSizeMembers { @@ -62,32 +61,27 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto2::frame::FrameLayersCommon::IdWithSizeMembersCommon::FieldMembersCommon::SizeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto2::frame::FrameLayersCommon::IdWithSizeMembersCommon::FieldMembersCommon::SizeCommon::name(); } - - }; - - + /// @brief Definition of "MsgId" field. using MsgId = howto2::field::MsgId< TOpt, comms::option::def::FixedBitLength<4U> >; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -95,7 +89,7 @@ struct FrameLayers MsgId >; }; - + /// @brief Definition of "Field" field. class Field : public comms::field::Bitfield< @@ -123,19 +117,15 @@ struct FrameLayers size, msgId ); - + /// @brief Name of the field. static const char* name() { return howto2::frame::FrameLayersCommon::IdWithSizeMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "IdWithSize". template using IdWithSize = @@ -146,11 +136,10 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::IdWithSize >; - + /// @brief Final protocol stack definition. template using Stack = IdWithSize; - }; /// @brief Definition of "Frame" frame class. @@ -185,5 +174,3 @@ class Frame : public } // namespace frame } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/frame/FrameCommon.h b/howtos/howto2/include/howto2/frame/FrameCommon.h index 2e76d2194..6530d63ee 100644 --- a/howtos/howto2/include/howto2/frame/FrameCommon.h +++ b/howtos/howto2/include/howto2/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace howto2 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto2::frame::Frame frame. /// @see howto2::frame::FrameLayers @@ -36,28 +35,25 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto2::frame::FrameLayers::IdWithSizeMembers::FieldMembers::Size field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto2::frame::FrameLayers::IdWithSizeMembers::FieldMembers::Size field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto2::frame::FrameLayers::IdWithSizeMembers::FieldMembers::MsgId field. using MsgIdCommon = howto2::field::MsgIdCommon; - }; - + /// @brief Common types and functions for /// @ref howto2::frame::FrameLayers::IdWithSizeMembers::Field field. struct FieldCommon @@ -67,15 +63,10 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - }; } // namespace frame } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/input/AllMessages.h b/howtos/howto2/include/howto2/input/AllMessages.h index 2b42d2048..40708ed0b 100644 --- a/howtos/howto2/include/howto2/input/AllMessages.h +++ b/howtos/howto2/include/howto2/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto2/include/howto2/input/ClientInputMessages.h b/howtos/howto2/include/howto2/input/ClientInputMessages.h index 379f1bd07..43f8611de 100644 --- a/howtos/howto2/include/howto2/input/ClientInputMessages.h +++ b/howtos/howto2/include/howto2/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto2/include/howto2/input/ServerInputMessages.h b/howtos/howto2/include/howto2/input/ServerInputMessages.h index 8024af5b6..16da6d9b9 100644 --- a/howtos/howto2/include/howto2/input/ServerInputMessages.h +++ b/howtos/howto2/include/howto2/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto2/include/howto2/message/Msg1.h b/howtos/howto2/include/howto2/message/Msg1.h index 919e607bd..c80647894 100644 --- a/howtos/howto2/include/howto2/message/Msg1.h +++ b/howtos/howto2/include/howto2/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -14,14 +14,12 @@ #include "howto2/message/Msg1Common.h" #include "howto2/options/DefaultOptions.h" - namespace howto2 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -49,17 +47,14 @@ struct Msg1Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -104,22 +99,18 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto2::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/message/Msg1Common.h b/howtos/howto2/include/howto2/message/Msg1Common.h index 5953f1397..c1a80dc2f 100644 --- a/howtos/howto2/include/howto2/message/Msg1Common.h +++ b/howtos/howto2/include/howto2/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto2 namespace message { - /// @brief Common types and functions for fields of /// @ref howto2::message::Msg1 message. /// @see howto2::message::Msg1Fields @@ -27,9 +26,7 @@ struct Msg1FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto2 - - - diff --git a/howtos/howto2/include/howto2/message/Msg2.h b/howtos/howto2/include/howto2/message/Msg2.h index 6f19bbc57..f1239985a 100644 --- a/howtos/howto2/include/howto2/message/Msg2.h +++ b/howtos/howto2/include/howto2/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto2/message/Msg2Common.h" #include "howto2/options/DefaultOptions.h" - namespace howto2 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -47,24 +45,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto2::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -82,24 +76,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto2::message::Msg2FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -148,24 +138,20 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto2::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/message/Msg2Common.h b/howtos/howto2/include/howto2/message/Msg2Common.h index be87c5636..09d6c9b46 100644 --- a/howtos/howto2/include/howto2/message/Msg2Common.h +++ b/howtos/howto2/include/howto2/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto2 namespace message { - /// @brief Common types and functions for fields of /// @ref howto2::message::Msg2 message. /// @see howto2::message::Msg2Fields @@ -27,22 +26,20 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto2::message::Msg2Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto2::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto2::message::Msg2Fields::F2 field. struct F2Common @@ -50,22 +47,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto2::message::Msg2Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto2::message::Msg2Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto2 - - - diff --git a/howtos/howto2/include/howto2/message/Msg3.h b/howtos/howto2/include/howto2/message/Msg3.h index 864a21999..20865bd20 100644 --- a/howtos/howto2/include/howto2/message/Msg3.h +++ b/howtos/howto2/include/howto2/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -14,14 +14,12 @@ #include "howto2/message/Msg3Common.h" #include "howto2/options/DefaultOptions.h" - namespace howto2 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -49,17 +47,14 @@ struct Msg3Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -104,22 +99,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto2::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/message/Msg3Common.h b/howtos/howto2/include/howto2/message/Msg3Common.h index d699d29f9..3ffcf22ab 100644 --- a/howtos/howto2/include/howto2/message/Msg3Common.h +++ b/howtos/howto2/include/howto2/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto2 namespace message { - /// @brief Common types and functions for fields of /// @ref howto2::message::Msg3 message. /// @see howto2::message::Msg3Fields @@ -27,9 +26,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto2 - - - diff --git a/howtos/howto2/include/howto2/message/Msg4.h b/howtos/howto2/include/howto2/message/Msg4.h index 73090ed6e..b67ee068b 100644 --- a/howtos/howto2/include/howto2/message/Msg4.h +++ b/howtos/howto2/include/howto2/message/Msg4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 4" message and its fields. @@ -15,14 +15,12 @@ #include "howto2/message/Msg4Common.h" #include "howto2/options/DefaultOptions.h" - namespace howto2 { namespace message { - /// @brief Fields of @ref Msg4. /// @tparam TOpt Extra options /// @see @ref Msg4 @@ -47,24 +45,20 @@ struct Msg4Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto2::message::Msg4FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg4FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -82,24 +76,20 @@ struct Msg4Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto2::message::Msg4FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto2::message::Msg4FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -148,24 +138,20 @@ class Msg4 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto2::message::Msg4Common::name(); } - - }; } // namespace message } // namespace howto2 - - diff --git a/howtos/howto2/include/howto2/message/Msg4Common.h b/howtos/howto2/include/howto2/message/Msg4Common.h index 8d0054a95..584983806 100644 --- a/howtos/howto2/include/howto2/message/Msg4Common.h +++ b/howtos/howto2/include/howto2/message/Msg4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto2 namespace message { - /// @brief Common types and functions for fields of /// @ref howto2::message::Msg4 message. /// @see howto2::message::Msg4Fields @@ -27,22 +26,20 @@ struct Msg4FieldsCommon /// @brief Re-definition of the value type used by /// howto2::message::Msg4Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto2::message::Msg4Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto2::message::Msg4Fields::F2 field. struct F2Common @@ -50,22 +47,19 @@ struct Msg4FieldsCommon /// @brief Re-definition of the value type used by /// howto2::message::Msg4Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto2::message::Msg4Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg4Common { return "Message 4"; } - }; } // namespace message } // namespace howto2 - - - diff --git a/howtos/howto2/include/howto2/options/BareMetalDefaultOptions.h b/howtos/howto2/include/howto2/options/BareMetalDefaultOptions.h index 4120d557f..96295fe2d 100644 --- a/howtos/howto2/include/howto2/options/BareMetalDefaultOptions.h +++ b/howtos/howto2/include/howto2/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,9 +37,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg1Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref howto2::message::Msg3 message. struct Msg3Fields : public TBase::message::Msg3Fields @@ -51,11 +50,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -70,13 +67,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto2/include/howto2/options/ClientDefaultOptions.h b/howtos/howto2/include/howto2/options/ClientDefaultOptions.h index bd372a614..5d94a568b 100644 --- a/howtos/howto2/include/howto2/options/ClientDefaultOptions.h +++ b/howtos/howto2/include/howto2/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto2/include/howto2/options/DataViewDefaultOptions.h b/howtos/howto2/include/howto2/options/DataViewDefaultOptions.h index d0ba13052..8c6d6051f 100644 --- a/howtos/howto2/include/howto2/options/DataViewDefaultOptions.h +++ b/howtos/howto2/include/howto2/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,9 +31,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg1Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref howto2::message::Msg3 message. struct Msg3Fields : public TBase::message::Msg3Fields @@ -45,11 +44,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -64,13 +61,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto2/include/howto2/options/DefaultOptions.h b/howtos/howto2/include/howto2/options/DefaultOptions.h index 425d440d3..c311a76d5 100644 --- a/howtos/howto2/include/howto2/options/DefaultOptions.h +++ b/howtos/howto2/include/howto2/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,9 +30,8 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto2::message::Msg1Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref howto2::message::Msg3 message. struct Msg3Fields @@ -40,11 +39,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto2::message::Msg3Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -55,18 +52,13 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto2::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto2::frame::FrameLayers::IdWithSize /// layer. using IdWithSize = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto2/include/howto2/options/ServerDefaultOptions.h b/howtos/howto2/include/howto2/options/ServerDefaultOptions.h index 79d8024ec..d543bbc5c 100644 --- a/howtos/howto2/include/howto2/options/ServerDefaultOptions.h +++ b/howtos/howto2/include/howto2/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto3/include/howto3/Message.h b/howtos/howto3/include/howto3/Message.h index 92e92d6f2..9ff98201c 100644 --- a/howtos/howto3/include/howto3/Message.h +++ b/howtos/howto3/include/howto3/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace howto3 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile howto3/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace howto3 - - diff --git a/howtos/howto3/include/howto3/MsgId.h b/howtos/howto3/include/howto3/MsgId.h index 244da516a..4731ad5de 100644 --- a/howtos/howto3/include/howto3/MsgId.h +++ b/howtos/howto3/include/howto3/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -17,7 +17,7 @@ enum MsgId : std::uint8_t MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , MsgId_M4 = 4, ///< message id of Message 4 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 4, ///< Last defined value., @@ -25,4 +25,3 @@ enum MsgId : std::uint8_t }; } // namespace howto3 - diff --git a/howtos/howto3/include/howto3/Version.h b/howtos/howto3/include/howto3/Version.h index 25aeb35ec..a8edad36b 100644 --- a/howtos/howto3/include/howto3/Version.h +++ b/howtos/howto3/include/howto3/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto3 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto3/include/howto3/dispatch/DispatchClientInputMessage.h b/howtos/howto3/include/howto3/dispatch/DispatchClientInputMessage.h index f45202def..4f7657aa8 100644 --- a/howtos/howto3/include/howto3/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto3/include/howto3/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto3::options::DefaultOptions. /// @headerfile howto3/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref howto3::options::DefaultOptions as template parameter. /// @note Defined in howto3/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto3/include/howto3/dispatch/DispatchMessage.h b/howtos/howto3/include/howto3/dispatch/DispatchMessage.h index 1a236a7a1..3d0649bce 100644 --- a/howtos/howto3/include/howto3/dispatch/DispatchMessage.h +++ b/howtos/howto3/include/howto3/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto3::options::DefaultOptions. /// @headerfile howto3/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref howto3::options::DefaultOptions as template parameter. /// @note Defined in howto3/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto3/include/howto3/dispatch/DispatchServerInputMessage.h b/howtos/howto3/include/howto3/dispatch/DispatchServerInputMessage.h index 3f0b3a368..479274c21 100644 --- a/howtos/howto3/include/howto3/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto3/include/howto3/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto3::options::DefaultOptions. /// @headerfile howto3/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref howto3::options::DefaultOptions as template parameter. /// @note Defined in howto3/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto3/include/howto3/field/FieldBase.h b/howtos/howto3/include/howto3/field/FieldBase.h index a0761be2c..5968b9183 100644 --- a/howtos/howto3/include/howto3/field/FieldBase.h +++ b/howtos/howto3/include/howto3/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto3 - diff --git a/howtos/howto3/include/howto3/field/MsgId.h b/howtos/howto3/include/howto3/field/MsgId.h index 5b6a91426..5c0b97dae 100644 --- a/howtos/howto3/include/howto3/field/MsgId.h +++ b/howtos/howto3/include/howto3/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto3 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto3::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto3::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto3::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto3::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto3::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto3::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto3::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto3::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto3::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto3::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto3::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto3 - diff --git a/howtos/howto3/include/howto3/field/MsgIdCommon.h b/howtos/howto3/include/howto3/field/MsgIdCommon.h index 843215e56..652f8e63c 100644 --- a/howtos/howto3/include/howto3/field/MsgIdCommon.h +++ b/howtos/howto3/include/howto3/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto3/MsgId.h" @@ -19,7 +17,6 @@ namespace howto3 namespace field { - /// @brief Common types and functions for /// @ref howto3::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto3::field::MsgId field. using ValueType = howto3::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto3::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -64,19 +61,15 @@ struct MsgIdCommon "Message 4" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto3::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto3 - diff --git a/howtos/howto3/include/howto3/frame/Frame.h b/howtos/howto3/include/howto3/frame/Frame.h index b84131c2f..7f2a3c441 100644 --- a/howtos/howto3/include/howto3/frame/Frame.h +++ b/howtos/howto3/include/howto3/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -17,7 +17,6 @@ namespace howto3 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -30,7 +29,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -43,11 +42,10 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Final protocol stack definition. template using Stack = Id; - }; /// @brief Definition of "Frame" frame class. @@ -82,5 +80,3 @@ class Frame : public } // namespace frame } // namespace howto3 - - diff --git a/howtos/howto3/include/howto3/input/AllMessages.h b/howtos/howto3/include/howto3/input/AllMessages.h index 19efb5a20..3e26a6f94 100644 --- a/howtos/howto3/include/howto3/input/AllMessages.h +++ b/howtos/howto3/include/howto3/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto3/include/howto3/input/ClientInputMessages.h b/howtos/howto3/include/howto3/input/ClientInputMessages.h index d3b63b471..5fc8e9c36 100644 --- a/howtos/howto3/include/howto3/input/ClientInputMessages.h +++ b/howtos/howto3/include/howto3/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto3/include/howto3/input/ServerInputMessages.h b/howtos/howto3/include/howto3/input/ServerInputMessages.h index 62289a0f3..4b3cc8f16 100644 --- a/howtos/howto3/include/howto3/input/ServerInputMessages.h +++ b/howtos/howto3/include/howto3/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto3/include/howto3/message/Msg1.h b/howtos/howto3/include/howto3/message/Msg1.h index c6a4fe231..5460d9eb7 100644 --- a/howtos/howto3/include/howto3/message/Msg1.h +++ b/howtos/howto3/include/howto3/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -14,14 +14,12 @@ #include "howto3/message/Msg1Common.h" #include "howto3/options/DefaultOptions.h" - namespace howto3 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -47,11 +45,8 @@ struct Msg1Fields { return howto3::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -96,22 +91,18 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto3::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto3 - - diff --git a/howtos/howto3/include/howto3/message/Msg1Common.h b/howtos/howto3/include/howto3/message/Msg1Common.h index e39412500..aa3e16143 100644 --- a/howtos/howto3/include/howto3/message/Msg1Common.h +++ b/howtos/howto3/include/howto3/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto3 namespace message { - /// @brief Common types and functions for fields of /// @ref howto3::message::Msg1 message. /// @see howto3::message::Msg1Fields @@ -27,9 +26,7 @@ struct Msg1FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto3 - - - diff --git a/howtos/howto3/include/howto3/message/Msg2.h b/howtos/howto3/include/howto3/message/Msg2.h index b6aa460dc..6f165686c 100644 --- a/howtos/howto3/include/howto3/message/Msg2.h +++ b/howtos/howto3/include/howto3/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto3/message/Msg2Common.h" #include "howto3/options/DefaultOptions.h" - namespace howto3 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -50,11 +48,8 @@ struct Msg2Fields { return howto3::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -99,22 +94,18 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto3::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto3 - - diff --git a/howtos/howto3/include/howto3/message/Msg2Common.h b/howtos/howto3/include/howto3/message/Msg2Common.h index 20cfe68c4..4757ed808 100644 --- a/howtos/howto3/include/howto3/message/Msg2Common.h +++ b/howtos/howto3/include/howto3/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto3 namespace message { - /// @brief Common types and functions for fields of /// @ref howto3::message::Msg2 message. /// @see howto3::message::Msg2Fields @@ -27,9 +26,7 @@ struct Msg2FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto3 - - - diff --git a/howtos/howto3/include/howto3/message/Msg3.h b/howtos/howto3/include/howto3/message/Msg3.h index 5620bfbea..1ed3089d5 100644 --- a/howtos/howto3/include/howto3/message/Msg3.h +++ b/howtos/howto3/include/howto3/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -15,14 +15,12 @@ #include "howto3/message/Msg3Common.h" #include "howto3/options/DefaultOptions.h" - namespace howto3 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -45,24 +43,20 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto3::message::Msg3FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto3::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto3::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto3 - - diff --git a/howtos/howto3/include/howto3/message/Msg3Common.h b/howtos/howto3/include/howto3/message/Msg3Common.h index 33e325754..1f70dd3c6 100644 --- a/howtos/howto3/include/howto3/message/Msg3Common.h +++ b/howtos/howto3/include/howto3/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto3 namespace message { - /// @brief Common types and functions for fields of /// @ref howto3::message::Msg3 message. /// @see howto3::message::Msg3Fields @@ -27,22 +26,19 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// howto3::message::Msg3Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto3::message::Msg3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto3 - - - diff --git a/howtos/howto3/include/howto3/options/BareMetalDefaultOptions.h b/howtos/howto3/include/howto3/options/BareMetalDefaultOptions.h index d328f77cb..11983ee77 100644 --- a/howtos/howto3/include/howto3/options/BareMetalDefaultOptions.h +++ b/howtos/howto3/include/howto3/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,9 +37,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg1Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref howto3::message::Msg2 message. struct Msg2Fields : public TBase::message::Msg2Fields @@ -51,11 +50,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -70,7 +67,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto3::frame::FrameLayers::Id layer. using Id = @@ -78,13 +75,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto3/include/howto3/options/ClientDefaultOptions.h b/howtos/howto3/include/howto3/options/ClientDefaultOptions.h index c134b1865..94a1d69a4 100644 --- a/howtos/howto3/include/howto3/options/ClientDefaultOptions.h +++ b/howtos/howto3/include/howto3/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto3/include/howto3/options/DataViewDefaultOptions.h b/howtos/howto3/include/howto3/options/DataViewDefaultOptions.h index 3c888ef1f..7bd6d4d67 100644 --- a/howtos/howto3/include/howto3/options/DataViewDefaultOptions.h +++ b/howtos/howto3/include/howto3/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,9 +31,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg1Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref howto3::message::Msg2 message. struct Msg2Fields : public TBase::message::Msg2Fields @@ -45,11 +44,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -64,13 +61,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto3/include/howto3/options/DefaultOptions.h b/howtos/howto3/include/howto3/options/DefaultOptions.h index 30407e6a8..0801b5e2d 100644 --- a/howtos/howto3/include/howto3/options/DefaultOptions.h +++ b/howtos/howto3/include/howto3/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,9 +30,8 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto3::message::Msg1Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref howto3::message::Msg2 message. struct Msg2Fields @@ -40,11 +39,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto3::message::Msg2Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -55,17 +52,12 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto3::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto3::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto3/include/howto3/options/ServerDefaultOptions.h b/howtos/howto3/include/howto3/options/ServerDefaultOptions.h index f0a8de39a..0b13d15e9 100644 --- a/howtos/howto3/include/howto3/options/ServerDefaultOptions.h +++ b/howtos/howto3/include/howto3/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto4/include/howto4/Message.h b/howtos/howto4/include/howto4/Message.h index b4ef64004..e94d7f9a4 100644 --- a/howtos/howto4/include/howto4/Message.h +++ b/howtos/howto4/include/howto4/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace howto4 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile howto4/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace howto4 - - diff --git a/howtos/howto4/include/howto4/MsgId.h b/howtos/howto4/include/howto4/MsgId.h index ab7d93592..9654cbd14 100644 --- a/howtos/howto4/include/howto4/MsgId.h +++ b/howtos/howto4/include/howto4/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -14,7 +14,7 @@ namespace howto4 enum MsgId : std::uint8_t { MsgId_M0 = 0, ///< message id of Message message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 0, ///< First defined value., MsgId_LastValue = 0, ///< Last defined value., @@ -22,4 +22,3 @@ enum MsgId : std::uint8_t }; } // namespace howto4 - diff --git a/howtos/howto4/include/howto4/Version.h b/howtos/howto4/include/howto4/Version.h index f2409096e..e0b81f474 100644 --- a/howtos/howto4/include/howto4/Version.h +++ b/howtos/howto4/include/howto4/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto4 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto4/include/howto4/dispatch/DispatchClientInputMessage.h b/howtos/howto4/include/howto4/dispatch/DispatchClientInputMessage.h index 18c1ebcad..bbed4f2a3 100644 --- a/howtos/howto4/include/howto4/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto4/include/howto4/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto4::options::DefaultOptions. /// @headerfile howto4/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ClientInputMsgDispatcher /// @ref howto4::options::DefaultOptions as template parameter. /// @note Defined in howto4/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto4/include/howto4/dispatch/DispatchMessage.h b/howtos/howto4/include/howto4/dispatch/DispatchMessage.h index 9e898b193..7eb95ff2c 100644 --- a/howtos/howto4/include/howto4/dispatch/DispatchMessage.h +++ b/howtos/howto4/include/howto4/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -124,7 +124,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto4::options::DefaultOptions. /// @headerfile howto4/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct MsgDispatcher /// @ref howto4::options::DefaultOptions as template parameter. /// @note Defined in howto4/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto4/include/howto4/dispatch/DispatchServerInputMessage.h b/howtos/howto4/include/howto4/dispatch/DispatchServerInputMessage.h index 6854c5f61..76359e4ca 100644 --- a/howtos/howto4/include/howto4/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto4/include/howto4/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto4::options::DefaultOptions. /// @headerfile howto4/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ServerInputMsgDispatcher /// @ref howto4::options::DefaultOptions as template parameter. /// @note Defined in howto4/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto4/include/howto4/field/FieldBase.h b/howtos/howto4/include/howto4/field/FieldBase.h index da1ceab1a..cadce6585 100644 --- a/howtos/howto4/include/howto4/field/FieldBase.h +++ b/howtos/howto4/include/howto4/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto4 - diff --git a/howtos/howto4/include/howto4/field/TlvProp.h b/howtos/howto4/include/howto4/field/TlvProp.h index 125a1a07c..c08efeedc 100644 --- a/howtos/howto4/include/howto4/field/TlvProp.h +++ b/howtos/howto4/include/howto4/field/TlvProp.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "TlvProp" field. @@ -28,7 +28,6 @@ namespace howto4 namespace field { - /// @brief Scope for all the member fields of /// @ref TlvProp field. /// @tparam TOpt Protocol options. @@ -60,20 +59,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -83,14 +81,9 @@ struct TlvPropMembers }; Base::setValue(0); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -106,24 +99,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::IntValue< @@ -139,24 +128,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::ValCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop1MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -165,7 +150,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop1" field. class Prop1 : public comms::field::Bundle< @@ -198,18 +183,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop2 field. struct Prop2Members @@ -237,20 +218,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -260,14 +240,9 @@ struct TlvPropMembers }; Base::setValue(2); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -283,24 +258,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::FloatValue< @@ -316,36 +287,33 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Generated default constructor. Val() { Base::setValue(std::numeric_limits::infinity()); } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::ValCommon::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop2MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -354,7 +322,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop2" field. class Prop2 : public comms::field::Bundle< @@ -387,18 +355,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop3 field. struct Prop3Members @@ -426,20 +390,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop3MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop3MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -449,14 +412,9 @@ struct TlvPropMembers }; Base::setValue(5); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -472,24 +430,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::Prop3MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop3MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::String< @@ -508,11 +462,8 @@ struct TlvPropMembers { return howto4::field::TlvPropMembersCommon::Prop3MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -521,7 +472,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop3" field. class Prop3 : public comms::field::Bundle< @@ -554,18 +505,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::Prop3Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Any field. struct AnyMembers @@ -587,24 +534,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::name(); } - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -620,24 +563,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::ArrayList< @@ -658,11 +597,8 @@ struct TlvPropMembers { return howto4::field::TlvPropMembersCommon::AnyMembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -671,7 +607,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Any" field. class Any : public comms::field::Bundle< @@ -704,18 +640,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropMembersCommon::AnyCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -737,7 +669,9 @@ class TlvProp : public howto4::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh > { using Base = @@ -745,7 +679,9 @@ class TlvProp : public howto4::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh >; public: /// @brief Allow access to internal fields. @@ -772,7 +708,7 @@ class TlvProp : public prop3, any ); - + /// @brief Optimized currFieldExec functionality. /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -799,7 +735,7 @@ class TlvProp : public break; } } - + /// @brief Optimized currFieldExec functionality (const variant). /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -826,13 +762,13 @@ class TlvProp : public break; } } - + /// @brief Name of the field. static const char* name() { return howto4::field::TlvPropCommon::name(); } - + COMMS_MSVC_WARNING_PUSH COMMS_MSVC_WARNING_DISABLE(4702) /// @brief Generated read functionality. @@ -846,17 +782,17 @@ class TlvProp : public comms::option::def::FailOnInvalid<> >; CommonKeyField commonKeyField; - + auto origIter = iter; auto es = commonKeyField.read(iter, len); if (es != comms::ErrorStatus::Success) { return es; } - + auto consumedLen = static_cast(std::distance(origIter, iter)); COMMS_ASSERT(consumedLen <= len); len -= consumedLen; - + switch (commonKeyField.getValue()) { case 0U /* 0x00U */: { @@ -880,13 +816,67 @@ class TlvProp : public initField_any().field_key().setValue(commonKeyField.getValue()); return accessField_any().template readFrom<1>(iter, len); }; - + return comms::ErrorStatus::InvalidMsgData; - } COMMS_MSVC_WARNING_POP - - + + /// @brief Generated write functionality. + template + comms::ErrorStatus write(TIter& iter, std::size_t len) const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().write(iter, len); + case FieldIdx_prop2: return accessField_prop2().write(iter, len); + case FieldIdx_prop3: return accessField_prop3().write(iter, len); + case FieldIdx_any: return accessField_any().write(iter, len); + default: break; + } + + return comms::ErrorStatus::Success; + } + + /// @brief Generated refresh functionality. + bool refresh() + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().refresh(); + case FieldIdx_prop2: return accessField_prop2().refresh(); + case FieldIdx_prop3: return accessField_prop3().refresh(); + case FieldIdx_any: return accessField_any().refresh(); + default: break; + } + + return false; + } + + /// @brief Generated length functionality. + std::size_t length() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().length(); + case FieldIdx_prop2: return accessField_prop2().length(); + case FieldIdx_prop3: return accessField_prop3().length(); + case FieldIdx_any: return accessField_any().length(); + default: break; + } + + return 0U; + } + + /// @brief Generated validity check functionality. + bool valid() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().valid(); + case FieldIdx_prop2: return accessField_prop2().valid(); + case FieldIdx_prop3: return accessField_prop3().valid(); + case FieldIdx_any: return accessField_any().valid(); + default: break; + } + + return false; + } private: template @@ -898,12 +888,8 @@ class TlvProp : public func.template operator()(std::forward(f)); // All other compilers #endif // #ifdef _MSC_VER } - - }; - } // namespace field } // namespace howto4 - diff --git a/howtos/howto4/include/howto4/field/TlvPropCommon.h b/howtos/howto4/include/howto4/field/TlvPropCommon.h index 6bf4c5eb4..465d2542a 100644 --- a/howtos/howto4/include/howto4/field/TlvPropCommon.h +++ b/howtos/howto4/include/howto4/field/TlvPropCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto4 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref howto4::field::TlvProp field. struct TlvPropMembersCommon @@ -30,22 +29,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop1Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop1Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop1Members::Length field. struct LengthCommon @@ -53,22 +50,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop1Members::Val field. struct ValCommon @@ -76,24 +71,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop1Members::Val field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop1Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop1 field. struct Prop1Common @@ -103,9 +95,8 @@ struct TlvPropMembersCommon { return "Prop1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto4::field::TlvPropMembers::Prop2 field. struct Prop2MembersCommon @@ -117,22 +108,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop2Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop2Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop2Members::Length field. struct LengthCommon @@ -140,22 +129,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop2Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop2Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop2Members::Val field. struct ValCommon @@ -163,24 +150,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop2Members::Val field. using ValueType = double; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop2Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop2 field. struct Prop2Common @@ -190,9 +174,8 @@ struct TlvPropMembersCommon { return "Prop2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto4::field::TlvPropMembers::Prop3 field. struct Prop3MembersCommon @@ -204,22 +187,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop3Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop3Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop3Members::Length field. struct LengthCommon @@ -227,22 +208,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::Prop3Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::Prop3Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop3Members::Val field. struct ValCommon @@ -252,11 +231,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Prop3 field. struct Prop3Common @@ -266,9 +243,8 @@ struct TlvPropMembersCommon { return "Prop3"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto4::field::TlvPropMembers::Any field. struct AnyMembersCommon @@ -280,22 +256,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::AnyMembers::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::AnyMembers::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::AnyMembers::Length field. struct LengthCommon @@ -303,22 +277,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// howto4::field::TlvPropMembers::AnyMembers::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::field::TlvPropMembers::AnyMembers::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::AnyMembers::Val field. struct ValCommon @@ -328,11 +300,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref howto4::field::TlvPropMembers::Any field. struct AnyCommon @@ -342,9 +312,7 @@ struct TlvPropMembersCommon { return "Any"; } - }; - }; /// @brief Common types and functions for @@ -356,10 +324,8 @@ struct TlvPropCommon { return "TlvProp"; } - }; } // namespace field } // namespace howto4 - diff --git a/howtos/howto4/include/howto4/frame/Frame.h b/howtos/howto4/include/howto4/frame/Frame.h index 64e233166..3a026df4b 100644 --- a/howtos/howto4/include/howto4/frame/Frame.h +++ b/howtos/howto4/include/howto4/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace howto4 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref Id layer. struct IdMembers { @@ -59,26 +58,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::frame::FrameLayersCommon::IdMembersCommon::IdFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::frame::FrameLayersCommon::IdMembersCommon::IdFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Id". template using Id = @@ -89,7 +83,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -110,26 +104,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -137,7 +126,7 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -156,26 +145,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". template using Checksum = @@ -184,7 +168,7 @@ struct FrameLayers comms::protocol::checksum::Crc_CCITT, Size >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -207,26 +191,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto4::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto4::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -234,11 +213,10 @@ struct FrameLayers typename SyncMembers::SyncField, Checksum >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -279,5 +257,3 @@ class Frame : public } // namespace frame } // namespace howto4 - - diff --git a/howtos/howto4/include/howto4/frame/FrameCommon.h b/howtos/howto4/include/howto4/frame/FrameCommon.h index 191e71c82..1dc3e43d0 100644 --- a/howtos/howto4/include/howto4/frame/FrameCommon.h +++ b/howtos/howto4/include/howto4/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto4 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto4::frame::Frame frame. /// @see howto4::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto4::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto4::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto4::frame::FrameLayers::ChecksumMembers struct. struct ChecksumMembersCommon @@ -60,24 +56,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto4::frame::FrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto4::frame::FrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto4::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -89,24 +82,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto4::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto4::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto4::frame::FrameLayers::IdMembers struct. struct IdMembersCommon @@ -118,28 +108,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto4::frame::FrameLayers::IdMembers::IdField field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto4::frame::FrameLayers::IdMembers::IdField field. static const char* name() { return "IdField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto4 - - diff --git a/howtos/howto4/include/howto4/input/AllMessages.h b/howtos/howto4/include/howto4/input/AllMessages.h index 92b420d68..136b7e5a6 100644 --- a/howtos/howto4/include/howto4/input/AllMessages.h +++ b/howtos/howto4/include/howto4/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto4/include/howto4/input/ClientInputMessages.h b/howtos/howto4/include/howto4/input/ClientInputMessages.h index 726f1f9da..2d51a6b9e 100644 --- a/howtos/howto4/include/howto4/input/ClientInputMessages.h +++ b/howtos/howto4/include/howto4/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto4/include/howto4/input/ServerInputMessages.h b/howtos/howto4/include/howto4/input/ServerInputMessages.h index 096cdae1f..e3ee50b73 100644 --- a/howtos/howto4/include/howto4/input/ServerInputMessages.h +++ b/howtos/howto4/include/howto4/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto4/include/howto4/message/Msg.h b/howtos/howto4/include/howto4/message/Msg.h index 3fc6d5813..cbe1fc75a 100644 --- a/howtos/howto4/include/howto4/message/Msg.h +++ b/howtos/howto4/include/howto4/message/Msg.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" message and its fields. @@ -15,14 +15,12 @@ #include "howto4/message/MsgCommon.h" #include "howto4/options/DefaultOptions.h" - namespace howto4 { namespace message { - /// @brief Fields of @ref Msg. /// @tparam TOpt Extra options /// @see @ref Msg @@ -50,11 +48,8 @@ struct MsgFields { return howto4::message::MsgFieldsCommon::PropsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Props @@ -99,22 +94,18 @@ class Msg : public COMMS_MSG_FIELDS_NAMES( props ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto4::message::MsgCommon::name(); } - - }; } // namespace message } // namespace howto4 - - diff --git a/howtos/howto4/include/howto4/message/MsgCommon.h b/howtos/howto4/include/howto4/message/MsgCommon.h index b2d2f7109..14118f496 100644 --- a/howtos/howto4/include/howto4/message/MsgCommon.h +++ b/howtos/howto4/include/howto4/message/MsgCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto4 namespace message { - /// @brief Common types and functions for fields of /// @ref howto4::message::Msg message. /// @see howto4::message::MsgFields @@ -27,9 +26,7 @@ struct MsgFieldsCommon { return "Props"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct MsgCommon { return "Message"; } - }; } // namespace message } // namespace howto4 - - - diff --git a/howtos/howto4/include/howto4/options/BareMetalDefaultOptions.h b/howtos/howto4/include/howto4/options/BareMetalDefaultOptions.h index fbebea7d3..142f829ee 100644 --- a/howtos/howto4/include/howto4/options/BareMetalDefaultOptions.h +++ b/howtos/howto4/include/howto4/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,9 +38,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::Prop3Members::Val >; - }; // struct Prop3Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -51,13 +50,10 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message : public TBase::message { @@ -72,11 +68,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::MsgFields::Props >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -91,7 +85,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto4::frame::FrameLayers::Id layer. using Id = @@ -99,13 +93,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto4/include/howto4/options/ClientDefaultOptions.h b/howtos/howto4/include/howto4/options/ClientDefaultOptions.h index 53d173d86..805cbbde7 100644 --- a/howtos/howto4/include/howto4/options/ClientDefaultOptions.h +++ b/howtos/howto4/include/howto4/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto4/include/howto4/options/DataViewDefaultOptions.h b/howtos/howto4/include/howto4/options/DataViewDefaultOptions.h index d715588a4..c8cf3a94d 100644 --- a/howtos/howto4/include/howto4/options/DataViewDefaultOptions.h +++ b/howtos/howto4/include/howto4/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,9 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::Prop3Members::Val >; - }; // struct Prop3Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -45,13 +44,10 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -66,13 +62,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto4/include/howto4/options/DefaultOptions.h b/howtos/howto4/include/howto4/options/DefaultOptions.h index a8d197f34..d1a674bd0 100644 --- a/howtos/howto4/include/howto4/options/DefaultOptions.h +++ b/howtos/howto4/include/howto4/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,22 +31,18 @@ struct DefaultOptionsT : public TBase /// howto4::field::TlvPropMembers::Prop3Members::Val /// field. using Val = comms::option::EmptyOption; - }; // struct Prop3Members - + struct AnyMembers { /// @brief Extra options for @ref /// howto4::field::TlvPropMembers::AnyMembers::Val /// field. using Val = comms::option::EmptyOption; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message { @@ -57,11 +53,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto4::message::MsgFields::Props field. using Props = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -72,17 +66,12 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto4::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto4::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto4/include/howto4/options/ServerDefaultOptions.h b/howtos/howto4/include/howto4/options/ServerDefaultOptions.h index 6564c4037..ac9838f2b 100644 --- a/howtos/howto4/include/howto4/options/ServerDefaultOptions.h +++ b/howtos/howto4/include/howto4/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto5/include/howto5/Interface.h b/howtos/howto5/include/howto5/Interface.h index 82e3aaea0..988c114d4 100644 --- a/howtos/howto5/include/howto5/Interface.h +++ b/howtos/howto5/include/howto5/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -17,7 +17,6 @@ namespace howto5 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile howto5/Interface.h @@ -28,8 +27,7 @@ struct InterfaceFields howto5::field::Version< howto5::options::DefaultOptions >; - - + /// @brief Definition of "Flags" field. class Flags : public howto5::field::InterfaceFlags< @@ -46,11 +44,8 @@ struct InterfaceFields { return howto5::InterfaceFieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Version, @@ -95,10 +90,6 @@ class Interface : public version, flags ); - - }; } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/InterfaceCommon.h b/howtos/howto5/include/howto5/InterfaceCommon.h index 1316191e7..41bb4ba46 100644 --- a/howtos/howto5/include/howto5/InterfaceCommon.h +++ b/howtos/howto5/include/howto5/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace howto5 { - /// @brief Common types and functions for fields of /// @ref howto5::Interface interface. /// @see howto5::InterfaceFields @@ -21,7 +20,7 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref howto5::InterfaceFields::Version field. using VersionCommon = howto5::field::VersionCommon; - + /// @brief Common types and functions for /// @ref howto5::InterfaceFields::Flags field. struct FlagsCommon : public howto5::field::InterfaceFlagsCommon @@ -31,10 +30,6 @@ struct InterfaceFieldsCommon { return "Flags"; } - }; - }; } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/MsgId.h b/howtos/howto5/include/howto5/MsgId.h index 4d9ca650a..de67ec27c 100644 --- a/howtos/howto5/include/howto5/MsgId.h +++ b/howtos/howto5/include/howto5/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/Version.h b/howtos/howto5/include/howto5/Version.h index c7a0c2de6..9214a0b6b 100644 --- a/howtos/howto5/include/howto5/Version.h +++ b/howtos/howto5/include/howto5/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto5 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto5/include/howto5/dispatch/DispatchClientInputMessage.h b/howtos/howto5/include/howto5/dispatch/DispatchClientInputMessage.h index 9377d55a3..ef5b35913 100644 --- a/howtos/howto5/include/howto5/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto5/include/howto5/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto5::options::DefaultOptions. /// @headerfile howto5/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref howto5::options::DefaultOptions as template parameter. /// @note Defined in howto5/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto5/include/howto5/dispatch/DispatchMessage.h b/howtos/howto5/include/howto5/dispatch/DispatchMessage.h index b109981ad..79b802d51 100644 --- a/howtos/howto5/include/howto5/dispatch/DispatchMessage.h +++ b/howtos/howto5/include/howto5/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto5::options::DefaultOptions. /// @headerfile howto5/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref howto5::options::DefaultOptions as template parameter. /// @note Defined in howto5/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto5/include/howto5/dispatch/DispatchServerInputMessage.h b/howtos/howto5/include/howto5/dispatch/DispatchServerInputMessage.h index 62f31f2fa..d61239090 100644 --- a/howtos/howto5/include/howto5/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto5/include/howto5/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto5::options::DefaultOptions. /// @headerfile howto5/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref howto5::options::DefaultOptions as template parameter. /// @note Defined in howto5/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto5/include/howto5/field/FieldBase.h b/howtos/howto5/include/howto5/field/FieldBase.h index 351d51c54..448d28ba9 100644 --- a/howtos/howto5/include/howto5/field/FieldBase.h +++ b/howtos/howto5/include/howto5/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/InterfaceFlags.h b/howtos/howto5/include/howto5/field/InterfaceFlags.h index 8af1b43cb..5f2fa2fcd 100644 --- a/howtos/howto5/include/howto5/field/InterfaceFlags.h +++ b/howtos/howto5/include/howto5/field/InterfaceFlags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "InterfaceFlags" field. @@ -17,7 +17,6 @@ namespace howto5 namespace field { - /// @brief Definition of "InterfaceFlags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -50,7 +49,7 @@ class InterfaceFlags : public B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref howto5::field::InterfaceFlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -59,18 +58,14 @@ class InterfaceFlags : public howto5::field::InterfaceFlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return howto5::field::InterfaceFlagsCommon::name(); } - - }; - } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/InterfaceFlagsCommon.h b/howtos/howto5/include/howto5/field/InterfaceFlagsCommon.h index af61422dd..0ec1484fe 100644 --- a/howtos/howto5/include/howto5/field/InterfaceFlagsCommon.h +++ b/howtos/howto5/include/howto5/field/InterfaceFlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto5 namespace field { - /// @brief Common types and functions for /// @ref howto5::field::InterfaceFlags field. struct InterfaceFlagsCommon @@ -24,7 +23,7 @@ struct InterfaceFlagsCommon { return "InterfaceFlags"; } - + /// @brief Retrieve name of the bit of /// @ref howto5::field::InterfaceFlags field. static const char* bitName(std::size_t idx) @@ -33,19 +32,16 @@ struct InterfaceFlagsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/MsgId.h b/howtos/howto5/include/howto5/field/MsgId.h index ac8f196e1..723d0e7c4 100644 --- a/howtos/howto5/include/howto5/field/MsgId.h +++ b/howtos/howto5/include/howto5/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto5 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto5::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto5::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto5::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto5::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto5::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto5::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto5::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto5::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto5::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto5::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto5::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/MsgIdCommon.h b/howtos/howto5/include/howto5/field/MsgIdCommon.h index ffe32a27b..5dc79f292 100644 --- a/howtos/howto5/include/howto5/field/MsgIdCommon.h +++ b/howtos/howto5/include/howto5/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto5/MsgId.h" @@ -19,7 +17,6 @@ namespace howto5 namespace field { - /// @brief Common types and functions for /// @ref howto5::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto5::field::MsgId field. using ValueType = howto5::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto5::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto5::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/Version.h b/howtos/howto5/include/howto5/field/Version.h index 58627d19d..7da0887ef 100644 --- a/howtos/howto5/include/howto5/field/Version.h +++ b/howtos/howto5/include/howto5/field/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Version" field. @@ -18,7 +18,6 @@ namespace howto5 namespace field { - /// @brief Definition of "Version" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class Version : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::field::VersionCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::field::VersionCommon::name(); } - - }; - } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/VersionCommon.h b/howtos/howto5/include/howto5/field/VersionCommon.h index 0411bfd6f..3c3ddcbe9 100644 --- a/howtos/howto5/include/howto5/field/VersionCommon.h +++ b/howtos/howto5/include/howto5/field/VersionCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto5 namespace field { - /// @brief Common types and functions for /// @ref howto5::field::Version field. struct VersionCommon @@ -22,23 +21,20 @@ struct VersionCommon /// @brief Re-definition of the value type used by /// howto5::field::Version field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::field::Version field. static const char* name() { return "Version"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/VersionWithFlags.h b/howtos/howto5/include/howto5/field/VersionWithFlags.h index 58a9211ad..ab226ab5b 100644 --- a/howtos/howto5/include/howto5/field/VersionWithFlags.h +++ b/howtos/howto5/include/howto5/field/VersionWithFlags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "VersionWithFlags" field. @@ -20,7 +20,6 @@ namespace howto5 namespace field { - /// @brief Scope for all the member fields of /// @ref VersionWithFlags field. /// @tparam TOpt Protocol options. @@ -33,8 +32,7 @@ struct VersionWithFlagsMembers TOpt, comms::option::def::FixedBitLength<12U> >; - - + /// @brief Definition of "Flags" field. class Flags : public howto5::field::InterfaceFlags< @@ -53,11 +51,8 @@ struct VersionWithFlagsMembers { return howto5::field::VersionWithFlagsMembersCommon::FlagsCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -98,18 +93,14 @@ class VersionWithFlags : public version, flags ); - + /// @brief Name of the field. static const char* name() { return howto5::field::VersionWithFlagsCommon::name(); } - - }; - } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/field/VersionWithFlagsCommon.h b/howtos/howto5/include/howto5/field/VersionWithFlagsCommon.h index 076cc6ae1..1ca50d3b2 100644 --- a/howtos/howto5/include/howto5/field/VersionWithFlagsCommon.h +++ b/howtos/howto5/include/howto5/field/VersionWithFlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace howto5 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref howto5::field::VersionWithFlags field. struct VersionWithFlagsMembersCommon @@ -23,7 +22,7 @@ struct VersionWithFlagsMembersCommon /// @brief Common types and functions for /// @ref howto5::field::VersionWithFlagsMembers::Version field. using VersionCommon = howto5::field::VersionCommon; - + /// @brief Common types and functions for /// @ref howto5::field::VersionWithFlagsMembers::Flags field. struct FlagsCommon : public howto5::field::InterfaceFlagsCommon @@ -33,9 +32,7 @@ struct VersionWithFlagsMembersCommon { return "Flags"; } - }; - }; /// @brief Common types and functions for @@ -47,10 +44,8 @@ struct VersionWithFlagsCommon { return "VersionWithFlags"; } - }; } // namespace field } // namespace howto5 - diff --git a/howtos/howto5/include/howto5/frame/Frame.h b/howtos/howto5/include/howto5/frame/Frame.h index d2d9ce4ea..39b45a866 100644 --- a/howtos/howto5/include/howto5/frame/Frame.h +++ b/howtos/howto5/include/howto5/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace howto5 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "VersionWithFlags". using VersionWithFlags = howto5::frame::layer::VersionWithFlags< @@ -48,7 +47,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::VersionWithFlags >; - + /// @brief Definition of layer "Id". template using Id = @@ -61,7 +60,7 @@ struct FrameLayers VersionWithFlags, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -80,26 +79,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -107,11 +101,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -150,5 +143,3 @@ class Frame : public } // namespace frame } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/frame/FrameCommon.h b/howtos/howto5/include/howto5/frame/FrameCommon.h index ca47da774..c69c7d205 100644 --- a/howtos/howto5/include/howto5/frame/FrameCommon.h +++ b/howtos/howto5/include/howto5/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto5 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto5::frame::Frame frame. /// @see howto5::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto5::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/input/AllMessages.h b/howtos/howto5/include/howto5/input/AllMessages.h index c95ff311a..3684daecf 100644 --- a/howtos/howto5/include/howto5/input/AllMessages.h +++ b/howtos/howto5/include/howto5/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto5/include/howto5/input/ClientInputMessages.h b/howtos/howto5/include/howto5/input/ClientInputMessages.h index f64e9a40c..4276675ce 100644 --- a/howtos/howto5/include/howto5/input/ClientInputMessages.h +++ b/howtos/howto5/include/howto5/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto5/include/howto5/input/ServerInputMessages.h b/howtos/howto5/include/howto5/input/ServerInputMessages.h index d641a722a..a9d729c98 100644 --- a/howtos/howto5/include/howto5/input/ServerInputMessages.h +++ b/howtos/howto5/include/howto5/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto5/include/howto5/message/Msg1.h b/howtos/howto5/include/howto5/message/Msg1.h index 2880615b5..d96802f04 100644 --- a/howtos/howto5/include/howto5/message/Msg1.h +++ b/howtos/howto5/include/howto5/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "howto5/message/Msg1Common.h" #include "howto5/options/DefaultOptions.h" - namespace howto5 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,24 +44,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -83,26 +77,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg1FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg1FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// The field exists only when B0 in interface flags is set. @@ -123,11 +112,8 @@ struct Msg1Fields { return howto5::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Inner field of @ref F3 optional. class F3Field : public comms::field::IntValue< @@ -143,23 +129,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg1FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg1FieldsCommon::F3Common::name(); } - - }; - + /// @brief Definition of version dependent /// F3 field. struct F3 : public @@ -175,8 +158,7 @@ struct Msg1Fields return F3Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -231,19 +213,19 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto5::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -251,31 +233,26 @@ class Msg1 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B0()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/message/Msg1Common.h b/howtos/howto5/include/howto5/message/Msg1Common.h index 6f25caa33..8d309b827 100644 --- a/howtos/howto5/include/howto5/message/Msg1Common.h +++ b/howtos/howto5/include/howto5/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto5 namespace message { - /// @brief Common types and functions for fields of /// @ref howto5::message::Msg1 message. /// @see howto5::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto5::message::Msg1Fields::F2 field. struct F2MembersCommon @@ -54,24 +51,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg1Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::message::Msg1Fields::F2Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto5::message::Msg1Fields::F2 field. struct F2Common @@ -81,9 +75,8 @@ struct Msg1FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref howto5::message::Msg1Fields::F3 field. struct F3Common @@ -91,22 +84,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg1Fields::F3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::message::Msg1Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -118,12 +108,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto5 - - - diff --git a/howtos/howto5/include/howto5/message/Msg2.h b/howtos/howto5/include/howto5/message/Msg2.h index 960207abf..32ce51896 100644 --- a/howtos/howto5/include/howto5/message/Msg2.h +++ b/howtos/howto5/include/howto5/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -17,14 +17,12 @@ #include "howto5/message/Msg2Common.h" #include "howto5/options/DefaultOptions.h" - namespace howto5 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -51,26 +49,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -93,17 +86,14 @@ struct Msg2Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -123,26 +113,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// The field exists only when B1 in interface flags is set. @@ -163,11 +148,8 @@ struct Msg2Fields { return howto5::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Inner field of @ref F3 optional. class F3Field : public comms::field::IntValue< @@ -183,23 +165,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto5::message::Msg2FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto5::message::Msg2FieldsCommon::F3Common::name(); } - - }; - + /// @brief Definition of version dependent /// F3 field. struct F3 : public @@ -215,8 +194,7 @@ struct Msg2Fields return F3Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -271,17 +249,17 @@ class Msg2 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto5::message::Msg2Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -289,31 +267,26 @@ class Msg2 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B1()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace howto5 - - diff --git a/howtos/howto5/include/howto5/message/Msg2Common.h b/howtos/howto5/include/howto5/message/Msg2Common.h index 6c4d99422..8fd223d44 100644 --- a/howtos/howto5/include/howto5/message/Msg2Common.h +++ b/howtos/howto5/include/howto5/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto5 namespace message { - /// @brief Common types and functions for fields of /// @ref howto5::message::Msg2 message. /// @see howto5::message::Msg2Fields @@ -31,24 +30,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg2Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto5::message::Msg2Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto5::message::Msg2Fields::F1 field. struct F1Common @@ -58,9 +54,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto5::message::Msg2Fields::F2 field. struct F2MembersCommon @@ -72,24 +67,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg2Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::message::Msg2Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto5::message::Msg2Fields::F2 field. struct F2Common @@ -99,9 +91,8 @@ struct Msg2FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref howto5::message::Msg2Fields::F3 field. struct F3Common @@ -109,22 +100,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto5::message::Msg2Fields::F3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto5::message::Msg2Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -136,12 +124,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto5 - - - diff --git a/howtos/howto5/include/howto5/options/BareMetalDefaultOptions.h b/howtos/howto5/include/howto5/options/BareMetalDefaultOptions.h index 0c8c1d77a..839f30753 100644 --- a/howtos/howto5/include/howto5/options/BareMetalDefaultOptions.h +++ b/howtos/howto5/include/howto5/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto5::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto5/include/howto5/options/ClientDefaultOptions.h b/howtos/howto5/include/howto5/options/ClientDefaultOptions.h index 2aea44247..f2e40a273 100644 --- a/howtos/howto5/include/howto5/options/ClientDefaultOptions.h +++ b/howtos/howto5/include/howto5/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto5/include/howto5/options/DataViewDefaultOptions.h b/howtos/howto5/include/howto5/options/DataViewDefaultOptions.h index 90646e083..3b6adde0e 100644 --- a/howtos/howto5/include/howto5/options/DataViewDefaultOptions.h +++ b/howtos/howto5/include/howto5/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto5/include/howto5/options/DefaultOptions.h b/howtos/howto5/include/howto5/options/DefaultOptions.h index 2b012907f..5bd102602 100644 --- a/howtos/howto5/include/howto5/options/DefaultOptions.h +++ b/howtos/howto5/include/howto5/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto5::message::Msg2Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto5::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto5::frame::FrameLayers::VersionWithFlags /// layer. using VersionWithFlags = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto5::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto5/include/howto5/options/ServerDefaultOptions.h b/howtos/howto5/include/howto5/options/ServerDefaultOptions.h index d2356acdc..092530ae7 100644 --- a/howtos/howto5/include/howto5/options/ServerDefaultOptions.h +++ b/howtos/howto5/include/howto5/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto6/include/howto6/Interface.h b/howtos/howto6/include/howto6/Interface.h index 2dd2123a3..4ca075991 100644 --- a/howtos/howto6/include/howto6/Interface.h +++ b/howtos/howto6/include/howto6/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace howto6 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile howto6/Interface.h @@ -27,8 +26,7 @@ struct InterfaceFields howto6::field::ChecksumType< howto6::options::DefaultOptions >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< ChecksumType @@ -67,10 +65,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( checksumType ); - - }; } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/InterfaceCommon.h b/howtos/howto6/include/howto6/InterfaceCommon.h index 45324e950..6695702a0 100644 --- a/howtos/howto6/include/howto6/InterfaceCommon.h +++ b/howtos/howto6/include/howto6/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace howto6 { - /// @brief Common types and functions for fields of /// @ref howto6::Interface interface. /// @see howto6::InterfaceFields @@ -20,8 +19,5 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref howto6::InterfaceFields::ChecksumType field. using ChecksumTypeCommon = howto6::field::ChecksumTypeCommon; - }; } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/MsgId.h b/howtos/howto6/include/howto6/MsgId.h index 6b616daea..f7ffa745c 100644 --- a/howtos/howto6/include/howto6/MsgId.h +++ b/howtos/howto6/include/howto6/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/Version.h b/howtos/howto6/include/howto6/Version.h index 36b19d47e..308e7ed93 100644 --- a/howtos/howto6/include/howto6/Version.h +++ b/howtos/howto6/include/howto6/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto6 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto6/include/howto6/dispatch/DispatchClientInputMessage.h b/howtos/howto6/include/howto6/dispatch/DispatchClientInputMessage.h index ad5cfbd33..23d67e23c 100644 --- a/howtos/howto6/include/howto6/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto6/include/howto6/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto6::options::DefaultOptions. /// @headerfile howto6/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref howto6::options::DefaultOptions as template parameter. /// @note Defined in howto6/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto6/include/howto6/dispatch/DispatchMessage.h b/howtos/howto6/include/howto6/dispatch/DispatchMessage.h index 983ab9d25..f1bb49cb4 100644 --- a/howtos/howto6/include/howto6/dispatch/DispatchMessage.h +++ b/howtos/howto6/include/howto6/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto6::options::DefaultOptions. /// @headerfile howto6/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref howto6::options::DefaultOptions as template parameter. /// @note Defined in howto6/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto6/include/howto6/dispatch/DispatchServerInputMessage.h b/howtos/howto6/include/howto6/dispatch/DispatchServerInputMessage.h index 0f71e0514..1ec1e1555 100644 --- a/howtos/howto6/include/howto6/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto6/include/howto6/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto6::options::DefaultOptions. /// @headerfile howto6/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref howto6::options::DefaultOptions as template parameter. /// @note Defined in howto6/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto6/include/howto6/field/ChecksumType.h b/howtos/howto6/include/howto6/field/ChecksumType.h index 74d4eddfa..3864327ef 100644 --- a/howtos/howto6/include/howto6/field/ChecksumType.h +++ b/howtos/howto6/include/howto6/field/ChecksumType.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "ChecksumType" field. @@ -17,7 +17,6 @@ namespace howto6 namespace field { - /// @brief Definition of "ChecksumType" field. /// @see @ref howto6::field::ChecksumTypeCommon::ValueType /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class ChecksumType : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto6::field::ChecksumTypeCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto6::field::ChecksumTypeCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto6::field::ChecksumTypeCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto6::field::ChecksumTypeCommon::valueName(). static const char* valueName(ValueType val) { return howto6::field::ChecksumTypeCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto6::field::ChecksumTypeCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto6::field::ChecksumTypeCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto6::field::ChecksumTypeCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto6::field::ChecksumTypeCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto6::field::ChecksumTypeCommon::name(); } - - }; - } // namespace field } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/field/ChecksumTypeCommon.h b/howtos/howto6/include/howto6/field/ChecksumTypeCommon.h index eb7f0f70d..5f8c76233 100644 --- a/howtos/howto6/include/howto6/field/ChecksumTypeCommon.h +++ b/howtos/howto6/include/howto6/field/ChecksumTypeCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace howto6 namespace field { - /// @brief Common types and functions for /// @ref howto6::field::ChecksumType field. struct ChecksumTypeCommon @@ -30,27 +27,27 @@ struct ChecksumTypeCommon Sum8 = 0, ///< value @b Sum8. Crc16 = 1, ///< value @b Crc16. Crc32 = 2, ///< value @b Crc32. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto6::field::ChecksumType field. static const char* name() { return "ChecksumType"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -58,10 +55,10 @@ struct ChecksumTypeCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -71,19 +68,15 @@ struct ChecksumTypeCommon "Crc32" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto6::field::ChecksumType field. using ChecksumTypeVal = ChecksumTypeCommon::ValueType; - } // namespace field } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/field/FieldBase.h b/howtos/howto6/include/howto6/field/FieldBase.h index b8c4f87d2..9053276ea 100644 --- a/howtos/howto6/include/howto6/field/FieldBase.h +++ b/howtos/howto6/include/howto6/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/field/MsgId.h b/howtos/howto6/include/howto6/field/MsgId.h index f83839eff..3db9a88af 100644 --- a/howtos/howto6/include/howto6/field/MsgId.h +++ b/howtos/howto6/include/howto6/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto6 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto6::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto6::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto6::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto6::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto6::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto6::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto6::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto6::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto6::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto6::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto6::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/field/MsgIdCommon.h b/howtos/howto6/include/howto6/field/MsgIdCommon.h index ce151a0d6..cb2f1bffb 100644 --- a/howtos/howto6/include/howto6/field/MsgIdCommon.h +++ b/howtos/howto6/include/howto6/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto6/MsgId.h" @@ -19,7 +17,6 @@ namespace howto6 namespace field { - /// @brief Common types and functions for /// @ref howto6::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto6::field::MsgId field. using ValueType = howto6::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto6::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto6::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto6 - diff --git a/howtos/howto6/include/howto6/frame/Frame.h b/howtos/howto6/include/howto6/frame/Frame.h index 94cee96b9..961c4225f 100644 --- a/howtos/howto6/include/howto6/frame/Frame.h +++ b/howtos/howto6/include/howto6/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -27,7 +27,6 @@ namespace howto6 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -40,7 +39,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "ChekcusmType". using ChekcusmType = comms::protocol::TransportValueLayer< @@ -50,7 +49,7 @@ struct FrameLayers 0U, Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -63,7 +62,7 @@ struct FrameLayers ChekcusmType, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -82,26 +81,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -109,7 +103,7 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -132,26 +126,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -159,7 +148,7 @@ struct FrameLayers typename SyncMembers::SyncField, Size >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -178,26 +167,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". template using Checksum = @@ -206,11 +190,10 @@ struct FrameLayers Sync, typename TOpt::frame::FrameLayers::Checksum >; - + /// @brief Final protocol stack definition. template using Stack = Checksum; - }; /// @brief Definition of "Frame" frame class. @@ -253,5 +236,3 @@ class Frame : public } // namespace frame } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/frame/FrameCommon.h b/howtos/howto6/include/howto6/frame/FrameCommon.h index b7dc852fc..a63aab485 100644 --- a/howtos/howto6/include/howto6/frame/FrameCommon.h +++ b/howtos/howto6/include/howto6/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto6 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto6::frame::Frame frame. /// @see howto6::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto6::frame::FrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto6::frame::FrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto6::frame::FrameLayers::SyncMembers struct. struct SyncMembersCommon @@ -60,24 +56,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto6::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto6::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto6::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -89,28 +82,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto6::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto6::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/input/AllMessages.h b/howtos/howto6/include/howto6/input/AllMessages.h index df8ef045b..e9a1ed249 100644 --- a/howtos/howto6/include/howto6/input/AllMessages.h +++ b/howtos/howto6/include/howto6/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto6/include/howto6/input/ClientInputMessages.h b/howtos/howto6/include/howto6/input/ClientInputMessages.h index b318f2896..dfd472c58 100644 --- a/howtos/howto6/include/howto6/input/ClientInputMessages.h +++ b/howtos/howto6/include/howto6/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto6/include/howto6/input/ServerInputMessages.h b/howtos/howto6/include/howto6/input/ServerInputMessages.h index a4e5d9f4e..0fce657a7 100644 --- a/howtos/howto6/include/howto6/input/ServerInputMessages.h +++ b/howtos/howto6/include/howto6/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto6/include/howto6/message/Msg1.h b/howtos/howto6/include/howto6/message/Msg1.h index b8660e3ea..ce07aa950 100644 --- a/howtos/howto6/include/howto6/message/Msg1.h +++ b/howtos/howto6/include/howto6/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "howto6/message/Msg1Common.h" #include "howto6/options/DefaultOptions.h" - namespace howto6 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -45,24 +43,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto6::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/message/Msg1Common.h b/howtos/howto6/include/howto6/message/Msg1Common.h index 1b84b8c98..9469fa2ed 100644 --- a/howtos/howto6/include/howto6/message/Msg1Common.h +++ b/howtos/howto6/include/howto6/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto6 namespace message { - /// @brief Common types and functions for fields of /// @ref howto6::message::Msg1 message. /// @see howto6::message::Msg1Fields @@ -27,22 +26,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto6::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto6::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto6 - - - diff --git a/howtos/howto6/include/howto6/message/Msg2.h b/howtos/howto6/include/howto6/message/Msg2.h index 67a7ac87c..450abf8fd 100644 --- a/howtos/howto6/include/howto6/message/Msg2.h +++ b/howtos/howto6/include/howto6/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto6/message/Msg2Common.h" #include "howto6/options/DefaultOptions.h" - namespace howto6 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -45,24 +43,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto6::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/message/Msg2Common.h b/howtos/howto6/include/howto6/message/Msg2Common.h index 66a7dbb67..138f3fa5c 100644 --- a/howtos/howto6/include/howto6/message/Msg2Common.h +++ b/howtos/howto6/include/howto6/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto6 namespace message { - /// @brief Common types and functions for fields of /// @ref howto6::message::Msg2 message. /// @see howto6::message::Msg2Fields @@ -27,22 +26,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto6::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto6::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto6 - - - diff --git a/howtos/howto6/include/howto6/message/Msg3.h b/howtos/howto6/include/howto6/message/Msg3.h index a32939340..bef31a4c7 100644 --- a/howtos/howto6/include/howto6/message/Msg3.h +++ b/howtos/howto6/include/howto6/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -16,14 +16,12 @@ #include "howto6/message/Msg3Common.h" #include "howto6/options/DefaultOptions.h" - namespace howto6 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -50,26 +48,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto6::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto6::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -90,11 +83,8 @@ struct Msg3Fields { return howto6::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -139,22 +129,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto6::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto6 - - diff --git a/howtos/howto6/include/howto6/message/Msg3Common.h b/howtos/howto6/include/howto6/message/Msg3Common.h index 04bff8ba6..4170f0d7b 100644 --- a/howtos/howto6/include/howto6/message/Msg3Common.h +++ b/howtos/howto6/include/howto6/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto6 namespace message { - /// @brief Common types and functions for fields of /// @ref howto6::message::Msg3 message. /// @see howto6::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// howto6::message::Msg3Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto6::message::Msg3Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto6::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto6 - - - diff --git a/howtos/howto6/include/howto6/options/BareMetalDefaultOptions.h b/howtos/howto6/include/howto6/options/BareMetalDefaultOptions.h index e0f044cdd..a93d5ace2 100644 --- a/howtos/howto6/include/howto6/options/BareMetalDefaultOptions.h +++ b/howtos/howto6/include/howto6/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto6::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto6/include/howto6/options/ClientDefaultOptions.h b/howtos/howto6/include/howto6/options/ClientDefaultOptions.h index e4e835316..9514f12af 100644 --- a/howtos/howto6/include/howto6/options/ClientDefaultOptions.h +++ b/howtos/howto6/include/howto6/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto6/include/howto6/options/DataViewDefaultOptions.h b/howtos/howto6/include/howto6/options/DataViewDefaultOptions.h index 38cfc500c..6c4da550e 100644 --- a/howtos/howto6/include/howto6/options/DataViewDefaultOptions.h +++ b/howtos/howto6/include/howto6/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto6/include/howto6/options/DefaultOptions.h b/howtos/howto6/include/howto6/options/DefaultOptions.h index db5c8a0b6..bb431b834 100644 --- a/howtos/howto6/include/howto6/options/DefaultOptions.h +++ b/howtos/howto6/include/howto6/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto6::message::Msg3Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto6::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto6::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto6::frame::FrameLayers::Checksum /// layer. using Checksum = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto6/include/howto6/options/ServerDefaultOptions.h b/howtos/howto6/include/howto6/options/ServerDefaultOptions.h index b405563db..2f7b49250 100644 --- a/howtos/howto6/include/howto6/options/ServerDefaultOptions.h +++ b/howtos/howto6/include/howto6/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto7/include/howto7/Message.h b/howtos/howto7/include/howto7/Message.h index 7fe2a9169..599c9ab59 100644 --- a/howtos/howto7/include/howto7/Message.h +++ b/howtos/howto7/include/howto7/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace howto7 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile howto7/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/MsgId.h b/howtos/howto7/include/howto7/MsgId.h index 4fa1f4778..e2c274f4a 100644 --- a/howtos/howto7/include/howto7/MsgId.h +++ b/howtos/howto7/include/howto7/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace howto7 - diff --git a/howtos/howto7/include/howto7/Version.h b/howtos/howto7/include/howto7/Version.h index 248b122a4..9a132e186 100644 --- a/howtos/howto7/include/howto7/Version.h +++ b/howtos/howto7/include/howto7/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto7 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto7/include/howto7/dispatch/DispatchClientInputMessage.h b/howtos/howto7/include/howto7/dispatch/DispatchClientInputMessage.h index 3629a4339..a87cca143 100644 --- a/howtos/howto7/include/howto7/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto7/include/howto7/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto7::options::DefaultOptions. /// @headerfile howto7/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref howto7::options::DefaultOptions as template parameter. /// @note Defined in howto7/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto7/include/howto7/dispatch/DispatchMessage.h b/howtos/howto7/include/howto7/dispatch/DispatchMessage.h index 1ee50ff5a..48b850472 100644 --- a/howtos/howto7/include/howto7/dispatch/DispatchMessage.h +++ b/howtos/howto7/include/howto7/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto7::options::DefaultOptions. /// @headerfile howto7/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref howto7::options::DefaultOptions as template parameter. /// @note Defined in howto7/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto7/include/howto7/dispatch/DispatchServerInputMessage.h b/howtos/howto7/include/howto7/dispatch/DispatchServerInputMessage.h index eb63f604a..1b144fdca 100644 --- a/howtos/howto7/include/howto7/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto7/include/howto7/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto7::options::DefaultOptions. /// @headerfile howto7/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref howto7::options::DefaultOptions as template parameter. /// @note Defined in howto7/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto7/include/howto7/field/FieldBase.h b/howtos/howto7/include/howto7/field/FieldBase.h index b2c43397e..d4bee8600 100644 --- a/howtos/howto7/include/howto7/field/FieldBase.h +++ b/howtos/howto7/include/howto7/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto7 - diff --git a/howtos/howto7/include/howto7/field/MsgId.h b/howtos/howto7/include/howto7/field/MsgId.h index 5e82848fb..510759c7d 100644 --- a/howtos/howto7/include/howto7/field/MsgId.h +++ b/howtos/howto7/include/howto7/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto7 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto7::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto7::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto7::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto7::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto7::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto7::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto7::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto7::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto7::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto7::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto7::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto7 - diff --git a/howtos/howto7/include/howto7/field/MsgIdCommon.h b/howtos/howto7/include/howto7/field/MsgIdCommon.h index 48ab7aa0b..90211bd7b 100644 --- a/howtos/howto7/include/howto7/field/MsgIdCommon.h +++ b/howtos/howto7/include/howto7/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto7/MsgId.h" @@ -19,7 +17,6 @@ namespace howto7 namespace field { - /// @brief Common types and functions for /// @ref howto7::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto7::field::MsgId field. using ValueType = howto7::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto7::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto7::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto7 - diff --git a/howtos/howto7/include/howto7/frame/Frame.h b/howtos/howto7/include/howto7/frame/Frame.h index be66b3ba5..d816be5d7 100644 --- a/howtos/howto7/include/howto7/frame/Frame.h +++ b/howtos/howto7/include/howto7/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -24,7 +24,6 @@ namespace howto7 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -37,7 +36,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -50,7 +49,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -69,26 +68,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto7::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto7::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -96,7 +90,7 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Scope for field(s) of @ref AlternatingSync layer. struct AlternatingSyncMembers { @@ -115,26 +109,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto7::frame::FrameLayersCommon::AlternatingSyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto7::frame::FrameLayersCommon::AlternatingSyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "AlternatingSync". template using AlternatingSync = @@ -143,11 +132,10 @@ struct FrameLayers Size, typename TOpt::frame::FrameLayers::AlternatingSync >; - + /// @brief Final protocol stack definition. template using Stack = AlternatingSync; - }; /// @brief Definition of "Frame" frame class. @@ -186,5 +174,3 @@ class Frame : public } // namespace frame } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/frame/FrameCommon.h b/howtos/howto7/include/howto7/frame/FrameCommon.h index 108f84b59..9ef00f0d5 100644 --- a/howtos/howto7/include/howto7/frame/FrameCommon.h +++ b/howtos/howto7/include/howto7/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto7 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto7::frame::Frame frame. /// @see howto7::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto7::frame::FrameLayers::AlternatingSyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto7::frame::FrameLayers::AlternatingSyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto7::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -60,28 +56,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto7::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto7::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/input/AllMessages.h b/howtos/howto7/include/howto7/input/AllMessages.h index 3ee71dd1a..93dc2e71e 100644 --- a/howtos/howto7/include/howto7/input/AllMessages.h +++ b/howtos/howto7/include/howto7/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto7/include/howto7/input/ClientInputMessages.h b/howtos/howto7/include/howto7/input/ClientInputMessages.h index a752404ba..12b834a7c 100644 --- a/howtos/howto7/include/howto7/input/ClientInputMessages.h +++ b/howtos/howto7/include/howto7/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto7/include/howto7/input/ServerInputMessages.h b/howtos/howto7/include/howto7/input/ServerInputMessages.h index 2a9cc76c8..378e5c1b9 100644 --- a/howtos/howto7/include/howto7/input/ServerInputMessages.h +++ b/howtos/howto7/include/howto7/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto7/include/howto7/message/Msg1.h b/howtos/howto7/include/howto7/message/Msg1.h index f0f1a133c..848347405 100644 --- a/howtos/howto7/include/howto7/message/Msg1.h +++ b/howtos/howto7/include/howto7/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "howto7/message/Msg1Common.h" #include "howto7/options/DefaultOptions.h" - namespace howto7 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -45,24 +43,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto7::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto7::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto7::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/message/Msg1Common.h b/howtos/howto7/include/howto7/message/Msg1Common.h index 3b37e5419..ab734314f 100644 --- a/howtos/howto7/include/howto7/message/Msg1Common.h +++ b/howtos/howto7/include/howto7/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto7 namespace message { - /// @brief Common types and functions for fields of /// @ref howto7::message::Msg1 message. /// @see howto7::message::Msg1Fields @@ -27,22 +26,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto7::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto7::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto7 - - - diff --git a/howtos/howto7/include/howto7/message/Msg2.h b/howtos/howto7/include/howto7/message/Msg2.h index 6ffbc7af4..157504083 100644 --- a/howtos/howto7/include/howto7/message/Msg2.h +++ b/howtos/howto7/include/howto7/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto7/message/Msg2Common.h" #include "howto7/options/DefaultOptions.h" - namespace howto7 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -45,24 +43,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto7::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto7::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto7::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/message/Msg2Common.h b/howtos/howto7/include/howto7/message/Msg2Common.h index 6399a2bc1..6acf6b44d 100644 --- a/howtos/howto7/include/howto7/message/Msg2Common.h +++ b/howtos/howto7/include/howto7/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto7 namespace message { - /// @brief Common types and functions for fields of /// @ref howto7::message::Msg2 message. /// @see howto7::message::Msg2Fields @@ -27,22 +26,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto7::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto7::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto7 - - - diff --git a/howtos/howto7/include/howto7/message/Msg3.h b/howtos/howto7/include/howto7/message/Msg3.h index e6be6d5cc..b0125dd1b 100644 --- a/howtos/howto7/include/howto7/message/Msg3.h +++ b/howtos/howto7/include/howto7/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -16,14 +16,12 @@ #include "howto7/message/Msg3Common.h" #include "howto7/options/DefaultOptions.h" - namespace howto7 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -50,26 +48,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto7::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto7::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -90,11 +83,8 @@ struct Msg3Fields { return howto7::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -139,22 +129,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto7::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto7 - - diff --git a/howtos/howto7/include/howto7/message/Msg3Common.h b/howtos/howto7/include/howto7/message/Msg3Common.h index 700e6e861..c7daa3563 100644 --- a/howtos/howto7/include/howto7/message/Msg3Common.h +++ b/howtos/howto7/include/howto7/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto7 namespace message { - /// @brief Common types and functions for fields of /// @ref howto7::message::Msg3 message. /// @see howto7::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// howto7::message::Msg3Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto7::message::Msg3Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto7::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto7 - - - diff --git a/howtos/howto7/include/howto7/options/BareMetalDefaultOptions.h b/howtos/howto7/include/howto7/options/BareMetalDefaultOptions.h index d0fc0c598..da595a49a 100644 --- a/howtos/howto7/include/howto7/options/BareMetalDefaultOptions.h +++ b/howtos/howto7/include/howto7/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto7::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto7/include/howto7/options/ClientDefaultOptions.h b/howtos/howto7/include/howto7/options/ClientDefaultOptions.h index 6b5ffa8c4..ef157df13 100644 --- a/howtos/howto7/include/howto7/options/ClientDefaultOptions.h +++ b/howtos/howto7/include/howto7/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto7/include/howto7/options/DataViewDefaultOptions.h b/howtos/howto7/include/howto7/options/DataViewDefaultOptions.h index 80b561922..d01f15606 100644 --- a/howtos/howto7/include/howto7/options/DataViewDefaultOptions.h +++ b/howtos/howto7/include/howto7/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto7/include/howto7/options/DefaultOptions.h b/howtos/howto7/include/howto7/options/DefaultOptions.h index e558c100c..025d50f03 100644 --- a/howtos/howto7/include/howto7/options/DefaultOptions.h +++ b/howtos/howto7/include/howto7/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto7::message::Msg3Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto7::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto7::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto7::frame::FrameLayers::AlternatingSync /// layer. using AlternatingSync = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto7/include/howto7/options/ServerDefaultOptions.h b/howtos/howto7/include/howto7/options/ServerDefaultOptions.h index 0e4776fa5..5926939ae 100644 --- a/howtos/howto7/include/howto7/options/ServerDefaultOptions.h +++ b/howtos/howto7/include/howto7/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto8/include/howto8/Interface.h b/howtos/howto8/include/howto8/Interface.h index be21700dd..16e5f8a96 100644 --- a/howtos/howto8/include/howto8/Interface.h +++ b/howtos/howto8/include/howto8/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace howto8 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile howto8/Interface.h @@ -27,8 +26,7 @@ struct InterfaceFields howto8::field::Flags< howto8::options::DefaultOptions >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -66,10 +64,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/InterfaceCommon.h b/howtos/howto8/include/howto8/InterfaceCommon.h index 19b07272f..eae97604f 100644 --- a/howtos/howto8/include/howto8/InterfaceCommon.h +++ b/howtos/howto8/include/howto8/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace howto8 { - /// @brief Common types and functions for fields of /// @ref howto8::Interface interface. /// @see howto8::InterfaceFields @@ -20,8 +19,5 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref howto8::InterfaceFields::Flags field. using FlagsCommon = howto8::field::FlagsCommon; - }; } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/MsgId.h b/howtos/howto8/include/howto8/MsgId.h index d2b98d248..46ba39b65 100644 --- a/howtos/howto8/include/howto8/MsgId.h +++ b/howtos/howto8/include/howto8/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/Version.h b/howtos/howto8/include/howto8/Version.h index 41d993b09..d54f57459 100644 --- a/howtos/howto8/include/howto8/Version.h +++ b/howtos/howto8/include/howto8/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto8 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto8/include/howto8/dispatch/DispatchClientInputMessage.h b/howtos/howto8/include/howto8/dispatch/DispatchClientInputMessage.h index 97c9a801f..b77218b5d 100644 --- a/howtos/howto8/include/howto8/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto8/include/howto8/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto8::options::DefaultOptions. /// @headerfile howto8/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref howto8::options::DefaultOptions as template parameter. /// @note Defined in howto8/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto8/include/howto8/dispatch/DispatchMessage.h b/howtos/howto8/include/howto8/dispatch/DispatchMessage.h index c1de0251e..2673f3cd6 100644 --- a/howtos/howto8/include/howto8/dispatch/DispatchMessage.h +++ b/howtos/howto8/include/howto8/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto8::options::DefaultOptions. /// @headerfile howto8/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref howto8::options::DefaultOptions as template parameter. /// @note Defined in howto8/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto8/include/howto8/dispatch/DispatchServerInputMessage.h b/howtos/howto8/include/howto8/dispatch/DispatchServerInputMessage.h index 155f53d7e..eb1b73a0c 100644 --- a/howtos/howto8/include/howto8/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto8/include/howto8/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto8::options::DefaultOptions. /// @headerfile howto8/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref howto8::options::DefaultOptions as template parameter. /// @note Defined in howto8/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto8/include/howto8/field/FieldBase.h b/howtos/howto8/include/howto8/field/FieldBase.h index af5fd87e2..2941e5617 100644 --- a/howtos/howto8/include/howto8/field/FieldBase.h +++ b/howtos/howto8/include/howto8/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/field/Flags.h b/howtos/howto8/include/howto8/field/Flags.h index a67b57ef4..10ab65a4e 100644 --- a/howtos/howto8/include/howto8/field/Flags.h +++ b/howtos/howto8/include/howto8/field/Flags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Flags" field. @@ -17,7 +17,6 @@ namespace howto8 namespace field { - /// @brief Definition of "Flags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -50,7 +49,7 @@ class Flags : public B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref howto8::field::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -59,18 +58,14 @@ class Flags : public howto8::field::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return howto8::field::FlagsCommon::name(); } - - }; - } // namespace field } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/field/FlagsCommon.h b/howtos/howto8/include/howto8/field/FlagsCommon.h index facdc8e63..b04790b9a 100644 --- a/howtos/howto8/include/howto8/field/FlagsCommon.h +++ b/howtos/howto8/include/howto8/field/FlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto8 namespace field { - /// @brief Common types and functions for /// @ref howto8::field::Flags field. struct FlagsCommon @@ -24,7 +23,7 @@ struct FlagsCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref howto8::field::Flags field. static const char* bitName(std::size_t idx) @@ -33,19 +32,16 @@ struct FlagsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/field/MsgId.h b/howtos/howto8/include/howto8/field/MsgId.h index fca7fee23..1a96ecd6f 100644 --- a/howtos/howto8/include/howto8/field/MsgId.h +++ b/howtos/howto8/include/howto8/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto8 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto8::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto8::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto8::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto8::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto8::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto8::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto8::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto8::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto8::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto8::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto8::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/field/MsgIdCommon.h b/howtos/howto8/include/howto8/field/MsgIdCommon.h index 027fa3631..ef0489de4 100644 --- a/howtos/howto8/include/howto8/field/MsgIdCommon.h +++ b/howtos/howto8/include/howto8/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto8/MsgId.h" @@ -19,7 +17,6 @@ namespace howto8 namespace field { - /// @brief Common types and functions for /// @ref howto8::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto8::field::MsgId field. using ValueType = howto8::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto8::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto8::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto8 - diff --git a/howtos/howto8/include/howto8/frame/Frame.h b/howtos/howto8/include/howto8/frame/Frame.h index 893adc3fa..47a51337d 100644 --- a/howtos/howto8/include/howto8/frame/Frame.h +++ b/howtos/howto8/include/howto8/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -29,7 +29,6 @@ namespace howto8 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -42,7 +41,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref Flags layer. struct FlagsMembers { @@ -64,13 +63,9 @@ struct FrameLayers { return howto8::frame::FrameLayersCommon::FlagsMembersCommon::OptFlagsCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Flags". using Flags = howto8::frame::layer::Flags< @@ -78,7 +73,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Flags >; - + /// @brief Scope for field(s) of @ref Id layer. struct IdMembers { @@ -92,8 +87,7 @@ struct FrameLayers TOpt, comms::option::def::FixedBitLength<7U> >; - - + /// @brief Definition of "Ctrl" field. class Ctrl : public comms::field::BitmaskValue< @@ -117,7 +111,7 @@ struct FrameLayers COMMS_BITMASK_BITS_SEQ( HasFlags ); - + /// @brief Retrieve name of the bit. /// @see @ref howto8::frame::FrameLayersCommon::IdMembersCommon::FieldMembersCommon::CtrlCommon::bitName(). static const char* bitName(BitIdx idx) @@ -126,17 +120,14 @@ struct FrameLayers howto8::frame::FrameLayersCommon::IdMembersCommon::FieldMembersCommon::CtrlCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return howto8::frame::FrameLayersCommon::IdMembersCommon::FieldMembersCommon::CtrlCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -144,7 +135,7 @@ struct FrameLayers Ctrl >; }; - + /// @brief Definition of "Field" field. class Field : public comms::field::Bitfield< @@ -172,19 +163,15 @@ struct FrameLayers msgId, ctrl ); - + /// @brief Name of the field. static const char* name() { return howto8::frame::FrameLayersCommon::IdMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Id". template using Id = @@ -195,7 +182,7 @@ struct FrameLayers Flags, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -214,26 +201,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto8::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto8::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -241,11 +223,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -284,5 +265,3 @@ class Frame : public } // namespace frame } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/frame/FrameCommon.h b/howtos/howto8/include/howto8/frame/FrameCommon.h index bd7c7109f..bc2fb9e72 100644 --- a/howtos/howto8/include/howto8/frame/FrameCommon.h +++ b/howtos/howto8/include/howto8/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace howto8 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto8::frame::Frame frame. /// @see howto8::frame::FrameLayers @@ -33,24 +32,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto8::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto8::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto8::frame::FrameLayers::IdMembers struct. struct IdMembersCommon @@ -62,7 +58,7 @@ struct FrameLayersCommon /// @brief Common types and functions for /// @ref howto8::frame::FrameLayers::IdMembers::FieldMembers::MsgId field. using MsgIdCommon = howto8::field::MsgIdCommon; - + /// @brief Common types and functions for /// @ref howto8::frame::FrameLayers::IdMembers::FieldMembers::Ctrl field. struct CtrlCommon @@ -72,7 +68,7 @@ struct FrameLayersCommon { return "Ctrl"; } - + /// @brief Retrieve name of the bit of /// @ref howto8::frame::FrameLayers::IdMembers::FieldMembers::Ctrl field. static const char* bitName(std::size_t idx) @@ -80,20 +76,17 @@ struct FrameLayersCommon static const char* Map[] = { "HasFlags" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto8::frame::FrameLayers::IdMembers::Field field. struct FieldCommon @@ -103,11 +96,9 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref howto8::frame::FrameLayers::FlagsMembers struct. struct FlagsMembersCommon @@ -121,15 +112,10 @@ struct FrameLayersCommon { return "OptFlags"; } - }; - }; - }; } // namespace frame } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/input/AllMessages.h b/howtos/howto8/include/howto8/input/AllMessages.h index 53c0f382b..90a89da23 100644 --- a/howtos/howto8/include/howto8/input/AllMessages.h +++ b/howtos/howto8/include/howto8/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto8/include/howto8/input/ClientInputMessages.h b/howtos/howto8/include/howto8/input/ClientInputMessages.h index 90d314a19..74303c6df 100644 --- a/howtos/howto8/include/howto8/input/ClientInputMessages.h +++ b/howtos/howto8/include/howto8/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto8/include/howto8/input/ServerInputMessages.h b/howtos/howto8/include/howto8/input/ServerInputMessages.h index cda649947..f7bd22695 100644 --- a/howtos/howto8/include/howto8/input/ServerInputMessages.h +++ b/howtos/howto8/include/howto8/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto8/include/howto8/message/Msg1.h b/howtos/howto8/include/howto8/message/Msg1.h index 5396dd33a..db960ef63 100644 --- a/howtos/howto8/include/howto8/message/Msg1.h +++ b/howtos/howto8/include/howto8/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "howto8/message/Msg1Common.h" #include "howto8/options/DefaultOptions.h" - namespace howto8 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,24 +44,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto8::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto8::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -83,26 +77,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto8::message::Msg1FieldsCommon::F2MembersCommon::F2FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto8::message::Msg1FieldsCommon::F2MembersCommon::F2FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// Present when B0 in the interface flags is set @@ -123,11 +112,8 @@ struct Msg1Fields { return howto8::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -178,19 +164,19 @@ class Msg1 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto8::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -198,31 +184,26 @@ class Msg1 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B0()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/message/Msg1Common.h b/howtos/howto8/include/howto8/message/Msg1Common.h index b74ec08d2..90acd71e9 100644 --- a/howtos/howto8/include/howto8/message/Msg1Common.h +++ b/howtos/howto8/include/howto8/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto8 namespace message { - /// @brief Common types and functions for fields of /// @ref howto8::message::Msg1 message. /// @see howto8::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto8::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto8::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto8::message::Msg1Fields::F2 field. struct F2MembersCommon @@ -54,24 +51,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto8::message::Msg1Fields::F2Members::F2Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto8::message::Msg1Fields::F2Members::F2Field field. static const char* name() { return "F2Field"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto8::message::Msg1Fields::F2 field. struct F2Common @@ -81,9 +75,7 @@ struct Msg1FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -95,12 +87,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto8 - - - diff --git a/howtos/howto8/include/howto8/message/Msg2.h b/howtos/howto8/include/howto8/message/Msg2.h index 2f9923536..df0309557 100644 --- a/howtos/howto8/include/howto8/message/Msg2.h +++ b/howtos/howto8/include/howto8/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -16,14 +16,12 @@ #include "howto8/message/Msg2Common.h" #include "howto8/options/DefaultOptions.h" - namespace howto8 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -46,24 +44,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto8::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto8::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -83,26 +77,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto8::message::Msg2FieldsCommon::F2MembersCommon::F2FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto8::message::Msg2FieldsCommon::F2MembersCommon::F2FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// Present when B1 in the interface flags is set @@ -123,11 +112,8 @@ struct Msg2Fields { return howto8::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -178,19 +164,19 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 8U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto8::message::Msg2Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -198,31 +184,26 @@ class Msg2 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B1()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace howto8 - - diff --git a/howtos/howto8/include/howto8/message/Msg2Common.h b/howtos/howto8/include/howto8/message/Msg2Common.h index 4774330b7..6ff9666eb 100644 --- a/howtos/howto8/include/howto8/message/Msg2Common.h +++ b/howtos/howto8/include/howto8/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto8 namespace message { - /// @brief Common types and functions for fields of /// @ref howto8::message::Msg2 message. /// @see howto8::message::Msg2Fields @@ -27,22 +26,20 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto8::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto8::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref howto8::message::Msg2Fields::F2 field. struct F2MembersCommon @@ -54,24 +51,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto8::message::Msg2Fields::F2Members::F2Field field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto8::message::Msg2Fields::F2Members::F2Field field. static const char* name() { return "F2Field"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto8::message::Msg2Fields::F2 field. struct F2Common @@ -81,9 +75,7 @@ struct Msg2FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -95,12 +87,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto8 - - - diff --git a/howtos/howto8/include/howto8/options/BareMetalDefaultOptions.h b/howtos/howto8/include/howto8/options/BareMetalDefaultOptions.h index e13750f85..1c9da3d3a 100644 --- a/howtos/howto8/include/howto8/options/BareMetalDefaultOptions.h +++ b/howtos/howto8/include/howto8/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,13 +37,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto8/include/howto8/options/ClientDefaultOptions.h b/howtos/howto8/include/howto8/options/ClientDefaultOptions.h index 7319e9008..ad5d177df 100644 --- a/howtos/howto8/include/howto8/options/ClientDefaultOptions.h +++ b/howtos/howto8/include/howto8/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto8/include/howto8/options/DataViewDefaultOptions.h b/howtos/howto8/include/howto8/options/DataViewDefaultOptions.h index a68d90274..36e2d8bc3 100644 --- a/howtos/howto8/include/howto8/options/DataViewDefaultOptions.h +++ b/howtos/howto8/include/howto8/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,13 +31,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto8/include/howto8/options/DefaultOptions.h b/howtos/howto8/include/howto8/options/DefaultOptions.h index 35568e098..f9c57b219 100644 --- a/howtos/howto8/include/howto8/options/DefaultOptions.h +++ b/howtos/howto8/include/howto8/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,21 +30,16 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto8::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto8::frame::FrameLayers::Flags layer. using Flags = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto8::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto8/include/howto8/options/ServerDefaultOptions.h b/howtos/howto8/include/howto8/options/ServerDefaultOptions.h index 205eac4fd..74a2dfbe7 100644 --- a/howtos/howto8/include/howto8/options/ServerDefaultOptions.h +++ b/howtos/howto8/include/howto8/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/howtos/howto9/include/howto9/Message.h b/howtos/howto9/include/howto9/Message.h index d352293cd..95bfda5ad 100644 --- a/howtos/howto9/include/howto9/Message.h +++ b/howtos/howto9/include/howto9/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace howto9 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile howto9/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/MsgId.h b/howtos/howto9/include/howto9/MsgId.h index c974666c5..65b0cfb00 100644 --- a/howtos/howto9/include/howto9/MsgId.h +++ b/howtos/howto9/include/howto9/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/Version.h b/howtos/howto9/include/howto9/Version.h index 30379ca4b..923f8dd71 100644 --- a/howtos/howto9/include/howto9/Version.h +++ b/howtos/howto9/include/howto9/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace howto9 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/howtos/howto9/include/howto9/dispatch/DispatchClientInputMessage.h b/howtos/howto9/include/howto9/dispatch/DispatchClientInputMessage.h index 4359ca530..85a068551 100644 --- a/howtos/howto9/include/howto9/dispatch/DispatchClientInputMessage.h +++ b/howtos/howto9/include/howto9/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto9::options::DefaultOptions. /// @headerfile howto9/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref howto9::options::DefaultOptions as template parameter. /// @note Defined in howto9/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto9/include/howto9/dispatch/DispatchMessage.h b/howtos/howto9/include/howto9/dispatch/DispatchMessage.h index b8a651ccb..81828ced9 100644 --- a/howtos/howto9/include/howto9/dispatch/DispatchMessage.h +++ b/howtos/howto9/include/howto9/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto9::options::DefaultOptions. /// @headerfile howto9/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref howto9::options::DefaultOptions as template parameter. /// @note Defined in howto9/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto9/include/howto9/dispatch/DispatchServerInputMessage.h b/howtos/howto9/include/howto9/dispatch/DispatchServerInputMessage.h index a41fb37bd..d61950847 100644 --- a/howtos/howto9/include/howto9/dispatch/DispatchServerInputMessage.h +++ b/howtos/howto9/include/howto9/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref howto9::options::DefaultOptions. /// @headerfile howto9/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref howto9::options::DefaultOptions as template parameter. /// @note Defined in howto9/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/howtos/howto9/include/howto9/field/FieldBase.h b/howtos/howto9/include/howto9/field/FieldBase.h index 3c2fe0fa6..506a06881 100644 --- a/howtos/howto9/include/howto9/field/FieldBase.h +++ b/howtos/howto9/include/howto9/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/MsgId.h b/howtos/howto9/include/howto9/field/MsgId.h index edbb3885b..63f5f03cc 100644 --- a/howtos/howto9/include/howto9/field/MsgId.h +++ b/howtos/howto9/include/howto9/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace howto9 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref howto9::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = howto9::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref howto9::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = howto9::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref howto9::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return howto9::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref howto9::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return howto9::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref howto9::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return howto9::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return howto9::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/MsgIdCommon.h b/howtos/howto9/include/howto9/field/MsgIdCommon.h index e48c69494..b0f3ae6c9 100644 --- a/howtos/howto9/include/howto9/field/MsgIdCommon.h +++ b/howtos/howto9/include/howto9/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "howto9/MsgId.h" @@ -19,7 +17,6 @@ namespace howto9 namespace field { - /// @brief Common types and functions for /// @ref howto9::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref howto9::field::MsgId field. using ValueType = howto9::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref howto9::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref howto9::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/SizeField.h b/howtos/howto9/include/howto9/field/SizeField.h index 0a9fd6d65..913c24789 100644 --- a/howtos/howto9/include/howto9/field/SizeField.h +++ b/howtos/howto9/include/howto9/field/SizeField.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "SizeField" field. @@ -18,7 +18,6 @@ namespace howto9 namespace field { - /// @brief Definition of "SizeField" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -39,25 +38,20 @@ class SizeField : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::field::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::field::SizeFieldCommon::name(); } - - }; - } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/SizeFieldCommon.h b/howtos/howto9/include/howto9/field/SizeFieldCommon.h index c05ff3d16..f2c992d0c 100644 --- a/howtos/howto9/include/howto9/field/SizeFieldCommon.h +++ b/howtos/howto9/include/howto9/field/SizeFieldCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace field { - /// @brief Common types and functions for /// @ref howto9::field::SizeField field. struct SizeFieldCommon @@ -22,23 +21,20 @@ struct SizeFieldCommon /// @brief Re-definition of the value type used by /// howto9::field::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto9::field::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/SyncField.h b/howtos/howto9/include/howto9/field/SyncField.h index 9bf709039..d8e921c28 100644 --- a/howtos/howto9/include/howto9/field/SyncField.h +++ b/howtos/howto9/include/howto9/field/SyncField.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "SyncField" field. @@ -18,7 +18,6 @@ namespace howto9 namespace field { - /// @brief Definition of "SyncField" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class SyncField : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::field::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::field::SyncFieldCommon::name(); } - - }; - } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/field/SyncFieldCommon.h b/howtos/howto9/include/howto9/field/SyncFieldCommon.h index 84f360f5e..b664b1b19 100644 --- a/howtos/howto9/include/howto9/field/SyncFieldCommon.h +++ b/howtos/howto9/include/howto9/field/SyncFieldCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace field { - /// @brief Common types and functions for /// @ref howto9::field::SyncField field. struct SyncFieldCommon @@ -22,23 +21,20 @@ struct SyncFieldCommon /// @brief Re-definition of the value type used by /// howto9::field::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto9::field::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace howto9 - diff --git a/howtos/howto9/include/howto9/frame/Frame.h b/howtos/howto9/include/howto9/frame/Frame.h index 813581b82..16cdf2ad4 100644 --- a/howtos/howto9/include/howto9/frame/Frame.h +++ b/howtos/howto9/include/howto9/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -27,7 +27,6 @@ namespace howto9 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -40,7 +39,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -59,26 +58,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". using Checksum = howto9::frame::layer::Checksum< @@ -86,7 +80,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Checksum >; - + /// @brief Definition of layer "Id". template using Id = @@ -99,7 +93,7 @@ struct FrameLayers Checksum, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Definition of layer "Size". template using Size = @@ -109,7 +103,7 @@ struct FrameLayers >, Id >; - + /// @brief Definition of layer "Sync". template using Sync = @@ -120,11 +114,10 @@ struct FrameLayers >, Size >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -165,5 +158,3 @@ class Frame : public } // namespace frame } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/frame/FrameCommon.h b/howtos/howto9/include/howto9/frame/FrameCommon.h index e89d2cc6f..b3cbc7e8e 100644 --- a/howtos/howto9/include/howto9/frame/FrameCommon.h +++ b/howtos/howto9/include/howto9/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref howto9::frame::Frame frame. /// @see howto9::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// howto9::frame::FrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto9::frame::FrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/input/AllMessages.h b/howtos/howto9/include/howto9/input/AllMessages.h index e82e4a358..df0c2775a 100644 --- a/howtos/howto9/include/howto9/input/AllMessages.h +++ b/howtos/howto9/include/howto9/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/howtos/howto9/include/howto9/input/ClientInputMessages.h b/howtos/howto9/include/howto9/input/ClientInputMessages.h index 693d4d009..19b0ea413 100644 --- a/howtos/howto9/include/howto9/input/ClientInputMessages.h +++ b/howtos/howto9/include/howto9/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/howtos/howto9/include/howto9/input/ServerInputMessages.h b/howtos/howto9/include/howto9/input/ServerInputMessages.h index 6a9bba400..b3a5b5609 100644 --- a/howtos/howto9/include/howto9/input/ServerInputMessages.h +++ b/howtos/howto9/include/howto9/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/howtos/howto9/include/howto9/message/Msg1.h b/howtos/howto9/include/howto9/message/Msg1.h index 5166288ee..7e3940b14 100644 --- a/howtos/howto9/include/howto9/message/Msg1.h +++ b/howtos/howto9/include/howto9/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "howto9/message/Msg1Common.h" #include "howto9/options/DefaultOptions.h" - namespace howto9 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -45,24 +43,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto9::message::Msg1Common::name(); } - - }; } // namespace message } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/message/Msg1Common.h b/howtos/howto9/include/howto9/message/Msg1Common.h index 97d06f240..368fbfef5 100644 --- a/howtos/howto9/include/howto9/message/Msg1Common.h +++ b/howtos/howto9/include/howto9/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace message { - /// @brief Common types and functions for fields of /// @ref howto9::message::Msg1 message. /// @see howto9::message::Msg1Fields @@ -27,22 +26,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// howto9::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref howto9::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace howto9 - - - diff --git a/howtos/howto9/include/howto9/message/Msg2.h b/howtos/howto9/include/howto9/message/Msg2.h index fd078179d..0d785246c 100644 --- a/howtos/howto9/include/howto9/message/Msg2.h +++ b/howtos/howto9/include/howto9/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "howto9/message/Msg2Common.h" #include "howto9/options/DefaultOptions.h" - namespace howto9 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -45,24 +43,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto9::message::Msg2Common::name(); } - - }; } // namespace message } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/message/Msg2Common.h b/howtos/howto9/include/howto9/message/Msg2Common.h index adf56ebcc..7dc049f36 100644 --- a/howtos/howto9/include/howto9/message/Msg2Common.h +++ b/howtos/howto9/include/howto9/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace message { - /// @brief Common types and functions for fields of /// @ref howto9::message::Msg2 message. /// @see howto9::message::Msg2Fields @@ -27,22 +26,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// howto9::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref howto9::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace howto9 - - - diff --git a/howtos/howto9/include/howto9/message/Msg3.h b/howtos/howto9/include/howto9/message/Msg3.h index 722d0f417..78c561619 100644 --- a/howtos/howto9/include/howto9/message/Msg3.h +++ b/howtos/howto9/include/howto9/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -16,14 +16,12 @@ #include "howto9/message/Msg3Common.h" #include "howto9/options/DefaultOptions.h" - namespace howto9 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -50,26 +48,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return howto9::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return howto9::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -90,11 +83,8 @@ struct Msg3Fields { return howto9::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -139,22 +129,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return howto9::message::Msg3Common::name(); } - - }; } // namespace message } // namespace howto9 - - diff --git a/howtos/howto9/include/howto9/message/Msg3Common.h b/howtos/howto9/include/howto9/message/Msg3Common.h index 6d82255a4..204a7100c 100644 --- a/howtos/howto9/include/howto9/message/Msg3Common.h +++ b/howtos/howto9/include/howto9/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace howto9 namespace message { - /// @brief Common types and functions for fields of /// @ref howto9::message::Msg3 message. /// @see howto9::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// howto9::message::Msg3Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref howto9::message::Msg3Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref howto9::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace howto9 - - - diff --git a/howtos/howto9/include/howto9/options/BareMetalDefaultOptions.h b/howtos/howto9/include/howto9/options/BareMetalDefaultOptions.h index 2fcd373f3..b5106cb2b 100644 --- a/howtos/howto9/include/howto9/options/BareMetalDefaultOptions.h +++ b/howtos/howto9/include/howto9/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -37,11 +37,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -56,7 +54,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// howto9::frame::FrameLayers::Id layer. using Id = @@ -64,13 +62,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/howtos/howto9/include/howto9/options/ClientDefaultOptions.h b/howtos/howto9/include/howto9/options/ClientDefaultOptions.h index 9cf3180fe..9ed303464 100644 --- a/howtos/howto9/include/howto9/options/ClientDefaultOptions.h +++ b/howtos/howto9/include/howto9/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/howtos/howto9/include/howto9/options/DataViewDefaultOptions.h b/howtos/howto9/include/howto9/options/DataViewDefaultOptions.h index 838d97b1b..964644fe4 100644 --- a/howtos/howto9/include/howto9/options/DataViewDefaultOptions.h +++ b/howtos/howto9/include/howto9/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -31,11 +31,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -50,13 +48,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/howtos/howto9/include/howto9/options/DefaultOptions.h b/howtos/howto9/include/howto9/options/DefaultOptions.h index 7f937c6f7..55b300350 100644 --- a/howtos/howto9/include/howto9/options/DefaultOptions.h +++ b/howtos/howto9/include/howto9/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -30,11 +30,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto9::message::Msg3Fields::F1 field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -45,22 +43,17 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// howto9::frame::FrameLayers::Data layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto9::frame::FrameLayers::Checksum /// layer. using Checksum = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// howto9::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/howtos/howto9/include/howto9/options/ServerDefaultOptions.h b/howtos/howto9/include/howto9/options/ServerDefaultOptions.h index 1ceb9c530..642a072d1 100644 --- a/howtos/howto9/include/howto9/options/ServerDefaultOptions.h +++ b/howtos/howto9/include/howto9/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/script/env_dev.sh b/script/env_dev.sh new file mode 100755 index 000000000..21b0673bc --- /dev/null +++ b/script/env_dev.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -z "${CC}" -o -z "${CXX}" ]; then + echo "ERROR: Compilers are not provided" + exit 1 +fi + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT_DIR=$( dirname ${SCRIPT_DIR} ) +BUILD_DIR="${ROOT_DIR}/build.${CC}" +mkdir -p ${BUILD_DIR} +cd ${BUILD_DIR} + +cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZERS=ON "$@" diff --git a/script/env_dev_clang.sh b/script/env_dev_clang.sh index f3b98ff6a..c9e59f973 100755 --- a/script/env_dev_clang.sh +++ b/script/env_dev_clang.sh @@ -1,9 +1,7 @@ #!/bin/bash -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ROOT_DIR=$( dirname ${SCRIPT_DIR} ) -BUILD_DIR="${ROOT_DIR}/build.clang" -mkdir -p ${BUILD_DIR} -cd ${BUILD_DIR} +export CC=clang +export CXX=clang++ -CC=clang CXX=clang++ cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZERS=ON +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source ${SCRIPT_DIR}/env_dev.sh "$@" diff --git a/script/env_dev_size.sh b/script/env_dev_size.sh new file mode 100755 index 000000000..3a2a719ca --- /dev/null +++ b/script/env_dev_size.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -z "${CC}" -o -z "${CXX}" ]; then + echo "ERROR: Compilers are not provided" + exit 1 +fi + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT_DIR=$( dirname ${SCRIPT_DIR} ) +BUILD_DIR="${ROOT_DIR}/build.size.${CC}" +mkdir -p ${BUILD_DIR} +cd ${BUILD_DIR} + +cmake .. -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=MinSizeRel "$@" diff --git a/script/env_dev_size_gcc.sh b/script/env_dev_size_gcc.sh new file mode 100755 index 000000000..9a6c652a8 --- /dev/null +++ b/script/env_dev_size_gcc.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export CC=gcc +export CXX=g++ + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source ${SCRIPT_DIR}/env_dev_size.sh "$@" + diff --git a/script/full_debug_build.sh b/script/full_debug_build.sh new file mode 100755 index 000000000..3159ab71a --- /dev/null +++ b/script/full_debug_build.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ -z "${CC}" -o -z "$CXX" ]; then + echo "ERROR: Compilers are not provided" + exit 1 +fi + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT_DIR=$( dirname ${SCRIPT_DIR} ) +export BUILD_DIR="${ROOT_DIR}/build.full.${CC}" +export COMMON_INSTALL_DIR=${BUILD_DIR}/install +export COMMON_BUILD_TYPE=Debug +export EXTERNALS_DIR=${ROOT_DIR}/externals +mkdir -p ${BUILD_DIR} + +${SCRIPT_DIR}/prepare_externals.sh + +cd ${BUILD_DIR} +cmake .. -DCMAKE_INSTALL_PREFIX=${COMMON_INSTALL_DIR} -DCMAKE_BUILD_TYPE=Debug "$@" + +procs=$(nproc) +if [ -n "${procs}" ]; then + procs_param="--parallel ${procs}" +fi + +cmake --build ${BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param} diff --git a/script/full_debug_build_clang.sh b/script/full_debug_build_clang.sh new file mode 100755 index 000000000..fc808781c --- /dev/null +++ b/script/full_debug_build_clang.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export CC=clang +export CXX=clang++ + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +${SCRIPT_DIR}/full_debug_build.sh "$@" + diff --git a/script/full_debug_build_gcc.sh b/script/full_debug_build_gcc.sh new file mode 100755 index 000000000..101913490 --- /dev/null +++ b/script/full_debug_build_gcc.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export CC=gcc +export CXX=g++ + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +${SCRIPT_DIR}/full_debug_build.sh "$@" + diff --git a/script/prepare_externals.bat b/script/prepare_externals.bat new file mode 100755 index 000000000..dda0e1cfe --- /dev/null +++ b/script/prepare_externals.bat @@ -0,0 +1,95 @@ +rem Input +rem BUILD_DIR - Main build directory +rem GENERATOR - CMake generator +rem EXTERNALS_DIR - (Optional) Directory where externals need to be located +rem COMMS_REPO - (Optional) Repository of the COMMS library +rem COMMS_TAG - (Optional) Tag of the COMMS library +rem COMMSDSL_REPO - (Optional) Repository of the commsdsl code generators +rem COMMSDSL_TAG - (Optional) Tag of the commdsl +rem COMMON_INSTALL_DIR - (Optional) Common directory to perform installations +rem COMMON_BUILD_TYPE - (Optional) CMake build type +rem COMMON_CXX_STANDARD - (Optional) CMake C++ standard + +rem ----------------------------------------------------- + +if [%BUILD_DIR%] == [] echo "BUILD_DIR hasn't been specified" & exit /b 1 + +if [%GENERATOR%] == [] set GENERATOR="NMake Makefiles" + +if [%EXTERNALS_DIR%] == [] set EXTERNALS_DIR=%BUILD_DIR%/externals + +if [%COMMS_REPO%] == [] set COMMS_REPO="https://github.com/commschamp/comms.git" + +if [%COMMS_TAG%] == [] set COMMS_TAG="master" + +if [%COMMSDSL_REPO%] == [] set COMMSDSL_REPO="https://github.com/commschamp/commsdsl.git" + +if [%COMMSDSL_TAG%] == [] set COMMSDSL_TAG="master" + +if [%CC_TOOLS_QT_REPO%] == [] set CC_TOOLS_QT_REPO="https://github.com/commschamp/cc_tools_qt.git" + +if [%CC_TOOLS_QT_TAG%] == [] set CC_TOOLS_QT_TAG="master" + +if [%COMMON_BUILD_TYPE%] == [] set COMMON_BUILD_TYPE=Debug + +set COMMS_SRC_DIR=%EXTERNALS_DIR%/comms +set COMMS_BUILD_DIR=%BUILD_DIR%/externals/comms/build +set COMMS_INSTALL_DIR=%COMMS_BUILD_DIR%/install +if NOT [%COMMON_INSTALL_DIR%] == [] set COMMS_INSTALL_DIR=%COMMON_INSTALL_DIR% + +set COMMSDSL_SRC_DIR=%EXTERNALS_DIR%/commsdsl +set COMMSDSL_BUILD_DIR=%BUILD_DIR%/externals/commsdsl/build +set COMMSDSL_INSTALL_DIR=%COMMSDSL_BUILD_DIR%/install +if NOT [%COMMON_INSTALL_DIR%] == [] set COMMSDSL_INSTALL_DIR=%COMMON_INSTALL_DIR% + +rem ---------------------------------------------------- + +mkdir "%EXTERNALS_DIR%" +if exist %COMMS_SRC_DIR%/.git goto comms_update +echo "Cloning COMMS library..." +git clone -b %COMMS_TAG% %COMMS_REPO% %COMMS_SRC_DIR% +if %errorlevel% neq 0 exit /b %errorlevel% +goto comms_build + +:comms_update +echo "Updating COMMS library..." +cd "%COMMS_SRC_DIR%" +git fetch --all +git checkout . +git checkout %COMMS_TAG% +git pull --all +if %errorlevel% neq 0 exit /b %errorlevel% + +:comms_build +echo "Building COMMS library..." +mkdir "%COMMS_BUILD_DIR%" +cd %COMMS_BUILD_DIR% +cmake -G %GENERATOR% -S %COMMS_SRC_DIR% -B %COMMS_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%COMMS_INSTALL_DIR% -DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% -DCMAKE_CXX_STANDARD=%COMMON_CXX_STANDARD% +if %errorlevel% neq 0 exit /b %errorlevel% +cmake --build %COMMS_BUILD_DIR% --config %COMMON_BUILD_TYPE% --target install +if %errorlevel% neq 0 exit /b %errorlevel% + +if exist %COMMSDSL_SRC_DIR%/.git goto commsdsl_update +echo "Cloning commsdsl ..." +git clone -b %COMMSDSL_TAG% %COMMSDSL_REPO% %COMMSDSL_SRC_DIR% +if %errorlevel% neq 0 exit /b %errorlevel% +goto commsdsl_build + +:commsdsl_update +echo "Updating commsdsl..." +cd %COMMSDSL_SRC_DIR% +git fetch --all +git checkout . +git checkout %COMMSDSL_TAG% +git pull --all + +:commsdsl_build +echo "Building commsdsl ..." +mkdir "%COMMSDSL_BUILD_DIR%" +cd %COMMSDSL_BUILD_DIR% +cmake -G %GENERATOR% -S %COMMSDSL_SRC_DIR% -B %COMMSDSL_BUILD_DIR% -DCMAKE_INSTALL_PREFIX=%COMMSDSL_INSTALL_DIR% -DCMAKE_BUILD_TYPE=%COMMON_BUILD_TYPE% ^ + -DCOMMSDSL_INSTALL_LIBRARY=OFF +if %errorlevel% neq 0 exit /b %errorlevel% +cmake --build %COMMSDSL_BUILD_DIR% --config %COMMON_BUILD_TYPE% --target install +if %errorlevel% neq 0 exit /b %errorlevel% + diff --git a/script/prepare_externals.sh b/script/prepare_externals.sh new file mode 100755 index 000000000..861f3de72 --- /dev/null +++ b/script/prepare_externals.sh @@ -0,0 +1,133 @@ +#!/bin/bash + +# Input +# BUILD_DIR - Main build directory +# CC - Main C compiler +# CXX - Main C++ compiler +# CC_COMMSDSL - C compiler for commsdsl +# CXX_COMMSDSL - C++ compiler for commsdsl +# EXTERNALS_DIR - (Optional) Directory where externals need to be located +# COMMS_REPO - (Optional) Repository of the COMMS library +# COMMS_TAG - (Optional) Tag of the COMMS library +# COMMSDSL_REPO - (Optional) Repository of the commsdsl code generators +# COMMSDSL_TAG - (Optional) Tag of the commdsl +# COMMON_INSTALL_DIR - (Optional) Common directory to perform installations +# COMMON_BUILD_TYPE - (Optional) CMake build type +# COMMON_CXX_STANDARD - (Optional) CMake C++ standard + +##################################### + +if [ -z "${BUILD_DIR}" ]; then + echo "BUILD_DIR hasn't been specified" + exit 1 +fi + +if [ -z "${EXTERNALS_DIR}" ]; then + EXTERNALS_DIR=${BUILD_DIR}/externals +fi + +if [ -z "${COMMS_REPO}" ]; then + COMMS_REPO=https://github.com/commschamp/comms.git +fi + +if [ -z "${COMMS_TAG}" ]; then + COMMS_TAG=master +fi + +if [ -z "${COMMSDSL_REPO}" ]; then + COMMSDSL_REPO=https://github.com/commschamp/commsdsl.git +fi + +if [ -z "${COMMSDSL_TAG}" ]; then + COMMSDSL_TAG=master +fi + +if [ -z "${COMMON_BUILD_TYPE}" ]; then + COMMON_BUILD_TYPE=Debug +fi + +if [ -z "${CC_COMMSDSL}" ]; then + CC_COMMSDSL=${CC} +fi + +if [ -z "${CXX_COMMSDSL}" ]; then + CXX_COMMSDSL=${CXX} +fi + +COMMS_SRC_DIR=${EXTERNALS_DIR}/comms +COMMS_BUILD_DIR=${BUILD_DIR}/externals/comms/build +COMMS_INSTALL_DIR=${COMMS_BUILD_DIR}/install +if [ -n "${COMMON_INSTALL_DIR}" ]; then + COMMS_INSTALL_DIR=${COMMON_INSTALL_DIR} +fi + +COMMSDSL_SRC_DIR=${EXTERNALS_DIR}/commsdsl +COMMSDSL_BUILD_DIR=${BUILD_DIR}/externals/commsdsl/build +COMMSDSL_INSTALL_DIR=${COMMSDSL_BUILD_DIR}/install +if [ -n "${COMMON_INSTALL_DIR}" ]; then + COMMSDSL_INSTALL_DIR=${COMMON_INSTALL_DIR} +fi + +CC_TOOLS_QT_SRC_DIR=${EXTERNALS_DIR}/cc_tools_qt +CC_TOOLS_QT_BUILD_DIR=${BUILD_DIR}/externals/cc_tools_qt/build +CC_TOOLS_QT_INSTALL_DIR=${CC_TOOLS_QT_BUILD_DIR}/install +if [ -n "${COMMON_INSTALL_DIR}" ]; then + CC_TOOLS_QT_INSTALL_DIR=${COMMON_INSTALL_DIR} +fi + +procs=$(nproc) +if [ -n "${procs}" ]; then + procs_param="-- -j${procs}" +fi + +##################################### + +function build_comms() { + if [ -e ${COMMS_SRC_DIR}/.git ]; then + echo "Updating COMMS library..." + cd ${COMMS_SRC_DIR} + git fetch --all + git checkout . + git checkout ${COMMS_TAG} + git pull --all + else + echo "Cloning COMMS library..." + mkdir -p ${EXTERNALS_DIR} + git clone -b ${COMMS_TAG} ${COMMS_REPO} ${COMMS_SRC_DIR} + fi + + echo "Building COMMS library..." + mkdir -p ${COMMS_BUILD_DIR} + cmake -S ${COMMS_SRC_DIR} -B ${COMMS_BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${COMMS_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} -DCMAKE_CXX_STANDARD=${COMMON_CXX_STANDARD} + cmake --build ${COMMS_BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param} +} + +function build_commsdsl() { + if [ -e ${COMMSDSL_SRC_DIR}/.git ]; then + echo "Updating commsdsl..." + cd ${COMMSDSL_SRC_DIR} + git fetch --all + git checkout . + git checkout ${COMMSDSL_TAG} + git pull --all + else + echo "Cloning commsdsl ..." + mkdir -p ${EXTERNALS_DIR} + git clone -b ${COMMSDSL_TAG} ${COMMSDSL_REPO} ${COMMSDSL_SRC_DIR} + fi + + echo "Building commsdsl ..." + mkdir -p ${COMMSDSL_BUILD_DIR} + CC=${CC_COMMSDSL} CXX=${CXX_COMMSDSL} cmake -S ${COMMSDSL_SRC_DIR} -B ${COMMSDSL_BUILD_DIR} \ + -DCMAKE_INSTALL_PREFIX=${COMMSDSL_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${COMMON_BUILD_TYPE} \ + -DCOMMSDSL_INSTALL_LIBRARY=OFF + cmake --build ${COMMSDSL_BUILD_DIR} --config ${COMMON_BUILD_TYPE} --target install ${procs_param} +} + +set -e +export VERBOSE=1 +build_comms +build_commsdsl + + + diff --git a/tutorials/tutorial1/include/tutorial1/Message.h b/tutorials/tutorial1/include/tutorial1/Message.h index 9787ebe79..1ecb62c5a 100644 --- a/tutorials/tutorial1/include/tutorial1/Message.h +++ b/tutorials/tutorial1/include/tutorial1/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial1 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial1/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial1 - - diff --git a/tutorials/tutorial1/include/tutorial1/MsgId.h b/tutorials/tutorial1/include/tutorial1/MsgId.h index cda1ff4a4..eb062cf49 100644 --- a/tutorials/tutorial1/include/tutorial1/MsgId.h +++ b/tutorials/tutorial1/include/tutorial1/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of @b M1 message. , MsgId_M2 = 2, ///< message id of @b M2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial1 - diff --git a/tutorials/tutorial1/include/tutorial1/Version.h b/tutorials/tutorial1/include/tutorial1/Version.h index 6682c079d..06e3a2a24 100644 --- a/tutorials/tutorial1/include/tutorial1/Version.h +++ b/tutorials/tutorial1/include/tutorial1/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial1 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchClientInputMessage.h index 606f59a5e..f07d4e9ed 100644 --- a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial1::options::DefaultOptions. /// @headerfile tutorial1/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial1::options::DefaultOptions as template parameter. /// @note Defined in tutorial1/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchMessage.h b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchMessage.h index 147d24b45..6168d15ff 100644 --- a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchMessage.h +++ b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial1::options::DefaultOptions. /// @headerfile tutorial1/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial1::options::DefaultOptions as template parameter. /// @note Defined in tutorial1/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchServerInputMessage.h index f7f4161a5..39318428a 100644 --- a/tutorials/tutorial1/include/tutorial1/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial1/include/tutorial1/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial1::options::DefaultOptions. /// @headerfile tutorial1/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial1::options::DefaultOptions as template parameter. /// @note Defined in tutorial1/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial1/include/tutorial1/field/FieldBase.h b/tutorials/tutorial1/include/tutorial1/field/FieldBase.h index 2d3dd2c30..4c9f55ce4 100644 --- a/tutorials/tutorial1/include/tutorial1/field/FieldBase.h +++ b/tutorials/tutorial1/include/tutorial1/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial1 - diff --git a/tutorials/tutorial1/include/tutorial1/field/MsgId.h b/tutorials/tutorial1/include/tutorial1/field/MsgId.h index 2cc84426a..8c701cb3c 100644 --- a/tutorials/tutorial1/include/tutorial1/field/MsgId.h +++ b/tutorials/tutorial1/include/tutorial1/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial1 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial1::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial1::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial1::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial1::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial1::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial1::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial1::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial1::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial1::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial1::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial1::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial1 - diff --git a/tutorials/tutorial1/include/tutorial1/field/MsgIdCommon.h b/tutorials/tutorial1/include/tutorial1/field/MsgIdCommon.h index d9d9da218..cfbd8efab 100644 --- a/tutorials/tutorial1/include/tutorial1/field/MsgIdCommon.h +++ b/tutorials/tutorial1/include/tutorial1/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial1/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial1 namespace field { - /// @brief Common types and functions for /// @ref tutorial1::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial1::field::MsgId field. using ValueType = tutorial1::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial1::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "M2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial1::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial1 - diff --git a/tutorials/tutorial1/include/tutorial1/frame/Frame.h b/tutorials/tutorial1/include/tutorial1/frame/Frame.h index 4af423839..4649a9875 100644 --- a/tutorials/tutorial1/include/tutorial1/frame/Frame.h +++ b/tutorials/tutorial1/include/tutorial1/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -20,7 +20,6 @@ namespace tutorial1 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -33,7 +32,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref ID layer. struct IDMembers { @@ -42,10 +41,8 @@ struct FrameLayers tutorial1::field::MsgId< TOpt >; - - }; - + /// @brief Definition of layer "ID". template using ID = @@ -56,11 +53,10 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::ID >; - + /// @brief Final protocol stack definition. template using Stack = ID; - }; /// @brief Definition of "Frame" frame class. @@ -95,5 +91,3 @@ class Frame : public } // namespace frame } // namespace tutorial1 - - diff --git a/tutorials/tutorial1/include/tutorial1/frame/FrameCommon.h b/tutorials/tutorial1/include/tutorial1/frame/FrameCommon.h index 926632624..6dfeee791 100644 --- a/tutorials/tutorial1/include/tutorial1/frame/FrameCommon.h +++ b/tutorials/tutorial1/include/tutorial1/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial1 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial1::frame::Frame frame. /// @see tutorial1::frame::FrameLayers @@ -27,13 +26,9 @@ struct FrameLayersCommon /// @brief Common types and functions for /// @ref tutorial1::frame::FrameLayers::IDMembers::MsgId field. using MsgIdCommon = tutorial1::field::MsgIdCommon; - }; - }; } // namespace frame } // namespace tutorial1 - - diff --git a/tutorials/tutorial1/include/tutorial1/input/AllMessages.h b/tutorials/tutorial1/include/tutorial1/input/AllMessages.h index 87b3e60fc..c761a342e 100644 --- a/tutorials/tutorial1/include/tutorial1/input/AllMessages.h +++ b/tutorials/tutorial1/include/tutorial1/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial1/include/tutorial1/input/ClientInputMessages.h b/tutorials/tutorial1/include/tutorial1/input/ClientInputMessages.h index 7f3293425..3f7cb3566 100644 --- a/tutorials/tutorial1/include/tutorial1/input/ClientInputMessages.h +++ b/tutorials/tutorial1/include/tutorial1/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial1/include/tutorial1/input/ServerInputMessages.h b/tutorials/tutorial1/include/tutorial1/input/ServerInputMessages.h index f683a1120..a29335ede 100644 --- a/tutorials/tutorial1/include/tutorial1/input/ServerInputMessages.h +++ b/tutorials/tutorial1/include/tutorial1/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial1/include/tutorial1/message/Msg1.h b/tutorials/tutorial1/include/tutorial1/message/Msg1.h index f22b54deb..fa81bddcb 100644 --- a/tutorials/tutorial1/include/tutorial1/message/Msg1.h +++ b/tutorials/tutorial1/include/tutorial1/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial1/message/Msg1Common.h" #include "tutorial1/options/DefaultOptions.h" - namespace tutorial1 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial1::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial1 - - diff --git a/tutorials/tutorial1/include/tutorial1/message/Msg1Common.h b/tutorials/tutorial1/include/tutorial1/message/Msg1Common.h index e19c993b0..23afe6004 100644 --- a/tutorials/tutorial1/include/tutorial1/message/Msg1Common.h +++ b/tutorials/tutorial1/include/tutorial1/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial1 namespace message { - /// @brief Common types and functions of /// @ref tutorial1::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial1 - - - diff --git a/tutorials/tutorial1/include/tutorial1/message/Msg2.h b/tutorials/tutorial1/include/tutorial1/message/Msg2.h index 982590fbb..2a8ac7127 100644 --- a/tutorials/tutorial1/include/tutorial1/message/Msg2.h +++ b/tutorials/tutorial1/include/tutorial1/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial1/message/Msg2Common.h" #include "tutorial1/options/DefaultOptions.h" - namespace tutorial1 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial1::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial1 - - diff --git a/tutorials/tutorial1/include/tutorial1/message/Msg2Common.h b/tutorials/tutorial1/include/tutorial1/message/Msg2Common.h index fd1cd98ba..055090e9c 100644 --- a/tutorials/tutorial1/include/tutorial1/message/Msg2Common.h +++ b/tutorials/tutorial1/include/tutorial1/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial1 namespace message { - /// @brief Common types and functions of /// @ref tutorial1::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial1 - - - diff --git a/tutorials/tutorial1/include/tutorial1/options/BareMetalDefaultOptions.h b/tutorials/tutorial1/include/tutorial1/options/BareMetalDefaultOptions.h index 9a950e0f7..cea67a454 100644 --- a/tutorials/tutorial1/include/tutorial1/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial1/include/tutorial1/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial1::frame::FrameLayers::ID layer. using ID = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::ID >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial1/include/tutorial1/options/ClientDefaultOptions.h b/tutorials/tutorial1/include/tutorial1/options/ClientDefaultOptions.h index b9a998345..245eb2946 100644 --- a/tutorials/tutorial1/include/tutorial1/options/ClientDefaultOptions.h +++ b/tutorials/tutorial1/include/tutorial1/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial1/include/tutorial1/options/DataViewDefaultOptions.h b/tutorials/tutorial1/include/tutorial1/options/DataViewDefaultOptions.h index 65733b7f0..aed9d95bc 100644 --- a/tutorials/tutorial1/include/tutorial1/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial1/include/tutorial1/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial1/include/tutorial1/options/DefaultOptions.h b/tutorials/tutorial1/include/tutorial1/options/DefaultOptions.h index 056d5b464..547d7125f 100644 --- a/tutorials/tutorial1/include/tutorial1/options/DefaultOptions.h +++ b/tutorials/tutorial1/include/tutorial1/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,17 +31,12 @@ struct DefaultOptionsT : public TBase /// tutorial1::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial1::frame::FrameLayers::ID layer. using ID = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial1/include/tutorial1/options/ServerDefaultOptions.h b/tutorials/tutorial1/include/tutorial1/options/ServerDefaultOptions.h index adf5c0804..3b385242a 100644 --- a/tutorials/tutorial1/include/tutorial1/options/ServerDefaultOptions.h +++ b/tutorials/tutorial1/include/tutorial1/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial10/include/tutorial10/Message.h b/tutorials/tutorial10/include/tutorial10/Message.h index 02817d595..47573a98f 100644 --- a/tutorials/tutorial10/include/tutorial10/Message.h +++ b/tutorials/tutorial10/include/tutorial10/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial10 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial10/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/MsgId.h b/tutorials/tutorial10/include/tutorial10/MsgId.h index ac9ce8060..2e6f4fe48 100644 --- a/tutorials/tutorial10/include/tutorial10/MsgId.h +++ b/tutorials/tutorial10/include/tutorial10/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -18,7 +18,7 @@ enum MsgId : std::uint8_t MsgId_M3 = 3, ///< message id of Message 3 message. , MsgId_M4 = 4, ///< message id of Message 4 message. , MsgId_M5 = 5, ///< message id of Message 5 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 5, ///< Last defined value., @@ -26,4 +26,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial10 - diff --git a/tutorials/tutorial10/include/tutorial10/Version.h b/tutorials/tutorial10/include/tutorial10/Version.h index 0ff599aee..8f8f42820 100644 --- a/tutorials/tutorial10/include/tutorial10/Version.h +++ b/tutorials/tutorial10/include/tutorial10/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial10 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchClientInputMessage.h index 94730e5a1..ef1eadd8e 100644 --- a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -139,7 +139,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial10::options::DefaultOptions. /// @headerfile tutorial10/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial10::options::DefaultOptions as template parameter. /// @note Defined in tutorial10/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchMessage.h b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchMessage.h index 9073108c2..e85f948ed 100644 --- a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchMessage.h +++ b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -144,7 +144,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial10::options::DefaultOptions. /// @headerfile tutorial10/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -204,9 +204,7 @@ struct MsgDispatcher /// @ref tutorial10::options::DefaultOptions as template parameter. /// @note Defined in tutorial10/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchServerInputMessage.h index 2d5e7403e..016571a72 100644 --- a/tutorials/tutorial10/include/tutorial10/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial10/include/tutorial10/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -139,7 +139,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial10::options::DefaultOptions. /// @headerfile tutorial10/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial10::options::DefaultOptions as template parameter. /// @note Defined in tutorial10/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial10/include/tutorial10/field/FieldBase.h b/tutorials/tutorial10/include/tutorial10/field/FieldBase.h index d6b350827..1576f430e 100644 --- a/tutorials/tutorial10/include/tutorial10/field/FieldBase.h +++ b/tutorials/tutorial10/include/tutorial10/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial10 - diff --git a/tutorials/tutorial10/include/tutorial10/field/MsgId.h b/tutorials/tutorial10/include/tutorial10/field/MsgId.h index 1ef1cf793..9a6c17205 100644 --- a/tutorials/tutorial10/include/tutorial10/field/MsgId.h +++ b/tutorials/tutorial10/include/tutorial10/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial10 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial10::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial10::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial10::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial10::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial10::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial10::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial10::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial10::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial10::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial10::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial10::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial10 - diff --git a/tutorials/tutorial10/include/tutorial10/field/MsgIdCommon.h b/tutorials/tutorial10/include/tutorial10/field/MsgIdCommon.h index f53ef4558..9fb275f87 100644 --- a/tutorials/tutorial10/include/tutorial10/field/MsgIdCommon.h +++ b/tutorials/tutorial10/include/tutorial10/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial10/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial10 namespace field { - /// @brief Common types and functions for /// @ref tutorial10::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial10::field::MsgId field. using ValueType = tutorial10::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial10::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -65,19 +62,15 @@ struct MsgIdCommon "Message 5" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial10::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial10 - diff --git a/tutorials/tutorial10/include/tutorial10/frame/Frame.h b/tutorials/tutorial10/include/tutorial10/frame/Frame.h index 7128d22c2..ecbfadcfb 100644 --- a/tutorials/tutorial10/include/tutorial10/frame/Frame.h +++ b/tutorials/tutorial10/include/tutorial10/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial10 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial10::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial10::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/frame/FrameCommon.h b/tutorials/tutorial10/include/tutorial10/frame/FrameCommon.h index c260d4c9c..7c0c91c13 100644 --- a/tutorials/tutorial10/include/tutorial10/frame/FrameCommon.h +++ b/tutorials/tutorial10/include/tutorial10/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial10 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial10::frame::Frame frame. /// @see tutorial10::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial10::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial10::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/input/AllMessages.h b/tutorials/tutorial10/include/tutorial10/input/AllMessages.h index 38981876d..b73b825dc 100644 --- a/tutorials/tutorial10/include/tutorial10/input/AllMessages.h +++ b/tutorials/tutorial10/include/tutorial10/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial10/include/tutorial10/input/ClientInputMessages.h b/tutorials/tutorial10/include/tutorial10/input/ClientInputMessages.h index 812bb57d3..d741d35f5 100644 --- a/tutorials/tutorial10/include/tutorial10/input/ClientInputMessages.h +++ b/tutorials/tutorial10/include/tutorial10/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial10/include/tutorial10/input/ServerInputMessages.h b/tutorials/tutorial10/include/tutorial10/input/ServerInputMessages.h index 00d4caf13..3d5625f41 100644 --- a/tutorials/tutorial10/include/tutorial10/input/ServerInputMessages.h +++ b/tutorials/tutorial10/include/tutorial10/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg1.h b/tutorials/tutorial10/include/tutorial10/message/Msg1.h index 8e4e75202..0280270c3 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg1.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial10/message/Msg1Common.h" #include "tutorial10/options/DefaultOptions.h" - namespace tutorial10 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -65,18 +63,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial10::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg1Common.h b/tutorials/tutorial10/include/tutorial10/message/Msg1Common.h index ba7ff8992..a80195514 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg1Common.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial10 namespace message { - /// @brief Common types and functions of /// @ref tutorial10::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial10 - - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg2.h b/tutorials/tutorial10/include/tutorial10/message/Msg2.h index 96fe50e00..710a51d7c 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg2.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial10/message/Msg2Common.h" #include "tutorial10/options/DefaultOptions.h" - namespace tutorial10 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -65,18 +63,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial10::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg2Common.h b/tutorials/tutorial10/include/tutorial10/message/Msg2Common.h index b2a79fd85..734cea240 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg2Common.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial10 namespace message { - /// @brief Common types and functions of /// @ref tutorial10::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial10 - - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg3.h b/tutorials/tutorial10/include/tutorial10/message/Msg3.h index 14fe41128..c8d5cfd6e 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg3.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial10/message/Msg3Common.h" #include "tutorial10/options/DefaultOptions.h" - namespace tutorial10 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -63,18 +61,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial10::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg3Common.h b/tutorials/tutorial10/include/tutorial10/message/Msg3Common.h index 69c26d51c..89c8b644c 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg3Common.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial10 namespace message { - /// @brief Common types and functions of /// @ref tutorial10::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial10 - - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg4.h b/tutorials/tutorial10/include/tutorial10/message/Msg4.h index 77794c231..8e59ed082 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg4.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 4" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial10/message/Msg4Common.h" #include "tutorial10/options/DefaultOptions.h" - namespace tutorial10 { namespace message { - /// @brief Fields of @ref Msg4. /// @tparam TOpt Extra options /// @see @ref Msg4 @@ -63,18 +61,14 @@ class Msg4 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial10::message::Msg4Common::name(); } - - }; } // namespace message } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg4Common.h b/tutorials/tutorial10/include/tutorial10/message/Msg4Common.h index cda7efd9a..6836392a1 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg4Common.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial10 namespace message { - /// @brief Common types and functions of /// @ref tutorial10::message::Msg4 message. struct Msg4Common @@ -22,12 +21,8 @@ struct Msg4Common { return "Message 4"; } - }; } // namespace message } // namespace tutorial10 - - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg5.h b/tutorials/tutorial10/include/tutorial10/message/Msg5.h index f7312a130..896d89188 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg5.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg5.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 5" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial10/message/Msg5Common.h" #include "tutorial10/options/DefaultOptions.h" - namespace tutorial10 { namespace message { - /// @brief Fields of @ref Msg5. /// @tparam TOpt Extra options /// @see @ref Msg5 @@ -63,18 +61,14 @@ class Msg5 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial10::message::Msg5Common::name(); } - - }; } // namespace message } // namespace tutorial10 - - diff --git a/tutorials/tutorial10/include/tutorial10/message/Msg5Common.h b/tutorials/tutorial10/include/tutorial10/message/Msg5Common.h index 1d4964650..bc38cb0a2 100644 --- a/tutorials/tutorial10/include/tutorial10/message/Msg5Common.h +++ b/tutorials/tutorial10/include/tutorial10/message/Msg5Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial10 namespace message { - /// @brief Common types and functions of /// @ref tutorial10::message::Msg5 message. struct Msg5Common @@ -22,12 +21,8 @@ struct Msg5Common { return "Message 5"; } - }; } // namespace message } // namespace tutorial10 - - - diff --git a/tutorials/tutorial10/include/tutorial10/options/BareMetalDefaultOptions.h b/tutorials/tutorial10/include/tutorial10/options/BareMetalDefaultOptions.h index 304e816f6..0da8cf845 100644 --- a/tutorials/tutorial10/include/tutorial10/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial10/include/tutorial10/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial10::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial10/include/tutorial10/options/ClientDefaultOptions.h b/tutorials/tutorial10/include/tutorial10/options/ClientDefaultOptions.h index 68ffd4281..208c1fc97 100644 --- a/tutorials/tutorial10/include/tutorial10/options/ClientDefaultOptions.h +++ b/tutorials/tutorial10/include/tutorial10/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. @@ -28,7 +28,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg1 >; - + /// @brief Extra options for @ref /// tutorial10::message::Msg2 message. using Msg2 = @@ -37,10 +37,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg2 >; - }; // struct message - - }; /// @brief Alias to @ref ClientDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial10/include/tutorial10/options/DataViewDefaultOptions.h b/tutorials/tutorial10/include/tutorial10/options/DataViewDefaultOptions.h index a0cc2fe2c..6209cc518 100644 --- a/tutorials/tutorial10/include/tutorial10/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial10/include/tutorial10/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial10/include/tutorial10/options/DefaultOptions.h b/tutorials/tutorial10/include/tutorial10/options/DefaultOptions.h index 2d059e784..fab675509 100644 --- a/tutorials/tutorial10/include/tutorial10/options/DefaultOptions.h +++ b/tutorials/tutorial10/include/tutorial10/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -26,13 +26,12 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// tutorial10::message::Msg1 message. using Msg1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial10::message::Msg2 message. using Msg2 = comms::option::EmptyOption; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -44,18 +43,13 @@ struct DefaultOptionsT : public TBase /// tutorial10::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial10::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial10/include/tutorial10/options/ServerDefaultOptions.h b/tutorials/tutorial10/include/tutorial10/options/ServerDefaultOptions.h index 0d3544711..c5ebbc813 100644 --- a/tutorials/tutorial10/include/tutorial10/options/ServerDefaultOptions.h +++ b/tutorials/tutorial10/include/tutorial10/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. @@ -28,7 +28,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg1 >; - + /// @brief Extra options for @ref /// tutorial10::message::Msg2 message. using Msg2 = @@ -37,10 +37,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg2 >; - }; // struct message - - }; /// @brief Alias to @ref ServerDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial11/include/tutorial11/Message.h b/tutorials/tutorial11/include/tutorial11/Message.h index a0e6ee26d..15c5f2826 100644 --- a/tutorials/tutorial11/include/tutorial11/Message.h +++ b/tutorials/tutorial11/include/tutorial11/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial11 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial11/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/MsgId.h b/tutorials/tutorial11/include/tutorial11/MsgId.h index dfd61de84..deaf3b17d 100644 --- a/tutorials/tutorial11/include/tutorial11/MsgId.h +++ b/tutorials/tutorial11/include/tutorial11/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial11 - diff --git a/tutorials/tutorial11/include/tutorial11/Version.h b/tutorials/tutorial11/include/tutorial11/Version.h index cbd917020..ca28b85c8 100644 --- a/tutorials/tutorial11/include/tutorial11/Version.h +++ b/tutorials/tutorial11/include/tutorial11/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial11 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchClientInputMessage.h index 18978ea89..2026f07ca 100644 --- a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial11::options::DefaultOptions. /// @headerfile tutorial11/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial11::options::DefaultOptions as template parameter. /// @note Defined in tutorial11/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchMessage.h b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchMessage.h index f799400e0..26bcd2193 100644 --- a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchMessage.h +++ b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial11::options::DefaultOptions. /// @headerfile tutorial11/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial11::options::DefaultOptions as template parameter. /// @note Defined in tutorial11/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchServerInputMessage.h index 6cf774459..e2fd36e74 100644 --- a/tutorials/tutorial11/include/tutorial11/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial11/include/tutorial11/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial11::options::DefaultOptions. /// @headerfile tutorial11/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial11::options::DefaultOptions as template parameter. /// @note Defined in tutorial11/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial11/include/tutorial11/field/FieldBase.h b/tutorials/tutorial11/include/tutorial11/field/FieldBase.h index 2afe05b39..598f5cfbd 100644 --- a/tutorials/tutorial11/include/tutorial11/field/FieldBase.h +++ b/tutorials/tutorial11/include/tutorial11/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial11 - diff --git a/tutorials/tutorial11/include/tutorial11/field/MsgId.h b/tutorials/tutorial11/include/tutorial11/field/MsgId.h index e89ae183d..b1d2558c1 100644 --- a/tutorials/tutorial11/include/tutorial11/field/MsgId.h +++ b/tutorials/tutorial11/include/tutorial11/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial11 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial11::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial11::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial11::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial11::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial11::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial11::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial11::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial11::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial11::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial11::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial11::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial11 - diff --git a/tutorials/tutorial11/include/tutorial11/field/MsgIdCommon.h b/tutorials/tutorial11/include/tutorial11/field/MsgIdCommon.h index 2d112869b..5d5518188 100644 --- a/tutorials/tutorial11/include/tutorial11/field/MsgIdCommon.h +++ b/tutorials/tutorial11/include/tutorial11/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial11/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial11 namespace field { - /// @brief Common types and functions for /// @ref tutorial11::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial11::field::MsgId field. using ValueType = tutorial11::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial11::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial11::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial11 - diff --git a/tutorials/tutorial11/include/tutorial11/frame/Frame.h b/tutorials/tutorial11/include/tutorial11/frame/Frame.h index d14eba696..79306f781 100644 --- a/tutorials/tutorial11/include/tutorial11/frame/Frame.h +++ b/tutorials/tutorial11/include/tutorial11/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial11 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial11::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial11::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/frame/FrameCommon.h b/tutorials/tutorial11/include/tutorial11/frame/FrameCommon.h index 5a3a5d2c6..ce5b4038b 100644 --- a/tutorials/tutorial11/include/tutorial11/frame/FrameCommon.h +++ b/tutorials/tutorial11/include/tutorial11/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial11 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial11::frame::Frame frame. /// @see tutorial11::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial11::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial11::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/input/AllMessages.h b/tutorials/tutorial11/include/tutorial11/input/AllMessages.h index 8ee8f3365..241853a30 100644 --- a/tutorials/tutorial11/include/tutorial11/input/AllMessages.h +++ b/tutorials/tutorial11/include/tutorial11/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial11/include/tutorial11/input/ClientInputMessages.h b/tutorials/tutorial11/include/tutorial11/input/ClientInputMessages.h index 1599ee377..3d3249290 100644 --- a/tutorials/tutorial11/include/tutorial11/input/ClientInputMessages.h +++ b/tutorials/tutorial11/include/tutorial11/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial11/include/tutorial11/input/ServerInputMessages.h b/tutorials/tutorial11/include/tutorial11/input/ServerInputMessages.h index 22d286fe6..d133459fe 100644 --- a/tutorials/tutorial11/include/tutorial11/input/ServerInputMessages.h +++ b/tutorials/tutorial11/include/tutorial11/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg1.h b/tutorials/tutorial11/include/tutorial11/message/Msg1.h index 321ff4c4f..3591e507d 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg1.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -13,14 +13,12 @@ #include - namespace tutorial11 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -65,24 +63,20 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Custom destructor ~Msg1() { std::cout << "Proper destruction: " << __FUNCTION__ << std::endl; } - + /// @brief Name of the message. static const char* doName() { return tutorial11::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg1Common.h b/tutorials/tutorial11/include/tutorial11/message/Msg1Common.h index c828aaab4..23aa506fe 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg1Common.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial11 namespace message { - /// @brief Common types and functions of /// @ref tutorial11::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial11 - - - diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg2.h b/tutorials/tutorial11/include/tutorial11/message/Msg2.h index b585c974b..08ffaaa9f 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg2.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -13,14 +13,12 @@ #include - namespace tutorial11 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -65,24 +63,20 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Custom destructor ~Msg2() { std::cout << "Proper destruction: " << __FUNCTION__ << std::endl; } - + /// @brief Name of the message. static const char* doName() { return tutorial11::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg2Common.h b/tutorials/tutorial11/include/tutorial11/message/Msg2Common.h index 23bfc93ae..6b69bd2b6 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg2Common.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial11 namespace message { - /// @brief Common types and functions of /// @ref tutorial11::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial11 - - - diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg3.h b/tutorials/tutorial11/include/tutorial11/message/Msg3.h index aa661cb7a..81889ec51 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg3.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -13,14 +13,12 @@ #include - namespace tutorial11 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -65,24 +63,20 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Custom destructor ~Msg3() { std::cout << "Proper destruction: " << __FUNCTION__ << std::endl; } - + /// @brief Name of the message. static const char* doName() { return tutorial11::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial11 - - diff --git a/tutorials/tutorial11/include/tutorial11/message/Msg3Common.h b/tutorials/tutorial11/include/tutorial11/message/Msg3Common.h index 0e89d1a2c..d31bab4c6 100644 --- a/tutorials/tutorial11/include/tutorial11/message/Msg3Common.h +++ b/tutorials/tutorial11/include/tutorial11/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial11 namespace message { - /// @brief Common types and functions of /// @ref tutorial11::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial11 - - - diff --git a/tutorials/tutorial11/include/tutorial11/options/BareMetalDefaultOptions.h b/tutorials/tutorial11/include/tutorial11/options/BareMetalDefaultOptions.h index 5df0003c2..8eacf845b 100644 --- a/tutorials/tutorial11/include/tutorial11/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial11/include/tutorial11/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial11::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial11/include/tutorial11/options/ClientDefaultOptions.h b/tutorials/tutorial11/include/tutorial11/options/ClientDefaultOptions.h index ec3ec0a46..c1645763b 100644 --- a/tutorials/tutorial11/include/tutorial11/options/ClientDefaultOptions.h +++ b/tutorials/tutorial11/include/tutorial11/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial11/include/tutorial11/options/DataViewDefaultOptions.h b/tutorials/tutorial11/include/tutorial11/options/DataViewDefaultOptions.h index 7dd35674d..a08557218 100644 --- a/tutorials/tutorial11/include/tutorial11/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial11/include/tutorial11/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial11/include/tutorial11/options/DefaultOptions.h b/tutorials/tutorial11/include/tutorial11/options/DefaultOptions.h index 5faa91b61..4ad48352e 100644 --- a/tutorials/tutorial11/include/tutorial11/options/DefaultOptions.h +++ b/tutorials/tutorial11/include/tutorial11/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial11::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial11::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial11/include/tutorial11/options/ServerDefaultOptions.h b/tutorials/tutorial11/include/tutorial11/options/ServerDefaultOptions.h index 4d02ca88f..67248b81b 100644 --- a/tutorials/tutorial11/include/tutorial11/options/ServerDefaultOptions.h +++ b/tutorials/tutorial11/include/tutorial11/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial12/include/tutorial12/Message.h b/tutorials/tutorial12/include/tutorial12/Message.h index e2723362d..df1c7c7a5 100644 --- a/tutorials/tutorial12/include/tutorial12/Message.h +++ b/tutorials/tutorial12/include/tutorial12/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial12 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial12/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/MsgId.h b/tutorials/tutorial12/include/tutorial12/MsgId.h index 5fc8ab109..63cf79e9d 100644 --- a/tutorials/tutorial12/include/tutorial12/MsgId.h +++ b/tutorials/tutorial12/include/tutorial12/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/Version.h b/tutorials/tutorial12/include/tutorial12/Version.h index 73f5f9d06..8a27515e2 100644 --- a/tutorials/tutorial12/include/tutorial12/Version.h +++ b/tutorials/tutorial12/include/tutorial12/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial12 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchClientInputMessage.h index e9d4cba7e..e63d93e74 100644 --- a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial12::options::DefaultOptions. /// @headerfile tutorial12/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial12::options::DefaultOptions as template parameter. /// @note Defined in tutorial12/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchMessage.h b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchMessage.h index e2d94f60a..0d5ce9c2a 100644 --- a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchMessage.h +++ b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial12::options::DefaultOptions. /// @headerfile tutorial12/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial12::options::DefaultOptions as template parameter. /// @note Defined in tutorial12/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchServerInputMessage.h index 24f670f2e..865e7a206 100644 --- a/tutorials/tutorial12/include/tutorial12/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial12/include/tutorial12/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial12::options::DefaultOptions. /// @headerfile tutorial12/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial12::options::DefaultOptions as template parameter. /// @note Defined in tutorial12/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial12/include/tutorial12/field/FieldBase.h b/tutorials/tutorial12/include/tutorial12/field/FieldBase.h index 78a83aede..4b81a1e57 100644 --- a/tutorials/tutorial12/include/tutorial12/field/FieldBase.h +++ b/tutorials/tutorial12/include/tutorial12/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/field/Length.h b/tutorials/tutorial12/include/tutorial12/field/Length.h index f2ca41710..bbef2e639 100644 --- a/tutorials/tutorial12/include/tutorial12/field/Length.h +++ b/tutorials/tutorial12/include/tutorial12/field/Length.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Length" field. @@ -18,7 +18,6 @@ namespace tutorial12 namespace field { - /// @brief Definition of "Length" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -39,25 +38,20 @@ class Length : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial12::field::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial12::field::LengthCommon::name(); } - - }; - } // namespace field } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/field/LengthCommon.h b/tutorials/tutorial12/include/tutorial12/field/LengthCommon.h index 0ee8f2236..f09657729 100644 --- a/tutorials/tutorial12/include/tutorial12/field/LengthCommon.h +++ b/tutorials/tutorial12/include/tutorial12/field/LengthCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial12 namespace field { - /// @brief Common types and functions for /// @ref tutorial12::field::Length field. struct LengthCommon @@ -22,23 +21,20 @@ struct LengthCommon /// @brief Re-definition of the value type used by /// tutorial12::field::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial12::field::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/field/MsgId.h b/tutorials/tutorial12/include/tutorial12/field/MsgId.h index 32e860662..f81e6c788 100644 --- a/tutorials/tutorial12/include/tutorial12/field/MsgId.h +++ b/tutorials/tutorial12/include/tutorial12/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial12 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial12::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial12::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial12::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial12::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial12::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial12::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial12::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial12::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial12::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial12::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial12::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/field/MsgIdCommon.h b/tutorials/tutorial12/include/tutorial12/field/MsgIdCommon.h index e120e83b1..f024fe46f 100644 --- a/tutorials/tutorial12/include/tutorial12/field/MsgIdCommon.h +++ b/tutorials/tutorial12/include/tutorial12/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial12/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial12 namespace field { - /// @brief Common types and functions for /// @ref tutorial12::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial12::field::MsgId field. using ValueType = tutorial12::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial12::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial12::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial12 - diff --git a/tutorials/tutorial12/include/tutorial12/frame/Frame.h b/tutorials/tutorial12/include/tutorial12/frame/Frame.h index 637e89772..1e9cf99c0 100644 --- a/tutorials/tutorial12/include/tutorial12/frame/Frame.h +++ b/tutorials/tutorial12/include/tutorial12/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial12 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial12::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial12::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/frame/FrameCommon.h b/tutorials/tutorial12/include/tutorial12/frame/FrameCommon.h index 79fc48e50..7b071f39b 100644 --- a/tutorials/tutorial12/include/tutorial12/frame/FrameCommon.h +++ b/tutorials/tutorial12/include/tutorial12/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial12 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial12::frame::Frame frame. /// @see tutorial12::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial12::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial12::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/input/AllMessages.h b/tutorials/tutorial12/include/tutorial12/input/AllMessages.h index fb8a2e613..10c7c8266 100644 --- a/tutorials/tutorial12/include/tutorial12/input/AllMessages.h +++ b/tutorials/tutorial12/include/tutorial12/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial12/include/tutorial12/input/ClientInputMessages.h b/tutorials/tutorial12/include/tutorial12/input/ClientInputMessages.h index 6886017b0..1fb870651 100644 --- a/tutorials/tutorial12/include/tutorial12/input/ClientInputMessages.h +++ b/tutorials/tutorial12/include/tutorial12/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial12/include/tutorial12/input/ServerInputMessages.h b/tutorials/tutorial12/include/tutorial12/input/ServerInputMessages.h index 1ceae3667..052097acc 100644 --- a/tutorials/tutorial12/include/tutorial12/input/ServerInputMessages.h +++ b/tutorials/tutorial12/include/tutorial12/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg1.h b/tutorials/tutorial12/include/tutorial12/message/Msg1.h index 0caa9dad0..3d8f18b0f 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg1.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial12/message/Msg1Common.h" #include "tutorial12/options/DefaultOptions.h" - namespace tutorial12 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -50,11 +48,8 @@ struct Msg1Fields { return tutorial12::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::String< @@ -77,17 +72,14 @@ struct Msg1Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return tutorial12::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -136,22 +128,18 @@ class Msg1 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 9U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial12::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg1Common.h b/tutorials/tutorial12/include/tutorial12/message/Msg1Common.h index 7b566caf9..4e531c4f2 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg1Common.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial12 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial12::message::Msg1 message. /// @see tutorial12::message::Msg1Fields @@ -27,9 +26,8 @@ struct Msg1FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial12::message::Msg1Fields::F2 field. struct F2Common @@ -39,9 +37,7 @@ struct Msg1FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -53,12 +49,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial12 - - - diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg2.h b/tutorials/tutorial12/include/tutorial12/message/Msg2.h index 92ac615b9..ef206a2bf 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg2.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial12/message/Msg2Common.h" #include "tutorial12/options/DefaultOptions.h" - namespace tutorial12 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -53,11 +51,8 @@ struct Msg2Fields { return tutorial12::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::ArrayList< @@ -80,11 +75,8 @@ struct Msg2Fields { return tutorial12::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -133,22 +125,18 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 7U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial12::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg2Common.h b/tutorials/tutorial12/include/tutorial12/message/Msg2Common.h index 4bebef261..6ef3703b5 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg2Common.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial12 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial12::message::Msg2 message. /// @see tutorial12::message::Msg2Fields @@ -27,9 +26,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial12::message::Msg2Fields::F2 field. struct F2Common @@ -39,9 +37,7 @@ struct Msg2FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -53,12 +49,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial12 - - - diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg3.h b/tutorials/tutorial12/include/tutorial12/message/Msg3.h index 3c0e607fb..a3c23d825 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg3.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial12/message/Msg3Common.h" #include "tutorial12/options/DefaultOptions.h" - namespace tutorial12 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -51,26 +49,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial12::message::Msg3FieldsCommon::F1MembersCommon::ElementCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial12::message::Msg3FieldsCommon::F1MembersCommon::ElementCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::ArrayList< @@ -93,11 +86,8 @@ struct Msg3Fields { return tutorial12::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -117,26 +107,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial12::message::Msg3FieldsCommon::F2MembersCommon::ElementCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial12::message::Msg3FieldsCommon::F2MembersCommon::ElementCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::ArrayList< @@ -159,11 +144,8 @@ struct Msg3Fields { return tutorial12::message::Msg3FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -212,22 +194,18 @@ class Msg3 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 13U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial12::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial12 - - diff --git a/tutorials/tutorial12/include/tutorial12/message/Msg3Common.h b/tutorials/tutorial12/include/tutorial12/message/Msg3Common.h index 3302f4b57..ee16faf59 100644 --- a/tutorials/tutorial12/include/tutorial12/message/Msg3Common.h +++ b/tutorials/tutorial12/include/tutorial12/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial12 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial12::message::Msg3 message. /// @see tutorial12::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial12::message::Msg3Fields::F1Members::Element field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial12::message::Msg3Fields::F1Members::Element field. static const char* name() { return "Element"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial12::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,8 @@ struct Msg3FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial12::message::Msg3Fields::F2 field. struct F2MembersCommon @@ -72,24 +67,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial12::message::Msg3Fields::F2Members::Element field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial12::message::Msg3Fields::F2Members::Element field. static const char* name() { return "Element"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial12::message::Msg3Fields::F2 field. struct F2Common @@ -99,9 +91,7 @@ struct Msg3FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -113,12 +103,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial12 - - - diff --git a/tutorials/tutorial12/include/tutorial12/options/BareMetalDefaultOptions.h b/tutorials/tutorial12/include/tutorial12/options/BareMetalDefaultOptions.h index f6440b817..0c26bf1a6 100644 --- a/tutorials/tutorial12/include/tutorial12/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial12/include/tutorial12/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg1Fields::F1 >; - + /// @brief Extra options for @ref /// tutorial12::message::Msg1Fields::F2 /// field. @@ -47,9 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::message::Msg1Fields::F2 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial12::message::Msg2 message. struct Msg2Fields : public TBase::message::Msg2Fields @@ -62,7 +61,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - + /// @brief Extra options for @ref /// tutorial12::message::Msg2Fields::F2 /// field. @@ -71,9 +70,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::message::Msg2Fields::F2 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial12::message::Msg3 message. struct Msg3Fields : public TBase::message::Msg3Fields @@ -86,7 +84,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - + /// @brief Extra options for @ref /// tutorial12::message::Msg3Fields::F2 /// field. @@ -95,11 +93,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::message::Msg3Fields::F2 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -115,7 +111,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial12::frame::FrameLayers::Id /// layer. @@ -124,13 +120,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial12/include/tutorial12/options/ClientDefaultOptions.h b/tutorials/tutorial12/include/tutorial12/options/ClientDefaultOptions.h index a8d8638d2..35754a5af 100644 --- a/tutorials/tutorial12/include/tutorial12/options/ClientDefaultOptions.h +++ b/tutorials/tutorial12/include/tutorial12/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial12/include/tutorial12/options/DataViewDefaultOptions.h b/tutorials/tutorial12/include/tutorial12/options/DataViewDefaultOptions.h index 48d57aae4..c88f7882e 100644 --- a/tutorials/tutorial12/include/tutorial12/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial12/include/tutorial12/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,7 +32,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg1Fields::F1 >; - + /// @brief Extra options for @ref /// tutorial12::message::Msg1Fields::F2 /// field. @@ -41,9 +41,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg1Fields::F2 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial12::message::Msg2 message. struct Msg2Fields : public TBase::message::Msg2Fields @@ -56,7 +55,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - + /// @brief Extra options for @ref /// tutorial12::message::Msg2Fields::F2 /// field. @@ -65,11 +64,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F2 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -85,13 +82,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial12/include/tutorial12/options/DefaultOptions.h b/tutorials/tutorial12/include/tutorial12/options/DefaultOptions.h index b249fc268..99d3b0d82 100644 --- a/tutorials/tutorial12/include/tutorial12/options/DefaultOptions.h +++ b/tutorials/tutorial12/include/tutorial12/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,14 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial12::message::Msg1Fields::F1 /// field. using F1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial12::message::Msg1Fields::F2 /// field. using F2 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref tutorial12::message::Msg2 message. struct Msg2Fields @@ -47,14 +46,13 @@ struct DefaultOptionsT : public TBase /// tutorial12::message::Msg2Fields::F1 /// field. using F1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial12::message::Msg2Fields::F2 /// field. using F2 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref tutorial12::message::Msg3 message. struct Msg3Fields @@ -63,16 +61,14 @@ struct DefaultOptionsT : public TBase /// tutorial12::message::Msg3Fields::F1 /// field. using F1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial12::message::Msg3Fields::F2 /// field. using F2 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -84,18 +80,13 @@ struct DefaultOptionsT : public TBase /// tutorial12::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial12::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial12/include/tutorial12/options/ServerDefaultOptions.h b/tutorials/tutorial12/include/tutorial12/options/ServerDefaultOptions.h index ebd9af27d..90e361f76 100644 --- a/tutorials/tutorial12/include/tutorial12/options/ServerDefaultOptions.h +++ b/tutorials/tutorial12/include/tutorial12/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial13/include/tutorial13/Message.h b/tutorials/tutorial13/include/tutorial13/Message.h index 7c998fc04..b878040d9 100644 --- a/tutorials/tutorial13/include/tutorial13/Message.h +++ b/tutorials/tutorial13/include/tutorial13/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial13 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial13/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/MsgId.h b/tutorials/tutorial13/include/tutorial13/MsgId.h index a324b5216..be77504b5 100644 --- a/tutorials/tutorial13/include/tutorial13/MsgId.h +++ b/tutorials/tutorial13/include/tutorial13/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial13 - diff --git a/tutorials/tutorial13/include/tutorial13/Version.h b/tutorials/tutorial13/include/tutorial13/Version.h index ec23c3e17..a17e136d7 100644 --- a/tutorials/tutorial13/include/tutorial13/Version.h +++ b/tutorials/tutorial13/include/tutorial13/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial13 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchClientInputMessage.h index b66622e2b..b6ce6a0d3 100644 --- a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -161,7 +161,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial13::options::DefaultOptions. /// @headerfile tutorial13/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial13::options::DefaultOptions as template parameter. /// @note Defined in tutorial13/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchMessage.h b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchMessage.h index fe53e8ccb..b9ebe79e5 100644 --- a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchMessage.h +++ b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -161,7 +161,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial13::options::DefaultOptions. /// @headerfile tutorial13/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct MsgDispatcher /// @ref tutorial13::options::DefaultOptions as template parameter. /// @note Defined in tutorial13/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchServerInputMessage.h index 06fa15909..dc8523cb9 100644 --- a/tutorials/tutorial13/include/tutorial13/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial13/include/tutorial13/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -161,7 +161,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial13::options::DefaultOptions. /// @headerfile tutorial13/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial13::options::DefaultOptions as template parameter. /// @note Defined in tutorial13/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial13/include/tutorial13/field/FieldBase.h b/tutorials/tutorial13/include/tutorial13/field/FieldBase.h index 736649763..244fdca72 100644 --- a/tutorials/tutorial13/include/tutorial13/field/FieldBase.h +++ b/tutorials/tutorial13/include/tutorial13/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial13 - diff --git a/tutorials/tutorial13/include/tutorial13/field/MsgId.h b/tutorials/tutorial13/include/tutorial13/field/MsgId.h index 7cd7d5d18..67c823bcb 100644 --- a/tutorials/tutorial13/include/tutorial13/field/MsgId.h +++ b/tutorials/tutorial13/include/tutorial13/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial13 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial13::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial13::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial13::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial13::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial13::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial13::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial13::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial13::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial13::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial13::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial13 - diff --git a/tutorials/tutorial13/include/tutorial13/field/MsgIdCommon.h b/tutorials/tutorial13/include/tutorial13/field/MsgIdCommon.h index e3c781d89..fbf639fb4 100644 --- a/tutorials/tutorial13/include/tutorial13/field/MsgIdCommon.h +++ b/tutorials/tutorial13/include/tutorial13/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial13/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial13 namespace field { - /// @brief Common types and functions for /// @ref tutorial13::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial13::field::MsgId field. using ValueType = tutorial13::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial13::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial13::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial13 - diff --git a/tutorials/tutorial13/include/tutorial13/frame/Frame.h b/tutorials/tutorial13/include/tutorial13/frame/Frame.h index 40422724b..4b51de5af 100644 --- a/tutorials/tutorial13/include/tutorial13/frame/Frame.h +++ b/tutorials/tutorial13/include/tutorial13/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial13 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/frame/FrameCommon.h b/tutorials/tutorial13/include/tutorial13/frame/FrameCommon.h index 3bc962fcf..94e3e8601 100644 --- a/tutorials/tutorial13/include/tutorial13/frame/FrameCommon.h +++ b/tutorials/tutorial13/include/tutorial13/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial13::frame::Frame frame. /// @see tutorial13::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial13::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial13::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/input/AllMessages.h b/tutorials/tutorial13/include/tutorial13/input/AllMessages.h index 51740ce38..381a1157b 100644 --- a/tutorials/tutorial13/include/tutorial13/input/AllMessages.h +++ b/tutorials/tutorial13/include/tutorial13/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial13/include/tutorial13/input/ClientInputMessages.h b/tutorials/tutorial13/include/tutorial13/input/ClientInputMessages.h index 14f3eb67c..fbebb8afc 100644 --- a/tutorials/tutorial13/include/tutorial13/input/ClientInputMessages.h +++ b/tutorials/tutorial13/include/tutorial13/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial13/include/tutorial13/input/ServerInputMessages.h b/tutorials/tutorial13/include/tutorial13/input/ServerInputMessages.h index 59b18eab8..1c873769b 100644 --- a/tutorials/tutorial13/include/tutorial13/input/ServerInputMessages.h +++ b/tutorials/tutorial13/include/tutorial13/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_1.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_1.h index 3cd23a554..464367509 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_1.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (1)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg1_1Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg1_1. /// @tparam TOpt Extra options /// @see @ref Msg1_1 @@ -45,24 +43,20 @@ struct Msg1_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg1_1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg1_1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 8U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 8U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg1_1Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_1Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_1Common.h index b315aedff..f3e10d219 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_1Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg1_1 message. /// @see tutorial13::message::Msg1_1Fields @@ -27,22 +26,19 @@ struct Msg1_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg1_1Fields::F1 field. using ValueType = std::uint64_t; - + /// @brief Name of the @ref tutorial13::message::Msg1_1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_1Common { return "Message 1 (1)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_2.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_2.h index 8b1d31cbd..437fba700 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_2.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (2)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg1_2Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg1_2. /// @tparam TOpt Extra options /// @see @ref Msg1_2 @@ -45,24 +43,20 @@ struct Msg1_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg1_2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg1_2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg1_2Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_2Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_2Common.h index 05506b67a..59dd6332a 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_2Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg1_2 message. /// @see tutorial13::message::Msg1_2Fields @@ -27,22 +26,19 @@ struct Msg1_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg1_2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial13::message::Msg1_2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_2Common { return "Message 1 (2)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_3.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_3.h index 37663cbd2..e023bee8b 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_3.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (3)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg1_3Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg1_3. /// @tparam TOpt Extra options /// @see @ref Msg1_3 @@ -45,24 +43,20 @@ struct Msg1_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg1_3FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg1_3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg1_3Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg1_3Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg1_3Common.h index 2c1f90f00..8a5060972 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg1_3Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg1_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg1_3 message. /// @see tutorial13::message::Msg1_3Fields @@ -27,22 +26,19 @@ struct Msg1_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg1_3Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial13::message::Msg1_3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_3Common { return "Message 1 (3)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_1.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_1.h index de0b23a9d..ef1f5bfda 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_1.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (1)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg2_1Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg2_1. /// @tparam TOpt Extra options /// @see @ref Msg2_1 @@ -53,20 +51,19 @@ struct Msg2_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_1FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_1FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_1Fields }; Base::setValue(1); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_1 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 3U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg2_1Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_1Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_1Common.h index 777863362..3f3c1a6d1 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_1Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg2_1 message. /// @see tutorial13::message::Msg2_1Fields @@ -27,22 +26,20 @@ struct Msg2_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_1Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_1Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial13::message::Msg2_1Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_1Common { return "Message 2 (1)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_2.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_2.h index e25da61ed..2cf38101a 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_2.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (2)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg2_2Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg2_2. /// @tparam TOpt Extra options /// @see @ref Msg2_2 @@ -53,20 +51,19 @@ struct Msg2_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_2FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_2FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_2Fields }; Base::setValue(2); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_2 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 5U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 5U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg2_2Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_2Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_2Common.h index 3131639a3..d45149b5c 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_2Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg2_2 message. /// @see tutorial13::message::Msg2_2Fields @@ -27,22 +26,20 @@ struct Msg2_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_2Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_2Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial13::message::Msg2_2Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_2Common { return "Message 2 (2)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_3.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_3.h index 318b22936..74e7c33d7 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_3.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (3)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial13/message/Msg2_3Common.h" #include "tutorial13/options/DefaultOptions.h" - namespace tutorial13 { namespace message { - /// @brief Fields of @ref Msg2_3. /// @tparam TOpt Extra options /// @see @ref Msg2_3 @@ -53,20 +51,19 @@ struct Msg2_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_3FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_3FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_3Fields }; Base::setValue(3); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial13::message::Msg2_3FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial13::message::Msg2_3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_3 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 9U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 9U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial13::message::Msg2_3Common::name(); } - - }; } // namespace message } // namespace tutorial13 - - diff --git a/tutorials/tutorial13/include/tutorial13/message/Msg2_3Common.h b/tutorials/tutorial13/include/tutorial13/message/Msg2_3Common.h index 1e33c875d..d148ad15d 100644 --- a/tutorials/tutorial13/include/tutorial13/message/Msg2_3Common.h +++ b/tutorials/tutorial13/include/tutorial13/message/Msg2_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial13 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial13::message::Msg2_3 message. /// @see tutorial13::message::Msg2_3Fields @@ -27,22 +26,20 @@ struct Msg2_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_3Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_3Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial13::message::Msg2_3Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial13::message::Msg2_3Fields::F1 field. using ValueType = std::uint64_t; - + /// @brief Name of the @ref tutorial13::message::Msg2_3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_3Common { return "Message 2 (3)"; } - }; } // namespace message } // namespace tutorial13 - - - diff --git a/tutorials/tutorial13/include/tutorial13/options/BareMetalDefaultOptions.h b/tutorials/tutorial13/include/tutorial13/options/BareMetalDefaultOptions.h index 99e3be1d0..e99d8227d 100644 --- a/tutorials/tutorial13/include/tutorial13/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial13/include/tutorial13/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial13::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial13/include/tutorial13/options/ClientDefaultOptions.h b/tutorials/tutorial13/include/tutorial13/options/ClientDefaultOptions.h index d2657acc8..cb5daa69a 100644 --- a/tutorials/tutorial13/include/tutorial13/options/ClientDefaultOptions.h +++ b/tutorials/tutorial13/include/tutorial13/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial13/include/tutorial13/options/DataViewDefaultOptions.h b/tutorials/tutorial13/include/tutorial13/options/DataViewDefaultOptions.h index efdc5308b..180c5fd55 100644 --- a/tutorials/tutorial13/include/tutorial13/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial13/include/tutorial13/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial13/include/tutorial13/options/DefaultOptions.h b/tutorials/tutorial13/include/tutorial13/options/DefaultOptions.h index 3ba7aac98..8efb84537 100644 --- a/tutorials/tutorial13/include/tutorial13/options/DefaultOptions.h +++ b/tutorials/tutorial13/include/tutorial13/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial13::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial13::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial13/include/tutorial13/options/ServerDefaultOptions.h b/tutorials/tutorial13/include/tutorial13/options/ServerDefaultOptions.h index ab42cc865..2310410ca 100644 --- a/tutorials/tutorial13/include/tutorial13/options/ServerDefaultOptions.h +++ b/tutorials/tutorial13/include/tutorial13/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial14/include/tutorial14/Message.h b/tutorials/tutorial14/include/tutorial14/Message.h index bf4514e50..d7b2e10b5 100644 --- a/tutorials/tutorial14/include/tutorial14/Message.h +++ b/tutorials/tutorial14/include/tutorial14/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial14 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial14/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial14 - - diff --git a/tutorials/tutorial14/include/tutorial14/MsgId.h b/tutorials/tutorial14/include/tutorial14/MsgId.h index 9992ae879..b01480bbf 100644 --- a/tutorials/tutorial14/include/tutorial14/MsgId.h +++ b/tutorials/tutorial14/include/tutorial14/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial14 - diff --git a/tutorials/tutorial14/include/tutorial14/Version.h b/tutorials/tutorial14/include/tutorial14/Version.h index 582094136..e8bb0546c 100644 --- a/tutorials/tutorial14/include/tutorial14/Version.h +++ b/tutorials/tutorial14/include/tutorial14/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial14 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchClientInputMessage.h index 3eacb9061..e192e7cae 100644 --- a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial14::options::DefaultOptions. /// @headerfile tutorial14/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial14::options::DefaultOptions as template parameter. /// @note Defined in tutorial14/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchMessage.h b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchMessage.h index bc5cf53b3..fd2c43ee2 100644 --- a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchMessage.h +++ b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial14::options::DefaultOptions. /// @headerfile tutorial14/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial14::options::DefaultOptions as template parameter. /// @note Defined in tutorial14/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchServerInputMessage.h index 4917da2df..60279a4ce 100644 --- a/tutorials/tutorial14/include/tutorial14/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial14/include/tutorial14/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial14::options::DefaultOptions. /// @headerfile tutorial14/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial14::options::DefaultOptions as template parameter. /// @note Defined in tutorial14/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial14/include/tutorial14/field/FieldBase.h b/tutorials/tutorial14/include/tutorial14/field/FieldBase.h index 9b8d1d640..2b653801f 100644 --- a/tutorials/tutorial14/include/tutorial14/field/FieldBase.h +++ b/tutorials/tutorial14/include/tutorial14/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial14 - diff --git a/tutorials/tutorial14/include/tutorial14/field/MsgId.h b/tutorials/tutorial14/include/tutorial14/field/MsgId.h index 1d4813c0e..8aacdc075 100644 --- a/tutorials/tutorial14/include/tutorial14/field/MsgId.h +++ b/tutorials/tutorial14/include/tutorial14/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial14 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial14::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial14::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial14::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial14::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial14::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial14::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial14::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial14::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial14::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial14::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial14 - diff --git a/tutorials/tutorial14/include/tutorial14/field/MsgIdCommon.h b/tutorials/tutorial14/include/tutorial14/field/MsgIdCommon.h index 05b9c11c4..0075e01ba 100644 --- a/tutorials/tutorial14/include/tutorial14/field/MsgIdCommon.h +++ b/tutorials/tutorial14/include/tutorial14/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial14/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial14 namespace field { - /// @brief Common types and functions for /// @ref tutorial14::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial14::field::MsgId field. using ValueType = tutorial14::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial14::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial14::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial14 - diff --git a/tutorials/tutorial14/include/tutorial14/frame/Frame.h b/tutorials/tutorial14/include/tutorial14/frame/Frame.h index 24b4ba6f7..9627472b1 100644 --- a/tutorials/tutorial14/include/tutorial14/frame/Frame.h +++ b/tutorials/tutorial14/include/tutorial14/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -26,7 +26,6 @@ namespace tutorial14 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -39,7 +38,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -52,7 +51,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -73,26 +72,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -100,7 +94,7 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -119,26 +113,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::frame::FrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". template using Checksum = @@ -147,7 +136,7 @@ struct FrameLayers tutorial14::frame::checksum::PlusOneSum, Size >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -170,26 +159,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -197,11 +181,10 @@ struct FrameLayers typename SyncMembers::SyncField, Checksum >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -242,5 +225,3 @@ class Frame : public } // namespace frame } // namespace tutorial14 - - diff --git a/tutorials/tutorial14/include/tutorial14/frame/FrameCommon.h b/tutorials/tutorial14/include/tutorial14/frame/FrameCommon.h index da431c561..b38e442c9 100644 --- a/tutorials/tutorial14/include/tutorial14/frame/FrameCommon.h +++ b/tutorials/tutorial14/include/tutorial14/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial14 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial14::frame::Frame frame. /// @see tutorial14::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial14::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial14::frame::FrameLayers::ChecksumMembers struct. struct ChecksumMembersCommon @@ -60,24 +56,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial14::frame::FrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::frame::FrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial14::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -89,28 +82,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial14::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial14 - - diff --git a/tutorials/tutorial14/include/tutorial14/input/AllMessages.h b/tutorials/tutorial14/include/tutorial14/input/AllMessages.h index ab978abd8..db7fec225 100644 --- a/tutorials/tutorial14/include/tutorial14/input/AllMessages.h +++ b/tutorials/tutorial14/include/tutorial14/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial14/include/tutorial14/input/ClientInputMessages.h b/tutorials/tutorial14/include/tutorial14/input/ClientInputMessages.h index ab201330b..e0960e2ed 100644 --- a/tutorials/tutorial14/include/tutorial14/input/ClientInputMessages.h +++ b/tutorials/tutorial14/include/tutorial14/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial14/include/tutorial14/input/ServerInputMessages.h b/tutorials/tutorial14/include/tutorial14/input/ServerInputMessages.h index acbf047b8..763c2f9e3 100644 --- a/tutorials/tutorial14/include/tutorial14/input/ServerInputMessages.h +++ b/tutorials/tutorial14/include/tutorial14/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial14/include/tutorial14/message/Msg1.h b/tutorials/tutorial14/include/tutorial14/message/Msg1.h index 2f8e94c9a..ea2ae14b9 100644 --- a/tutorials/tutorial14/include/tutorial14/message/Msg1.h +++ b/tutorials/tutorial14/include/tutorial14/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial14/message/Msg1Common.h" #include "tutorial14/options/DefaultOptions.h" - namespace tutorial14 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -51,26 +49,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::message::Msg1FieldsCommon::F1MembersCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::message::Msg1FieldsCommon::F1MembersCommon::F1Common::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::Optional< @@ -89,11 +82,8 @@ struct Msg1Fields { return tutorial14::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -113,26 +103,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::message::Msg1FieldsCommon::F2MembersCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::message::Msg1FieldsCommon::F2MembersCommon::F2Common::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::Optional< @@ -151,11 +136,8 @@ struct Msg1Fields { return tutorial14::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -175,26 +157,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::message::Msg1FieldsCommon::F3MembersCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::message::Msg1FieldsCommon::F3MembersCommon::F3Common::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. class F3 : public comms::field::Optional< @@ -213,11 +190,8 @@ struct Msg1Fields { return tutorial14::message::Msg1FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Definition of "Flags" field. class Flags : public comms::field::BitmaskValue< @@ -243,7 +217,7 @@ struct Msg1Fields COMMS_BITMASK_BITS_SEQ( F2F3 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial14::message::Msg1FieldsCommon::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -252,17 +226,14 @@ struct Msg1Fields tutorial14::message::Msg1FieldsCommon::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial14::message::Msg1FieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -321,19 +292,19 @@ class Msg1 : public f3, flags ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 9U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial14::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -341,12 +312,12 @@ class Msg1 : public field_f1().setExists(); field_f2().setMissing(); field_f3().setMissing(); - + auto es = Base::doRead(iter, len); if (es != comms::ErrorStatus::Success) { return es; } - + if (field_flags().getBitValue_F2F3()) { field_f2().field().value() = static_cast((field_f1().field().value() >> 16U) & 0xffffU); field_f3().field().value() = static_cast(field_f1().field().value() & 0xffffU); @@ -354,47 +325,41 @@ class Msg1 : public field_f2().setExists(); field_f3().setExists(); } - + return es; } - - + /// @brief Custom refresh functionality bool doRefresh() { auto f1Mode = comms::field::OptionalMode::Exists; auto f2f3Mode = comms::field::OptionalMode::Missing; - + if (field_flags().getBitValue_F2F3()) { std::swap(f1Mode, f2f3Mode); } - + bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + if (field_f1().getMode() != f1Mode) { field_f1().setMode(f1Mode); updated = true; } - + if (field_f2().getMode() != f2f3Mode) { field_f2().setMode(f2f3Mode); updated = true; } - + if (field_f3().getMode() != f2f3Mode) { field_f3().setMode(f2f3Mode); updated = true; } - + return updated; } - - - }; } // namespace message } // namespace tutorial14 - - diff --git a/tutorials/tutorial14/include/tutorial14/message/Msg1Common.h b/tutorials/tutorial14/include/tutorial14/message/Msg1Common.h index bcef071db..91e27337c 100644 --- a/tutorials/tutorial14/include/tutorial14/message/Msg1Common.h +++ b/tutorials/tutorial14/include/tutorial14/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial14 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial14::message::Msg1 message. /// @see tutorial14::message::Msg1Fields @@ -32,24 +31,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial14::message::Msg1Fields::F1Members::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial14::message::Msg1Fields::F1Members::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial14::message::Msg1Fields::F1 field. struct F1Common @@ -59,9 +55,8 @@ struct Msg1FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial14::message::Msg1Fields::F2 field. struct F2MembersCommon @@ -73,24 +68,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial14::message::Msg1Fields::F2Members::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::message::Msg1Fields::F2Members::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial14::message::Msg1Fields::F2 field. struct F2Common @@ -100,9 +92,8 @@ struct Msg1FieldsCommon { return "F2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial14::message::Msg1Fields::F3 field. struct F3MembersCommon @@ -114,24 +105,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial14::message::Msg1Fields::F3Members::F3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::message::Msg1Fields::F3Members::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial14::message::Msg1Fields::F3 field. struct F3Common @@ -141,9 +129,8 @@ struct Msg1FieldsCommon { return "F3"; } - }; - + /// @brief Common types and functions for /// @ref tutorial14::message::Msg1Fields::Flags field. struct FlagsCommon @@ -153,7 +140,7 @@ struct Msg1FieldsCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial14::message::Msg1Fields::Flags field. static const char* bitName(std::size_t idx) @@ -161,18 +148,15 @@ struct Msg1FieldsCommon static const char* Map[] = { "F2F3" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; /// @brief Common types and functions of @@ -184,12 +168,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial14 - - - diff --git a/tutorials/tutorial14/include/tutorial14/message/Msg2.h b/tutorials/tutorial14/include/tutorial14/message/Msg2.h index df3e44427..b6ff3c60f 100644 --- a/tutorials/tutorial14/include/tutorial14/message/Msg2.h +++ b/tutorials/tutorial14/include/tutorial14/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -17,14 +17,12 @@ #include - namespace tutorial14 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -47,24 +45,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial14::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial14::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -111,28 +105,27 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + // Custom code added to the public section - + /// @brief Name of the message. static const char* doNameOrig() { return tutorial14::message::Msg2Common::name(); } - + /// @brief Custom name retrieval static const char* doName() { return "Custom Message2"; } - - + /// @brief Custom read template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -140,8 +133,7 @@ class Msg2 : public std::cout << "Call of custom " << __FUNCTION__ << std::endl; return Base::doRead(iter, len); } - - + /// @brief Custom write template comms::ErrorStatus doWrite(TIter& iter, std::size_t len) const @@ -149,38 +141,33 @@ class Msg2 : public std::cout << "Call of custom " << __FUNCTION__ << std::endl; return Base::doWrite(iter, len); } - + /// @brief Custom length calculation std::size_t doLength() const { std::cout << "Call of custom " << __FUNCTION__ << std::endl; return Base::doLength(); } - + /// @brief Custom validity check bool doValid() const { std::cout << "Call of custom " << __FUNCTION__ << std::endl; return Base::doValid(); } - + /// @brief Custom refresh bool doRefresh() { std::cout << "Call of custom " << __FUNCTION__ << std::endl; return Base::doRefresh(); } - - protected: // Custom code added to the protected section - private: // Custom code added to the private section - - }; // Custom code added to the end of the file @@ -188,5 +175,3 @@ class Msg2 : public } // namespace message } // namespace tutorial14 - - diff --git a/tutorials/tutorial14/include/tutorial14/message/Msg2Common.h b/tutorials/tutorial14/include/tutorial14/message/Msg2Common.h index 6402cf1c8..6b1a60115 100644 --- a/tutorials/tutorial14/include/tutorial14/message/Msg2Common.h +++ b/tutorials/tutorial14/include/tutorial14/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial14 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial14::message::Msg2 message. /// @see tutorial14::message::Msg2Fields @@ -27,22 +26,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial14::message::Msg2Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial14::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial14 - - - diff --git a/tutorials/tutorial14/include/tutorial14/options/BareMetalDefaultOptions.h b/tutorials/tutorial14/include/tutorial14/options/BareMetalDefaultOptions.h index 2ebd545d8..50f271345 100644 --- a/tutorials/tutorial14/include/tutorial14/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial14/include/tutorial14/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial14::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial14/include/tutorial14/options/ClientDefaultOptions.h b/tutorials/tutorial14/include/tutorial14/options/ClientDefaultOptions.h index e277a8daf..e3e55e55b 100644 --- a/tutorials/tutorial14/include/tutorial14/options/ClientDefaultOptions.h +++ b/tutorials/tutorial14/include/tutorial14/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial14/include/tutorial14/options/DataViewDefaultOptions.h b/tutorials/tutorial14/include/tutorial14/options/DataViewDefaultOptions.h index 6def97a73..8ec6c606a 100644 --- a/tutorials/tutorial14/include/tutorial14/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial14/include/tutorial14/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial14/include/tutorial14/options/DefaultOptions.h b/tutorials/tutorial14/include/tutorial14/options/DefaultOptions.h index ca9243086..44b86346e 100644 --- a/tutorials/tutorial14/include/tutorial14/options/DefaultOptions.h +++ b/tutorials/tutorial14/include/tutorial14/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial14::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial14::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial14/include/tutorial14/options/ServerDefaultOptions.h b/tutorials/tutorial14/include/tutorial14/options/ServerDefaultOptions.h index d6b1a6f44..45d738e4a 100644 --- a/tutorials/tutorial14/include/tutorial14/options/ServerDefaultOptions.h +++ b/tutorials/tutorial14/include/tutorial14/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial15/include/tutorial15/Message.h b/tutorials/tutorial15/include/tutorial15/Message.h index 7d7cdd8aa..ca84950c0 100644 --- a/tutorials/tutorial15/include/tutorial15/Message.h +++ b/tutorials/tutorial15/include/tutorial15/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial15 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial15/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/MsgId.h b/tutorials/tutorial15/include/tutorial15/MsgId.h index 4704296f8..f2760e30b 100644 --- a/tutorials/tutorial15/include/tutorial15/MsgId.h +++ b/tutorials/tutorial15/include/tutorial15/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial15 - diff --git a/tutorials/tutorial15/include/tutorial15/Version.h b/tutorials/tutorial15/include/tutorial15/Version.h index 206fe78d6..c78673dd2 100644 --- a/tutorials/tutorial15/include/tutorial15/Version.h +++ b/tutorials/tutorial15/include/tutorial15/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial15 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchClientInputMessage.h index 1659cc5bd..426f4743c 100644 --- a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial15::options::DefaultOptions. /// @headerfile tutorial15/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial15::options::DefaultOptions as template parameter. /// @note Defined in tutorial15/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchMessage.h b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchMessage.h index 500351a6b..4aecb1c4c 100644 --- a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchMessage.h +++ b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial15::options::DefaultOptions. /// @headerfile tutorial15/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial15::options::DefaultOptions as template parameter. /// @note Defined in tutorial15/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchServerInputMessage.h index 0bfee9dff..1c21699cf 100644 --- a/tutorials/tutorial15/include/tutorial15/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial15/include/tutorial15/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial15::options::DefaultOptions. /// @headerfile tutorial15/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial15::options::DefaultOptions as template parameter. /// @note Defined in tutorial15/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial15/include/tutorial15/field/FieldBase.h b/tutorials/tutorial15/include/tutorial15/field/FieldBase.h index 0792b5963..04c8359a4 100644 --- a/tutorials/tutorial15/include/tutorial15/field/FieldBase.h +++ b/tutorials/tutorial15/include/tutorial15/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial15 - diff --git a/tutorials/tutorial15/include/tutorial15/field/MsgId.h b/tutorials/tutorial15/include/tutorial15/field/MsgId.h index 188014f92..54714df18 100644 --- a/tutorials/tutorial15/include/tutorial15/field/MsgId.h +++ b/tutorials/tutorial15/include/tutorial15/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial15 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial15::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial15::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial15::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial15::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial15::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial15::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial15::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial15::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial15::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial15::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial15::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial15 - diff --git a/tutorials/tutorial15/include/tutorial15/field/MsgIdCommon.h b/tutorials/tutorial15/include/tutorial15/field/MsgIdCommon.h index cd6167453..e5420f07b 100644 --- a/tutorials/tutorial15/include/tutorial15/field/MsgIdCommon.h +++ b/tutorials/tutorial15/include/tutorial15/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial15/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial15 namespace field { - /// @brief Common types and functions for /// @ref tutorial15::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial15::field::MsgId field. using ValueType = tutorial15::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial15::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial15::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial15 - diff --git a/tutorials/tutorial15/include/tutorial15/frame/Frame.h b/tutorials/tutorial15/include/tutorial15/frame/Frame.h index da97e62dc..2deff52c4 100644 --- a/tutorials/tutorial15/include/tutorial15/frame/Frame.h +++ b/tutorials/tutorial15/include/tutorial15/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial15 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial15::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial15::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/frame/FrameCommon.h b/tutorials/tutorial15/include/tutorial15/frame/FrameCommon.h index a4df877a9..d092f5acc 100644 --- a/tutorials/tutorial15/include/tutorial15/frame/FrameCommon.h +++ b/tutorials/tutorial15/include/tutorial15/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial15 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial15::frame::Frame frame. /// @see tutorial15::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial15::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial15::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/input/AllMessages.h b/tutorials/tutorial15/include/tutorial15/input/AllMessages.h index bf1ddb1f0..6b528dbde 100644 --- a/tutorials/tutorial15/include/tutorial15/input/AllMessages.h +++ b/tutorials/tutorial15/include/tutorial15/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial15/include/tutorial15/input/ClientInputMessages.h b/tutorials/tutorial15/include/tutorial15/input/ClientInputMessages.h index 9070c16a8..0693e9771 100644 --- a/tutorials/tutorial15/include/tutorial15/input/ClientInputMessages.h +++ b/tutorials/tutorial15/include/tutorial15/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial15/include/tutorial15/input/ServerInputMessages.h b/tutorials/tutorial15/include/tutorial15/input/ServerInputMessages.h index e4d998b09..ded9eeb15 100644 --- a/tutorials/tutorial15/include/tutorial15/input/ServerInputMessages.h +++ b/tutorials/tutorial15/include/tutorial15/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg1.h b/tutorials/tutorial15/include/tutorial15/message/Msg1.h index 19b3185f3..a6c2f6d9f 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg1.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial15/message/Msg1Common.h" #include "tutorial15/options/DefaultOptions.h" - namespace tutorial15 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -47,24 +45,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial15::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial15::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -111,24 +105,20 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial15::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg1Common.h b/tutorials/tutorial15/include/tutorial15/message/Msg1Common.h index bc922c586..291f2bad5 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg1Common.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial15 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial15::message::Msg1 message. /// @see tutorial15::message::Msg1Fields @@ -27,22 +26,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial15::message::Msg1Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial15::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial15 - - - diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg2.h b/tutorials/tutorial15/include/tutorial15/message/Msg2.h index f2f2e27dd..39dcf8eb1 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg2.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial15/message/Msg2Common.h" #include "tutorial15/options/DefaultOptions.h" - namespace tutorial15 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -50,26 +48,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial15::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial15::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -92,17 +85,14 @@ struct Msg2Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return tutorial15::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -147,22 +137,18 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial15::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg2Common.h b/tutorials/tutorial15/include/tutorial15/message/Msg2Common.h index 60b299804..5870cee3a 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg2Common.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial15 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial15::message::Msg2 message. /// @see tutorial15::message::Msg2Fields @@ -31,24 +30,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial15::message::Msg2Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial15::message::Msg2Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial15::message::Msg2Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg2FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial15 - - - diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg3.h b/tutorials/tutorial15/include/tutorial15/message/Msg3.h index 89303a74c..0b4230215 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg3.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -18,14 +18,12 @@ #include "tutorial15/message/Msg3Common.h" #include "tutorial15/options/DefaultOptions.h" - namespace tutorial15 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -52,26 +50,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial15::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial15::message::Msg3FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::ArrayList< @@ -97,17 +90,14 @@ struct Msg3Fields }; comms::util::assign(Base::value(), std::begin(Data), std::end(Data)); } - + /// @brief Name of the field. static const char* name() { return tutorial15::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -152,22 +142,18 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial15::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial15 - - diff --git a/tutorials/tutorial15/include/tutorial15/message/Msg3Common.h b/tutorials/tutorial15/include/tutorial15/message/Msg3Common.h index b355ded3a..2145cc8c1 100644 --- a/tutorials/tutorial15/include/tutorial15/message/Msg3Common.h +++ b/tutorials/tutorial15/include/tutorial15/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial15 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial15::message::Msg3 message. /// @see tutorial15::message::Msg3Fields @@ -31,24 +30,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial15::message::Msg3Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial15::message::Msg3Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial15::message::Msg3Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg3FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial15 - - - diff --git a/tutorials/tutorial15/include/tutorial15/options/BareMetalDefaultOptions.h b/tutorials/tutorial15/include/tutorial15/options/BareMetalDefaultOptions.h index 98c846c20..1745deeb5 100644 --- a/tutorials/tutorial15/include/tutorial15/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial15/include/tutorial15/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,9 +38,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial15::message::Msg3 message. struct Msg3Fields : public TBase::message::Msg3Fields @@ -53,11 +52,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -73,7 +70,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial15::frame::FrameLayers::Id /// layer. @@ -82,13 +79,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial15/include/tutorial15/options/ClientDefaultOptions.h b/tutorials/tutorial15/include/tutorial15/options/ClientDefaultOptions.h index c8bd0b88d..7d35841fb 100644 --- a/tutorials/tutorial15/include/tutorial15/options/ClientDefaultOptions.h +++ b/tutorials/tutorial15/include/tutorial15/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. @@ -28,10 +28,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg1 >; - }; // struct message - - }; /// @brief Alias to @ref ClientDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial15/include/tutorial15/options/DataViewDefaultOptions.h b/tutorials/tutorial15/include/tutorial15/options/DataViewDefaultOptions.h index 68596d12e..4c1a75bed 100644 --- a/tutorials/tutorial15/include/tutorial15/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial15/include/tutorial15/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,9 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial15::message::Msg3 message. struct Msg3Fields : public TBase::message::Msg3Fields @@ -47,11 +46,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg3Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -67,13 +64,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial15/include/tutorial15/options/DefaultOptions.h b/tutorials/tutorial15/include/tutorial15/options/DefaultOptions.h index 33f488d18..4e933978b 100644 --- a/tutorials/tutorial15/include/tutorial15/options/DefaultOptions.h +++ b/tutorials/tutorial15/include/tutorial15/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -26,7 +26,7 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// tutorial15::message::Msg1 message. using Msg1 = comms::option::EmptyOption; - + /// @brief Extra options for fields of /// @ref tutorial15::message::Msg2 message. struct Msg2Fields @@ -35,9 +35,8 @@ struct DefaultOptionsT : public TBase /// tutorial15::message::Msg2Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref tutorial15::message::Msg3 message. struct Msg3Fields @@ -46,11 +45,9 @@ struct DefaultOptionsT : public TBase /// tutorial15::message::Msg3Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -62,18 +59,13 @@ struct DefaultOptionsT : public TBase /// tutorial15::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial15::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial15/include/tutorial15/options/ServerDefaultOptions.h b/tutorials/tutorial15/include/tutorial15/options/ServerDefaultOptions.h index 85c7ea76c..913e6ee7f 100644 --- a/tutorials/tutorial15/include/tutorial15/options/ServerDefaultOptions.h +++ b/tutorials/tutorial15/include/tutorial15/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. @@ -28,10 +28,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg1 >; - }; // struct message - - }; /// @brief Alias to @ref ServerDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial16/include/tutorial16/Interface.h b/tutorials/tutorial16/include/tutorial16/Interface.h index b915e54c9..3cfdeec9f 100644 --- a/tutorials/tutorial16/include/tutorial16/Interface.h +++ b/tutorials/tutorial16/include/tutorial16/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace tutorial16 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile tutorial16/Interface.h @@ -38,11 +37,8 @@ struct InterfaceFields { return tutorial16::InterfaceFieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -81,10 +77,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/InterfaceCommon.h b/tutorials/tutorial16/include/tutorial16/InterfaceCommon.h index 8b617be4a..56b2dcd2d 100644 --- a/tutorials/tutorial16/include/tutorial16/InterfaceCommon.h +++ b/tutorials/tutorial16/include/tutorial16/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace tutorial16 { - /// @brief Common types and functions for fields of /// @ref tutorial16::Interface interface. /// @see tutorial16::InterfaceFields @@ -26,10 +25,6 @@ struct InterfaceFieldsCommon { return "Flags"; } - }; - }; } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/MsgId.h b/tutorials/tutorial16/include/tutorial16/MsgId.h index 27c95f8d8..850109e33 100644 --- a/tutorials/tutorial16/include/tutorial16/MsgId.h +++ b/tutorials/tutorial16/include/tutorial16/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/Version.h b/tutorials/tutorial16/include/tutorial16/Version.h index 940a596b3..9c6899d66 100644 --- a/tutorials/tutorial16/include/tutorial16/Version.h +++ b/tutorials/tutorial16/include/tutorial16/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial16 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchClientInputMessage.h index 733b1a62d..9d7686602 100644 --- a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial16::options::DefaultOptions. /// @headerfile tutorial16/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial16::options::DefaultOptions as template parameter. /// @note Defined in tutorial16/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchMessage.h b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchMessage.h index 7715187f6..2499d1dfa 100644 --- a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchMessage.h +++ b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial16::options::DefaultOptions. /// @headerfile tutorial16/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial16::options::DefaultOptions as template parameter. /// @note Defined in tutorial16/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchServerInputMessage.h index b32b0aff8..961be6ecd 100644 --- a/tutorials/tutorial16/include/tutorial16/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial16/include/tutorial16/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial16::options::DefaultOptions. /// @headerfile tutorial16/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial16::options::DefaultOptions as template parameter. /// @note Defined in tutorial16/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial16/include/tutorial16/field/FieldBase.h b/tutorials/tutorial16/include/tutorial16/field/FieldBase.h index e0e919131..2761f5c67 100644 --- a/tutorials/tutorial16/include/tutorial16/field/FieldBase.h +++ b/tutorials/tutorial16/include/tutorial16/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/field/InterfaceFlags.h b/tutorials/tutorial16/include/tutorial16/field/InterfaceFlags.h index a35991f3c..e003179fd 100644 --- a/tutorials/tutorial16/include/tutorial16/field/InterfaceFlags.h +++ b/tutorials/tutorial16/include/tutorial16/field/InterfaceFlags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "InterfaceFlags" field. @@ -17,7 +17,6 @@ namespace tutorial16 namespace field { - /// @brief Definition of "InterfaceFlags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -50,7 +49,7 @@ class InterfaceFlags : public B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial16::field::InterfaceFlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -59,18 +58,14 @@ class InterfaceFlags : public tutorial16::field::InterfaceFlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial16::field::InterfaceFlagsCommon::name(); } - - }; - } // namespace field } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/field/InterfaceFlagsCommon.h b/tutorials/tutorial16/include/tutorial16/field/InterfaceFlagsCommon.h index cc4569f8d..9e1698798 100644 --- a/tutorials/tutorial16/include/tutorial16/field/InterfaceFlagsCommon.h +++ b/tutorials/tutorial16/include/tutorial16/field/InterfaceFlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial16 namespace field { - /// @brief Common types and functions for /// @ref tutorial16::field::InterfaceFlags field. struct InterfaceFlagsCommon @@ -24,7 +23,7 @@ struct InterfaceFlagsCommon { return "InterfaceFlags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial16::field::InterfaceFlags field. static const char* bitName(std::size_t idx) @@ -33,19 +32,16 @@ struct InterfaceFlagsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/field/MsgId.h b/tutorials/tutorial16/include/tutorial16/field/MsgId.h index e92d281a2..87dc6a3e3 100644 --- a/tutorials/tutorial16/include/tutorial16/field/MsgId.h +++ b/tutorials/tutorial16/include/tutorial16/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial16 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial16::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial16::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial16::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial16::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial16::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial16::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial16::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial16::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial16::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial16::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/field/MsgIdCommon.h b/tutorials/tutorial16/include/tutorial16/field/MsgIdCommon.h index 34c008ae7..8897dae25 100644 --- a/tutorials/tutorial16/include/tutorial16/field/MsgIdCommon.h +++ b/tutorials/tutorial16/include/tutorial16/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial16/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial16 namespace field { - /// @brief Common types and functions for /// @ref tutorial16::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial16::field::MsgId field. using ValueType = tutorial16::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial16::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial16::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial16 - diff --git a/tutorials/tutorial16/include/tutorial16/frame/Frame.h b/tutorials/tutorial16/include/tutorial16/frame/Frame.h index 6eaf74da2..4d75d1fd5 100644 --- a/tutorials/tutorial16/include/tutorial16/frame/Frame.h +++ b/tutorials/tutorial16/include/tutorial16/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace tutorial16 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -51,7 +50,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Flags layer. struct FlagsMembers { @@ -71,13 +70,9 @@ struct FrameLayers { return tutorial16::frame::FrameLayersCommon::FlagsMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Flags". template using Flags = @@ -86,7 +81,7 @@ struct FrameLayers 0U, Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -105,26 +100,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -132,11 +122,10 @@ struct FrameLayers typename SizeMembers::SizeField, Flags >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -175,5 +164,3 @@ class Frame : public } // namespace frame } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/frame/FrameCommon.h b/tutorials/tutorial16/include/tutorial16/frame/FrameCommon.h index c750739c5..7a399e828 100644 --- a/tutorials/tutorial16/include/tutorial16/frame/FrameCommon.h +++ b/tutorials/tutorial16/include/tutorial16/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial16 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial16::frame::Frame frame. /// @see tutorial16::frame::FrameLayers @@ -32,24 +31,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial16::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial16::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial16::frame::FrameLayers::FlagsMembers struct. struct FlagsMembersCommon @@ -63,15 +59,10 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - }; } // namespace frame } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/input/AllMessages.h b/tutorials/tutorial16/include/tutorial16/input/AllMessages.h index ca2bb1b0f..0a076bbe9 100644 --- a/tutorials/tutorial16/include/tutorial16/input/AllMessages.h +++ b/tutorials/tutorial16/include/tutorial16/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial16/include/tutorial16/input/ClientInputMessages.h b/tutorials/tutorial16/include/tutorial16/input/ClientInputMessages.h index 63a8ca84f..d745db5ad 100644 --- a/tutorials/tutorial16/include/tutorial16/input/ClientInputMessages.h +++ b/tutorials/tutorial16/include/tutorial16/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial16/include/tutorial16/input/ServerInputMessages.h b/tutorials/tutorial16/include/tutorial16/input/ServerInputMessages.h index 8d7b9ee9c..4a89ba4a9 100644 --- a/tutorials/tutorial16/include/tutorial16/input/ServerInputMessages.h +++ b/tutorials/tutorial16/include/tutorial16/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial16/include/tutorial16/message/Msg1.h b/tutorials/tutorial16/include/tutorial16/message/Msg1.h index 91aace5f9..ea7efc2c6 100644 --- a/tutorials/tutorial16/include/tutorial16/message/Msg1.h +++ b/tutorials/tutorial16/include/tutorial16/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial16/message/Msg1Common.h" #include "tutorial16/options/DefaultOptions.h" - namespace tutorial16 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,24 +44,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -79,24 +73,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -116,26 +106,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. /// @details /// The field exists only when B0 in interface flags is set. @@ -156,11 +141,8 @@ struct Msg1Fields { return tutorial16::message::Msg1FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -215,19 +197,19 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial16::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -235,31 +217,26 @@ class Msg1 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF3Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B0()) { expF3Mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == expF3Mode) { return updated; } - + field_f3().setMode(expF3Mode); return true; } - - }; } // namespace message } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/message/Msg1Common.h b/tutorials/tutorial16/include/tutorial16/message/Msg1Common.h index e3ef3d4c7..62e000983 100644 --- a/tutorials/tutorial16/include/tutorial16/message/Msg1Common.h +++ b/tutorials/tutorial16/include/tutorial16/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial16 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial16::message::Msg1 message. /// @see tutorial16::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial16::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial16::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial16::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial16::message::Msg1Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial16::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial16::message::Msg1Fields::F3 field. struct F3MembersCommon @@ -77,24 +72,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial16::message::Msg1Fields::F3Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial16::message::Msg1Fields::F3Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial16::message::Msg1Fields::F3 field. struct F3Common @@ -104,9 +96,7 @@ struct Msg1FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -118,12 +108,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial16 - - - diff --git a/tutorials/tutorial16/include/tutorial16/message/Msg2.h b/tutorials/tutorial16/include/tutorial16/message/Msg2.h index fd303f105..ff916f5fc 100644 --- a/tutorials/tutorial16/include/tutorial16/message/Msg2.h +++ b/tutorials/tutorial16/include/tutorial16/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial16/message/Msg2Common.h" #include "tutorial16/options/DefaultOptions.h" - namespace tutorial16 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -51,26 +49,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -93,17 +86,14 @@ struct Msg2Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -123,26 +113,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial16::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial16::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// The field exists only when B1 in interface flags is set. @@ -163,11 +148,8 @@ struct Msg2Fields { return tutorial16::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -218,17 +200,17 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial16::message::Msg2Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -236,31 +218,26 @@ class Msg2 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B1()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace tutorial16 - - diff --git a/tutorials/tutorial16/include/tutorial16/message/Msg2Common.h b/tutorials/tutorial16/include/tutorial16/message/Msg2Common.h index 8a5743ccf..925a5e5c6 100644 --- a/tutorials/tutorial16/include/tutorial16/message/Msg2Common.h +++ b/tutorials/tutorial16/include/tutorial16/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial16 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial16::message::Msg2 message. /// @see tutorial16::message::Msg2Fields @@ -31,24 +30,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial16::message::Msg2Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial16::message::Msg2Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial16::message::Msg2Fields::F1 field. struct F1Common @@ -58,9 +54,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial16::message::Msg2Fields::F2 field. struct F2MembersCommon @@ -72,24 +67,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial16::message::Msg2Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial16::message::Msg2Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial16::message::Msg2Fields::F2 field. struct F2Common @@ -99,9 +91,7 @@ struct Msg2FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -113,12 +103,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial16 - - - diff --git a/tutorials/tutorial16/include/tutorial16/options/BareMetalDefaultOptions.h b/tutorials/tutorial16/include/tutorial16/options/BareMetalDefaultOptions.h index d8aaa19ea..b18527c6b 100644 --- a/tutorials/tutorial16/include/tutorial16/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial16/include/tutorial16/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,11 +38,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -58,7 +56,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial16::frame::FrameLayers::Id /// layer. @@ -67,13 +65,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial16/include/tutorial16/options/ClientDefaultOptions.h b/tutorials/tutorial16/include/tutorial16/options/ClientDefaultOptions.h index 8aad6c227..26f645201 100644 --- a/tutorials/tutorial16/include/tutorial16/options/ClientDefaultOptions.h +++ b/tutorials/tutorial16/include/tutorial16/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial16/include/tutorial16/options/DataViewDefaultOptions.h b/tutorials/tutorial16/include/tutorial16/options/DataViewDefaultOptions.h index 2f63a6429..28d005983 100644 --- a/tutorials/tutorial16/include/tutorial16/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial16/include/tutorial16/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,11 +32,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -52,13 +50,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial16/include/tutorial16/options/DefaultOptions.h b/tutorials/tutorial16/include/tutorial16/options/DefaultOptions.h index 15183b94e..5160fd30f 100644 --- a/tutorials/tutorial16/include/tutorial16/options/DefaultOptions.h +++ b/tutorials/tutorial16/include/tutorial16/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,11 +31,9 @@ struct DefaultOptionsT : public TBase /// tutorial16::message::Msg2Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -47,18 +45,13 @@ struct DefaultOptionsT : public TBase /// tutorial16::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial16::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial16/include/tutorial16/options/ServerDefaultOptions.h b/tutorials/tutorial16/include/tutorial16/options/ServerDefaultOptions.h index c26181f2a..1231bb211 100644 --- a/tutorials/tutorial16/include/tutorial16/options/ServerDefaultOptions.h +++ b/tutorials/tutorial16/include/tutorial16/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial17/include/tutorial17/Interface.h b/tutorials/tutorial17/include/tutorial17/Interface.h index 5f830afbb..3490f0082 100644 --- a/tutorials/tutorial17/include/tutorial17/Interface.h +++ b/tutorials/tutorial17/include/tutorial17/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace tutorial17 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile tutorial17/Interface.h @@ -49,7 +48,7 @@ struct InterfaceFields B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial17::InterfaceFieldsCommon::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -58,17 +57,14 @@ struct InterfaceFields tutorial17::InterfaceFieldsCommon::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial17::InterfaceFieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -107,10 +103,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/InterfaceCommon.h b/tutorials/tutorial17/include/tutorial17/InterfaceCommon.h index 19e57e142..4840b7926 100644 --- a/tutorials/tutorial17/include/tutorial17/InterfaceCommon.h +++ b/tutorials/tutorial17/include/tutorial17/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace tutorial17 { - /// @brief Common types and functions for fields of /// @ref tutorial17::Interface interface. /// @see tutorial17::InterfaceFields @@ -26,7 +25,7 @@ struct InterfaceFieldsCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial17::InterfaceFields::Flags field. static const char* bitName(std::size_t idx) @@ -35,19 +34,14 @@ struct InterfaceFieldsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/MsgId.h b/tutorials/tutorial17/include/tutorial17/MsgId.h index af91101d2..9aebaffa9 100644 --- a/tutorials/tutorial17/include/tutorial17/MsgId.h +++ b/tutorials/tutorial17/include/tutorial17/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial17 - diff --git a/tutorials/tutorial17/include/tutorial17/Version.h b/tutorials/tutorial17/include/tutorial17/Version.h index 03f4817cb..440fb526c 100644 --- a/tutorials/tutorial17/include/tutorial17/Version.h +++ b/tutorials/tutorial17/include/tutorial17/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial17 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchClientInputMessage.h index 6aaf48139..7db8c56d4 100644 --- a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial17::options::DefaultOptions. /// @headerfile tutorial17/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial17::options::DefaultOptions as template parameter. /// @note Defined in tutorial17/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchMessage.h b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchMessage.h index f3b34a8f9..b8af55788 100644 --- a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchMessage.h +++ b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial17::options::DefaultOptions. /// @headerfile tutorial17/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial17::options::DefaultOptions as template parameter. /// @note Defined in tutorial17/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchServerInputMessage.h index b3e43c687..cb4c83b8e 100644 --- a/tutorials/tutorial17/include/tutorial17/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial17/include/tutorial17/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial17::options::DefaultOptions. /// @headerfile tutorial17/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial17::options::DefaultOptions as template parameter. /// @note Defined in tutorial17/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial17/include/tutorial17/field/FieldBase.h b/tutorials/tutorial17/include/tutorial17/field/FieldBase.h index dd1c0a068..9c50bb021 100644 --- a/tutorials/tutorial17/include/tutorial17/field/FieldBase.h +++ b/tutorials/tutorial17/include/tutorial17/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial17 - diff --git a/tutorials/tutorial17/include/tutorial17/field/MsgId.h b/tutorials/tutorial17/include/tutorial17/field/MsgId.h index 04e505674..ee5fd09b8 100644 --- a/tutorials/tutorial17/include/tutorial17/field/MsgId.h +++ b/tutorials/tutorial17/include/tutorial17/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial17 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial17::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial17::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial17::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial17::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial17::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial17::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial17::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial17::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial17::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial17::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial17 - diff --git a/tutorials/tutorial17/include/tutorial17/field/MsgIdCommon.h b/tutorials/tutorial17/include/tutorial17/field/MsgIdCommon.h index 251417242..95b0b9e12 100644 --- a/tutorials/tutorial17/include/tutorial17/field/MsgIdCommon.h +++ b/tutorials/tutorial17/include/tutorial17/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial17/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial17 namespace field { - /// @brief Common types and functions for /// @ref tutorial17::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial17::field::MsgId field. using ValueType = tutorial17::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial17::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial17::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial17 - diff --git a/tutorials/tutorial17/include/tutorial17/frame/Frame.h b/tutorials/tutorial17/include/tutorial17/frame/Frame.h index 2cfbe8cc2..b9528606b 100644 --- a/tutorials/tutorial17/include/tutorial17/frame/Frame.h +++ b/tutorials/tutorial17/include/tutorial17/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -26,7 +26,6 @@ namespace tutorial17 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -39,7 +38,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref SizeWithFlags layer. struct SizeWithFlagsMembers { @@ -64,24 +63,20 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::SizeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::SizeCommon::name(); } - - }; - - + /// @brief Definition of "Flags" field. class Flags : public comms::field::BitmaskValue< @@ -107,7 +102,7 @@ struct FrameLayers COMMS_BITMASK_BITS_SEQ( F1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -116,17 +111,14 @@ struct FrameLayers tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -134,7 +126,7 @@ struct FrameLayers Flags >; }; - + /// @brief Definition of "Field" field. class Field : public comms::field::Bitfield< @@ -162,19 +154,15 @@ struct FrameLayers size, flags ); - + /// @brief Name of the field. static const char* name() { return tutorial17::frame::FrameLayersCommon::SizeWithFlagsMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "SizeWithFlags". using SizeWithFlags = tutorial17::frame::layer::SizeWithFlags< @@ -182,7 +170,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::SizeWithFlags >; - + /// @brief Scope for field(s) of @ref IdWithFlags layer. struct IdWithFlagsMembers { @@ -196,8 +184,7 @@ struct FrameLayers TOpt, comms::option::def::FixedBitLength<6U> >; - - + /// @brief Definition of "Flags" field. class Flags : public comms::field::BitmaskValue< @@ -223,7 +210,7 @@ struct FrameLayers COMMS_BITMASK_BITS_SEQ( F1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial17::frame::FrameLayersCommon::IdWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -232,17 +219,14 @@ struct FrameLayers tutorial17::frame::FrameLayersCommon::IdWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial17::frame::FrameLayersCommon::IdWithFlagsMembersCommon::FieldMembersCommon::FlagsCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -250,7 +234,7 @@ struct FrameLayers Flags >; }; - + /// @brief Definition of "Field" field. class Field : public comms::field::Bitfield< @@ -278,19 +262,15 @@ struct FrameLayers msgId, flags ); - + /// @brief Name of the field. static const char* name() { return tutorial17::frame::FrameLayersCommon::IdWithFlagsMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "IdWithFlags". template using IdWithFlags = @@ -301,11 +281,10 @@ struct FrameLayers SizeWithFlags, typename TOpt::frame::FrameLayers::IdWithFlags >; - + /// @brief Final protocol stack definition. template using Stack = IdWithFlags; - }; /// @brief Definition of "Frame" frame class. @@ -342,5 +321,3 @@ class Frame : public } // namespace frame } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/frame/FrameCommon.h b/tutorials/tutorial17/include/tutorial17/frame/FrameCommon.h index 8247ae1b5..488089e76 100644 --- a/tutorials/tutorial17/include/tutorial17/frame/FrameCommon.h +++ b/tutorials/tutorial17/include/tutorial17/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial17 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial17::frame::Frame frame. /// @see tutorial17::frame::FrameLayers @@ -33,7 +32,7 @@ struct FrameLayersCommon /// @brief Common types and functions for /// @ref tutorial17::frame::FrameLayers::IdWithFlagsMembers::FieldMembers::MsgId field. using MsgIdCommon = tutorial17::field::MsgIdCommon; - + /// @brief Common types and functions for /// @ref tutorial17::frame::FrameLayers::IdWithFlagsMembers::FieldMembers::Flags field. struct FlagsCommon @@ -43,7 +42,7 @@ struct FrameLayersCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial17::frame::FrameLayers::IdWithFlagsMembers::FieldMembers::Flags field. static const char* bitName(std::size_t idx) @@ -51,20 +50,17 @@ struct FrameLayersCommon static const char* Map[] = { "F1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial17::frame::FrameLayers::IdWithFlagsMembers::Field field. struct FieldCommon @@ -74,11 +70,9 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial17::frame::FrameLayers::SizeWithFlagsMembers struct. struct SizeWithFlagsMembersCommon @@ -94,22 +88,20 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial17::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Size field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial17::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Size field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial17::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Flags field. struct FlagsCommon @@ -119,7 +111,7 @@ struct FrameLayersCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial17::frame::FrameLayers::SizeWithFlagsMembers::FieldMembers::Flags field. static const char* bitName(std::size_t idx) @@ -127,20 +119,17 @@ struct FrameLayersCommon static const char* Map[] = { "F1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial17::frame::FrameLayers::SizeWithFlagsMembers::Field field. struct FieldCommon @@ -150,15 +139,10 @@ struct FrameLayersCommon { return "Field"; } - }; - }; - }; } // namespace frame } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/input/AllMessages.h b/tutorials/tutorial17/include/tutorial17/input/AllMessages.h index 8bf30c745..8cecef7aa 100644 --- a/tutorials/tutorial17/include/tutorial17/input/AllMessages.h +++ b/tutorials/tutorial17/include/tutorial17/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial17/include/tutorial17/input/ClientInputMessages.h b/tutorials/tutorial17/include/tutorial17/input/ClientInputMessages.h index 814e7e8c1..e8ae1133c 100644 --- a/tutorials/tutorial17/include/tutorial17/input/ClientInputMessages.h +++ b/tutorials/tutorial17/include/tutorial17/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial17/include/tutorial17/input/ServerInputMessages.h b/tutorials/tutorial17/include/tutorial17/input/ServerInputMessages.h index bac67b7f7..4bd183234 100644 --- a/tutorials/tutorial17/include/tutorial17/input/ServerInputMessages.h +++ b/tutorials/tutorial17/include/tutorial17/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial17/include/tutorial17/message/Msg1.h b/tutorials/tutorial17/include/tutorial17/message/Msg1.h index 3277531ab..2384b7d47 100644 --- a/tutorials/tutorial17/include/tutorial17/message/Msg1.h +++ b/tutorials/tutorial17/include/tutorial17/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial17/message/Msg1Common.h" #include "tutorial17/options/DefaultOptions.h" - namespace tutorial17 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,24 +44,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -79,24 +73,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -116,26 +106,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg1FieldsCommon::F3MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. /// @details /// The field exists only when B0 in interface flags is set. @@ -156,11 +141,8 @@ struct Msg1Fields { return tutorial17::message::Msg1FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -215,19 +197,19 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial17::message::Msg1Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -235,31 +217,26 @@ class Msg1 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF3Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B0()) { expF3Mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == expF3Mode) { return updated; } - + field_f3().setMode(expF3Mode); return true; } - - }; } // namespace message } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/message/Msg1Common.h b/tutorials/tutorial17/include/tutorial17/message/Msg1Common.h index 0a77f1a8e..b39114f2b 100644 --- a/tutorials/tutorial17/include/tutorial17/message/Msg1Common.h +++ b/tutorials/tutorial17/include/tutorial17/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial17 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial17::message::Msg1 message. /// @see tutorial17::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial17::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial17::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial17::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial17::message::Msg1Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial17::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial17::message::Msg1Fields::F3 field. struct F3MembersCommon @@ -77,24 +72,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial17::message::Msg1Fields::F3Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial17::message::Msg1Fields::F3Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial17::message::Msg1Fields::F3 field. struct F3Common @@ -104,9 +96,7 @@ struct Msg1FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -118,12 +108,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial17 - - - diff --git a/tutorials/tutorial17/include/tutorial17/message/Msg2.h b/tutorials/tutorial17/include/tutorial17/message/Msg2.h index a4d0f54e1..62372238d 100644 --- a/tutorials/tutorial17/include/tutorial17/message/Msg2.h +++ b/tutorials/tutorial17/include/tutorial17/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial17/message/Msg2Common.h" #include "tutorial17/options/DefaultOptions.h" - namespace tutorial17 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -51,26 +49,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg2FieldsCommon::F1MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::String< @@ -93,17 +86,14 @@ struct Msg2Fields static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -123,26 +113,21 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial17::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial17::message::Msg2FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. /// @details /// The field exists only when B1 in interface flags is set. @@ -163,11 +148,8 @@ struct Msg2Fields { return tutorial17::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -218,17 +200,17 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial17::message::Msg2Common::name(); } - + /// @brief Custom read functionality template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -236,31 +218,26 @@ class Msg2 : public doRefresh(); // Update mode according to flags in the interface return Base::doRead(iter, len); } - - + // @brief Custom refresh functionality bool doRefresh() { bool updated = Base::doRefresh(); // Don't forget default refresh functionality - + auto expF2Mode = comms::field::OptionalMode::Missing; if (Base::transportField_flags().getBitValue_B1()) { expF2Mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == expF2Mode) { return updated; } - + field_f2().setMode(expF2Mode); return true; } - - }; } // namespace message } // namespace tutorial17 - - diff --git a/tutorials/tutorial17/include/tutorial17/message/Msg2Common.h b/tutorials/tutorial17/include/tutorial17/message/Msg2Common.h index f5fd3261d..367d1b3e3 100644 --- a/tutorials/tutorial17/include/tutorial17/message/Msg2Common.h +++ b/tutorials/tutorial17/include/tutorial17/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial17 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial17::message::Msg2 message. /// @see tutorial17::message::Msg2Fields @@ -31,24 +30,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial17::message::Msg2Fields::F1Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial17::message::Msg2Fields::F1Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial17::message::Msg2Fields::F1 field. struct F1Common @@ -58,9 +54,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial17::message::Msg2Fields::F2 field. struct F2MembersCommon @@ -72,24 +67,21 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial17::message::Msg2Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial17::message::Msg2Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial17::message::Msg2Fields::F2 field. struct F2Common @@ -99,9 +91,7 @@ struct Msg2FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -113,12 +103,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial17 - - - diff --git a/tutorials/tutorial17/include/tutorial17/options/BareMetalDefaultOptions.h b/tutorials/tutorial17/include/tutorial17/options/BareMetalDefaultOptions.h index e1deab4a7..7581e7e56 100644 --- a/tutorials/tutorial17/include/tutorial17/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial17/include/tutorial17/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,11 +38,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -58,13 +56,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial17/include/tutorial17/options/ClientDefaultOptions.h b/tutorials/tutorial17/include/tutorial17/options/ClientDefaultOptions.h index 8bfcb4976..da1f5ae0a 100644 --- a/tutorials/tutorial17/include/tutorial17/options/ClientDefaultOptions.h +++ b/tutorials/tutorial17/include/tutorial17/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial17/include/tutorial17/options/DataViewDefaultOptions.h b/tutorials/tutorial17/include/tutorial17/options/DataViewDefaultOptions.h index dadf89543..4a0dbe54c 100644 --- a/tutorials/tutorial17/include/tutorial17/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial17/include/tutorial17/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,11 +32,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -52,13 +50,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial17/include/tutorial17/options/DefaultOptions.h b/tutorials/tutorial17/include/tutorial17/options/DefaultOptions.h index 185266649..18088b4b2 100644 --- a/tutorials/tutorial17/include/tutorial17/options/DefaultOptions.h +++ b/tutorials/tutorial17/include/tutorial17/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,11 +31,9 @@ struct DefaultOptionsT : public TBase /// tutorial17::message::Msg2Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -47,23 +45,18 @@ struct DefaultOptionsT : public TBase /// tutorial17::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial17::frame::FrameLayers::SizeWithFlags /// layer. using SizeWithFlags = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial17::frame::FrameLayers::IdWithFlags /// layer. using IdWithFlags = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial17/include/tutorial17/options/ServerDefaultOptions.h b/tutorials/tutorial17/include/tutorial17/options/ServerDefaultOptions.h index 2f6492ba4..07a31a001 100644 --- a/tutorials/tutorial17/include/tutorial17/options/ServerDefaultOptions.h +++ b/tutorials/tutorial17/include/tutorial17/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial18/include/tutorial18/Message.h b/tutorials/tutorial18/include/tutorial18/Message.h index 9271d46cc..04da214b4 100644 --- a/tutorials/tutorial18/include/tutorial18/Message.h +++ b/tutorials/tutorial18/include/tutorial18/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial18 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial18/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/MsgId.h b/tutorials/tutorial18/include/tutorial18/MsgId.h index 05466ce42..36716179d 100644 --- a/tutorials/tutorial18/include/tutorial18/MsgId.h +++ b/tutorials/tutorial18/include/tutorial18/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial18 - diff --git a/tutorials/tutorial18/include/tutorial18/Version.h b/tutorials/tutorial18/include/tutorial18/Version.h index a6d4264cd..16bc7c667 100644 --- a/tutorials/tutorial18/include/tutorial18/Version.h +++ b/tutorials/tutorial18/include/tutorial18/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial18 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchClientInputMessage.h index 79f961741..ebdf567f7 100644 --- a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -161,7 +161,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial18::options::DefaultOptions. /// @headerfile tutorial18/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial18::options::DefaultOptions as template parameter. /// @note Defined in tutorial18/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchMessage.h b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchMessage.h index a71e0328f..f0a7617b8 100644 --- a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchMessage.h +++ b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -161,7 +161,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial18::options::DefaultOptions. /// @headerfile tutorial18/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct MsgDispatcher /// @ref tutorial18::options::DefaultOptions as template parameter. /// @note Defined in tutorial18/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchServerInputMessage.h index 60bf7a986..235137dbe 100644 --- a/tutorials/tutorial18/include/tutorial18/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial18/include/tutorial18/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -161,7 +161,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial18::options::DefaultOptions. /// @headerfile tutorial18/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -221,9 +221,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial18::options::DefaultOptions as template parameter. /// @note Defined in tutorial18/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial18/include/tutorial18/field/FieldBase.h b/tutorials/tutorial18/include/tutorial18/field/FieldBase.h index d4f770670..8c14cd535 100644 --- a/tutorials/tutorial18/include/tutorial18/field/FieldBase.h +++ b/tutorials/tutorial18/include/tutorial18/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial18 - diff --git a/tutorials/tutorial18/include/tutorial18/field/MsgId.h b/tutorials/tutorial18/include/tutorial18/field/MsgId.h index b578a5973..514ce5a5f 100644 --- a/tutorials/tutorial18/include/tutorial18/field/MsgId.h +++ b/tutorials/tutorial18/include/tutorial18/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "ID" field. @@ -17,7 +17,6 @@ namespace tutorial18 namespace field { - /// @brief Definition of "ID" field. /// @see @ref tutorial18::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial18::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial18::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial18::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial18::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial18::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial18::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial18::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial18::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial18::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial18 - diff --git a/tutorials/tutorial18/include/tutorial18/field/MsgIdCommon.h b/tutorials/tutorial18/include/tutorial18/field/MsgIdCommon.h index ca1a03b20..2afc73d4e 100644 --- a/tutorials/tutorial18/include/tutorial18/field/MsgIdCommon.h +++ b/tutorials/tutorial18/include/tutorial18/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial18/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial18 namespace field { - /// @brief Common types and functions for /// @ref tutorial18::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial18::field::MsgId field. using ValueType = tutorial18::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial18::field::MsgId field. static const char* name() { return "ID"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial18::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial18 - diff --git a/tutorials/tutorial18/include/tutorial18/frame/Frame.h b/tutorials/tutorial18/include/tutorial18/frame/Frame.h index d46e8139d..4fd3d5325 100644 --- a/tutorials/tutorial18/include/tutorial18/frame/Frame.h +++ b/tutorials/tutorial18/include/tutorial18/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -26,7 +26,6 @@ namespace tutorial18 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -39,7 +38,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -52,7 +51,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -73,26 +72,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -100,7 +94,7 @@ struct FrameLayers typename SizeMembers::Field, Id >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -119,26 +113,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::frame::FrameLayersCommon::ChecksumMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::frame::FrameLayersCommon::ChecksumMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". template using Checksum = @@ -147,7 +136,7 @@ struct FrameLayers comms::protocol::checksum::Crc_CCITT, Size >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -170,26 +159,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::frame::FrameLayersCommon::SyncMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::frame::FrameLayersCommon::SyncMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -197,11 +181,10 @@ struct FrameLayers typename SyncMembers::Field, Checksum >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -242,5 +225,3 @@ class Frame : public } // namespace frame } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/frame/FrameCommon.h b/tutorials/tutorial18/include/tutorial18/frame/FrameCommon.h index 5157a90de..5e31cb93e 100644 --- a/tutorials/tutorial18/include/tutorial18/frame/FrameCommon.h +++ b/tutorials/tutorial18/include/tutorial18/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial18::frame::Frame frame. /// @see tutorial18::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial18::frame::FrameLayers::SyncMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial18::frame::FrameLayers::SyncMembers::Field field. static const char* name() { return "Sync"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial18::frame::FrameLayers::ChecksumMembers struct. struct ChecksumMembersCommon @@ -60,24 +56,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial18::frame::FrameLayers::ChecksumMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial18::frame::FrameLayers::ChecksumMembers::Field field. static const char* name() { return "Checksum"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial18::frame::FrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -89,28 +82,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial18::frame::FrameLayers::SizeMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial18::frame::FrameLayers::SizeMembers::Field field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/input/AllMessages.h b/tutorials/tutorial18/include/tutorial18/input/AllMessages.h index 38f9f2aec..f809d1278 100644 --- a/tutorials/tutorial18/include/tutorial18/input/AllMessages.h +++ b/tutorials/tutorial18/include/tutorial18/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial18/include/tutorial18/input/ClientInputMessages.h b/tutorials/tutorial18/include/tutorial18/input/ClientInputMessages.h index e7fb02833..48d57a34f 100644 --- a/tutorials/tutorial18/include/tutorial18/input/ClientInputMessages.h +++ b/tutorials/tutorial18/include/tutorial18/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial18/include/tutorial18/input/ServerInputMessages.h b/tutorials/tutorial18/include/tutorial18/input/ServerInputMessages.h index 850dba08a..e412b912c 100644 --- a/tutorials/tutorial18/include/tutorial18/input/ServerInputMessages.h +++ b/tutorials/tutorial18/include/tutorial18/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_1.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_1.h index 66e0ea8f0..54f373cd3 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_1.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (1)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg1_1Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg1_1. /// @tparam TOpt Extra options /// @see @ref Msg1_1 @@ -45,24 +43,20 @@ struct Msg1_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg1_1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg1_1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 8U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 8U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg1_1Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_1Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_1Common.h index 0bbe719db..a564c7c01 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_1Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg1_1 message. /// @see tutorial18::message::Msg1_1Fields @@ -27,22 +26,19 @@ struct Msg1_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg1_1Fields::F1 field. using ValueType = std::uint64_t; - + /// @brief Name of the @ref tutorial18::message::Msg1_1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_1Common { return "Message 1 (1)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_2.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_2.h index fffb7338d..1a585e542 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_2.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (2)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg1_2Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg1_2. /// @tparam TOpt Extra options /// @see @ref Msg1_2 @@ -45,24 +43,20 @@ struct Msg1_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg1_2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg1_2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg1_2Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_2Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_2Common.h index 80a74f522..7aaa1e3d4 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_2Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg1_2 message. /// @see tutorial18::message::Msg1_2Fields @@ -27,22 +26,19 @@ struct Msg1_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg1_2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial18::message::Msg1_2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_2Common { return "Message 1 (2)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_3.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_3.h index 114d49b8f..4b8c45031 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_3.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1 (3)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg1_3Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg1_3. /// @tparam TOpt Extra options /// @see @ref Msg1_3 @@ -45,24 +43,20 @@ struct Msg1_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg1_3FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg1_3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -107,24 +101,20 @@ class Msg1_3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg1_3Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg1_3Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg1_3Common.h index ba27a37a7..d9c616219 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg1_3Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg1_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg1_3 message. /// @see tutorial18::message::Msg1_3Fields @@ -27,22 +26,19 @@ struct Msg1_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg1_3Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial18::message::Msg1_3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg1_3Common { return "Message 1 (3)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_1.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_1.h index c95c8e5b8..0320f4e64 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_1.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (1)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg2_1Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg2_1. /// @tparam TOpt Extra options /// @see @ref Msg2_1 @@ -53,20 +51,19 @@ struct Msg2_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_1FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_1FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_1Fields }; Base::setValue(1); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_1 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 3U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg2_1Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_1Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_1Common.h index 66a2bcabb..c105b20e7 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_1Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg2_1 message. /// @see tutorial18::message::Msg2_1Fields @@ -27,22 +26,20 @@ struct Msg2_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_1Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_1Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial18::message::Msg2_1Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_1Common { return "Message 2 (1)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_2.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_2.h index ebf23b78a..2f308bc11 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_2.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (2)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg2_2Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg2_2. /// @tparam TOpt Extra options /// @see @ref Msg2_2 @@ -53,20 +51,19 @@ struct Msg2_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_2FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_2FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_2Fields }; Base::setValue(2); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_2 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 5U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 5U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg2_2Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_2Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_2Common.h index 9a6faf221..28159d9d5 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_2Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg2_2 message. /// @see tutorial18::message::Msg2_2Fields @@ -27,22 +26,20 @@ struct Msg2_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_2Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_2Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial18::message::Msg2_2Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_2Common { return "Message 2 (2)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_3.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_3.h index d8b80a5d8..e77074801 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_3.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2 (3)" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial18/message/Msg2_3Common.h" #include "tutorial18/options/DefaultOptions.h" - namespace tutorial18 { namespace message { - /// @brief Fields of @ref Msg2_3. /// @tparam TOpt Extra options /// @see @ref Msg2_3 @@ -53,20 +51,19 @@ struct Msg2_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_3FieldsCommon::TypeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_3FieldsCommon::TypeCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -76,14 +73,9 @@ struct Msg2_3Fields }; Base::setValue(3); return true; - } - - - }; - - + /// @brief Definition of "F1" field. class F1 : public comms::field::IntValue< @@ -99,24 +91,20 @@ struct Msg2_3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial18::message::Msg2_3FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial18::message::Msg2_3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Type, @@ -165,24 +153,20 @@ class Msg2_3 : public type, f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 9U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 9U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial18::message::Msg2_3Common::name(); } - - }; } // namespace message } // namespace tutorial18 - - diff --git a/tutorials/tutorial18/include/tutorial18/message/Msg2_3Common.h b/tutorials/tutorial18/include/tutorial18/message/Msg2_3Common.h index c66ce581b..c567c12f3 100644 --- a/tutorials/tutorial18/include/tutorial18/message/Msg2_3Common.h +++ b/tutorials/tutorial18/include/tutorial18/message/Msg2_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial18 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial18::message::Msg2_3 message. /// @see tutorial18::message::Msg2_3Fields @@ -27,22 +26,20 @@ struct Msg2_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_3Fields::Type field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_3Fields::Type field. static const char* name() { return "Type"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial18::message::Msg2_3Fields::F1 field. struct F1Common @@ -50,22 +47,19 @@ struct Msg2_3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial18::message::Msg2_3Fields::F1 field. using ValueType = std::uint64_t; - + /// @brief Name of the @ref tutorial18::message::Msg2_3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2_3Common { return "Message 2 (3)"; } - }; } // namespace message } // namespace tutorial18 - - - diff --git a/tutorials/tutorial18/include/tutorial18/options/BareMetalDefaultOptions.h b/tutorials/tutorial18/include/tutorial18/options/BareMetalDefaultOptions.h index db1cf52e1..93186b6ca 100644 --- a/tutorials/tutorial18/include/tutorial18/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial18/include/tutorial18/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial18::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial18/include/tutorial18/options/ClientDefaultOptions.h b/tutorials/tutorial18/include/tutorial18/options/ClientDefaultOptions.h index da4774e57..bfbc4148c 100644 --- a/tutorials/tutorial18/include/tutorial18/options/ClientDefaultOptions.h +++ b/tutorials/tutorial18/include/tutorial18/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial18/include/tutorial18/options/DataViewDefaultOptions.h b/tutorials/tutorial18/include/tutorial18/options/DataViewDefaultOptions.h index 01bebded2..2c952e03d 100644 --- a/tutorials/tutorial18/include/tutorial18/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial18/include/tutorial18/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial18/include/tutorial18/options/DefaultOptions.h b/tutorials/tutorial18/include/tutorial18/options/DefaultOptions.h index 79dd90649..23b4ca77c 100644 --- a/tutorials/tutorial18/include/tutorial18/options/DefaultOptions.h +++ b/tutorials/tutorial18/include/tutorial18/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial18::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial18::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial18/include/tutorial18/options/ServerDefaultOptions.h b/tutorials/tutorial18/include/tutorial18/options/ServerDefaultOptions.h index 732126618..b50b06395 100644 --- a/tutorials/tutorial18/include/tutorial18/options/ServerDefaultOptions.h +++ b/tutorials/tutorial18/include/tutorial18/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial19/include/tutorial19/Interface.h b/tutorials/tutorial19/include/tutorial19/Interface.h index 2bdfb24de..8d72e06f7 100644 --- a/tutorials/tutorial19/include/tutorial19/Interface.h +++ b/tutorials/tutorial19/include/tutorial19/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -17,7 +17,6 @@ namespace tutorial19 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile tutorial19/Interface.h @@ -40,24 +39,20 @@ struct InterfaceFields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::InterfaceFieldsCommon::VersionCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::InterfaceFieldsCommon::VersionCommon::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Version @@ -98,10 +93,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( version ); - - }; } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/InterfaceCommon.h b/tutorials/tutorial19/include/tutorial19/InterfaceCommon.h index 3e80467ef..0f1619b2f 100644 --- a/tutorials/tutorial19/include/tutorial19/InterfaceCommon.h +++ b/tutorials/tutorial19/include/tutorial19/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace tutorial19 { - /// @brief Common types and functions for fields of /// @ref tutorial19::Interface interface. /// @see tutorial19::InterfaceFields @@ -24,23 +23,18 @@ struct InterfaceFieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::InterfaceFields::Version field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::InterfaceFields::Version field. static const char* name() { return "Version"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/MsgId.h b/tutorials/tutorial19/include/tutorial19/MsgId.h index 6d2297c28..8ec9ed1d2 100644 --- a/tutorials/tutorial19/include/tutorial19/MsgId.h +++ b/tutorials/tutorial19/include/tutorial19/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial19 - diff --git a/tutorials/tutorial19/include/tutorial19/Version.h b/tutorials/tutorial19/include/tutorial19/Version.h index 08b5fcb72..85b79a121 100644 --- a/tutorials/tutorial19/include/tutorial19/Version.h +++ b/tutorials/tutorial19/include/tutorial19/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial19 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchClientInputMessage.h index a62121b99..ba0ce2358 100644 --- a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial19::options::DefaultOptions. /// @headerfile tutorial19/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial19::options::DefaultOptions as template parameter. /// @note Defined in tutorial19/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchMessage.h b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchMessage.h index bebad86d5..82528e876 100644 --- a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchMessage.h +++ b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial19::options::DefaultOptions. /// @headerfile tutorial19/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial19::options::DefaultOptions as template parameter. /// @note Defined in tutorial19/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchServerInputMessage.h index dac8cafe8..1c57b60d9 100644 --- a/tutorials/tutorial19/include/tutorial19/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial19/include/tutorial19/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial19::options::DefaultOptions. /// @headerfile tutorial19/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial19::options::DefaultOptions as template parameter. /// @note Defined in tutorial19/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial19/include/tutorial19/field/FieldBase.h b/tutorials/tutorial19/include/tutorial19/field/FieldBase.h index 48bb4674b..17a8d9fa9 100644 --- a/tutorials/tutorial19/include/tutorial19/field/FieldBase.h +++ b/tutorials/tutorial19/include/tutorial19/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial19 - diff --git a/tutorials/tutorial19/include/tutorial19/field/MsgId.h b/tutorials/tutorial19/include/tutorial19/field/MsgId.h index 7835693a6..be1cb0479 100644 --- a/tutorials/tutorial19/include/tutorial19/field/MsgId.h +++ b/tutorials/tutorial19/include/tutorial19/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial19 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial19::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial19::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial19::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial19::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial19::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial19::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial19::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial19::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial19::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial19::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial19 - diff --git a/tutorials/tutorial19/include/tutorial19/field/MsgIdCommon.h b/tutorials/tutorial19/include/tutorial19/field/MsgIdCommon.h index f6fb6f6c6..fef58e162 100644 --- a/tutorials/tutorial19/include/tutorial19/field/MsgIdCommon.h +++ b/tutorials/tutorial19/include/tutorial19/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial19/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial19 namespace field { - /// @brief Common types and functions for /// @ref tutorial19::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial19::field::MsgId field. using ValueType = tutorial19::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial19::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial19::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial19 - diff --git a/tutorials/tutorial19/include/tutorial19/frame/Frame.h b/tutorials/tutorial19/include/tutorial19/frame/Frame.h index 242ec2c3f..3ebfbe445 100644 --- a/tutorials/tutorial19/include/tutorial19/frame/Frame.h +++ b/tutorials/tutorial19/include/tutorial19/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -24,7 +24,6 @@ namespace tutorial19 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -37,7 +36,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -50,7 +49,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Version layer. struct VersionMembers { @@ -71,26 +70,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::frame::FrameLayersCommon::VersionMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::frame::FrameLayersCommon::VersionMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Version". template using Version = @@ -99,7 +93,7 @@ struct FrameLayers 0U, Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -118,26 +112,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -145,11 +134,10 @@ struct FrameLayers typename SizeMembers::Field, Version >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -188,5 +176,3 @@ class Frame : public } // namespace frame } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/frame/FrameCommon.h b/tutorials/tutorial19/include/tutorial19/frame/FrameCommon.h index 5a6b70ba5..7792ec226 100644 --- a/tutorials/tutorial19/include/tutorial19/frame/FrameCommon.h +++ b/tutorials/tutorial19/include/tutorial19/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial19 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial19::frame::Frame frame. /// @see tutorial19::frame::FrameLayers @@ -31,24 +30,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial19::frame::FrameLayers::SizeMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::frame::FrameLayers::SizeMembers::Field field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial19::frame::FrameLayers::VersionMembers struct. struct VersionMembersCommon @@ -60,28 +56,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial19::frame::FrameLayers::VersionMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::frame::FrameLayers::VersionMembers::Field field. static const char* name() { return "Version"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/input/AllMessages.h b/tutorials/tutorial19/include/tutorial19/input/AllMessages.h index 84e78603b..a1bb4915a 100644 --- a/tutorials/tutorial19/include/tutorial19/input/AllMessages.h +++ b/tutorials/tutorial19/include/tutorial19/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial19/include/tutorial19/input/ClientInputMessages.h b/tutorials/tutorial19/include/tutorial19/input/ClientInputMessages.h index ccb7d2f43..21de06411 100644 --- a/tutorials/tutorial19/include/tutorial19/input/ClientInputMessages.h +++ b/tutorials/tutorial19/include/tutorial19/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial19/include/tutorial19/input/ServerInputMessages.h b/tutorials/tutorial19/include/tutorial19/input/ServerInputMessages.h index 0753c08f9..ec858ded4 100644 --- a/tutorials/tutorial19/include/tutorial19/input/ServerInputMessages.h +++ b/tutorials/tutorial19/include/tutorial19/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg1.h b/tutorials/tutorial19/include/tutorial19/message/Msg1.h index ddbdd421c..981a21907 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg1.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial19/message/Msg1Common.h" #include "tutorial19/options/DefaultOptions.h" - namespace tutorial19 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,27 +44,23 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Inner field of @ref F2 optional. /// @deprecated Since version 4 - + class F2Field : public comms::field::IntValue< tutorial19::field::FieldBase<>, @@ -81,23 +75,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg1FieldsCommon::F2Common::name(); } - - }; - + /// @brief Definition of version dependent /// F2 field. struct F2 : public @@ -113,8 +104,7 @@ struct Msg1Fields return F2Field::name(); } }; - - + /// @brief Inner field of @ref F3 optional. class F3Field : public comms::field::IntValue< @@ -130,23 +120,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg1FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg1FieldsCommon::F3Common::name(); } - - }; - + /// @brief Definition of version dependent /// F3 field. struct F3 : public @@ -162,8 +149,7 @@ struct Msg1Fields return F3Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -216,24 +202,20 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial19::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg1Common.h b/tutorials/tutorial19/include/tutorial19/message/Msg1Common.h index 86e673dd3..15bcaa97c 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg1Common.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial19 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial19::message::Msg1 message. /// @see tutorial19::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg1Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg1Fields::F3 field. struct F3Common @@ -73,22 +68,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg1Fields::F3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg1Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -100,12 +92,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial19 - - - diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg2.h b/tutorials/tutorial19/include/tutorial19/message/Msg2.h index 2dd4ca4c8..ccb13d103 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg2.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial19/message/Msg2Common.h" #include "tutorial19/options/DefaultOptions.h" - namespace tutorial19 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -48,44 +46,48 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial19::message::Msg2FieldsCommon::F1Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial19::message::Msg2FieldsCommon::F1Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial19::message::Msg2FieldsCommon::F1Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial19::message::Msg2FieldsCommon::F1Common::valueName(). static const char* valueName(ValueType val) { return tutorial19::message::Msg2FieldsCommon::F1Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial19::message::Msg2FieldsCommon::F1Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial19::message::Msg2FieldsCommon::F1Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial19::message::Msg2FieldsCommon::F1Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial19::message::Msg2FieldsCommon::F1Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg2FieldsCommon::F1Common::name(); } - - }; - + /// @brief Definition of version dependent /// F1 field. struct F1 : public @@ -101,8 +103,7 @@ struct Msg2Fields return F1Field::name(); } }; - - + /// @brief Inner field of @ref F2 optional. /// @see @ref tutorial19::message::Msg2FieldsCommon::F2Common::ValueType class F2Field : public @@ -123,75 +124,77 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial19::message::Msg2FieldsCommon::F2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial19::message::Msg2FieldsCommon::F2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial19::message::Msg2FieldsCommon::F2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial19::message::Msg2FieldsCommon::F2Common::valueName(). static const char* valueName(ValueType val) { return tutorial19::message::Msg2FieldsCommon::F2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial19::message::Msg2FieldsCommon::F2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial19::message::Msg2FieldsCommon::F2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial19::message::Msg2FieldsCommon::F2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial19::message::Msg2FieldsCommon::F2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg2FieldsCommon::F2Common::name(); } - + /// @brief Generated validity check functionality. bool valid() const { if (Base::valid()) { return true; } - + if (3U <= Base::getVersion()) { if (Base::getValue() == static_cast(0)) { return true; } } - + if ((4U <= Base::getVersion()) && (Base::getVersion() < 5U)) { if (Base::getValue() == static_cast(1)) { return true; } } - + if (5U <= Base::getVersion()) { if (Base::getValue() == static_cast(2)) { return true; } } - + return false; - } - - - }; - + /// @brief Definition of version dependent /// F2 field. struct F2 : public @@ -207,8 +210,7 @@ struct Msg2Fields return F2Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -257,24 +259,20 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial19::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg2Common.h b/tutorials/tutorial19/include/tutorial19/message/Msg2Common.h index 48f868185..5aad83a48 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg2Common.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial19 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial19::message::Msg2 message. /// @see tutorial19::message::Msg2Fields @@ -35,27 +32,27 @@ struct Msg2FieldsCommon V0 = 0, ///< value @b V0. V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial19::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -63,10 +60,10 @@ struct Msg2FieldsCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -76,18 +73,15 @@ struct Msg2FieldsCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial19::message::Msg2Fields::F1 field. using F1Val = F1Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg2Fields::F2 field. struct F2Common @@ -99,27 +93,27 @@ struct Msg2FieldsCommon V0 = 0, ///< value @b V0. V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial19::message::Msg2Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -127,10 +121,10 @@ struct Msg2FieldsCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -140,18 +134,14 @@ struct Msg2FieldsCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial19::message::Msg2Fields::F2 field. using F2Val = F2Common::ValueType; - - }; /// @brief Common types and functions of @@ -163,12 +153,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial19 - - - diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg3.h b/tutorials/tutorial19/include/tutorial19/message/Msg3.h index a0d41ba6e..88fbb1e7e 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg3.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial19/message/Msg3Common.h" #include "tutorial19/options/DefaultOptions.h" - namespace tutorial19 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -59,7 +57,7 @@ struct Msg3Fields B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial19::message::Msg3FieldsCommon::F1Common::bitName(). static const char* bitName(BitIdx idx) @@ -68,17 +66,14 @@ struct Msg3Fields tutorial19::message::Msg3FieldsCommon::F1Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -98,26 +93,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg3FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg3FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::Optional< @@ -136,11 +126,8 @@ struct Msg3Fields { return tutorial19::message::Msg3FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -160,26 +147,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg3FieldsCommon::F3MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg3FieldsCommon::F3MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. class F3 : public comms::field::Optional< @@ -198,11 +180,8 @@ struct Msg3Fields { return tutorial19::message::Msg3FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Inner field of @ref F4 optional. class F4Field : public comms::field::IntValue< @@ -218,23 +197,20 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial19::message::Msg3FieldsCommon::F4Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial19::message::Msg3FieldsCommon::F4Common::name(); } - - }; - + /// @brief Definition of version dependent /// F4 field. struct F4 : public @@ -250,8 +226,7 @@ struct Msg3Fields return F4Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -310,19 +285,19 @@ class Msg3 : public f3, f4 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 7U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial19::message::Msg3Common::name(); } - + /// @brief Generated read functionality. template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -334,22 +309,21 @@ class Msg3 : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f2(); - + es = Base::template doReadFromUntilAndUpdateLen(iter, len); if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f3(); - + es = Base::template doReadFrom(iter, len); - } while (false); return es; } - + /// @brief Generated refresh functionality. bool doRefresh() { @@ -358,58 +332,49 @@ class Msg3 : public updated = refresh_f3() || updated; return updated; } - private: void readPrepare_f2() { refresh_f2(); - } - + void readPrepare_f3() { refresh_f3(); - } - + bool refresh_f2() { auto mode = comms::field::OptionalMode::Missing; if (field_f1().getBitValue_B0()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == mode) { return false; } - + field_f2().setMode(mode); return true; - } - + bool refresh_f3() { auto mode = comms::field::OptionalMode::Missing; if (field_f1().getBitValue_B1()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == mode) { return false; } - + field_f3().setMode(mode); return true; - } - - }; } // namespace message } // namespace tutorial19 - - diff --git a/tutorials/tutorial19/include/tutorial19/message/Msg3Common.h b/tutorials/tutorial19/include/tutorial19/message/Msg3Common.h index df18d4d89..3a8a7d655 100644 --- a/tutorials/tutorial19/include/tutorial19/message/Msg3Common.h +++ b/tutorials/tutorial19/include/tutorial19/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial19 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial19::message::Msg3 message. /// @see tutorial19::message::Msg3Fields @@ -30,7 +29,7 @@ struct Msg3FieldsCommon { return "F1"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial19::message::Msg3Fields::F1 field. static const char* bitName(std::size_t idx) @@ -39,18 +38,16 @@ struct Msg3FieldsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial19::message::Msg3Fields::F2 field. struct F2MembersCommon @@ -62,24 +59,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg3Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg3Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg3Fields::F2 field. struct F2Common @@ -89,9 +83,8 @@ struct Msg3FieldsCommon { return "F2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial19::message::Msg3Fields::F3 field. struct F3MembersCommon @@ -103,24 +96,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg3Fields::F3Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg3Fields::F3Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg3Fields::F3 field. struct F3Common @@ -130,9 +120,8 @@ struct Msg3FieldsCommon { return "F3"; } - }; - + /// @brief Common types and functions for /// @ref tutorial19::message::Msg3Fields::F4 field. struct F4Common @@ -140,22 +129,19 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial19::message::Msg3Fields::F4 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial19::message::Msg3Fields::F4 field. static const char* name() { return "F4"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -167,12 +153,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial19 - - - diff --git a/tutorials/tutorial19/include/tutorial19/options/BareMetalDefaultOptions.h b/tutorials/tutorial19/include/tutorial19/options/BareMetalDefaultOptions.h index c1ad13927..dec58e85a 100644 --- a/tutorials/tutorial19/include/tutorial19/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial19/include/tutorial19/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial19::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial19/include/tutorial19/options/ClientDefaultOptions.h b/tutorials/tutorial19/include/tutorial19/options/ClientDefaultOptions.h index 1f57160d5..52ac22054 100644 --- a/tutorials/tutorial19/include/tutorial19/options/ClientDefaultOptions.h +++ b/tutorials/tutorial19/include/tutorial19/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial19/include/tutorial19/options/DataViewDefaultOptions.h b/tutorials/tutorial19/include/tutorial19/options/DataViewDefaultOptions.h index a9263ca93..72a0100b2 100644 --- a/tutorials/tutorial19/include/tutorial19/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial19/include/tutorial19/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial19/include/tutorial19/options/DefaultOptions.h b/tutorials/tutorial19/include/tutorial19/options/DefaultOptions.h index ef192941e..a06c4cc58 100644 --- a/tutorials/tutorial19/include/tutorial19/options/DefaultOptions.h +++ b/tutorials/tutorial19/include/tutorial19/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial19::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial19::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial19/include/tutorial19/options/ServerDefaultOptions.h b/tutorials/tutorial19/include/tutorial19/options/ServerDefaultOptions.h index 107f98587..1eb023532 100644 --- a/tutorials/tutorial19/include/tutorial19/options/ServerDefaultOptions.h +++ b/tutorials/tutorial19/include/tutorial19/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial2/include/tutorial2/Message.h b/tutorials/tutorial2/include/tutorial2/Message.h index 759366890..3bff3c062 100644 --- a/tutorials/tutorial2/include/tutorial2/Message.h +++ b/tutorials/tutorial2/include/tutorial2/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial2 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial2/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/MsgId.h b/tutorials/tutorial2/include/tutorial2/MsgId.h index ecfeed01a..4c11577b2 100644 --- a/tutorials/tutorial2/include/tutorial2/MsgId.h +++ b/tutorials/tutorial2/include/tutorial2/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -30,7 +30,7 @@ enum MsgId : std::uint8_t MsgId_M15 = 15, ///< message id of @b M15 message. , MsgId_M16 = 16, ///< message id of @b M16 message. , MsgId_M17 = 17, ///< message id of @b M17 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 17, ///< Last defined value., @@ -38,4 +38,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/Version.h b/tutorials/tutorial2/include/tutorial2/Version.h index a7f34b0e5..8067c35cc 100644 --- a/tutorials/tutorial2/include/tutorial2/Version.h +++ b/tutorials/tutorial2/include/tutorial2/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial2 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchClientInputMessage.h index 3ad56e2fa..4a9753a4b 100644 --- a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -204,7 +204,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial2::options::DefaultOptions. /// @headerfile tutorial2/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -264,9 +264,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial2::options::DefaultOptions as template parameter. /// @note Defined in tutorial2/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchMessage.h b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchMessage.h index 4e840dc55..952c0fec6 100644 --- a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchMessage.h +++ b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -204,7 +204,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial2::options::DefaultOptions. /// @headerfile tutorial2/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -264,9 +264,7 @@ struct MsgDispatcher /// @ref tutorial2::options::DefaultOptions as template parameter. /// @note Defined in tutorial2/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchServerInputMessage.h index bfeea5665..3aa5b87aa 100644 --- a/tutorials/tutorial2/include/tutorial2/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial2/include/tutorial2/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -204,7 +204,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial2::options::DefaultOptions. /// @headerfile tutorial2/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -264,9 +264,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial2::options::DefaultOptions as template parameter. /// @note Defined in tutorial2/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial2/include/tutorial2/field/B8_1.h b/tutorials/tutorial2/include/tutorial2/field/B8_1.h index 846a913a5..3d9f3e626 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B8_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/B8_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "B8_1" field. @@ -22,7 +22,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref B8_1 field. /// @tparam TOpt Protocol options. @@ -44,24 +43,20 @@ struct B8_1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::B8_1MembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_1MembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. /// @see @ref tutorial2::field::B8_1MembersCommon::M2Common::ValueType class M2 : public @@ -80,45 +75,48 @@ struct B8_1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::B8_1MembersCommon::M2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::B8_1MembersCommon::M2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::B8_1MembersCommon::M2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::B8_1MembersCommon::M2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::B8_1MembersCommon::M2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::B8_1MembersCommon::M2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::B8_1MembersCommon::M2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::B8_1MembersCommon::M2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::B8_1MembersCommon::M2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_1MembersCommon::M2Common::name(); } - - }; - - + /// @brief Definition of "M3" field. class M3 : public comms::field::String< @@ -139,11 +137,8 @@ struct B8_1Members { return tutorial2::field::B8_1MembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -188,19 +183,14 @@ class B8_1 : public m2, m3 ); - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B8_1Common.h b/tutorials/tutorial2/include/tutorial2/field/B8_1Common.h index 050eef364..6a612e0d5 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B8_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/B8_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::B8_1 field. struct B8_1MembersCommon @@ -30,22 +27,20 @@ struct B8_1MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::B8_1Members::M1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::field::B8_1Members::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::B8_1Members::M2 field. struct M2Common @@ -56,27 +51,27 @@ struct B8_1MembersCommon { V1 = 0, ///< value @b V1. V2 = 1, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 1, ///< Last defined value. ValuesLimit = 2, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::B8_1Members::M2 field. static const char* name() { return "M2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -84,10 +79,10 @@ struct B8_1MembersCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -96,18 +91,15 @@ struct B8_1MembersCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::field::B8_1Members::M2 field. using M2Val = M2Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial2::field::B8_1Members::M3 field. struct M3Common @@ -117,9 +109,7 @@ struct B8_1MembersCommon { return "M3"; } - }; - }; /// @brief Common types and functions for @@ -131,10 +121,8 @@ struct B8_1Common { return "B8_1"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B8_2.h b/tutorials/tutorial2/include/tutorial2/field/B8_2.h index 5edad2bf5..23c396bdc 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B8_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/B8_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "B8_2" field. @@ -25,7 +25,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref B8_2 field. /// @tparam TOpt Protocol options. @@ -47,36 +46,33 @@ struct B8_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Generated default constructor. M1() { Base::setValue(std::numeric_limits::quiet_NaN()); } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::B8_2MembersCommon::M1Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_2MembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. class M2 : public comms::field::BitmaskValue< @@ -104,7 +100,7 @@ struct B8_2Members SomeBit=0, SomeOtherbit=5 ); - + /// @brief Generates independent access functions for internal bits. /// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro /// related to @b comms::field::BitmaskValue class from COMMS library @@ -117,7 +113,7 @@ struct B8_2Members SomeBit, SomeOtherbit ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::B8_2MembersCommon::M2Common::bitName(). static const char* bitName(BitIdx idx) @@ -126,17 +122,14 @@ struct B8_2Members tutorial2::field::B8_2MembersCommon::M2Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_2MembersCommon::M2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref M3 field. struct M3Members @@ -156,26 +149,21 @@ struct B8_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::B8_2MembersCommon::M3MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_2MembersCommon::M3MembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "M3" field. class M3 : public comms::field::ArrayList< @@ -198,11 +186,8 @@ struct B8_2Members { return tutorial2::field::B8_2MembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -249,19 +234,14 @@ class B8_2 : public m2, m3 ); - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B8_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B8_2Common.h b/tutorials/tutorial2/include/tutorial2/field/B8_2Common.h index 26b0716ae..b52b001e5 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B8_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/B8_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::B8_2 field. struct B8_2MembersCommon @@ -27,22 +26,20 @@ struct B8_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::B8_2Members::M1 field. using ValueType = float; - + /// @brief Name of the @ref tutorial2::field::B8_2Members::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::B8_2Members::M2 field. struct M2Common @@ -52,7 +49,7 @@ struct B8_2MembersCommon { return "M2"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::B8_2Members::M2 field. static const char* bitName(std::size_t idx) @@ -65,18 +62,16 @@ struct B8_2MembersCommon nullptr, "SomeOtherbit" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::B8_2Members::M3 field. struct M3MembersCommon @@ -88,24 +83,21 @@ struct B8_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::B8_2Members::M3Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::B8_2Members::M3Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::B8_2Members::M3 field. struct M3Common @@ -115,9 +107,7 @@ struct B8_2MembersCommon { return "M3"; } - }; - }; /// @brief Common types and functions for @@ -129,10 +119,8 @@ struct B8_2Common { return "B8_2"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B9_1.h b/tutorials/tutorial2/include/tutorial2/field/B9_1.h index 56fe688e9..5f0f177e3 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B9_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/B9_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "B9_1" field. @@ -22,7 +22,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref B9_1 field. /// @tparam TOpt Protocol options. @@ -46,24 +45,20 @@ struct B9_1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::B9_1MembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_1MembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. /// @see @ref tutorial2::field::B9_1MembersCommon::M2Common::ValueType class M2 : public @@ -84,45 +79,48 @@ struct B9_1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::B9_1MembersCommon::M2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::B9_1MembersCommon::M2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::B9_1MembersCommon::M2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::B9_1MembersCommon::M2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::B9_1MembersCommon::M2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::B9_1MembersCommon::M2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::B9_1MembersCommon::M2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::B9_1MembersCommon::M2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::B9_1MembersCommon::M2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_1MembersCommon::M2Common::name(); } - - }; - - + /// @brief Definition of "M3" field. class M3 : public comms::field::BitmaskValue< @@ -150,7 +148,7 @@ struct B9_1Members B0=0, B5=5 ); - + /// @brief Generates independent access functions for internal bits. /// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro /// related to @b comms::field::BitmaskValue class from COMMS library @@ -163,7 +161,7 @@ struct B9_1Members B0, B5 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::B9_1MembersCommon::M3Common::bitName(). static const char* bitName(BitIdx idx) @@ -172,17 +170,14 @@ struct B9_1Members tutorial2::field::B9_1MembersCommon::M3Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_1MembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -227,18 +222,14 @@ class B9_1 : public m2, m3 ); - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B9_1Common.h b/tutorials/tutorial2/include/tutorial2/field/B9_1Common.h index a67351106..12c665053 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B9_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/B9_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::B9_1 field. struct B9_1MembersCommon @@ -30,22 +27,20 @@ struct B9_1MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::B9_1Members::M1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::B9_1Members::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::B9_1Members::M2 field. struct M2Common @@ -56,27 +51,27 @@ struct B9_1MembersCommon { V1 = 0, ///< value @b V1. V2 = 1, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 1, ///< Last defined value. ValuesLimit = 2, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::B9_1Members::M2 field. static const char* name() { return "M2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -84,10 +79,10 @@ struct B9_1MembersCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -96,18 +91,15 @@ struct B9_1MembersCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::field::B9_1Members::M2 field. using M2Val = M2Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial2::field::B9_1Members::M3 field. struct M3Common @@ -117,7 +109,7 @@ struct B9_1MembersCommon { return "M3"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::B9_1Members::M3 field. static const char* bitName(std::size_t idx) @@ -130,18 +122,15 @@ struct B9_1MembersCommon nullptr, "B5" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; /// @brief Common types and functions for @@ -153,10 +142,8 @@ struct B9_1Common { return "B9_1"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B9_2.h b/tutorials/tutorial2/include/tutorial2/field/B9_2.h index 9958b45f6..b1b65f4f2 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B9_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/B9_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "B9_2" field. @@ -22,7 +22,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref B9_2 field. /// @tparam TOpt Protocol options. @@ -48,24 +47,20 @@ struct B9_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::B9_2MembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_2MembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. /// @see @ref tutorial2::field::B9_2MembersCommon::M2Common::ValueType class M2 : public @@ -90,45 +85,48 @@ struct B9_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::B9_2MembersCommon::M2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::B9_2MembersCommon::M2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::B9_2MembersCommon::M2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::B9_2MembersCommon::M2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::B9_2MembersCommon::M2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::B9_2MembersCommon::M2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::B9_2MembersCommon::M2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::B9_2MembersCommon::M2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::B9_2MembersCommon::M2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_2MembersCommon::M2Common::name(); } - - }; - - + /// @brief Definition of "M3" field. class M3 : public comms::field::BitmaskValue< @@ -160,7 +158,7 @@ struct B9_2Members B5=5, B7=7 ); - + /// @brief Generates independent access functions for internal bits. /// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro /// related to @b comms::field::BitmaskValue class from COMMS library @@ -175,7 +173,7 @@ struct B9_2Members B5, B7 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::B9_2MembersCommon::M3Common::bitName(). static const char* bitName(BitIdx idx) @@ -184,17 +182,14 @@ struct B9_2Members tutorial2::field::B9_2MembersCommon::M3Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_2MembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -241,18 +236,14 @@ class B9_2 : public m2, m3 ); - + /// @brief Name of the field. static const char* name() { return tutorial2::field::B9_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/B9_2Common.h b/tutorials/tutorial2/include/tutorial2/field/B9_2Common.h index 40218ec51..7a2de000b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/B9_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/B9_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::B9_2 field. struct B9_2MembersCommon @@ -30,22 +27,20 @@ struct B9_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::B9_2Members::M1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::field::B9_2Members::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::B9_2Members::M2 field. struct M2Common @@ -56,27 +51,27 @@ struct B9_2MembersCommon { V1 = 2, ///< value @b V1. V2 = 5, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 2, ///< First defined value. LastValue = 5, ///< Last defined value. ValuesLimit = 6, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::B9_2Members::M2 field. static const char* name() { return "M2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -84,10 +79,10 @@ struct B9_2MembersCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -100,18 +95,15 @@ struct B9_2MembersCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::field::B9_2Members::M2 field. using M2Val = M2Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial2::field::B9_2Members::M3 field. struct M3Common @@ -121,7 +113,7 @@ struct B9_2MembersCommon { return "M3"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::B9_2Members::M3 field. static const char* bitName(std::size_t idx) @@ -136,18 +128,15 @@ struct B9_2MembersCommon nullptr, "B7" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - }; /// @brief Common types and functions for @@ -159,10 +148,8 @@ struct B9_2Common { return "B9_2"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/D7_1.h b/tutorials/tutorial2/include/tutorial2/field/D7_1.h index bc7583664..b5c1e4f9c 100644 --- a/tutorials/tutorial2/include/tutorial2/field/D7_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/D7_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "D7_1" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "D7_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -46,12 +45,8 @@ class D7_1 : public { return tutorial2::field::D7_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/D7_1Common.h b/tutorials/tutorial2/include/tutorial2/field/D7_1Common.h index f15e830b8..b73d4ace7 100644 --- a/tutorials/tutorial2/include/tutorial2/field/D7_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/D7_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::D7_1 field. struct D7_1Common @@ -22,10 +21,8 @@ struct D7_1Common { return "D7_1"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/D7_2.h b/tutorials/tutorial2/include/tutorial2/field/D7_2.h index a60a29a67..e0fb243cf 100644 --- a/tutorials/tutorial2/include/tutorial2/field/D7_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/D7_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "D7_2" field. @@ -21,7 +21,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref D7_2 field. /// @tparam TOpt Protocol options. @@ -43,24 +42,19 @@ struct D7_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::D7_2MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::D7_2MembersCommon::LengthCommon::name(); } - - }; - - }; /// @brief Definition of "D7_2" field. @@ -93,18 +87,14 @@ class D7_2 : public }; comms::util::assign(Base::value(), std::begin(Data), std::end(Data)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::D7_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/D7_2Common.h b/tutorials/tutorial2/include/tutorial2/field/D7_2Common.h index e5bf8f157..87fc3a412 100644 --- a/tutorials/tutorial2/include/tutorial2/field/D7_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/D7_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::D7_2 field. struct D7_2MembersCommon @@ -26,22 +25,19 @@ struct D7_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::D7_2Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::D7_2Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -53,10 +49,8 @@ struct D7_2Common { return "D7_2"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/E2_1.h b/tutorials/tutorial2/include/tutorial2/field/E2_1.h index 7db8e3640..808759d3d 100644 --- a/tutorials/tutorial2/include/tutorial2/field/E2_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/E2_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "E2_1" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "E2_1" field. /// @see @ref tutorial2::field::E2_1Common::ValueType /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class E2_1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::E2_1Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::E2_1Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::E2_1Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::E2_1Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::E2_1Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::E2_1Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::E2_1Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::E2_1Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::E2_1Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::E2_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/E2_1Common.h b/tutorials/tutorial2/include/tutorial2/field/E2_1Common.h index 1e94d60ae..c301f1e02 100644 --- a/tutorials/tutorial2/include/tutorial2/field/E2_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/E2_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::E2_1 field. struct E2_1Common @@ -30,27 +27,27 @@ struct E2_1Common V1 = 0, ///< Some value V2 = 1, ///< value @b V2. V3 = 2, ///< value @b V3. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::E2_1 field. static const char* name() { return "E2_1"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -58,10 +55,10 @@ struct E2_1Common if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -71,19 +68,15 @@ struct E2_1Common "V3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial2::field::E2_1 field. using E2_1Val = E2_1Common::ValueType; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/E2_2.h b/tutorials/tutorial2/include/tutorial2/field/E2_2.h index ce1d7efe1..42f50f747 100644 --- a/tutorials/tutorial2/include/tutorial2/field/E2_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/E2_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "E2_2" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "E2_2" field. /// @see @ref tutorial2::field::E2_2Common::ValueType /// @tparam TOpt Protocol options. @@ -47,46 +46,48 @@ class E2_2 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::E2_2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::E2_2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::E2_2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::E2_2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::E2_2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::E2_2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::E2_2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::E2_2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::E2_2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::E2_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/E2_2Common.h b/tutorials/tutorial2/include/tutorial2/field/E2_2Common.h index a05d13524..1a02040c3 100644 --- a/tutorials/tutorial2/include/tutorial2/field/E2_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/E2_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,7 +6,9 @@ #pragma once +#include #include +#include #include #include @@ -16,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::E2_2 field. struct E2_2Common @@ -28,27 +29,27 @@ struct E2_2Common V1 = 0, ///< value @b V1. V2 = 100, ///< value @b V2. V3 = 271, ///< value @b V3. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 271, ///< Last defined value. ValuesLimit = 272, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = std::pair; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::E2_2 field. static const char* name() { return "E2_2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -61,14 +62,14 @@ struct E2_2Common { return info.first < v; }); - + if ((iter == endIter) || (iter->first != val)) { return nullptr; } - + return iter->second; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -78,19 +79,15 @@ struct E2_2Common std::make_pair(ValueType::V3, "V3") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial2::field::E2_2 field. using E2_2Val = E2_2Common::ValueType; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_1.h b/tutorials/tutorial2/include/tutorial2/field/F11_1.h index eae43e874..1c3df079c 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Field 11_1" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "Field 11_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -39,25 +38,20 @@ class F11_1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::F11_1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::F11_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_1Common.h b/tutorials/tutorial2/include/tutorial2/field/F11_1Common.h index 4f3760772..0d1df33cf 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::F11_1 field. struct F11_1Common @@ -22,23 +21,20 @@ struct F11_1Common /// @brief Re-definition of the value type used by /// tutorial2::field::F11_1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::F11_1 field. static const char* name() { return "Field 11_1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_2.h b/tutorials/tutorial2/include/tutorial2/field/F11_2.h index 58899e20e..18a48258f 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Field 11_2" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "Field 11_2" field. /// @see @ref tutorial2::field::F11_2Common::ValueType /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class F11_2 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::F11_2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::F11_2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::F11_2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::F11_2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::F11_2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::F11_2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::F11_2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::F11_2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::F11_2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::F11_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_2Common.h b/tutorials/tutorial2/include/tutorial2/field/F11_2Common.h index 748f64c94..e24383fa4 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::F11_2 field. struct F11_2Common @@ -30,27 +27,27 @@ struct F11_2Common V0 = 0, ///< value @b V0. V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::F11_2 field. static const char* name() { return "Field 11_2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -58,10 +55,10 @@ struct F11_2Common if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -71,19 +68,15 @@ struct F11_2Common "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial2::field::F11_2 field. using F11_2Val = F11_2Common::ValueType; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_3.h b/tutorials/tutorial2/include/tutorial2/field/F11_3.h index c89d0b4e4..d34be07a3 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "F11_3" field. @@ -20,7 +20,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref F11_3 field. /// @tparam TOpt Protocol options. @@ -33,8 +32,7 @@ struct F11_3Members TOpt, comms::option::def::FixedBitLength<5U> >; - - + /// @brief Definition of "M2" field. class M2 : public tutorial2::field::F11_2< @@ -53,11 +51,8 @@ struct F11_3Members { return tutorial2::field::F11_3MembersCommon::M2Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -98,18 +93,14 @@ class F11_3 : public m1, m2 ); - + /// @brief Name of the field. static const char* name() { return tutorial2::field::F11_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F11_3Common.h b/tutorials/tutorial2/include/tutorial2/field/F11_3Common.h index 1e4deb981..025191797 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F11_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/F11_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::F11_3 field. struct F11_3MembersCommon @@ -23,7 +22,7 @@ struct F11_3MembersCommon /// @brief Common types and functions for /// @ref tutorial2::field::F11_3Members::M1 field. using M1Common = tutorial2::field::F11_1Common; - + /// @brief Common types and functions for /// @ref tutorial2::field::F11_3Members::M2 field. struct M2Common : public tutorial2::field::F11_2Common @@ -33,9 +32,7 @@ struct F11_3MembersCommon { return "M2"; } - }; - }; /// @brief Common types and functions for @@ -47,10 +44,8 @@ struct F11_3Common { return "F11_3"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F5_1.h b/tutorials/tutorial2/include/tutorial2/field/F5_1.h index 21dccb48e..2f346c677 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F5_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/F5_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "F5_1" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "F5_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -38,31 +37,27 @@ class F5_1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::F5_1Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::F5_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F5_1Common.h b/tutorials/tutorial2/include/tutorial2/field/F5_1Common.h index ea26156aa..1c0e73384 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F5_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/F5_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::F5_1 field. struct F5_1Common @@ -20,23 +19,20 @@ struct F5_1Common /// @brief Re-definition of the value type used by /// tutorial2::field::F5_1 field. using ValueType = float; - + /// @brief Name of the @ref tutorial2::field::F5_1 field. static const char* name() { return "F5_1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F5_2.h b/tutorials/tutorial2/include/tutorial2/field/F5_2.h index 3b931ff08..ce223c15a 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F5_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/F5_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "F5_2" field. @@ -19,7 +19,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "F5_2" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -40,129 +39,125 @@ class F5_2 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = tutorial2::field::F5_2Common::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = tutorial2::field::F5_2Common::SpecialNamesMapInfo; - + /// @brief Generated default constructor. F5_2() { Base::setValue(std::numeric_limits::quiet_NaN()); } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::F5_2Common::hasSpecials(); } - + /// @brief Special value "S3". /// @see @ref tutorial2::field::F5_2Common::valueS3(). static constexpr ValueType valueS3() { return tutorial2::field::F5_2Common::valueS3(); } - + /// @brief Check the value is equal to special @ref valueS3(). bool isS3() const { return ((Base::getValue() < 0) && (std::isinf(Base::getValue()))); } - + /// @brief Assign special value @ref valueS3() to the field. void setS3() { Base::setValue(valueS3()); } - + /// @brief Special value "S4". /// @see @ref tutorial2::field::F5_2Common::valueS4(). static constexpr ValueType valueS4() { return tutorial2::field::F5_2Common::valueS4(); } - + /// @brief Check the value is equal to special @ref valueS4(). bool isS4() const { return (std::abs(Base::getValue() - static_cast(5.123000)) < std::numeric_limits::epsilon()); } - + /// @brief Assign special value @ref valueS4() to the field. void setS4() { Base::setValue(valueS4()); } - + /// @brief Special value "S2". /// @see @ref tutorial2::field::F5_2Common::valueS2(). static constexpr ValueType valueS2() { return tutorial2::field::F5_2Common::valueS2(); } - + /// @brief Check the value is equal to special @ref valueS2(). bool isS2() const { return ((0 < Base::getValue()) && (std::isinf(Base::getValue()))); } - + /// @brief Assign special value @ref valueS2() to the field. void setS2() { Base::setValue(valueS2()); } - + /// @brief Special value "S1". /// @see @ref tutorial2::field::F5_2Common::valueS1(). static constexpr ValueType valueS1() { return tutorial2::field::F5_2Common::valueS1(); } - + /// @brief Check the value is equal to special @ref valueS1(). bool isS1() const { return (std::isnan(Base::getValue())); } - + /// @brief Assign special value @ref valueS1() to the field. void setS1() { Base::setValue(valueS1()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return tutorial2::field::F5_2Common::specialNamesMap(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::F5_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/F5_2Common.h b/tutorials/tutorial2/include/tutorial2/field/F5_2Common.h index 58bcea276..52b4af90b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/F5_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/F5_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::F5_2 field. struct F5_2Common @@ -22,52 +21,51 @@ struct F5_2Common /// @brief Re-definition of the value type used by /// tutorial2::field::F5_2 field. using ValueType = double; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::F5_2 field. static const char* name() { return "F5_2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "S3". static constexpr ValueType valueS3() { return -std::numeric_limits::infinity(); } - + /// @brief Special value "S4". static constexpr ValueType valueS4() { return static_cast(5.123000); } - + /// @brief Special value "S2". static constexpr ValueType valueS2() { return std::numeric_limits::infinity(); } - + /// @brief Special value "S1". static constexpr ValueType valueS1() { return std::numeric_limits::quiet_NaN(); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -78,14 +76,11 @@ struct F5_2Common std::make_pair(valueS1(), "S1") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/FieldBase.h b/tutorials/tutorial2/include/tutorial2/field/FieldBase.h index 741a7dd3d..2af779a74 100644 --- a/tutorials/tutorial2/include/tutorial2/field/FieldBase.h +++ b/tutorials/tutorial2/include/tutorial2/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I1.h b/tutorials/tutorial2/include/tutorial2/field/I1.h index ebc799866..02be36cc0 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I1.h +++ b/tutorials/tutorial2/include/tutorial2/field/I1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I1" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -39,25 +38,20 @@ class I1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I1Common.h b/tutorials/tutorial2/include/tutorial2/field/I1Common.h index b9b685116..0058c6bd4 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I1 field. struct I1Common @@ -22,23 +21,20 @@ struct I1Common /// @brief Re-definition of the value type used by /// tutorial2::field::I1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::I1 field. static const char* name() { return "I1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_1.h b/tutorials/tutorial2/include/tutorial2/field/I3_1.h index 926f9bddc..83358af61 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I3_1" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I3_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class I3_1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I3_1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I3_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_1Common.h b/tutorials/tutorial2/include/tutorial2/field/I3_1Common.h index c007c8827..df229a9f7 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I3_1 field. struct I3_1Common @@ -22,23 +21,20 @@ struct I3_1Common /// @brief Re-definition of the value type used by /// tutorial2::field::I3_1 field. using ValueType = std::int32_t; - + /// @brief Name of the @ref tutorial2::field::I3_1 field. static const char* name() { return "I3_1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_2.h b/tutorials/tutorial2/include/tutorial2/field/I3_2.h index 7b8360e92..19c02efab 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I3_2" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I3_2" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class I3_2 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I3_2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I3_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_2Common.h b/tutorials/tutorial2/include/tutorial2/field/I3_2Common.h index 2fef5d3c9..cf26cdb8b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I3_2 field. struct I3_2Common @@ -22,23 +21,20 @@ struct I3_2Common /// @brief Re-definition of the value type used by /// tutorial2::field::I3_2 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial2::field::I3_2 field. static const char* name() { return "I3_2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_3.h b/tutorials/tutorial2/include/tutorial2/field/I3_3.h index 4c083d4ca..f033301e1 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I3_3" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I3_3" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class I3_3 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I3_3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I3_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_3Common.h b/tutorials/tutorial2/include/tutorial2/field/I3_3Common.h index 91c33f140..ebc722448 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I3_3 field. struct I3_3Common @@ -22,23 +21,20 @@ struct I3_3Common /// @brief Re-definition of the value type used by /// tutorial2::field::I3_3 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial2::field::I3_3 field. static const char* name() { return "I3_3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_4.h b/tutorials/tutorial2/include/tutorial2/field/I3_4.h index 8df845eff..5a307be3a 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_4.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I3_4" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I3_4" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,77 +40,72 @@ class I3_4 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = tutorial2::field::I3_4Common::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = tutorial2::field::I3_4Common::SpecialNamesMapInfo; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I3_4Common::hasSpecials(); } - + /// @brief Special value "S1". /// @see @ref tutorial2::field::I3_4Common::valueS1(). static constexpr ValueType valueS1() { return tutorial2::field::I3_4Common::valueS1(); } - + /// @brief Check the value is equal to special @ref valueS1(). bool isS1() const { return Base::getValue() == valueS1(); } - + /// @brief Assign special value @ref valueS1() to the field. void setS1() { Base::setValue(valueS1()); } - + /// @brief Special value "S2". /// @see @ref tutorial2::field::I3_4Common::valueS2(). static constexpr ValueType valueS2() { return tutorial2::field::I3_4Common::valueS2(); } - + /// @brief Check the value is equal to special @ref valueS2(). bool isS2() const { return Base::getValue() == valueS2(); } - + /// @brief Assign special value @ref valueS2() to the field. void setS2() { Base::setValue(valueS2()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return tutorial2::field::I3_4Common::specialNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I3_4Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_4Common.h b/tutorials/tutorial2/include/tutorial2/field/I3_4Common.h index 5eb3722d9..7f408fc36 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_4Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I3_4 field. struct I3_4Common @@ -24,40 +23,39 @@ struct I3_4Common /// @brief Re-definition of the value type used by /// tutorial2::field::I3_4 field. using ValueType = std::uint8_t; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::I3_4 field. static const char* name() { return "I3_4"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "S1". static constexpr ValueType valueS1() { return static_cast(1); } - + /// @brief Special value "S2". static constexpr ValueType valueS2() { return static_cast(5); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -66,14 +64,11 @@ struct I3_4Common std::make_pair(valueS2(), "S2") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_5.h b/tutorials/tutorial2/include/tutorial2/field/I3_5.h index e240947e5..6af2ee0f1 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_5.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_5.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I3_5" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "I3_5" field. /// @details /// Year as offset since 2000 @@ -47,25 +46,20 @@ class I3_5 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::I3_5Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::I3_5Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/I3_5Common.h b/tutorials/tutorial2/include/tutorial2/field/I3_5Common.h index 7e2b6a1af..c4dbd5607 100644 --- a/tutorials/tutorial2/include/tutorial2/field/I3_5Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/I3_5Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::I3_5 field. struct I3_5Common @@ -22,23 +21,20 @@ struct I3_5Common /// @brief Re-definition of the value type used by /// tutorial2::field::I3_5 field. using ValueType = std::int16_t; - + /// @brief Name of the @ref tutorial2::field::I3_5 field. static const char* name() { return "I3_5"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_1.h b/tutorials/tutorial2/include/tutorial2/field/L10_1.h index 812816886..363a0898b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "L10_1" field. @@ -19,7 +19,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref L10_1 field. /// @tparam TOpt Protocol options. @@ -41,24 +40,19 @@ struct L10_1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_1MembersCommon::ElementCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_1MembersCommon::ElementCommon::name(); } - - }; - - }; /// @brief Definition of "L10_1" field. @@ -88,12 +82,8 @@ class L10_1 : public { return tutorial2::field::L10_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_1Common.h b/tutorials/tutorial2/include/tutorial2/field/L10_1Common.h index 921d21eb2..58276e5fe 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::L10_1 field. struct L10_1MembersCommon @@ -26,22 +25,19 @@ struct L10_1MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_1Members::Element field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial2::field::L10_1Members::Element field. static const char* name() { return "Element"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -53,10 +49,8 @@ struct L10_1Common { return "L10_1"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_2.h b/tutorials/tutorial2/include/tutorial2/field/L10_2.h index 2c0f28251..aa76238a1 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "L10_2" field. @@ -19,7 +19,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref L10_2 field. /// @tparam TOpt Protocol options. @@ -41,24 +40,20 @@ struct L10_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_2MembersCommon::ElementCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_2MembersCommon::ElementCommon::name(); } - - }; - - + /// @brief Definition of "Size" field. class Size : public comms::field::IntValue< @@ -76,24 +71,19 @@ struct L10_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_2MembersCommon::SizeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_2MembersCommon::SizeCommon::name(); } - - }; - - }; /// @brief Definition of "L10_2" field. @@ -123,12 +113,8 @@ class L10_2 : public { return tutorial2::field::L10_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_2Common.h b/tutorials/tutorial2/include/tutorial2/field/L10_2Common.h index 9e636f9e1..a47a5fe24 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::L10_2 field. struct L10_2MembersCommon @@ -26,22 +25,20 @@ struct L10_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_2Members::Element field. using ValueType = std::int16_t; - + /// @brief Name of the @ref tutorial2::field::L10_2Members::Element field. static const char* name() { return "Element"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_2Members::Size field. struct SizeCommon @@ -49,22 +46,19 @@ struct L10_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_2Members::Size field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial2::field::L10_2Members::Size field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -76,10 +70,8 @@ struct L10_2Common { return "L10_2"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_3.h b/tutorials/tutorial2/include/tutorial2/field/L10_3.h index b8fe3ef5d..5d2ca97bd 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "L10_3" field. @@ -22,7 +22,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref L10_3 field. /// @tparam TOpt Protocol options. @@ -48,24 +47,20 @@ struct L10_3Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_3MembersCommon::ElementMembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_3MembersCommon::ElementMembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. class M2 : public comms::field::String< @@ -86,11 +81,8 @@ struct L10_3Members { return tutorial2::field::L10_3MembersCommon::ElementMembersCommon::M2Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -98,7 +90,7 @@ struct L10_3Members M2 >; }; - + /// @brief Definition of "Element" field. class Element : public comms::field::Bundle< @@ -126,18 +118,14 @@ struct L10_3Members m1, m2 ); - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_3MembersCommon::ElementCommon::name(); } - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -153,24 +141,19 @@ struct L10_3Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_3MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_3MembersCommon::LengthCommon::name(); } - - }; - - }; /// @brief Definition of "L10_3" field. @@ -200,12 +183,8 @@ class L10_3 : public { return tutorial2::field::L10_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_3Common.h b/tutorials/tutorial2/include/tutorial2/field/L10_3Common.h index c5e225b6b..43e6b2ed2 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::L10_3 field. struct L10_3MembersCommon @@ -30,22 +29,20 @@ struct L10_3MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_3Members::ElementMembers::M1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::L10_3Members::ElementMembers::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_3Members::ElementMembers::M2 field. struct M2Common @@ -55,11 +52,9 @@ struct L10_3MembersCommon { return "M2"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_3Members::Element field. struct ElementCommon @@ -69,9 +64,8 @@ struct L10_3MembersCommon { return "Element"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_3Members::Length field. struct LengthCommon @@ -79,22 +73,19 @@ struct L10_3MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_3Members::Length field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::field::L10_3Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -106,10 +97,8 @@ struct L10_3Common { return "L10_3"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_4.h b/tutorials/tutorial2/include/tutorial2/field/L10_4.h index 46423ad97..e52595451 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_4.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "L10_4" field. @@ -23,7 +23,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref L10_4 field. /// @tparam TOpt Protocol options. @@ -49,24 +48,20 @@ struct L10_4Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. /// @see @ref tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::ValueType class M2 : public @@ -87,45 +82,48 @@ struct L10_4Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M2Common::name(); } - - }; - - + /// @brief Definition of "M3" field. class M3 : public comms::field::String< @@ -144,11 +142,8 @@ struct L10_4Members { return tutorial2::field::L10_4MembersCommon::ElementMembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -157,7 +152,7 @@ struct L10_4Members M3 >; }; - + /// @brief Definition of "Element" field. class Element : public comms::field::Bundle< @@ -188,18 +183,14 @@ struct L10_4Members m2, m3 ); - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_4MembersCommon::ElementCommon::name(); } - - }; - - + /// @brief Definition of "Size" field. class Size : public comms::field::IntValue< @@ -215,24 +206,20 @@ struct L10_4Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_4MembersCommon::SizeCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_4MembersCommon::SizeCommon::name(); } - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -248,24 +235,19 @@ struct L10_4Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L10_4MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L10_4MembersCommon::LengthCommon::name(); } - - }; - - }; /// @brief Definition of "L10_4" field. @@ -297,12 +279,8 @@ class L10_4 : public { return tutorial2::field::L10_4Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L10_4Common.h b/tutorials/tutorial2/include/tutorial2/field/L10_4Common.h index a14a11a39..de9343bd1 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L10_4Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/L10_4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,7 +6,9 @@ #pragma once +#include #include +#include #include #include @@ -16,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::L10_4 field. struct L10_4MembersCommon @@ -32,22 +33,20 @@ struct L10_4MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_4Members::ElementMembers::M1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::L10_4Members::ElementMembers::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_4Members::ElementMembers::M2 field. struct M2Common @@ -58,27 +57,27 @@ struct L10_4MembersCommon { V1 = 5, ///< value @b V1. V2 = 15, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 5, ///< First defined value. LastValue = 15, ///< Last defined value. ValuesLimit = 16, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = std::pair; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::L10_4Members::ElementMembers::M2 field. static const char* name() { return "M2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -91,14 +90,14 @@ struct L10_4MembersCommon { return info.first < v; }); - + if ((iter == endIter) || (iter->first != val)) { return nullptr; } - + return iter->second; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -107,18 +106,15 @@ struct L10_4MembersCommon std::make_pair(ValueType::V2, "V2") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::field::L10_4Members::ElementMembers::M2 field. using M2Val = M2Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_4Members::ElementMembers::M3 field. struct M3Common @@ -128,11 +124,9 @@ struct L10_4MembersCommon { return "M3"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_4Members::Element field. struct ElementCommon @@ -142,9 +136,8 @@ struct L10_4MembersCommon { return "Element"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_4Members::Size field. struct SizeCommon @@ -152,22 +145,20 @@ struct L10_4MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_4Members::Size field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::field::L10_4Members::Size field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::field::L10_4Members::Length field. struct LengthCommon @@ -175,22 +166,19 @@ struct L10_4MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::L10_4Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::L10_4Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -202,10 +190,8 @@ struct L10_4Common { return "L10_4"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L6_3.h b/tutorials/tutorial2/include/tutorial2/field/L6_3.h index 34711b4a8..9b50f61c3 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L6_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/L6_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "L6_3" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "L6_3" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class L6_3 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::L6_3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::L6_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/L6_3Common.h b/tutorials/tutorial2/include/tutorial2/field/L6_3Common.h index d8b55b886..e62fd785f 100644 --- a/tutorials/tutorial2/include/tutorial2/field/L6_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/L6_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::L6_3 field. struct L6_3Common @@ -22,23 +21,20 @@ struct L6_3Common /// @brief Re-definition of the value type used by /// tutorial2::field::L6_3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::field::L6_3 field. static const char* name() { return "L6_3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/MsgId.h b/tutorials/tutorial2/include/tutorial2/field/MsgId.h index f329c596d..0c708262e 100644 --- a/tutorials/tutorial2/include/tutorial2/field/MsgId.h +++ b/tutorials/tutorial2/include/tutorial2/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial2::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial2::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/MsgIdCommon.h b/tutorials/tutorial2/include/tutorial2/field/MsgIdCommon.h index 2de403203..6cb125b2e 100644 --- a/tutorials/tutorial2/include/tutorial2/field/MsgIdCommon.h +++ b/tutorials/tutorial2/include/tutorial2/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial2/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial2::field::MsgId field. using ValueType = tutorial2::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -77,19 +74,15 @@ struct MsgIdCommon "M17" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial2::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_1.h b/tutorials/tutorial2/include/tutorial2/field/S4_1.h index 9c8f8c6b3..692bd8a7f 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S4_1" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S4_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -52,7 +51,7 @@ class S4_1 : public B1, B2 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::S4_1Common::bitName(). static const char* bitName(BitIdx idx) @@ -61,18 +60,14 @@ class S4_1 : public tutorial2::field::S4_1Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::S4_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_1Common.h b/tutorials/tutorial2/include/tutorial2/field/S4_1Common.h index 6be2c7e71..a3bf4cdc2 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S4_1 field. struct S4_1Common @@ -24,7 +23,7 @@ struct S4_1Common { return "S4_1"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::S4_1 field. static const char* bitName(std::size_t idx) @@ -34,19 +33,16 @@ struct S4_1Common "B1", "B2" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_2.h b/tutorials/tutorial2/include/tutorial2/field/S4_2.h index 64e72234f..93820cc0b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S4_2" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S4_2" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -54,7 +53,7 @@ class S4_2 : public B5=5, B15=15 ); - + /// @brief Generates independent access functions for internal bits. /// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro /// related to @b comms::field::BitmaskValue class from COMMS library @@ -69,7 +68,7 @@ class S4_2 : public B5, B15 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::S4_2Common::bitName(). static const char* bitName(BitIdx idx) @@ -78,18 +77,14 @@ class S4_2 : public tutorial2::field::S4_2Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::S4_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_2Common.h b/tutorials/tutorial2/include/tutorial2/field/S4_2Common.h index a2d522c39..11015ca72 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S4_2 field. struct S4_2Common @@ -24,7 +23,7 @@ struct S4_2Common { return "S4_2"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::S4_2 field. static const char* bitName(std::size_t idx) @@ -47,19 +46,16 @@ struct S4_2Common nullptr, "B15" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_3.h b/tutorials/tutorial2/include/tutorial2/field/S4_3.h index 07bdae655..6c42bf6ba 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S4_3" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S4_3" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -56,7 +55,7 @@ class S4_3 : public B5=5, B20=20 ); - + /// @brief Generates independent access functions for internal bits. /// @details See definition of @b COMMS_BITMASK_BITS_ACCESS macro /// related to @b comms::field::BitmaskValue class from COMMS library @@ -73,7 +72,7 @@ class S4_3 : public B5, B20 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::field::S4_3Common::bitName(). static const char* bitName(BitIdx idx) @@ -82,18 +81,14 @@ class S4_3 : public tutorial2::field::S4_3Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::S4_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S4_3Common.h b/tutorials/tutorial2/include/tutorial2/field/S4_3Common.h index 409e7eca5..7e2b7e13d 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S4_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S4_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S4_3 field. struct S4_3Common @@ -24,7 +23,7 @@ struct S4_3Common { return "S4_3"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::field::S4_3 field. static const char* bitName(std::size_t idx) @@ -52,19 +51,16 @@ struct S4_3Common nullptr, "B20" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_1.h b/tutorials/tutorial2/include/tutorial2/field/S6_1.h index 2a0526c17..ef87f6cbd 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_1.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S6_1" field. @@ -17,7 +17,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S6_1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -43,12 +42,8 @@ class S6_1 : public { return tutorial2::field::S6_1Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_1Common.h b/tutorials/tutorial2/include/tutorial2/field/S6_1Common.h index e523ba3fd..c40c1dd89 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_1Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S6_1 field. struct S6_1Common @@ -22,10 +21,8 @@ struct S6_1Common { return "S6_1"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_2.h b/tutorials/tutorial2/include/tutorial2/field/S6_2.h index 69774f3a1..1af5e3ffb 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_2.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S6_2" field. @@ -19,7 +19,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the member fields of /// @ref S6_2 field. /// @tparam TOpt Protocol options. @@ -41,24 +40,19 @@ struct S6_2Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::field::S6_2MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::field::S6_2MembersCommon::LengthCommon::name(); } - - }; - - }; /// @brief Definition of "S6_2" field. @@ -88,18 +82,14 @@ class S6_2 : public static const std::size_t StrSize = std::extent::value; Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::field::S6_2Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_2Common.h b/tutorials/tutorial2/include/tutorial2/field/S6_2Common.h index f4e8c95c5..9adf35315 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_2Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::field::S6_2 field. struct S6_2MembersCommon @@ -26,22 +25,19 @@ struct S6_2MembersCommon /// @brief Re-definition of the value type used by /// tutorial2::field::S6_2Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::field::S6_2Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -53,10 +49,8 @@ struct S6_2Common { return "S6_2"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_3.h b/tutorials/tutorial2/include/tutorial2/field/S6_3.h index b67f03520..f7d3fabdd 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_3.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S6_3" field. @@ -18,7 +18,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S6_3" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -44,12 +43,8 @@ class S6_3 : public { return tutorial2::field::S6_3Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_3Common.h b/tutorials/tutorial2/include/tutorial2/field/S6_3Common.h index 5773fcccb..bf4edfd71 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_3Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S6_3 field. struct S6_3Common @@ -22,10 +21,8 @@ struct S6_3Common { return "S6_3"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_4.h b/tutorials/tutorial2/include/tutorial2/field/S6_4.h index 4e0a4b7a6..587e1d168 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_4.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S6_4" field. @@ -19,7 +19,6 @@ namespace tutorial2 namespace field { - /// @brief Definition of "S6_4" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -57,12 +56,8 @@ class S6_4 : public { return tutorial2::field::S6_4Common::name(); } - - }; - } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/field/S6_4Common.h b/tutorials/tutorial2/include/tutorial2/field/S6_4Common.h index 1c93279d1..28e6c964b 100644 --- a/tutorials/tutorial2/include/tutorial2/field/S6_4Common.h +++ b/tutorials/tutorial2/include/tutorial2/field/S6_4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial2 namespace field { - /// @brief Common types and functions for /// @ref tutorial2::field::S6_4 field. struct S6_4Common @@ -22,10 +21,8 @@ struct S6_4Common { return "S6_4"; } - }; } // namespace field } // namespace tutorial2 - diff --git a/tutorials/tutorial2/include/tutorial2/frame/Frame.h b/tutorials/tutorial2/include/tutorial2/frame/Frame.h index 78234ad6d..2fc948130 100644 --- a/tutorials/tutorial2/include/tutorial2/frame/Frame.h +++ b/tutorials/tutorial2/include/tutorial2/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial2 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Scope for field(s) of @ref ID layer. struct IDMembers { @@ -45,10 +44,8 @@ struct FrameLayers tutorial2::field::MsgId< TOpt >; - - }; - + /// @brief Definition of layer "ID". template using ID = @@ -59,7 +56,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::ID >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -78,26 +75,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -105,11 +97,10 @@ struct FrameLayers typename SizeMembers::SizeField, ID >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -146,5 +137,3 @@ class Frame : public } // namespace frame } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/frame/FrameCommon.h b/tutorials/tutorial2/include/tutorial2/frame/FrameCommon.h index b7a7cfbe1..78e911c85 100644 --- a/tutorials/tutorial2/include/tutorial2/frame/FrameCommon.h +++ b/tutorials/tutorial2/include/tutorial2/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial2::frame::Frame frame. /// @see tutorial2::frame::FrameLayers @@ -32,24 +31,21 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial2::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial2::frame::FrameLayers::IDMembers struct. struct IDMembersCommon @@ -57,13 +53,9 @@ struct FrameLayersCommon /// @brief Common types and functions for /// @ref tutorial2::frame::FrameLayers::IDMembers::MsgId field. using MsgIdCommon = tutorial2::field::MsgIdCommon; - }; - }; } // namespace frame } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/input/AllMessages.h b/tutorials/tutorial2/include/tutorial2/input/AllMessages.h index ff4768406..3e60df5c2 100644 --- a/tutorials/tutorial2/include/tutorial2/input/AllMessages.h +++ b/tutorials/tutorial2/include/tutorial2/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial2/include/tutorial2/input/ClientInputMessages.h b/tutorials/tutorial2/include/tutorial2/input/ClientInputMessages.h index 6339b8ba6..2e2415b44 100644 --- a/tutorials/tutorial2/include/tutorial2/input/ClientInputMessages.h +++ b/tutorials/tutorial2/include/tutorial2/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial2/include/tutorial2/input/ServerInputMessages.h b/tutorials/tutorial2/include/tutorial2/input/ServerInputMessages.h index a55eaad99..7246b7165 100644 --- a/tutorials/tutorial2/include/tutorial2/input/ServerInputMessages.h +++ b/tutorials/tutorial2/include/tutorial2/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg1.h b/tutorials/tutorial2/include/tutorial2/message/Msg1.h index c3cafcf80..4999bb7df 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg1.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg1Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -47,11 +45,8 @@ struct Msg1Fields { return tutorial2::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -67,24 +62,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -133,24 +124,20 @@ class Msg1 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 3U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg10.h b/tutorials/tutorial2/include/tutorial2/message/Msg10.h index bb4f612b3..8f953a4f3 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg10.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg10.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 10" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial2/message/Msg10Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg10. /// @tparam TOpt Extra options /// @see @ref Msg10 @@ -48,11 +46,8 @@ struct Msg10Fields { return tutorial2::message::Msg10FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::L10_2< @@ -69,11 +64,8 @@ struct Msg10Fields { return tutorial2::message::Msg10FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public tutorial2::field::L10_3< @@ -90,11 +82,8 @@ struct Msg10Fields { return tutorial2::message::Msg10FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Definition of "F4" field. class F4 : public tutorial2::field::L10_4< @@ -111,11 +100,8 @@ struct Msg10Fields { return tutorial2::message::Msg10FieldsCommon::F4Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -172,22 +158,18 @@ class Msg10 : public f3, f4 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 25U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg10Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg10Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg10Common.h index 289da4b0a..d050bd148 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg10Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg10Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -17,7 +17,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg10 message. /// @see tutorial2::message::Msg10Fields @@ -26,7 +25,7 @@ struct Msg10FieldsCommon /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg10Fields::F1 field. using F1MembersCommon = tutorial2::field::L10_1MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg10Fields::F1 field. struct F1Common : public tutorial2::field::L10_1Common @@ -36,13 +35,12 @@ struct Msg10FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg10Fields::F2 field. using F2MembersCommon = tutorial2::field::L10_2MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg10Fields::F2 field. struct F2Common : public tutorial2::field::L10_2Common @@ -52,13 +50,12 @@ struct Msg10FieldsCommon { return "F2"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg10Fields::F3 field. using F3MembersCommon = tutorial2::field::L10_3MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg10Fields::F3 field. struct F3Common : public tutorial2::field::L10_3Common @@ -68,13 +65,12 @@ struct Msg10FieldsCommon { return "F3"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg10Fields::F4 field. using F4MembersCommon = tutorial2::field::L10_4MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg10Fields::F4 field. struct F4Common : public tutorial2::field::L10_4Common @@ -84,9 +80,7 @@ struct Msg10FieldsCommon { return "F4"; } - }; - }; /// @brief Common types and functions of @@ -98,12 +92,8 @@ struct Msg10Common { return "Message 10"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg11.h b/tutorials/tutorial2/include/tutorial2/message/Msg11.h index ca7b59fcf..869db9d34 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg11.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg11.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 11" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg11Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg11. /// @tparam TOpt Extra options /// @see @ref Msg11 @@ -36,15 +34,13 @@ struct Msg11Fields tutorial2::field::F11_1< TOpt >; - - + /// @brief Definition of "Field 11_2" field. using F2 = tutorial2::field::F11_2< TOpt >; - - + /// @brief Definition of "F3" field. class F3 : public tutorial2::field::F11_3< @@ -61,11 +57,8 @@ struct Msg11Fields { return tutorial2::message::Msg11FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F11_1, @@ -118,24 +111,20 @@ class Msg11 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 3U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg11Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg11Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg11Common.h index daae04770..b851728b5 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg11Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg11Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg11 message. /// @see tutorial2::message::Msg11Fields @@ -25,15 +24,15 @@ struct Msg11FieldsCommon /// @brief Common types and functions for /// @ref tutorial2::message::Msg11Fields::F11_1 field. using F11_1Common = tutorial2::field::F11_1Common; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg11Fields::F2 field. using F2Common = tutorial2::field::F11_2Common; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg11Fields::F3 field. using F3MembersCommon = tutorial2::field::F11_3MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg11Fields::F3 field. struct F3Common : public tutorial2::field::F11_3Common @@ -43,9 +42,7 @@ struct Msg11FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -57,12 +54,8 @@ struct Msg11Common { return "Message 11"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg12.h b/tutorials/tutorial2/include/tutorial2/message/Msg12.h index fd4199a09..c3fa8d127 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg12.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg12.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 12" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg12Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg12. /// @tparam TOpt Extra options /// @see @ref Msg12 @@ -50,26 +48,21 @@ struct Msg12Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg12FieldsCommon::F1MembersCommon::ActF1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg12FieldsCommon::F1MembersCommon::ActF1Common::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::Optional< @@ -86,11 +79,8 @@ struct Msg12Fields { return tutorial2::message::Msg12FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -135,24 +125,20 @@ class Msg12 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg12Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg12Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg12Common.h index f5ead02b8..87d7294a8 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg12Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg12Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg12 message. /// @see tutorial2::message::Msg12Fields @@ -31,24 +30,21 @@ struct Msg12FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg12Fields::F1Members::ActF1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg12Fields::F1Members::ActF1 field. static const char* name() { return "ActF1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg12Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg12FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg12Common { return "Message 12"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg13.h b/tutorials/tutorial2/include/tutorial2/message/Msg13.h index 8cbc19584..2b3441607 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg13.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg13.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 13" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial2/message/Msg13Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg13. /// @tparam TOpt Extra options /// @see @ref Msg13 @@ -59,7 +57,7 @@ struct Msg13Fields F2Present, F3Missing ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial2::message::Msg13FieldsCommon::FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -68,17 +66,14 @@ struct Msg13Fields tutorial2::message::Msg13FieldsCommon::FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg13FieldsCommon::FlagsCommon::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -98,26 +93,21 @@ struct Msg13Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg13FieldsCommon::F2MembersCommon::ActF2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg13FieldsCommon::F2MembersCommon::ActF2Common::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::Optional< @@ -136,11 +126,8 @@ struct Msg13Fields { return tutorial2::message::Msg13FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -160,26 +147,21 @@ struct Msg13Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg13FieldsCommon::F3MembersCommon::ActF3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg13FieldsCommon::F3MembersCommon::ActF3Common::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. class F3 : public comms::field::Optional< @@ -198,11 +180,8 @@ struct Msg13Fields { return tutorial2::message::Msg13FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags, @@ -257,19 +236,19 @@ class Msg13 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg13Common::name(); } - + /// @brief Generated read functionality. template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -280,22 +259,21 @@ class Msg13 : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f2(); - + es = Base::template doReadFromUntilAndUpdateLen(iter, len); if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f3(); - + es = Base::template doReadFrom(iter, len); - } while (false); return es; } - + /// @brief Generated refresh functionality. bool doRefresh() { @@ -304,58 +282,49 @@ class Msg13 : public updated = refresh_f3() || updated; return updated; } - private: void readPrepare_f2() { refresh_f2(); - } - + void readPrepare_f3() { refresh_f3(); - } - + bool refresh_f2() { auto mode = comms::field::OptionalMode::Missing; if (field_flags().getBitValue_F2Present()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == mode) { return false; } - + field_f2().setMode(mode); return true; - } - + bool refresh_f3() { auto mode = comms::field::OptionalMode::Missing; if (!field_flags().getBitValue_F3Missing()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == mode) { return false; } - + field_f3().setMode(mode); return true; - } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg13Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg13Common.h index 2143f6271..e95af0067 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg13Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg13Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg13 message. /// @see tutorial2::message::Msg13Fields @@ -30,7 +29,7 @@ struct Msg13FieldsCommon { return "Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial2::message::Msg13Fields::Flags field. static const char* bitName(std::size_t idx) @@ -39,18 +38,16 @@ struct Msg13FieldsCommon "F2Present", "F3Missing" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::message::Msg13Fields::F2 field. struct F2MembersCommon @@ -62,24 +59,21 @@ struct Msg13FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg13Fields::F2Members::ActF2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg13Fields::F2Members::ActF2 field. static const char* name() { return "ActF2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg13Fields::F2 field. struct F2Common @@ -89,9 +83,8 @@ struct Msg13FieldsCommon { return "F2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::message::Msg13Fields::F3 field. struct F3MembersCommon @@ -103,24 +96,21 @@ struct Msg13FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg13Fields::F3Members::ActF3 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::message::Msg13Fields::F3Members::ActF3 field. static const char* name() { return "ActF3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg13Fields::F3 field. struct F3Common @@ -130,9 +120,7 @@ struct Msg13FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -144,12 +132,8 @@ struct Msg13Common { return "Message 13"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg14.h b/tutorials/tutorial2/include/tutorial2/message/Msg14.h index 5610846b4..af1d2dab7 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg14.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg14.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 14" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg14Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg14. /// @tparam TOpt Extra options /// @see @ref Msg14 @@ -46,24 +44,20 @@ struct Msg14Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg14FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg14FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -79,24 +73,20 @@ struct Msg14Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg14FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg14FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -116,26 +106,21 @@ struct Msg14Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg14FieldsCommon::F3MembersCommon::ActF3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg14FieldsCommon::F3MembersCommon::ActF3Common::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. class F3 : public comms::field::Optional< @@ -154,11 +139,8 @@ struct Msg14Fields { return tutorial2::message::Msg14FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -213,19 +195,19 @@ class Msg14 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg14Common::name(); } - + /// @brief Generated read functionality. template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -236,15 +218,14 @@ class Msg14 : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f3(); - + es = Base::template doReadFrom(iter, len); - } while (false); return es; } - + /// @brief Generated refresh functionality. bool doRefresh() { @@ -252,15 +233,13 @@ class Msg14 : public updated = refresh_f3() || updated; return updated; } - private: void readPrepare_f3() { refresh_f3(); - } - + bool refresh_f3() { auto mode = comms::field::OptionalMode::Missing; @@ -269,21 +248,16 @@ class Msg14 : public (field_f2().getValue() != static_cast(0))))) { mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == mode) { return false; } - + field_f3().setMode(mode); return true; - } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg14Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg14Common.h index ec21f5e03..bd96b8513 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg14Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg14Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg14 message. /// @see tutorial2::message::Msg14Fields @@ -27,22 +26,20 @@ struct Msg14FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg14Fields::F1 field. using ValueType = std::int8_t; - + /// @brief Name of the @ref tutorial2::message::Msg14Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg14Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg14FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg14Fields::F2 field. using ValueType = std::int8_t; - + /// @brief Name of the @ref tutorial2::message::Msg14Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::message::Msg14Fields::F3 field. struct F3MembersCommon @@ -77,24 +72,21 @@ struct Msg14FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg14Fields::F3Members::ActF3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg14Fields::F3Members::ActF3 field. static const char* name() { return "ActF3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg14Fields::F3 field. struct F3Common @@ -104,9 +96,7 @@ struct Msg14FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -118,12 +108,8 @@ struct Msg14Common { return "Message 14"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg15.h b/tutorials/tutorial2/include/tutorial2/message/Msg15.h index 2bf018c2d..d77919856 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg15.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg15.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 15" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg15Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg15. /// @tparam TOpt Extra options /// @see @ref Msg15 @@ -47,11 +45,8 @@ struct Msg15Fields { return tutorial2::message::Msg15FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -67,24 +62,20 @@ struct Msg15Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg15FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg15FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public comms::field::IntValue< @@ -100,24 +91,20 @@ struct Msg15Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg15FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg15FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -170,24 +157,20 @@ class Msg15 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg15Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg15Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg15Common.h index a0859b23b..ba524e64c 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg15Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg15Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg15 message. /// @see tutorial2::message::Msg15Fields @@ -30,9 +29,8 @@ struct Msg15FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg15Fields::F2 field. struct F2Common @@ -40,22 +38,20 @@ struct Msg15FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg15Fields::F2 field. using ValueType = std::int16_t; - + /// @brief Name of the @ref tutorial2::message::Msg15Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg15Fields::F3 field. struct F3Common @@ -63,22 +59,19 @@ struct Msg15FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg15Fields::F3 field. using ValueType = std::int8_t; - + /// @brief Name of the @ref tutorial2::message::Msg15Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -90,12 +83,8 @@ struct Msg15Common { return "Message 15"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg16.h b/tutorials/tutorial2/include/tutorial2/message/Msg16.h index b641b3aa9..4a9ce29a2 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg16.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg16.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 16" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial2/message/Msg16Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg16. /// @tparam TOpt Extra options /// @see @ref Msg16 @@ -45,24 +43,20 @@ struct Msg16Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg16FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg16FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -78,24 +72,20 @@ struct Msg16Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg16FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg16FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public comms::field::IntValue< @@ -111,24 +101,20 @@ struct Msg16Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg16FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg16FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -181,24 +167,20 @@ class Msg16 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 3U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg16Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg16Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg16Common.h index 780316aac..aa603ae09 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg16Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg16Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg16 message. /// @see tutorial2::message::Msg16Fields @@ -27,22 +26,20 @@ struct Msg16FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg16Fields::F1 field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial2::message::Msg16Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg16Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg16FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg16Fields::F2 field. using ValueType = std::int8_t; - + /// @brief Name of the @ref tutorial2::message::Msg16Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg16Fields::F3 field. struct F3Common @@ -73,22 +68,19 @@ struct Msg16FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg16Fields::F3 field. using ValueType = std::int8_t; - + /// @brief Name of the @ref tutorial2::message::Msg16Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -100,12 +92,8 @@ struct Msg16Common { return "Message 16"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg17.h b/tutorials/tutorial2/include/tutorial2/message/Msg17.h index 24a29c4cd..86cc9980d 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg17.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg17.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 17" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg17Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg17. /// @tparam TOpt Extra options /// @see @ref Msg17 @@ -48,57 +46,53 @@ struct Msg17Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = tutorial2::message::Msg17FieldsCommon::F1Common::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = tutorial2::message::Msg17FieldsCommon::F1Common::SpecialNamesMapInfo; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg17FieldsCommon::F1Common::hasSpecials(); } - + /// @brief Special value "S1". /// @see @ref tutorial2::message::Msg17FieldsCommon::F1Common::valueS1(). static constexpr ValueType valueS1() { return tutorial2::message::Msg17FieldsCommon::F1Common::valueS1(); } - + /// @brief Check the value is equal to special @ref valueS1(). bool isS1() const { return Base::getValue() == valueS1(); } - + /// @brief Assign special value @ref valueS1() to the field. void setS1() { Base::setValue(valueS1()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return tutorial2::message::Msg17FieldsCommon::F1Common::specialNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg17FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -118,24 +112,20 @@ struct Msg17Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M1Common::name(); } - - }; - - + /// @brief Definition of "M2" field. class M2 : public comms::field::IntValue< @@ -151,24 +141,20 @@ struct Msg17Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M2Common::name(); } - - }; - - + /// @brief Definition of "M3" field. class M3 : public comms::field::IntValue< @@ -184,24 +170,20 @@ struct Msg17Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg17FieldsCommon::F2MembersCommon::M3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -210,7 +192,7 @@ struct Msg17Fields M3 >; }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::Bundle< @@ -241,18 +223,14 @@ struct Msg17Fields m2, m3 ); - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg17FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -301,24 +279,20 @@ class Msg17 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 10U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 10U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg17Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg17Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg17Common.h index 59c221e53..add35a89e 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg17Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg17Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg17 message. /// @see tutorial2::message::Msg17Fields @@ -29,34 +28,33 @@ struct Msg17FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg17Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::message::Msg17Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "S1". static constexpr ValueType valueS1() { return static_cast(10); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -64,13 +62,11 @@ struct Msg17FieldsCommon std::make_pair(valueS1(), "S1") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial2::message::Msg17Fields::F2 field. struct F2MembersCommon @@ -82,22 +78,20 @@ struct Msg17FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg17Fields::F2Members::M1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg17Fields::F2Members::M1 field. static const char* name() { return "M1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg17Fields::F2Members::M2 field. struct M2Common @@ -105,22 +99,20 @@ struct Msg17FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg17Fields::F2Members::M2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg17Fields::F2Members::M2 field. static const char* name() { return "M2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg17Fields::F2Members::M3 field. struct M3Common @@ -128,24 +120,21 @@ struct Msg17FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg17Fields::F2Members::M3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial2::message::Msg17Fields::F2Members::M3 field. static const char* name() { return "M3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg17Fields::F2 field. struct F2Common @@ -155,9 +144,7 @@ struct Msg17FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -169,12 +156,8 @@ struct Msg17Common { return "Message 17"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg1Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg1Common.h index a0016dae4..405bf7eee 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg1Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg1 message. /// @see tutorial2::message::Msg1Fields @@ -30,9 +29,8 @@ struct Msg1FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg1Fields::F2 field. struct F2Common @@ -40,22 +38,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial2::message::Msg1Fields::F2 field. using ValueType = std::int16_t; - + /// @brief Name of the @ref tutorial2::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -67,12 +62,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg2.h b/tutorials/tutorial2/include/tutorial2/message/Msg2.h index 4e4cf6f47..4a1185ad2 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg2.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg2Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -47,11 +45,8 @@ struct Msg2Fields { return tutorial2::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::E2_2< @@ -68,11 +63,8 @@ struct Msg2Fields { return tutorial2::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. /// @details /// Some Inner enum @@ -99,45 +91,48 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::message::Msg2FieldsCommon::F3Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::message::Msg2FieldsCommon::F3Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::message::Msg2FieldsCommon::F3Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::message::Msg2FieldsCommon::F3Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::message::Msg2FieldsCommon::F3Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::message::Msg2FieldsCommon::F3Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::message::Msg2FieldsCommon::F3Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::message::Msg2FieldsCommon::F3Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::message::Msg2FieldsCommon::F3Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg2FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Definition of "F4" field. /// @see @ref tutorial2::message::Msg2FieldsCommon::F4Common::ValueType class F4 : public @@ -162,45 +157,48 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial2::message::Msg2FieldsCommon::F4Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial2::message::Msg2FieldsCommon::F4Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial2::message::Msg2FieldsCommon::F4Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial2::message::Msg2FieldsCommon::F4Common::valueName(). static const char* valueName(ValueType val) { return tutorial2::message::Msg2FieldsCommon::F4Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial2::message::Msg2FieldsCommon::F4Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial2::message::Msg2FieldsCommon::F4Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial2::message::Msg2FieldsCommon::F4Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial2::message::Msg2FieldsCommon::F4Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial2::message::Msg2FieldsCommon::F4Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -257,24 +255,20 @@ class Msg2 : public f3, f4 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 6U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg2Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg2Common.h index b26d80df0..60485d465 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg2Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,7 +6,9 @@ #pragma once +#include #include +#include #include #include #include "tutorial2/field/E2_1Common.h" @@ -18,7 +20,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg2 message. /// @see tutorial2::message::Msg2Fields @@ -33,9 +34,8 @@ struct Msg2FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg2Fields::F2 field. struct F2Common : public tutorial2::field::E2_2Common @@ -45,9 +45,8 @@ struct Msg2FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg2Fields::F3 field. struct F3Common @@ -59,27 +58,27 @@ struct Msg2FieldsCommon V1 = -100, ///< value @b V1. V2 = 0, ///< value @b V2. V3 = 10, ///< value @b V3. - + // --- Extra values generated for convenience --- FirstValue = -100, ///< First defined value. LastValue = 10, ///< Last defined value. ValuesLimit = 11, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = std::pair; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::message::Msg2Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -92,14 +91,14 @@ struct Msg2FieldsCommon { return info.first < v; }); - + if ((iter == endIter) || (iter->first != val)) { return nullptr; } - + return iter->second; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -109,18 +108,15 @@ struct Msg2FieldsCommon std::make_pair(ValueType::V3, "V3") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::message::Msg2Fields::F3 field. using F3Val = F3Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg2Fields::F4 field. struct F4Common @@ -133,27 +129,27 @@ struct Msg2FieldsCommon V2 = 0x00FFU, ///< value Value 2. V3 = 0x02FFU, ///< value Value 3. V4 = 0x0FFFU, ///< value Value 4. - + // --- Extra values generated for convenience --- FirstValue = 0x0000U, ///< First defined value. LastValue = 0x0FFFU, ///< Last defined value. ValuesLimit = 0x1000U, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = std::pair; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial2::message::Msg2Fields::F4 field. static const char* name() { return "F4"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -166,14 +162,14 @@ struct Msg2FieldsCommon { return info.first < v; }); - + if ((iter == endIter) || (iter->first != val)) { return nullptr; } - + return iter->second; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -184,18 +180,14 @@ struct Msg2FieldsCommon std::make_pair(ValueType::V4, "Value 4") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial2::message::Msg2Fields::F4 field. using F4Val = F4Common::ValueType; - - }; /// @brief Common types and functions of @@ -207,12 +199,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg3.h b/tutorials/tutorial2/include/tutorial2/message/Msg3.h index 198899885..3d580152e 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg3.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -18,14 +18,12 @@ #include "tutorial2/message/Msg3Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -49,11 +47,8 @@ struct Msg3Fields { return tutorial2::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::I3_2< @@ -70,11 +65,8 @@ struct Msg3Fields { return tutorial2::message::Msg3FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public tutorial2::field::I3_3< @@ -91,11 +83,8 @@ struct Msg3Fields { return tutorial2::message::Msg3FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Definition of "F4" field. class F4 : public tutorial2::field::I3_4< @@ -112,11 +101,8 @@ struct Msg3Fields { return tutorial2::message::Msg3FieldsCommon::F4Common::name(); } - - }; - - + /// @brief Definition of "F5" field. class F5 : public tutorial2::field::I3_5< @@ -133,11 +119,8 @@ struct Msg3Fields { return tutorial2::message::Msg3FieldsCommon::F5Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -198,24 +181,20 @@ class Msg3 : public f4, f5 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 10U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 13U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg3Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg3Common.h index 064da6e86..8bb05bbd0 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg3Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -18,7 +18,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg3 message. /// @see tutorial2::message::Msg3Fields @@ -33,9 +32,8 @@ struct Msg3FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg3Fields::F2 field. struct F2Common : public tutorial2::field::I3_2Common @@ -45,9 +43,8 @@ struct Msg3FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg3Fields::F3 field. struct F3Common : public tutorial2::field::I3_3Common @@ -57,9 +54,8 @@ struct Msg3FieldsCommon { return "F3"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg3Fields::F4 field. struct F4Common : public tutorial2::field::I3_4Common @@ -69,9 +65,8 @@ struct Msg3FieldsCommon { return "F4"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg3Fields::F5 field. struct F5Common : public tutorial2::field::I3_5Common @@ -81,9 +76,7 @@ struct Msg3FieldsCommon { return "F5"; } - }; - }; /// @brief Common types and functions of @@ -95,12 +88,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg4.h b/tutorials/tutorial2/include/tutorial2/message/Msg4.h index a77c7f5b8..615b2fb1a 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg4.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 4" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial2/message/Msg4Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg4. /// @tparam TOpt Extra options /// @see @ref Msg4 @@ -47,11 +45,8 @@ struct Msg4Fields { return tutorial2::message::Msg4FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::S4_2< @@ -68,11 +63,8 @@ struct Msg4Fields { return tutorial2::message::Msg4FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public tutorial2::field::S4_3< @@ -89,11 +81,8 @@ struct Msg4Fields { return tutorial2::message::Msg4FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -146,24 +135,20 @@ class Msg4 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 6U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg4Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg4Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg4Common.h index 1afca9cfa..f9c54dfe6 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg4Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg4 message. /// @see tutorial2::message::Msg4Fields @@ -31,9 +30,8 @@ struct Msg4FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg4Fields::F2 field. struct F2Common : public tutorial2::field::S4_2Common @@ -43,9 +41,8 @@ struct Msg4FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg4Fields::F3 field. struct F3Common : public tutorial2::field::S4_3Common @@ -55,9 +52,7 @@ struct Msg4FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -69,12 +64,8 @@ struct Msg4Common { return "Message 4"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg5.h b/tutorials/tutorial2/include/tutorial2/message/Msg5.h index 9c55579f4..ed03e538a 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg5.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg5.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 5" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial2/message/Msg5Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg5. /// @tparam TOpt Extra options /// @see @ref Msg5 @@ -46,11 +44,8 @@ struct Msg5Fields { return tutorial2::message::Msg5FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::F5_2< @@ -67,11 +62,8 @@ struct Msg5Fields { return tutorial2::message::Msg5FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -120,24 +112,20 @@ class Msg5 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 12U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 12U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg5Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg5Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg5Common.h index b44b76845..eb65997e3 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg5Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg5Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg5 message. /// @see tutorial2::message::Msg5Fields @@ -30,9 +29,8 @@ struct Msg5FieldsCommon { return "F1"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg5Fields::F2 field. struct F2Common : public tutorial2::field::F5_2Common @@ -42,9 +40,7 @@ struct Msg5FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -56,12 +52,8 @@ struct Msg5Common { return "Message 5"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg6.h b/tutorials/tutorial2/include/tutorial2/message/Msg6.h index 0d5db84cc..9f21cfbc3 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg6.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg6.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 6" message and its fields. @@ -18,14 +18,12 @@ #include "tutorial2/message/Msg6Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg6. /// @tparam TOpt Extra options /// @see @ref Msg6 @@ -49,11 +47,8 @@ struct Msg6Fields { return tutorial2::message::Msg6FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::S6_2< @@ -70,11 +65,8 @@ struct Msg6Fields { return tutorial2::message::Msg6FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public tutorial2::field::S6_3< @@ -91,11 +83,8 @@ struct Msg6Fields { return tutorial2::message::Msg6FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Definition of "F4" field. class F4 : public tutorial2::field::S6_4< @@ -112,11 +101,8 @@ struct Msg6Fields { return tutorial2::message::Msg6FieldsCommon::F4Common::name(); } - - }; - - + /// @brief Definition of "F5" field. class F5 : public comms::field::String< @@ -135,11 +121,8 @@ struct Msg6Fields { return tutorial2::message::Msg6FieldsCommon::F5Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -200,22 +183,18 @@ class Msg6 : public f4, f5 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 8U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg6Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg6Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg6Common.h index f01939f55..3dab14cdc 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg6Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg6Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -17,7 +17,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg6 message. /// @see tutorial2::message::Msg6Fields @@ -32,13 +31,12 @@ struct Msg6FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg6Fields::F2 field. using F2MembersCommon = tutorial2::field::S6_2MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg6Fields::F2 field. struct F2Common : public tutorial2::field::S6_2Common @@ -48,9 +46,8 @@ struct Msg6FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg6Fields::F3 field. struct F3Common : public tutorial2::field::S6_3Common @@ -60,9 +57,8 @@ struct Msg6FieldsCommon { return "F3"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg6Fields::F4 field. struct F4Common : public tutorial2::field::S6_4Common @@ -72,9 +68,8 @@ struct Msg6FieldsCommon { return "F4"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg6Fields::F5 field. struct F5Common @@ -84,9 +79,7 @@ struct Msg6FieldsCommon { return "F5"; } - }; - }; /// @brief Common types and functions of @@ -98,12 +91,8 @@ struct Msg6Common { return "Message 6"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg7.h b/tutorials/tutorial2/include/tutorial2/message/Msg7.h index 27e68c8f1..b527e8d74 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg7.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg7.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 7" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial2/message/Msg7Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg7. /// @tparam TOpt Extra options /// @see @ref Msg7 @@ -48,11 +46,8 @@ struct Msg7Fields { return tutorial2::message::Msg7FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::D7_2< @@ -69,11 +64,8 @@ struct Msg7Fields { return tutorial2::message::Msg7FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Definition of "F3" field. class F3 : public comms::field::ArrayList< @@ -94,11 +86,8 @@ struct Msg7Fields { return tutorial2::message::Msg7FieldsCommon::F3Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -151,22 +140,18 @@ class Msg7 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 6U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg7Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg7Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg7Common.h index f3e58da03..ffc15dc07 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg7Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg7Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg7 message. /// @see tutorial2::message::Msg7Fields @@ -30,13 +29,12 @@ struct Msg7FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg7Fields::F2 field. using F2MembersCommon = tutorial2::field::D7_2MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg7Fields::F2 field. struct F2Common : public tutorial2::field::D7_2Common @@ -46,9 +44,8 @@ struct Msg7FieldsCommon { return "F2"; } - }; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg7Fields::F3 field. struct F3Common @@ -58,9 +55,7 @@ struct Msg7FieldsCommon { return "F3"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +67,8 @@ struct Msg7Common { return "Message 7"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg8.h b/tutorials/tutorial2/include/tutorial2/message/Msg8.h index f7fc23a89..c797f95e7 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg8.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg8.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 8" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial2/message/Msg8Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg8. /// @tparam TOpt Extra options /// @see @ref Msg8 @@ -46,11 +44,8 @@ struct Msg8Fields { return tutorial2::message::Msg8FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::B8_2< @@ -67,11 +62,8 @@ struct Msg8Fields { return tutorial2::message::Msg8FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -120,22 +112,18 @@ class Msg8 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 12U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg8Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg8Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg8Common.h index 4379cc2b1..593a6e36e 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg8Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg8Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg8 message. /// @see tutorial2::message::Msg8Fields @@ -24,7 +23,7 @@ struct Msg8FieldsCommon /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg8Fields::F1 field. using F1MembersCommon = tutorial2::field::B8_1MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg8Fields::F1 field. struct F1Common : public tutorial2::field::B8_1Common @@ -34,13 +33,12 @@ struct Msg8FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg8Fields::F2 field. using F2MembersCommon = tutorial2::field::B8_2MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg8Fields::F2 field. struct F2Common : public tutorial2::field::B8_2Common @@ -50,9 +48,7 @@ struct Msg8FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -64,12 +60,8 @@ struct Msg8Common { return "Message 8"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg9.h b/tutorials/tutorial2/include/tutorial2/message/Msg9.h index 97093313d..3450008aa 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg9.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg9.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 9" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial2/message/Msg9Common.h" #include "tutorial2/options/DefaultOptions.h" - namespace tutorial2 { namespace message { - /// @brief Fields of @ref Msg9. /// @tparam TOpt Extra options /// @see @ref Msg9 @@ -46,11 +44,8 @@ struct Msg9Fields { return tutorial2::message::Msg9FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public tutorial2::field::B9_2< @@ -67,11 +62,8 @@ struct Msg9Fields { return tutorial2::message::Msg9FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -120,24 +112,20 @@ class Msg9 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 5U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 5U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial2::message::Msg9Common::name(); } - - }; } // namespace message } // namespace tutorial2 - - diff --git a/tutorials/tutorial2/include/tutorial2/message/Msg9Common.h b/tutorials/tutorial2/include/tutorial2/message/Msg9Common.h index caf76a12e..123b3b024 100644 --- a/tutorials/tutorial2/include/tutorial2/message/Msg9Common.h +++ b/tutorials/tutorial2/include/tutorial2/message/Msg9Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial2 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial2::message::Msg9 message. /// @see tutorial2::message::Msg9Fields @@ -24,7 +23,7 @@ struct Msg9FieldsCommon /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg9Fields::F1 field. using F1MembersCommon = tutorial2::field::B9_1MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg9Fields::F1 field. struct F1Common : public tutorial2::field::B9_1Common @@ -34,13 +33,12 @@ struct Msg9FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial2::message::Msg9Fields::F2 field. using F2MembersCommon = tutorial2::field::B9_2MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial2::message::Msg9Fields::F2 field. struct F2Common : public tutorial2::field::B9_2Common @@ -50,9 +48,7 @@ struct Msg9FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -64,12 +60,8 @@ struct Msg9Common { return "Message 9"; } - }; } // namespace message } // namespace tutorial2 - - - diff --git a/tutorials/tutorial2/include/tutorial2/options/BareMetalDefaultOptions.h b/tutorials/tutorial2/include/tutorial2/options/BareMetalDefaultOptions.h index 4126ca97f..9d66049be 100644 --- a/tutorials/tutorial2/include/tutorial2/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial2/include/tutorial2/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -35,9 +35,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::field::B8_1Members::M3 >; - }; // struct B8_1Members - + struct B8_2Members : public TBase::field::B8_2Members { /// @brief Extra options for @ref @@ -47,9 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::B8_2Members::M3 >; - }; // struct B8_2Members - + /// @brief Extra options for @ref /// tutorial2::field::D7_1 field. using D7_1 = @@ -57,7 +55,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::field::D7_1 >; - + /// @brief Extra options for @ref /// tutorial2::field::D7_2 field. using D7_2 = @@ -65,7 +63,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::D7_2 >; - + /// @brief Extra options for @ref /// tutorial2::field::L10_1 field. using L10_1 = @@ -73,7 +71,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::field::L10_1 >; - + /// @brief Extra options for @ref /// tutorial2::field::L10_2 field. using L10_2 = @@ -81,7 +79,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::L10_2 >; - + struct L10_3Members : public TBase::field::L10_3Members { struct ElementMembers : public TBase::field::L10_3Members::ElementMembers @@ -94,11 +92,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::field::L10_3Members::ElementMembers::M2 >; - }; // struct ElementMembers - }; // struct L10_3Members - + /// @brief Extra options for @ref /// tutorial2::field::L10_3 field. using L10_3 = @@ -106,7 +102,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::L10_3 >; - + struct L10_4Members : public TBase::field::L10_4Members { struct ElementMembers : public TBase::field::L10_4Members::ElementMembers @@ -119,11 +115,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::L10_4Members::ElementMembers::M3 >; - }; // struct ElementMembers - }; // struct L10_4Members - + /// @brief Extra options for @ref /// tutorial2::field::L10_4 field. using L10_4 = @@ -131,7 +125,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::L10_4 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_1 field. using S6_1 = @@ -139,7 +133,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::SequenceFixedSizeUseFixedSizeStorage, typename TBase::field::S6_1 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_2 field. using S6_2 = @@ -147,7 +141,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::S6_2 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_3 field. using S6_3 = @@ -155,7 +149,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::S6_3 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_4 field. using S6_4 = @@ -163,9 +157,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::S6_4 >; - }; // struct field - + /// @brief Extra options for messages. struct message : public TBase::message { @@ -181,9 +174,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg6Fields::F5 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial2::message::Msg7 message. struct Msg7Fields : public TBase::message::Msg7Fields @@ -196,11 +188,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg7Fields::F3 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -216,7 +206,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial2::frame::FrameLayers::ID layer. using ID = @@ -224,13 +214,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::ID >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial2/include/tutorial2/options/ClientDefaultOptions.h b/tutorials/tutorial2/include/tutorial2/options/ClientDefaultOptions.h index e2d64b332..2151b29f2 100644 --- a/tutorials/tutorial2/include/tutorial2/options/ClientDefaultOptions.h +++ b/tutorials/tutorial2/include/tutorial2/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial2/include/tutorial2/options/DataViewDefaultOptions.h b/tutorials/tutorial2/include/tutorial2/options/DataViewDefaultOptions.h index 4960eb796..9e8a40268 100644 --- a/tutorials/tutorial2/include/tutorial2/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial2/include/tutorial2/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -29,9 +29,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::B8_1Members::M3 >; - }; // struct B8_1Members - + struct B8_2Members : public TBase::field::B8_2Members { /// @brief Extra options for @ref @@ -41,9 +40,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::B8_2Members::M3 >; - }; // struct B8_2Members - + /// @brief Extra options for @ref /// tutorial2::field::D7_1 field. using D7_1 = @@ -51,7 +49,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::D7_1 >; - + /// @brief Extra options for @ref /// tutorial2::field::D7_2 field. using D7_2 = @@ -59,7 +57,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::D7_2 >; - + struct L10_3Members : public TBase::field::L10_3Members { struct ElementMembers : public TBase::field::L10_3Members::ElementMembers @@ -72,11 +70,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::L10_3Members::ElementMembers::M2 >; - }; // struct ElementMembers - }; // struct L10_3Members - + struct L10_4Members : public TBase::field::L10_4Members { struct ElementMembers : public TBase::field::L10_4Members::ElementMembers @@ -89,11 +85,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::L10_4Members::ElementMembers::M3 >; - }; // struct ElementMembers - }; // struct L10_4Members - + /// @brief Extra options for @ref /// tutorial2::field::S6_1 field. using S6_1 = @@ -101,7 +95,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::S6_1 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_2 field. using S6_2 = @@ -109,7 +103,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::S6_2 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_3 field. using S6_3 = @@ -117,7 +111,7 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::S6_3 >; - + /// @brief Extra options for @ref /// tutorial2::field::S6_4 field. using S6_4 = @@ -125,9 +119,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::S6_4 >; - }; // struct field - + /// @brief Extra options for messages. struct message : public TBase::message { @@ -143,9 +136,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg6Fields::F5 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial2::message::Msg7 message. struct Msg7Fields : public TBase::message::Msg7Fields @@ -158,11 +150,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::message::Msg7Fields::F3 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -178,13 +168,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial2/include/tutorial2/options/DefaultOptions.h b/tutorials/tutorial2/include/tutorial2/options/DefaultOptions.h index 638ac393b..b09c519b2 100644 --- a/tutorials/tutorial2/include/tutorial2/options/DefaultOptions.h +++ b/tutorials/tutorial2/include/tutorial2/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -28,33 +28,31 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// tutorial2::field::B8_1Members::M3 field. using M3 = comms::option::EmptyOption; - }; // struct B8_1Members - + struct B8_2Members { /// @brief Extra options for @ref /// tutorial2::field::B8_2Members::M3 field. using M3 = comms::option::EmptyOption; - }; // struct B8_2Members - + /// @brief Extra options for @ref /// tutorial2::field::D7_1 field. using D7_1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::D7_2 field. using D7_2 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::L10_1 field. using L10_1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::L10_2 field. using L10_2 = comms::option::EmptyOption; - + struct L10_3Members { struct ElementMembers @@ -63,15 +61,13 @@ struct DefaultOptionsT : public TBase /// tutorial2::field::L10_3Members::ElementMembers::M2 /// field. using M2 = comms::option::EmptyOption; - }; // struct ElementMembers - }; // struct L10_3Members - + /// @brief Extra options for @ref /// tutorial2::field::L10_3 field. using L10_3 = comms::option::EmptyOption; - + struct L10_4Members { struct ElementMembers @@ -80,33 +76,30 @@ struct DefaultOptionsT : public TBase /// tutorial2::field::L10_4Members::ElementMembers::M3 /// field. using M3 = comms::option::EmptyOption; - }; // struct ElementMembers - }; // struct L10_4Members - + /// @brief Extra options for @ref /// tutorial2::field::L10_4 field. using L10_4 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::S6_1 field. using S6_1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::S6_2 field. using S6_2 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::S6_3 field. using S6_3 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::field::S6_4 field. using S6_4 = comms::option::EmptyOption; - }; // struct field - + /// @brief Extra options for messages. struct message { @@ -118,9 +111,8 @@ struct DefaultOptionsT : public TBase /// tutorial2::message::Msg6Fields::F5 /// field. using F5 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref tutorial2::message::Msg7 message. struct Msg7Fields @@ -129,11 +121,9 @@ struct DefaultOptionsT : public TBase /// tutorial2::message::Msg7Fields::F3 /// field. using F3 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -145,17 +135,12 @@ struct DefaultOptionsT : public TBase /// tutorial2::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial2::frame::FrameLayers::ID layer. using ID = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial2/include/tutorial2/options/ServerDefaultOptions.h b/tutorials/tutorial2/include/tutorial2/options/ServerDefaultOptions.h index 84cb8231c..a1119b204 100644 --- a/tutorials/tutorial2/include/tutorial2/options/ServerDefaultOptions.h +++ b/tutorials/tutorial2/include/tutorial2/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial20/include/tutorial20/Interface.h b/tutorials/tutorial20/include/tutorial20/Interface.h index 46cfe872d..3eef56ed1 100644 --- a/tutorials/tutorial20/include/tutorial20/Interface.h +++ b/tutorials/tutorial20/include/tutorial20/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace tutorial20 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile tutorial20/Interface.h @@ -27,8 +26,7 @@ struct InterfaceFields tutorial20::field::Version< tutorial20::options::DefaultOptions >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Version @@ -69,10 +67,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( version ); - - }; } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/InterfaceCommon.h b/tutorials/tutorial20/include/tutorial20/InterfaceCommon.h index 631f3c36c..82445a466 100644 --- a/tutorials/tutorial20/include/tutorial20/InterfaceCommon.h +++ b/tutorials/tutorial20/include/tutorial20/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace tutorial20 { - /// @brief Common types and functions for fields of /// @ref tutorial20::Interface interface. /// @see tutorial20::InterfaceFields @@ -20,8 +19,5 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref tutorial20::InterfaceFields::Version field. using VersionCommon = tutorial20::field::VersionCommon; - }; } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/MsgId.h b/tutorials/tutorial20/include/tutorial20/MsgId.h index 9fa413c4d..13c8d97b8 100644 --- a/tutorials/tutorial20/include/tutorial20/MsgId.h +++ b/tutorials/tutorial20/include/tutorial20/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -17,7 +17,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 0, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -25,4 +25,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/Version.h b/tutorials/tutorial20/include/tutorial20/Version.h index 418ee18f2..25a4ffc80 100644 --- a/tutorials/tutorial20/include/tutorial20/Version.h +++ b/tutorials/tutorial20/include/tutorial20/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial20 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchClientInputMessage.h index 25917e4be..077c64672 100644 --- a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial20::options::DefaultOptions. /// @headerfile tutorial20/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial20::options::DefaultOptions as template parameter. /// @note Defined in tutorial20/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchMessage.h b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchMessage.h index 68b101b46..c8a09fede 100644 --- a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchMessage.h +++ b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -139,7 +139,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial20::options::DefaultOptions. /// @headerfile tutorial20/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct MsgDispatcher /// @ref tutorial20::options::DefaultOptions as template parameter. /// @note Defined in tutorial20/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchServerInputMessage.h index a1ae0347c..3e26108b2 100644 --- a/tutorials/tutorial20/include/tutorial20/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial20/include/tutorial20/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -139,7 +139,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial20::options::DefaultOptions. /// @headerfile tutorial20/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial20::options::DefaultOptions as template parameter. /// @note Defined in tutorial20/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial20/include/tutorial20/field/FieldBase.h b/tutorials/tutorial20/include/tutorial20/field/FieldBase.h index 06a8695e9..0d77bfd61 100644 --- a/tutorials/tutorial20/include/tutorial20/field/FieldBase.h +++ b/tutorials/tutorial20/include/tutorial20/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/field/MsgId.h b/tutorials/tutorial20/include/tutorial20/field/MsgId.h index 0a8e6ae50..0dc6a6490 100644 --- a/tutorials/tutorial20/include/tutorial20/field/MsgId.h +++ b/tutorials/tutorial20/include/tutorial20/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial20 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial20::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial20::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial20::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial20::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial20::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial20::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial20::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial20::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial20::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial20::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/field/MsgIdCommon.h b/tutorials/tutorial20/include/tutorial20/field/MsgIdCommon.h index d4ef97d0e..70e57d2da 100644 --- a/tutorials/tutorial20/include/tutorial20/field/MsgIdCommon.h +++ b/tutorials/tutorial20/include/tutorial20/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial20/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial20 namespace field { - /// @brief Common types and functions for /// @ref tutorial20::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial20::field::MsgId field. using ValueType = tutorial20::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial20::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial20::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/field/Version.h b/tutorials/tutorial20/include/tutorial20/field/Version.h index c9ca386cc..c8002e1dd 100644 --- a/tutorials/tutorial20/include/tutorial20/field/Version.h +++ b/tutorials/tutorial20/include/tutorial20/field/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Version" field. @@ -18,7 +18,6 @@ namespace tutorial20 namespace field { - /// @brief Definition of "Version" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -41,25 +40,20 @@ class Version : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::field::VersionCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::field::VersionCommon::name(); } - - }; - } // namespace field } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/field/VersionCommon.h b/tutorials/tutorial20/include/tutorial20/field/VersionCommon.h index 60fde12f2..69355036b 100644 --- a/tutorials/tutorial20/include/tutorial20/field/VersionCommon.h +++ b/tutorials/tutorial20/include/tutorial20/field/VersionCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial20 namespace field { - /// @brief Common types and functions for /// @ref tutorial20::field::Version field. struct VersionCommon @@ -22,23 +21,20 @@ struct VersionCommon /// @brief Re-definition of the value type used by /// tutorial20::field::Version field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::field::Version field. static const char* name() { return "Version"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial20 - diff --git a/tutorials/tutorial20/include/tutorial20/frame/Frame.h b/tutorials/tutorial20/include/tutorial20/frame/Frame.h index 3e568713d..6e1b7cd45 100644 --- a/tutorials/tutorial20/include/tutorial20/frame/Frame.h +++ b/tutorials/tutorial20/include/tutorial20/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace tutorial20 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Version". using Version = comms::protocol::TransportValueLayer< @@ -50,7 +49,7 @@ struct FrameLayers Data, comms::option::def::PseudoValue >; - + /// @brief Definition of layer "Id". template using Id = @@ -63,7 +62,7 @@ struct FrameLayers Version, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -82,26 +81,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -109,11 +103,10 @@ struct FrameLayers typename SizeMembers::Field, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -152,5 +145,3 @@ class Frame : public } // namespace frame } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/frame/FrameCommon.h b/tutorials/tutorial20/include/tutorial20/frame/FrameCommon.h index 9e79cd5c8..4b340f2a9 100644 --- a/tutorials/tutorial20/include/tutorial20/frame/FrameCommon.h +++ b/tutorials/tutorial20/include/tutorial20/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial20 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial20::frame::Frame frame. /// @see tutorial20::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial20::frame::FrameLayers::SizeMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::frame::FrameLayers::SizeMembers::Field field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/input/AllMessages.h b/tutorials/tutorial20/include/tutorial20/input/AllMessages.h index ab266fe0d..654c0571d 100644 --- a/tutorials/tutorial20/include/tutorial20/input/AllMessages.h +++ b/tutorials/tutorial20/include/tutorial20/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial20/include/tutorial20/input/ClientInputMessages.h b/tutorials/tutorial20/include/tutorial20/input/ClientInputMessages.h index d89c599b7..ac31208d1 100644 --- a/tutorials/tutorial20/include/tutorial20/input/ClientInputMessages.h +++ b/tutorials/tutorial20/include/tutorial20/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial20/include/tutorial20/input/ServerInputMessages.h b/tutorials/tutorial20/include/tutorial20/input/ServerInputMessages.h index a0909cd5d..883982fe9 100644 --- a/tutorials/tutorial20/include/tutorial20/input/ServerInputMessages.h +++ b/tutorials/tutorial20/include/tutorial20/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial20/include/tutorial20/message/Connect.h b/tutorials/tutorial20/include/tutorial20/message/Connect.h index e639e5efb..d14f71e4d 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Connect.h +++ b/tutorials/tutorial20/include/tutorial20/message/Connect.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Connect" message and its fields. @@ -14,14 +14,12 @@ #include "tutorial20/message/ConnectCommon.h" #include "tutorial20/options/DefaultOptions.h" - namespace tutorial20 { namespace message { - /// @brief Fields of @ref Connect. /// @tparam TOpt Extra options /// @see @ref Connect @@ -34,8 +32,7 @@ struct ConnectFields tutorial20::field::Version< TOpt >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Version @@ -82,24 +79,20 @@ class Connect : public COMMS_MSG_FIELDS_NAMES( version ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial20::message::ConnectCommon::name(); } - - }; } // namespace message } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/message/ConnectCommon.h b/tutorials/tutorial20/include/tutorial20/message/ConnectCommon.h index b023098ff..9a7c9cb8b 100644 --- a/tutorials/tutorial20/include/tutorial20/message/ConnectCommon.h +++ b/tutorials/tutorial20/include/tutorial20/message/ConnectCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial20 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial20::message::Connect message. /// @see tutorial20::message::ConnectFields @@ -23,7 +22,6 @@ struct ConnectFieldsCommon /// @brief Common types and functions for /// @ref tutorial20::message::ConnectFields::Version field. using VersionCommon = tutorial20::field::VersionCommon; - }; /// @brief Common types and functions of @@ -35,12 +33,8 @@ struct ConnectCommon { return "Connect"; } - }; } // namespace message } // namespace tutorial20 - - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg1.h b/tutorials/tutorial20/include/tutorial20/message/Msg1.h index db1fd1d41..f2cadd09c 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg1.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial20/message/Msg1Common.h" #include "tutorial20/options/DefaultOptions.h" - namespace tutorial20 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,27 +44,23 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Inner field of @ref F2 optional. /// @deprecated Since version 4 - + class F2Field : public comms::field::IntValue< tutorial20::field::FieldBase<>, @@ -81,23 +75,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg1FieldsCommon::F2Common::name(); } - - }; - + /// @brief Definition of version dependent /// F2 field. struct F2 : public @@ -113,8 +104,7 @@ struct Msg1Fields return F2Field::name(); } }; - - + /// @brief Inner field of @ref F3 optional. class F3Field : public comms::field::IntValue< @@ -130,23 +120,20 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg1FieldsCommon::F3Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg1FieldsCommon::F3Common::name(); } - - }; - + /// @brief Definition of version dependent /// F3 field. struct F3 : public @@ -162,8 +149,7 @@ struct Msg1Fields return F3Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -216,24 +202,20 @@ class Msg1 : public f2, f3 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 2U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial20::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg1Common.h b/tutorials/tutorial20/include/tutorial20/message/Msg1Common.h index 4179a6652..7ef9f6362 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg1Common.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial20 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial20::message::Msg1 message. /// @see tutorial20::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg1Fields::F2 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg1Fields::F3 field. struct F3Common @@ -73,22 +68,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg1Fields::F3 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg1Fields::F3 field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -100,12 +92,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial20 - - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg2.h b/tutorials/tutorial20/include/tutorial20/message/Msg2.h index 36339f3c9..1ee70b978 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg2.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial20/message/Msg2Common.h" #include "tutorial20/options/DefaultOptions.h" - namespace tutorial20 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -48,44 +46,48 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial20::message::Msg2FieldsCommon::F1Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial20::message::Msg2FieldsCommon::F1Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial20::message::Msg2FieldsCommon::F1Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial20::message::Msg2FieldsCommon::F1Common::valueName(). static const char* valueName(ValueType val) { return tutorial20::message::Msg2FieldsCommon::F1Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial20::message::Msg2FieldsCommon::F1Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial20::message::Msg2FieldsCommon::F1Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial20::message::Msg2FieldsCommon::F1Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial20::message::Msg2FieldsCommon::F1Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg2FieldsCommon::F1Common::name(); } - - }; - + /// @brief Definition of version dependent /// F1 field. struct F1 : public @@ -101,8 +103,7 @@ struct Msg2Fields return F1Field::name(); } }; - - + /// @brief Inner field of @ref F2 optional. /// @see @ref tutorial20::message::Msg2FieldsCommon::F2Common::ValueType class F2Field : public @@ -123,75 +124,77 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial20::message::Msg2FieldsCommon::F2Common::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial20::message::Msg2FieldsCommon::F2Common::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial20::message::Msg2FieldsCommon::F2Common::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial20::message::Msg2FieldsCommon::F2Common::valueName(). static const char* valueName(ValueType val) { return tutorial20::message::Msg2FieldsCommon::F2Common::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial20::message::Msg2FieldsCommon::F2Common::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial20::message::Msg2FieldsCommon::F2Common::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial20::message::Msg2FieldsCommon::F2Common::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial20::message::Msg2FieldsCommon::F2Common::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg2FieldsCommon::F2Common::name(); } - + /// @brief Generated validity check functionality. bool valid() const { if (Base::valid()) { return true; } - + if (3U <= Base::getVersion()) { if (Base::getValue() == static_cast(0)) { return true; } } - + if ((4U <= Base::getVersion()) && (Base::getVersion() < 5U)) { if (Base::getValue() == static_cast(1)) { return true; } } - + if (5U <= Base::getVersion()) { if (Base::getValue() == static_cast(2)) { return true; } } - + return false; - } - - - }; - + /// @brief Definition of version dependent /// F2 field. struct F2 : public @@ -207,8 +210,7 @@ struct Msg2Fields return F2Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -257,24 +259,20 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 2U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial20::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg2Common.h b/tutorials/tutorial20/include/tutorial20/message/Msg2Common.h index d72616174..e2d02fa9e 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg2Common.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial20 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial20::message::Msg2 message. /// @see tutorial20::message::Msg2Fields @@ -35,27 +32,27 @@ struct Msg2FieldsCommon V0 = 0, ///< value @b V0. V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial20::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -63,10 +60,10 @@ struct Msg2FieldsCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -76,18 +73,15 @@ struct Msg2FieldsCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial20::message::Msg2Fields::F1 field. using F1Val = F1Common::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg2Fields::F2 field. struct F2Common @@ -99,27 +93,27 @@ struct Msg2FieldsCommon V0 = 0, ///< value @b V0. V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 2, ///< Last defined value. ValuesLimit = 3, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial20::message::Msg2Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -127,10 +121,10 @@ struct Msg2FieldsCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -140,18 +134,14 @@ struct Msg2FieldsCommon "V2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial20::message::Msg2Fields::F2 field. using F2Val = F2Common::ValueType; - - }; /// @brief Common types and functions of @@ -163,12 +153,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial20 - - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg3.h b/tutorials/tutorial20/include/tutorial20/message/Msg3.h index 9fecb0ff3..d251eb686 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg3.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial20/message/Msg3Common.h" #include "tutorial20/options/DefaultOptions.h" - namespace tutorial20 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -59,7 +57,7 @@ struct Msg3Fields B0, B1 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial20::message::Msg3FieldsCommon::F1Common::bitName(). static const char* bitName(BitIdx idx) @@ -68,17 +66,14 @@ struct Msg3Fields tutorial20::message::Msg3FieldsCommon::F1Common::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F2 field. struct F2Members @@ -98,26 +93,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg3FieldsCommon::F2MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg3FieldsCommon::F2MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F2" field. class F2 : public comms::field::Optional< @@ -136,11 +126,8 @@ struct Msg3Fields { return tutorial20::message::Msg3FieldsCommon::F2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref F3 field. struct F3Members @@ -160,26 +147,21 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg3FieldsCommon::F3MembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg3FieldsCommon::F3MembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of "F3" field. class F3 : public comms::field::Optional< @@ -198,11 +180,8 @@ struct Msg3Fields { return tutorial20::message::Msg3FieldsCommon::F3Common::name(); } - - }; - - + /// @brief Inner field of @ref F4 optional. class F4Field : public comms::field::IntValue< @@ -218,23 +197,20 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial20::message::Msg3FieldsCommon::F4Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial20::message::Msg3FieldsCommon::F4Common::name(); } - - }; - + /// @brief Definition of version dependent /// F4 field. struct F4 : public @@ -250,8 +226,7 @@ struct Msg3Fields return F4Field::name(); } }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -310,19 +285,19 @@ class Msg3 : public f3, f4 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 7U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial20::message::Msg3Common::name(); } - + /// @brief Generated read functionality. template comms::ErrorStatus doRead(TIter& iter, std::size_t len) @@ -334,22 +309,21 @@ class Msg3 : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f2(); - + es = Base::template doReadFromUntilAndUpdateLen(iter, len); if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_f3(); - + es = Base::template doReadFrom(iter, len); - } while (false); return es; } - + /// @brief Generated refresh functionality. bool doRefresh() { @@ -358,58 +332,49 @@ class Msg3 : public updated = refresh_f3() || updated; return updated; } - private: void readPrepare_f2() { refresh_f2(); - } - + void readPrepare_f3() { refresh_f3(); - } - + bool refresh_f2() { auto mode = comms::field::OptionalMode::Missing; if (field_f1().getBitValue_B0()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f2().getMode() == mode) { return false; } - + field_f2().setMode(mode); return true; - } - + bool refresh_f3() { auto mode = comms::field::OptionalMode::Missing; if (field_f1().getBitValue_B1()) { mode = comms::field::OptionalMode::Exists; } - + if (field_f3().getMode() == mode) { return false; } - + field_f3().setMode(mode); return true; - } - - }; } // namespace message } // namespace tutorial20 - - diff --git a/tutorials/tutorial20/include/tutorial20/message/Msg3Common.h b/tutorials/tutorial20/include/tutorial20/message/Msg3Common.h index a9cdb1f48..c891eb8d6 100644 --- a/tutorials/tutorial20/include/tutorial20/message/Msg3Common.h +++ b/tutorials/tutorial20/include/tutorial20/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial20 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial20::message::Msg3 message. /// @see tutorial20::message::Msg3Fields @@ -30,7 +29,7 @@ struct Msg3FieldsCommon { return "F1"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial20::message::Msg3Fields::F1 field. static const char* bitName(std::size_t idx) @@ -39,18 +38,16 @@ struct Msg3FieldsCommon "B0", "B1" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial20::message::Msg3Fields::F2 field. struct F2MembersCommon @@ -62,24 +59,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg3Fields::F2Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg3Fields::F2Members::Field field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg3Fields::F2 field. struct F2Common @@ -89,9 +83,8 @@ struct Msg3FieldsCommon { return "F2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial20::message::Msg3Fields::F3 field. struct F3MembersCommon @@ -103,24 +96,21 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg3Fields::F3Members::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg3Fields::F3Members::Field field. static const char* name() { return "F3"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg3Fields::F3 field. struct F3Common @@ -130,9 +120,8 @@ struct Msg3FieldsCommon { return "F3"; } - }; - + /// @brief Common types and functions for /// @ref tutorial20::message::Msg3Fields::F4 field. struct F4Common @@ -140,22 +129,19 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial20::message::Msg3Fields::F4 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial20::message::Msg3Fields::F4 field. static const char* name() { return "F4"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -167,12 +153,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial20 - - - diff --git a/tutorials/tutorial20/include/tutorial20/options/BareMetalDefaultOptions.h b/tutorials/tutorial20/include/tutorial20/options/BareMetalDefaultOptions.h index 336a8d652..969c855d4 100644 --- a/tutorials/tutorial20/include/tutorial20/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial20/include/tutorial20/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial20::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial20/include/tutorial20/options/ClientDefaultOptions.h b/tutorials/tutorial20/include/tutorial20/options/ClientDefaultOptions.h index 986331bcb..e2bb79919 100644 --- a/tutorials/tutorial20/include/tutorial20/options/ClientDefaultOptions.h +++ b/tutorials/tutorial20/include/tutorial20/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. @@ -28,10 +28,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Connect >; - }; // struct message - - }; /// @brief Alias to @ref ClientDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial20/include/tutorial20/options/DataViewDefaultOptions.h b/tutorials/tutorial20/include/tutorial20/options/DataViewDefaultOptions.h index 7c34e0e23..e1bb18a0e 100644 --- a/tutorials/tutorial20/include/tutorial20/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial20/include/tutorial20/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial20/include/tutorial20/options/DefaultOptions.h b/tutorials/tutorial20/include/tutorial20/options/DefaultOptions.h index 8c18f922b..2eee575a8 100644 --- a/tutorials/tutorial20/include/tutorial20/options/DefaultOptions.h +++ b/tutorials/tutorial20/include/tutorial20/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -26,9 +26,8 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// tutorial20::message::Connect message. using Connect = comms::option::EmptyOption; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -40,18 +39,13 @@ struct DefaultOptionsT : public TBase /// tutorial20::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial20::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial20/include/tutorial20/options/ServerDefaultOptions.h b/tutorials/tutorial20/include/tutorial20/options/ServerDefaultOptions.h index 3427a0f74..8ae4501bf 100644 --- a/tutorials/tutorial20/include/tutorial20/options/ServerDefaultOptions.h +++ b/tutorials/tutorial20/include/tutorial20/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. @@ -28,10 +28,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Connect >; - }; // struct message - - }; /// @brief Alias to @ref ServerDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial21/include/tutorial21/Interface.h b/tutorials/tutorial21/include/tutorial21/Interface.h index 7a47759bf..bae831bf4 100644 --- a/tutorials/tutorial21/include/tutorial21/Interface.h +++ b/tutorials/tutorial21/include/tutorial21/Interface.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Interface" interface class. @@ -16,7 +16,6 @@ namespace tutorial21 { - /// @brief Extra transport fields of @ref Interface interface class. /// @see @ref Interface /// @headerfile tutorial21/Interface.h @@ -27,8 +26,7 @@ struct InterfaceFields tutorial21::field::BasicFlags< tutorial21::options::DefaultOptions >; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< Flags @@ -67,10 +65,6 @@ class Interface : public COMMS_MSG_TRANSPORT_FIELDS_NAMES( flags ); - - }; } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/InterfaceCommon.h b/tutorials/tutorial21/include/tutorial21/InterfaceCommon.h index 542a111ce..218b25bc2 100644 --- a/tutorials/tutorial21/include/tutorial21/InterfaceCommon.h +++ b/tutorials/tutorial21/include/tutorial21/InterfaceCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -11,7 +11,6 @@ namespace tutorial21 { - /// @brief Common types and functions for fields of /// @ref tutorial21::Interface interface. /// @see tutorial21::InterfaceFields @@ -20,8 +19,5 @@ struct InterfaceFieldsCommon /// @brief Common types and functions for /// @ref tutorial21::InterfaceFields::Flags field. using FlagsCommon = tutorial21::field::BasicFlagsCommon; - }; } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/MsgId.h b/tutorials/tutorial21/include/tutorial21/MsgId.h index a6243e53e..f02b6315b 100644 --- a/tutorials/tutorial21/include/tutorial21/MsgId.h +++ b/tutorials/tutorial21/include/tutorial21/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/Version.h b/tutorials/tutorial21/include/tutorial21/Version.h index 6655af691..30a460e14 100644 --- a/tutorials/tutorial21/include/tutorial21/Version.h +++ b/tutorials/tutorial21/include/tutorial21/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial21 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchClientInputMessage.h index 1de6c3587..c9d38c3ee 100644 --- a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial21::options::DefaultOptions. /// @headerfile tutorial21/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial21::options::DefaultOptions as template parameter. /// @note Defined in tutorial21/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchMessage.h b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchMessage.h index 607ec542f..429652322 100644 --- a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchMessage.h +++ b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial21::options::DefaultOptions. /// @headerfile tutorial21/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial21::options::DefaultOptions as template parameter. /// @note Defined in tutorial21/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchServerInputMessage.h index 70d106213..3df46e552 100644 --- a/tutorials/tutorial21/include/tutorial21/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial21/include/tutorial21/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial21::options::DefaultOptions. /// @headerfile tutorial21/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial21::options::DefaultOptions as template parameter. /// @note Defined in tutorial21/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial21/include/tutorial21/field/BasicFlags.h b/tutorials/tutorial21/include/tutorial21/field/BasicFlags.h index b50c840a6..3a4f4aa5e 100644 --- a/tutorials/tutorial21/include/tutorial21/field/BasicFlags.h +++ b/tutorials/tutorial21/include/tutorial21/field/BasicFlags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Flags" field. @@ -18,7 +18,6 @@ namespace tutorial21 namespace field { - /// @brief Definition of "Flags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -39,25 +38,20 @@ class BasicFlags : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial21::field::BasicFlagsCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial21::field::BasicFlagsCommon::name(); } - - }; - } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/BasicFlagsCommon.h b/tutorials/tutorial21/include/tutorial21/field/BasicFlagsCommon.h index edda4d5b4..61007a631 100644 --- a/tutorials/tutorial21/include/tutorial21/field/BasicFlagsCommon.h +++ b/tutorials/tutorial21/include/tutorial21/field/BasicFlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial21 namespace field { - /// @brief Common types and functions for /// @ref tutorial21::field::BasicFlags field. struct BasicFlagsCommon @@ -22,23 +21,20 @@ struct BasicFlagsCommon /// @brief Re-definition of the value type used by /// tutorial21::field::BasicFlags field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial21::field::BasicFlags field. static const char* name() { return "Flags"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/FieldBase.h b/tutorials/tutorial21/include/tutorial21/field/FieldBase.h index c611fd228..a3bb5e225 100644 --- a/tutorials/tutorial21/include/tutorial21/field/FieldBase.h +++ b/tutorials/tutorial21/include/tutorial21/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/Msg1Flags.h b/tutorials/tutorial21/include/tutorial21/field/Msg1Flags.h index a9b5dbc29..bb3d4fbf9 100644 --- a/tutorials/tutorial21/include/tutorial21/field/Msg1Flags.h +++ b/tutorials/tutorial21/include/tutorial21/field/Msg1Flags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Msg1Flags" field. @@ -17,7 +17,6 @@ namespace tutorial21 namespace field { - /// @brief Definition of "Msg1Flags" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -52,7 +51,7 @@ class Msg1Flags : public B1, B2 ); - + /// @brief Retrieve name of the bit. /// @see @ref tutorial21::field::Msg1FlagsCommon::bitName(). static const char* bitName(BitIdx idx) @@ -61,18 +60,14 @@ class Msg1Flags : public tutorial21::field::Msg1FlagsCommon::bitName( static_cast(idx)); } - + /// @brief Name of the field. static const char* name() { return tutorial21::field::Msg1FlagsCommon::name(); } - - }; - } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/Msg1FlagsCommon.h b/tutorials/tutorial21/include/tutorial21/field/Msg1FlagsCommon.h index b75c0c28a..d9cd55afd 100644 --- a/tutorials/tutorial21/include/tutorial21/field/Msg1FlagsCommon.h +++ b/tutorials/tutorial21/include/tutorial21/field/Msg1FlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial21 namespace field { - /// @brief Common types and functions for /// @ref tutorial21::field::Msg1Flags field. struct Msg1FlagsCommon @@ -24,7 +23,7 @@ struct Msg1FlagsCommon { return "Msg1Flags"; } - + /// @brief Retrieve name of the bit of /// @ref tutorial21::field::Msg1Flags field. static const char* bitName(std::size_t idx) @@ -34,19 +33,16 @@ struct Msg1FlagsCommon "B1", "B2" }; - + static const std::size_t MapSize = std::extent::value; if (MapSize <= idx) { return nullptr; } - + return Map[idx]; } - - }; } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/Msg2Flags.h b/tutorials/tutorial21/include/tutorial21/field/Msg2Flags.h index 8ec7b1f4a..de29324b4 100644 --- a/tutorials/tutorial21/include/tutorial21/field/Msg2Flags.h +++ b/tutorials/tutorial21/include/tutorial21/field/Msg2Flags.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Msg2Flags" field. @@ -21,7 +21,6 @@ namespace tutorial21 namespace field { - /// @brief Scope for all the member fields of /// @ref Msg2Flags field. /// @tparam TOpt Protocol options. @@ -48,45 +47,48 @@ struct Msg2FlagsMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueName(). static const char* valueName(ValueType val) { return tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial21::field::Msg2FlagsMembersCommon::EnumMemCommon::name(); } - - }; - - + /// @brief Definition of "IntMem" field. class IntMem : public comms::field::IntValue< @@ -104,24 +106,20 @@ struct Msg2FlagsMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial21::field::Msg2FlagsMembersCommon::IntMemCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial21::field::Msg2FlagsMembersCommon::IntMemCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -162,18 +160,14 @@ class Msg2Flags : public enumMem, intMem ); - + /// @brief Name of the field. static const char* name() { return tutorial21::field::Msg2FlagsCommon::name(); } - - }; - } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/Msg2FlagsCommon.h b/tutorials/tutorial21/include/tutorial21/field/Msg2FlagsCommon.h index ab8887907..021f813ac 100644 --- a/tutorials/tutorial21/include/tutorial21/field/Msg2FlagsCommon.h +++ b/tutorials/tutorial21/include/tutorial21/field/Msg2FlagsCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include @@ -18,7 +16,6 @@ namespace tutorial21 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial21::field::Msg2Flags field. struct Msg2FlagsMembersCommon @@ -35,27 +32,27 @@ struct Msg2FlagsMembersCommon V1 = 1, ///< value @b V1. V2 = 2, ///< value @b V2. V3 = 3, ///< value @b V3. - + // --- Extra values generated for convenience --- FirstValue = 0, ///< First defined value. LastValue = 3, ///< Last defined value. ValuesLimit = 4, ///< Upper limit for defined values. }; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial21::field::Msg2FlagsMembers::EnumMem field. static const char* name() { return "EnumMem"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -63,10 +60,10 @@ struct Msg2FlagsMembersCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -77,18 +74,15 @@ struct Msg2FlagsMembersCommon "V3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Values enumerator for /// @ref tutorial21::field::Msg2FlagsMembers::EnumMem field. using EnumMemVal = EnumMemCommon::ValueType; - - + /// @brief Common types and functions for /// @ref tutorial21::field::Msg2FlagsMembers::IntMem field. struct IntMemCommon @@ -96,22 +90,19 @@ struct Msg2FlagsMembersCommon /// @brief Re-definition of the value type used by /// tutorial21::field::Msg2FlagsMembers::IntMem field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial21::field::Msg2FlagsMembers::IntMem field. static const char* name() { return "IntMem"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -123,10 +114,8 @@ struct Msg2FlagsCommon { return "Msg2Flags"; } - }; } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/MsgId.h b/tutorials/tutorial21/include/tutorial21/field/MsgId.h index 26e10ffb5..d614d54d0 100644 --- a/tutorials/tutorial21/include/tutorial21/field/MsgId.h +++ b/tutorials/tutorial21/include/tutorial21/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial21 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial21::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial21::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial21::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial21::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial21::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial21::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial21::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial21::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial21::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial21::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial21::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/field/MsgIdCommon.h b/tutorials/tutorial21/include/tutorial21/field/MsgIdCommon.h index 4018acd53..33637caac 100644 --- a/tutorials/tutorial21/include/tutorial21/field/MsgIdCommon.h +++ b/tutorials/tutorial21/include/tutorial21/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial21/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial21 namespace field { - /// @brief Common types and functions for /// @ref tutorial21::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial21::field::MsgId field. using ValueType = tutorial21::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial21::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial21::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial21 - diff --git a/tutorials/tutorial21/include/tutorial21/frame/Frame.h b/tutorials/tutorial21/include/tutorial21/frame/Frame.h index 593896740..8c011f32a 100644 --- a/tutorials/tutorial21/include/tutorial21/frame/Frame.h +++ b/tutorials/tutorial21/include/tutorial21/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace tutorial21 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Flags". using Flags = comms::protocol::TransportValueLayer< @@ -48,7 +47,7 @@ struct FrameLayers 0U, Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -61,7 +60,7 @@ struct FrameLayers Flags, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -80,26 +79,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial21::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial21::frame::FrameLayersCommon::SizeMembersCommon::FieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -107,11 +101,10 @@ struct FrameLayers typename SizeMembers::Field, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -150,5 +143,3 @@ class Frame : public } // namespace frame } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/frame/FrameCommon.h b/tutorials/tutorial21/include/tutorial21/frame/FrameCommon.h index 024e0e20d..fa6479b09 100644 --- a/tutorials/tutorial21/include/tutorial21/frame/FrameCommon.h +++ b/tutorials/tutorial21/include/tutorial21/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial21 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial21::frame::Frame frame. /// @see tutorial21::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial21::frame::FrameLayers::SizeMembers::Field field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial21::frame::FrameLayers::SizeMembers::Field field. static const char* name() { return "Size"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/input/AllMessages.h b/tutorials/tutorial21/include/tutorial21/input/AllMessages.h index b7f547823..d5e3ced66 100644 --- a/tutorials/tutorial21/include/tutorial21/input/AllMessages.h +++ b/tutorials/tutorial21/include/tutorial21/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial21/include/tutorial21/input/ClientInputMessages.h b/tutorials/tutorial21/include/tutorial21/input/ClientInputMessages.h index 4a868ba2b..d8165f6b8 100644 --- a/tutorials/tutorial21/include/tutorial21/input/ClientInputMessages.h +++ b/tutorials/tutorial21/include/tutorial21/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial21/include/tutorial21/input/ServerInputMessages.h b/tutorials/tutorial21/include/tutorial21/input/ServerInputMessages.h index c62d4d2b1..b1472efc7 100644 --- a/tutorials/tutorial21/include/tutorial21/input/ServerInputMessages.h +++ b/tutorials/tutorial21/include/tutorial21/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial21/include/tutorial21/message/Msg1.h b/tutorials/tutorial21/include/tutorial21/message/Msg1.h index 8848630f1..d1986a380 100644 --- a/tutorials/tutorial21/include/tutorial21/message/Msg1.h +++ b/tutorials/tutorial21/include/tutorial21/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial21/message/Msg1Common.h" #include "tutorial21/options/DefaultOptions.h" - namespace tutorial21 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial21::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/message/Msg1Common.h b/tutorials/tutorial21/include/tutorial21/message/Msg1Common.h index 7146fed69..6f48139de 100644 --- a/tutorials/tutorial21/include/tutorial21/message/Msg1Common.h +++ b/tutorials/tutorial21/include/tutorial21/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial21 namespace message { - /// @brief Common types and functions of /// @ref tutorial21::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial21 - - - diff --git a/tutorials/tutorial21/include/tutorial21/message/Msg2.h b/tutorials/tutorial21/include/tutorial21/message/Msg2.h index 90d54c148..65cf64b69 100644 --- a/tutorials/tutorial21/include/tutorial21/message/Msg2.h +++ b/tutorials/tutorial21/include/tutorial21/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial21/message/Msg2Common.h" #include "tutorial21/options/DefaultOptions.h" - namespace tutorial21 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial21::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial21 - - diff --git a/tutorials/tutorial21/include/tutorial21/message/Msg2Common.h b/tutorials/tutorial21/include/tutorial21/message/Msg2Common.h index 9a112110e..21fe8e061 100644 --- a/tutorials/tutorial21/include/tutorial21/message/Msg2Common.h +++ b/tutorials/tutorial21/include/tutorial21/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial21 namespace message { - /// @brief Common types and functions of /// @ref tutorial21::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial21 - - - diff --git a/tutorials/tutorial21/include/tutorial21/options/BareMetalDefaultOptions.h b/tutorials/tutorial21/include/tutorial21/options/BareMetalDefaultOptions.h index d4b2b512c..408e50106 100644 --- a/tutorials/tutorial21/include/tutorial21/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial21/include/tutorial21/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial21::frame::FrameLayers::Id /// layer. @@ -47,13 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial21/include/tutorial21/options/ClientDefaultOptions.h b/tutorials/tutorial21/include/tutorial21/options/ClientDefaultOptions.h index 989f07d62..69fb10aa4 100644 --- a/tutorials/tutorial21/include/tutorial21/options/ClientDefaultOptions.h +++ b/tutorials/tutorial21/include/tutorial21/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial21/include/tutorial21/options/DataViewDefaultOptions.h b/tutorials/tutorial21/include/tutorial21/options/DataViewDefaultOptions.h index 2cacdec11..8e8bba400 100644 --- a/tutorials/tutorial21/include/tutorial21/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial21/include/tutorial21/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial21/include/tutorial21/options/DefaultOptions.h b/tutorials/tutorial21/include/tutorial21/options/DefaultOptions.h index 9f6e06576..cc2a25a6a 100644 --- a/tutorials/tutorial21/include/tutorial21/options/DefaultOptions.h +++ b/tutorials/tutorial21/include/tutorial21/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,18 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial21::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial21::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial21/include/tutorial21/options/ServerDefaultOptions.h b/tutorials/tutorial21/include/tutorial21/options/ServerDefaultOptions.h index 575e27374..5141c672e 100644 --- a/tutorials/tutorial21/include/tutorial21/options/ServerDefaultOptions.h +++ b/tutorials/tutorial21/include/tutorial21/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial22/include/tutorial22/Message.h b/tutorials/tutorial22/include/tutorial22/Message.h index 4d1d0f571..43548afc9 100644 --- a/tutorials/tutorial22/include/tutorial22/Message.h +++ b/tutorials/tutorial22/include/tutorial22/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial22 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial22/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial22 - - diff --git a/tutorials/tutorial22/include/tutorial22/MsgId.h b/tutorials/tutorial22/include/tutorial22/MsgId.h index 2959b6a73..6eccccb08 100644 --- a/tutorials/tutorial22/include/tutorial22/MsgId.h +++ b/tutorials/tutorial22/include/tutorial22/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/Version.h b/tutorials/tutorial22/include/tutorial22/Version.h index 17a28fb85..52b0415bb 100644 --- a/tutorials/tutorial22/include/tutorial22/Version.h +++ b/tutorials/tutorial22/include/tutorial22/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial22 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchClientInputMessage.h index d1ade57f7..1ef2af9e0 100644 --- a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial22::options::DefaultOptions. /// @headerfile tutorial22/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial22::options::DefaultOptions as template parameter. /// @note Defined in tutorial22/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchMessage.h b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchMessage.h index 4aef61cfc..8ae907c9f 100644 --- a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchMessage.h +++ b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -124,7 +124,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial22::options::DefaultOptions. /// @headerfile tutorial22/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct MsgDispatcher /// @ref tutorial22::options::DefaultOptions as template parameter. /// @note Defined in tutorial22/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchServerInputMessage.h index dfc173abb..71bc2154a 100644 --- a/tutorials/tutorial22/include/tutorial22/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial22/include/tutorial22/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial22::options::DefaultOptions. /// @headerfile tutorial22/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial22::options::DefaultOptions as template parameter. /// @note Defined in tutorial22/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial22/include/tutorial22/field/FieldBase.h b/tutorials/tutorial22/include/tutorial22/field/FieldBase.h index cb3a066d4..d6c6de3b7 100644 --- a/tutorials/tutorial22/include/tutorial22/field/FieldBase.h +++ b/tutorials/tutorial22/include/tutorial22/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/Length.h b/tutorials/tutorial22/include/tutorial22/field/Length.h index 1da52530a..0dc90bc88 100644 --- a/tutorials/tutorial22/include/tutorial22/field/Length.h +++ b/tutorials/tutorial22/include/tutorial22/field/Length.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Length" field. @@ -21,7 +21,6 @@ namespace tutorial22 namespace field { - /// @brief Scope for all the member fields of /// @ref Length field. /// @tparam TOpt Protocol options. @@ -43,57 +42,53 @@ struct LengthMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = tutorial22::field::LengthMembersCommon::ShortCommon::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = tutorial22::field::LengthMembersCommon::ShortCommon::SpecialNamesMapInfo; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::LengthMembersCommon::ShortCommon::hasSpecials(); } - + /// @brief Special value "LongForm". /// @see @ref tutorial22::field::LengthMembersCommon::ShortCommon::valueLongForm(). static constexpr ValueType valueLongForm() { return tutorial22::field::LengthMembersCommon::ShortCommon::valueLongForm(); } - + /// @brief Check the value is equal to special @ref valueLongForm(). bool isLongForm() const { return Base::getValue() == valueLongForm(); } - + /// @brief Assign special value @ref valueLongForm() to the field. void setLongForm() { Base::setValue(valueLongForm()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return tutorial22::field::LengthMembersCommon::ShortCommon::specialNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::LengthMembersCommon::ShortCommon::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Long field. struct LongMembers @@ -113,26 +108,21 @@ struct LengthMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::LengthMembersCommon::LongMembersCommon::ActLongCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::LengthMembersCommon::LongMembersCommon::ActLongCommon::name(); } - - }; - - }; - + /// @brief Definition of "Long" field. class Long : public comms::field::Optional< @@ -151,11 +141,8 @@ struct LengthMembers { return tutorial22::field::LengthMembersCommon::LongCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -200,25 +187,24 @@ class Length : public short, long ); - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::LengthCommon::name(); } - + /// @brief Get length value std::size_t getValue() const { if (!field_short().isLongForm()) { return static_cast(field_short().value()); } - + COMMS_ASSERT(field_long().doesExist()); // Make sure the field in the consistent state return static_cast(field_long().field().value()); } - + /// @brief Set length value void setValue(std::size_t val) { @@ -227,18 +213,18 @@ class Length : public field_long().setMissing(); return; } - + field_short().setLongForm(); field_long().field().setValue(val); field_long().setExists(); } - + /// @brief Maximal possible length value static constexpr std::size_t maxValue() { return std::numeric_limits::max(); } - + /// @brief Generated read functionality. template comms::ErrorStatus read(TIter& iter, std::size_t len) @@ -249,55 +235,44 @@ class Length : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_long(); - + es = Base::template readFrom(iter, len); - } while(false); return es; } - - + /// @brief Generated refresh functionality. bool refresh() { bool updated = Base::refresh(); updated = refresh_long() || updated; return updated; - } - - private: void readPrepare_long() { refresh_long(); - } - + bool refresh_long() { auto mode = comms::field::OptionalMode::Missing; if (field_short().getValue() == static_cast(255U)) { mode = comms::field::OptionalMode::Exists; } - + if (field_long().getMode() == mode) { return false; } - + field_long().setMode(mode); return true; - } - - }; - } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/LengthCommon.h b/tutorials/tutorial22/include/tutorial22/field/LengthCommon.h index b22941386..50620063c 100644 --- a/tutorials/tutorial22/include/tutorial22/field/LengthCommon.h +++ b/tutorials/tutorial22/include/tutorial22/field/LengthCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial22 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial22::field::Length field. struct LengthMembersCommon @@ -28,34 +27,33 @@ struct LengthMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::LengthMembers::Short field. using ValueType = std::uint8_t; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial22::field::LengthMembers::Short field. static const char* name() { return "Short"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "LongForm". static constexpr ValueType valueLongForm() { return static_cast(255); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -63,13 +61,11 @@ struct LengthMembersCommon std::make_pair(valueLongForm(), "LongForm") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial22::field::LengthMembers::Long field. struct LongMembersCommon @@ -81,24 +77,21 @@ struct LengthMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::LengthMembers::LongMembers::ActLong field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial22::field::LengthMembers::LongMembers::ActLong field. static const char* name() { return "ActLong"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::LengthMembers::Long field. struct LongCommon @@ -108,9 +101,7 @@ struct LengthMembersCommon { return "Long"; } - }; - }; /// @brief Common types and functions for @@ -122,10 +113,8 @@ struct LengthCommon { return "Length"; } - }; } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/MsgId.h b/tutorials/tutorial22/include/tutorial22/field/MsgId.h index 9cb5f5763..644215163 100644 --- a/tutorials/tutorial22/include/tutorial22/field/MsgId.h +++ b/tutorials/tutorial22/include/tutorial22/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial22 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial22::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial22::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial22::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial22::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial22::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial22::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial22::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial22::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial22::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial22::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/MsgIdCommon.h b/tutorials/tutorial22/include/tutorial22/field/MsgIdCommon.h index 2252dccec..e1e59bfb4 100644 --- a/tutorials/tutorial22/include/tutorial22/field/MsgIdCommon.h +++ b/tutorials/tutorial22/include/tutorial22/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial22/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial22 namespace field { - /// @brief Common types and functions for /// @ref tutorial22::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial22::field::MsgId field. using ValueType = tutorial22::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial22::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial22::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/TlvProp.h b/tutorials/tutorial22/include/tutorial22/field/TlvProp.h index 4478af429..e00f60d7e 100644 --- a/tutorials/tutorial22/include/tutorial22/field/TlvProp.h +++ b/tutorials/tutorial22/include/tutorial22/field/TlvProp.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "TlvProp" field. @@ -26,7 +26,6 @@ namespace tutorial22 namespace field { - /// @brief Scope for all the member fields of /// @ref TlvProp field. /// @tparam TOpt Protocol options. @@ -58,20 +57,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::TlvPropMembersCommon::Prop1MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::Prop1MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -81,21 +79,15 @@ struct TlvPropMembers }; Base::setValue(0); return true; - } - - - }; - - + /// @brief Definition of "Length" field. using Length = tutorial22::field::Length< TOpt >; - - + /// @brief Definition of "Val" field. class Val : public comms::field::IntValue< @@ -113,24 +105,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::TlvPropMembersCommon::Prop1MembersCommon::ValCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::Prop1MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -139,7 +127,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop1" field. class Prop1 : public comms::field::Bundle< @@ -172,18 +160,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::Prop1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop2 field. struct Prop2Members @@ -211,20 +195,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::TlvPropMembersCommon::Prop2MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::Prop2MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -234,21 +217,15 @@ struct TlvPropMembers }; Base::setValue(2); return true; - } - - - }; - - + /// @brief Definition of "Length" field. using Length = tutorial22::field::Length< TOpt >; - - + /// @brief Definition of "Val" field. class Val : public comms::field::String< @@ -267,11 +244,8 @@ struct TlvPropMembers { return tutorial22::field::TlvPropMembersCommon::Prop2MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -280,7 +254,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop2" field. class Prop2 : public comms::field::Bundle< @@ -313,18 +287,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::Prop2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Any field. struct AnyMembers @@ -344,24 +314,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::name(); } - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -377,24 +343,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::ArrayList< @@ -415,11 +377,8 @@ struct TlvPropMembers { return tutorial22::field::TlvPropMembersCommon::AnyMembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -428,7 +387,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Any" field. class Any : public comms::field::Bundle< @@ -461,18 +420,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropMembersCommon::AnyCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -493,7 +448,9 @@ class TlvProp : public tutorial22::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh > { using Base = @@ -501,7 +458,9 @@ class TlvProp : public tutorial22::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh >; public: /// @brief Allow access to internal fields. @@ -524,7 +483,7 @@ class TlvProp : public prop2, any ); - + /// @brief Optimized currFieldExec functionality. /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -548,7 +507,7 @@ class TlvProp : public break; } } - + /// @brief Optimized currFieldExec functionality (const variant). /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -572,13 +531,13 @@ class TlvProp : public break; } } - + /// @brief Name of the field. static const char* name() { return tutorial22::field::TlvPropCommon::name(); } - + COMMS_MSVC_WARNING_PUSH COMMS_MSVC_WARNING_DISABLE(4702) /// @brief Generated read functionality. @@ -592,17 +551,17 @@ class TlvProp : public comms::option::def::FailOnInvalid<> >; CommonKeyField commonKeyField; - + auto origIter = iter; auto es = commonKeyField.read(iter, len); if (es != comms::ErrorStatus::Success) { return es; } - + auto consumedLen = static_cast(std::distance(origIter, iter)); COMMS_ASSERT(consumedLen <= len); len -= consumedLen; - + switch (commonKeyField.getValue()) { case 0U /* 0x00U */: { @@ -620,13 +579,63 @@ class TlvProp : public initField_any().field_key().setValue(commonKeyField.getValue()); return accessField_any().template readFrom<1>(iter, len); }; - + return comms::ErrorStatus::InvalidMsgData; - } COMMS_MSVC_WARNING_POP - - + + /// @brief Generated write functionality. + template + comms::ErrorStatus write(TIter& iter, std::size_t len) const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().write(iter, len); + case FieldIdx_prop2: return accessField_prop2().write(iter, len); + case FieldIdx_any: return accessField_any().write(iter, len); + default: break; + } + + return comms::ErrorStatus::Success; + } + + /// @brief Generated refresh functionality. + bool refresh() + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().refresh(); + case FieldIdx_prop2: return accessField_prop2().refresh(); + case FieldIdx_any: return accessField_any().refresh(); + default: break; + } + + return false; + } + + /// @brief Generated length functionality. + std::size_t length() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().length(); + case FieldIdx_prop2: return accessField_prop2().length(); + case FieldIdx_any: return accessField_any().length(); + default: break; + } + + return 0U; + } + + /// @brief Generated validity check functionality. + bool valid() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().valid(); + case FieldIdx_prop2: return accessField_prop2().valid(); + case FieldIdx_any: return accessField_any().valid(); + default: break; + } + + return false; + } private: template @@ -638,12 +647,8 @@ class TlvProp : public func.template operator()(std::forward(f)); // All other compilers #endif // #ifdef _MSC_VER } - - }; - } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/field/TlvPropCommon.h b/tutorials/tutorial22/include/tutorial22/field/TlvPropCommon.h index e1570bedf..7ade10ba2 100644 --- a/tutorials/tutorial22/include/tutorial22/field/TlvPropCommon.h +++ b/tutorials/tutorial22/include/tutorial22/field/TlvPropCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial22 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial22::field::TlvProp field. struct TlvPropMembersCommon @@ -31,30 +30,28 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::TlvPropMembers::Prop1Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial22::field::TlvPropMembers::Prop1Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial22::field::TlvPropMembers::Prop1Members::Length field. using LengthMembersCommon = tutorial22::field::LengthMembersCommon; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop1Members::Length field. using LengthCommon = tutorial22::field::LengthCommon; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop1Members::Val field. struct ValCommon @@ -62,24 +59,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::TlvPropMembers::Prop1Members::Val field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial22::field::TlvPropMembers::Prop1Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop1 field. struct Prop1Common @@ -89,9 +83,8 @@ struct TlvPropMembersCommon { return "Prop1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial22::field::TlvPropMembers::Prop2 field. struct Prop2MembersCommon @@ -103,30 +96,28 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::TlvPropMembers::Prop2Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial22::field::TlvPropMembers::Prop2Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial22::field::TlvPropMembers::Prop2Members::Length field. using LengthMembersCommon = tutorial22::field::LengthMembersCommon; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop2Members::Length field. using LengthCommon = tutorial22::field::LengthCommon; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop2Members::Val field. struct ValCommon @@ -136,11 +127,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Prop2 field. struct Prop2Common @@ -150,9 +139,8 @@ struct TlvPropMembersCommon { return "Prop2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial22::field::TlvPropMembers::Any field. struct AnyMembersCommon @@ -164,22 +152,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::TlvPropMembers::AnyMembers::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial22::field::TlvPropMembers::AnyMembers::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::AnyMembers::Length field. struct LengthCommon @@ -187,22 +173,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial22::field::TlvPropMembers::AnyMembers::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial22::field::TlvPropMembers::AnyMembers::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::AnyMembers::Val field. struct ValCommon @@ -212,11 +196,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial22::field::TlvPropMembers::Any field. struct AnyCommon @@ -226,9 +208,7 @@ struct TlvPropMembersCommon { return "Any"; } - }; - }; /// @brief Common types and functions for @@ -240,10 +220,8 @@ struct TlvPropCommon { return "TlvProp"; } - }; } // namespace field } // namespace tutorial22 - diff --git a/tutorials/tutorial22/include/tutorial22/frame/Frame.h b/tutorials/tutorial22/include/tutorial22/frame/Frame.h index c3aaecdc6..f306ca247 100644 --- a/tutorials/tutorial22/include/tutorial22/frame/Frame.h +++ b/tutorials/tutorial22/include/tutorial22/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace tutorial22 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -51,7 +50,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Definition of layer "Size". template using Size = @@ -61,7 +60,7 @@ struct FrameLayers >, Id >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -84,26 +83,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial22::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial22::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -111,11 +105,10 @@ struct FrameLayers typename SyncMembers::SyncField, Size >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -154,5 +147,3 @@ class Frame : public } // namespace frame } // namespace tutorial22 - - diff --git a/tutorials/tutorial22/include/tutorial22/frame/FrameCommon.h b/tutorials/tutorial22/include/tutorial22/frame/FrameCommon.h index e2e945854..82e30a6d9 100644 --- a/tutorials/tutorial22/include/tutorial22/frame/FrameCommon.h +++ b/tutorials/tutorial22/include/tutorial22/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial22 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial22::frame::Frame frame. /// @see tutorial22::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial22::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial22::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial22 - - diff --git a/tutorials/tutorial22/include/tutorial22/input/AllMessages.h b/tutorials/tutorial22/include/tutorial22/input/AllMessages.h index 332eb72fa..b171c72f0 100644 --- a/tutorials/tutorial22/include/tutorial22/input/AllMessages.h +++ b/tutorials/tutorial22/include/tutorial22/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial22/include/tutorial22/input/ClientInputMessages.h b/tutorials/tutorial22/include/tutorial22/input/ClientInputMessages.h index e8d37a4b5..18f2bd366 100644 --- a/tutorials/tutorial22/include/tutorial22/input/ClientInputMessages.h +++ b/tutorials/tutorial22/include/tutorial22/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial22/include/tutorial22/input/ServerInputMessages.h b/tutorials/tutorial22/include/tutorial22/input/ServerInputMessages.h index d16e423f9..91a1fe359 100644 --- a/tutorials/tutorial22/include/tutorial22/input/ServerInputMessages.h +++ b/tutorials/tutorial22/include/tutorial22/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial22/include/tutorial22/message/Msg1.h b/tutorials/tutorial22/include/tutorial22/message/Msg1.h index 20ffa7304..d7aa9786a 100644 --- a/tutorials/tutorial22/include/tutorial22/message/Msg1.h +++ b/tutorials/tutorial22/include/tutorial22/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial22/message/Msg1Common.h" #include "tutorial22/options/DefaultOptions.h" - namespace tutorial22 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -50,11 +48,8 @@ struct Msg1Fields { return tutorial22::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -99,22 +94,18 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial22::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial22 - - diff --git a/tutorials/tutorial22/include/tutorial22/message/Msg1Common.h b/tutorials/tutorial22/include/tutorial22/message/Msg1Common.h index ed162a3c6..aacc5515f 100644 --- a/tutorials/tutorial22/include/tutorial22/message/Msg1Common.h +++ b/tutorials/tutorial22/include/tutorial22/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial22 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial22::message::Msg1 message. /// @see tutorial22::message::Msg1Fields @@ -27,9 +26,7 @@ struct Msg1FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial22 - - - diff --git a/tutorials/tutorial22/include/tutorial22/options/BareMetalDefaultOptions.h b/tutorials/tutorial22/include/tutorial22/options/BareMetalDefaultOptions.h index ac943aaf5..1f2ced4f0 100644 --- a/tutorials/tutorial22/include/tutorial22/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial22/include/tutorial22/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,9 +38,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::Prop2Members::Val >; - }; // struct Prop2Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -51,13 +50,10 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message : public TBase::message { @@ -73,11 +69,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg1Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -93,7 +87,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial22::frame::FrameLayers::Id /// layer. @@ -102,13 +96,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial22/include/tutorial22/options/ClientDefaultOptions.h b/tutorials/tutorial22/include/tutorial22/options/ClientDefaultOptions.h index 8301609f9..00af1e8d0 100644 --- a/tutorials/tutorial22/include/tutorial22/options/ClientDefaultOptions.h +++ b/tutorials/tutorial22/include/tutorial22/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial22/include/tutorial22/options/DataViewDefaultOptions.h b/tutorials/tutorial22/include/tutorial22/options/DataViewDefaultOptions.h index 5f2473053..63bbade7a 100644 --- a/tutorials/tutorial22/include/tutorial22/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial22/include/tutorial22/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,9 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::Prop2Members::Val >; - }; // struct Prop2Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -45,13 +44,10 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -67,13 +63,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial22/include/tutorial22/options/DefaultOptions.h b/tutorials/tutorial22/include/tutorial22/options/DefaultOptions.h index bdf47e846..0580b2370 100644 --- a/tutorials/tutorial22/include/tutorial22/options/DefaultOptions.h +++ b/tutorials/tutorial22/include/tutorial22/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,22 +31,18 @@ struct DefaultOptionsT : public TBase /// tutorial22::field::TlvPropMembers::Prop2Members::Val /// field. using Val = comms::option::EmptyOption; - }; // struct Prop2Members - + struct AnyMembers { /// @brief Extra options for @ref /// tutorial22::field::TlvPropMembers::AnyMembers::Val /// field. using Val = comms::option::EmptyOption; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message { @@ -58,11 +54,9 @@ struct DefaultOptionsT : public TBase /// tutorial22::message::Msg1Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -74,18 +68,13 @@ struct DefaultOptionsT : public TBase /// tutorial22::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial22::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial22/include/tutorial22/options/ServerDefaultOptions.h b/tutorials/tutorial22/include/tutorial22/options/ServerDefaultOptions.h index 6b0424492..4ae3e92fc 100644 --- a/tutorials/tutorial22/include/tutorial22/options/ServerDefaultOptions.h +++ b/tutorials/tutorial22/include/tutorial22/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial23/include/t23_ext/Version.h b/tutorials/tutorial23/include/t23_ext/Version.h index 5c6086776..bc1c16649 100644 --- a/tutorials/tutorial23/include/t23_ext/Version.h +++ b/tutorials/tutorial23/include/t23_ext/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace t23_ext // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial23/include/t23_ext/field/FieldBase.h b/tutorials/tutorial23/include/t23_ext/field/FieldBase.h index c9ebdb8a9..533ad761c 100644 --- a/tutorials/tutorial23/include/t23_ext/field/FieldBase.h +++ b/tutorials/tutorial23/include/t23_ext/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace t23_ext - diff --git a/tutorials/tutorial23/include/t23_ext/ns1/field/I1.h b/tutorials/tutorial23/include/t23_ext/ns1/field/I1.h index 9eb012200..c6491344f 100644 --- a/tutorials/tutorial23/include/t23_ext/ns1/field/I1.h +++ b/tutorials/tutorial23/include/t23_ext/ns1/field/I1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I1" field. @@ -21,7 +21,6 @@ namespace ns1 namespace field { - /// @brief Definition of "I1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -42,60 +41,55 @@ class I1 : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = t23_ext::ns1::field::I1Common::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = t23_ext::ns1::field::I1Common::SpecialNamesMapInfo; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return t23_ext::ns1::field::I1Common::hasSpecials(); } - + /// @brief Special value "S1". /// @see @ref t23_ext::ns1::field::I1Common::valueS1(). static constexpr ValueType valueS1() { return t23_ext::ns1::field::I1Common::valueS1(); } - + /// @brief Check the value is equal to special @ref valueS1(). bool isS1() const { return Base::getValue() == valueS1(); } - + /// @brief Assign special value @ref valueS1() to the field. void setS1() { Base::setValue(valueS1()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return t23_ext::ns1::field::I1Common::specialNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return t23_ext::ns1::field::I1Common::name(); } - - }; - } // namespace field } // namespace ns1 } // namespace t23_ext - diff --git a/tutorials/tutorial23/include/t23_ext/ns1/field/I1Common.h b/tutorials/tutorial23/include/t23_ext/ns1/field/I1Common.h index fe30585ae..5e2a77ade 100644 --- a/tutorials/tutorial23/include/t23_ext/ns1/field/I1Common.h +++ b/tutorials/tutorial23/include/t23_ext/ns1/field/I1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -19,7 +19,6 @@ namespace ns1 namespace field { - /// @brief Common types and functions for /// @ref t23_ext::ns1::field::I1 field. struct I1Common @@ -27,34 +26,33 @@ struct I1Common /// @brief Re-definition of the value type used by /// t23_ext::ns1::field::I1 field. using ValueType = std::uint16_t; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref t23_ext::ns1::field::I1 field. static const char* name() { return "I1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "S1". static constexpr ValueType valueS1() { return static_cast(255); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -62,11 +60,9 @@ struct I1Common std::make_pair(valueS1(), "S1") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; } // namespace field @@ -74,4 +70,3 @@ struct I1Common } // namespace ns1 } // namespace t23_ext - diff --git a/tutorials/tutorial23/include/t23_ext/ns1/field/S1.h b/tutorials/tutorial23/include/t23_ext/ns1/field/S1.h index 12257de1c..4b0bee385 100644 --- a/tutorials/tutorial23/include/t23_ext/ns1/field/S1.h +++ b/tutorials/tutorial23/include/t23_ext/ns1/field/S1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "S1" field. @@ -22,7 +22,6 @@ namespace ns1 namespace field { - /// @brief Scope for all the member fields of /// @ref S1 field. /// @tparam TOpt Protocol options. @@ -44,24 +43,19 @@ struct S1Members public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return t23_ext::ns1::field::S1MembersCommon::LengthPrefixCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return t23_ext::ns1::field::S1MembersCommon::LengthPrefixCommon::name(); } - - }; - - }; /// @brief Definition of "S1" field. @@ -89,14 +83,10 @@ class S1 : public { return t23_ext::ns1::field::S1Common::name(); } - - }; - } // namespace field } // namespace ns1 } // namespace t23_ext - diff --git a/tutorials/tutorial23/include/t23_ext/ns1/field/S1Common.h b/tutorials/tutorial23/include/t23_ext/ns1/field/S1Common.h index 57d74a373..d91ac3d97 100644 --- a/tutorials/tutorial23/include/t23_ext/ns1/field/S1Common.h +++ b/tutorials/tutorial23/include/t23_ext/ns1/field/S1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -17,7 +17,6 @@ namespace ns1 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref t23_ext::ns1::field::S1 field. struct S1MembersCommon @@ -29,22 +28,19 @@ struct S1MembersCommon /// @brief Re-definition of the value type used by /// t23_ext::ns1::field::S1Members::LengthPrefix field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref t23_ext::ns1::field::S1Members::LengthPrefix field. static const char* name() { return "LengthPrefix"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions for @@ -56,7 +52,6 @@ struct S1Common { return "S1"; } - }; } // namespace field @@ -64,4 +59,3 @@ struct S1Common } // namespace ns1 } // namespace t23_ext - diff --git a/tutorials/tutorial23/include/t23_ext/options/BareMetalDefaultOptions.h b/tutorials/tutorial23/include/t23_ext/options/BareMetalDefaultOptions.h index 5d47611e6..1b2088f77 100644 --- a/tutorials/tutorial23/include/t23_ext/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial23/include/t23_ext/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,13 +38,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::t23_ext::ns1::field::S1 >; - }; // struct field - }; // struct ns1 - }; // struct t23_ext - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial23/include/t23_ext/options/ClientDefaultOptions.h b/tutorials/tutorial23/include/t23_ext/options/ClientDefaultOptions.h index 7bd78438a..ae18fd180 100644 --- a/tutorials/tutorial23/include/t23_ext/options/ClientDefaultOptions.h +++ b/tutorials/tutorial23/include/t23_ext/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial23/include/t23_ext/options/DataViewDefaultOptions.h b/tutorials/tutorial23/include/t23_ext/options/DataViewDefaultOptions.h index 68df43473..81eeb913f 100644 --- a/tutorials/tutorial23/include/t23_ext/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial23/include/t23_ext/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::t23_ext::ns1::field::S1 >; - }; // struct field - }; // struct ns1 - }; // struct t23_ext - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial23/include/t23_ext/options/DefaultOptions.h b/tutorials/tutorial23/include/t23_ext/options/DefaultOptions.h index f389cc60f..fa2c9ac07 100644 --- a/tutorials/tutorial23/include/t23_ext/options/DefaultOptions.h +++ b/tutorials/tutorial23/include/t23_ext/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,13 +31,9 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// t23_ext::ns1::field::S1 field. using S1 = comms::option::EmptyOption; - }; // struct field - }; // struct ns1 - }; // struct t23_ext - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial23/include/t23_ext/options/ServerDefaultOptions.h b/tutorials/tutorial23/include/t23_ext/options/ServerDefaultOptions.h index dfb95ad55..d7e79f4da 100644 --- a/tutorials/tutorial23/include/t23_ext/options/ServerDefaultOptions.h +++ b/tutorials/tutorial23/include/t23_ext/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial23/include/tutorial23/Message.h b/tutorials/tutorial23/include/tutorial23/Message.h index 41ac6a4a6..8ae8d7b65 100644 --- a/tutorials/tutorial23/include/tutorial23/Message.h +++ b/tutorials/tutorial23/include/tutorial23/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial23 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial23/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial23 - - diff --git a/tutorials/tutorial23/include/tutorial23/MsgId.h b/tutorials/tutorial23/include/tutorial23/MsgId.h index 4e92b5153..a47cfd1b4 100644 --- a/tutorials/tutorial23/include/tutorial23/MsgId.h +++ b/tutorials/tutorial23/include/tutorial23/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/Version.h b/tutorials/tutorial23/include/tutorial23/Version.h index 33541786c..53c3feee7 100644 --- a/tutorials/tutorial23/include/tutorial23/Version.h +++ b/tutorials/tutorial23/include/tutorial23/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial23 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchClientInputMessage.h index 708676d5f..a4a077cf8 100644 --- a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial23::options::DefaultOptions. /// @headerfile tutorial23/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial23::options::DefaultOptions as template parameter. /// @note Defined in tutorial23/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchMessage.h b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchMessage.h index 0855f724b..5f73d0491 100644 --- a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchMessage.h +++ b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -124,7 +124,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial23::options::DefaultOptions. /// @headerfile tutorial23/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct MsgDispatcher /// @ref tutorial23::options::DefaultOptions as template parameter. /// @note Defined in tutorial23/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchServerInputMessage.h index d183887a1..faa1d29e6 100644 --- a/tutorials/tutorial23/include/tutorial23/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial23/include/tutorial23/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -124,7 +124,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial23::options::DefaultOptions. /// @headerfile tutorial23/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -184,9 +184,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial23::options::DefaultOptions as template parameter. /// @note Defined in tutorial23/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial23/include/tutorial23/field/FieldBase.h b/tutorials/tutorial23/include/tutorial23/field/FieldBase.h index 3c6730028..a471becd1 100644 --- a/tutorials/tutorial23/include/tutorial23/field/FieldBase.h +++ b/tutorials/tutorial23/include/tutorial23/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/I1.h b/tutorials/tutorial23/include/tutorial23/field/I1.h index b0b4c7d93..f8d938809 100644 --- a/tutorials/tutorial23/include/tutorial23/field/I1.h +++ b/tutorials/tutorial23/include/tutorial23/field/I1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "I1" field. @@ -17,7 +17,6 @@ namespace tutorial23 namespace field { - /// @brief Definition of "I1" field. /// @tparam TOpt Protocol options. /// @tparam TExtraOpts Extra options. @@ -28,8 +27,6 @@ using I1 = TExtraOpts... >; - } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/I1Common.h b/tutorials/tutorial23/include/tutorial23/field/I1Common.h index 36e6d5666..47f0229e8 100644 --- a/tutorials/tutorial23/include/tutorial23/field/I1Common.h +++ b/tutorials/tutorial23/include/tutorial23/field/I1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial23 namespace field { - /// @brief Common types and functions for /// @ref tutorial23::field::I1 field. using I1Common = t23_ext::ns1::field::I1Common; @@ -22,4 +21,3 @@ using I1Common = t23_ext::ns1::field::I1Common; } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/Length.h b/tutorials/tutorial23/include/tutorial23/field/Length.h index 342e99064..42d5b0d72 100644 --- a/tutorials/tutorial23/include/tutorial23/field/Length.h +++ b/tutorials/tutorial23/include/tutorial23/field/Length.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Length" field. @@ -21,7 +21,6 @@ namespace tutorial23 namespace field { - /// @brief Scope for all the member fields of /// @ref Length field. /// @tparam TOpt Protocol options. @@ -43,57 +42,53 @@ struct LengthMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single special value name info entry. using SpecialNameInfo = tutorial23::field::LengthMembersCommon::ShortCommon::SpecialNameInfo; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = tutorial23::field::LengthMembersCommon::ShortCommon::SpecialNamesMapInfo; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial23::field::LengthMembersCommon::ShortCommon::hasSpecials(); } - + /// @brief Special value "LongForm". /// @see @ref tutorial23::field::LengthMembersCommon::ShortCommon::valueLongForm(). static constexpr ValueType valueLongForm() { return tutorial23::field::LengthMembersCommon::ShortCommon::valueLongForm(); } - + /// @brief Check the value is equal to special @ref valueLongForm(). bool isLongForm() const { return Base::getValue() == valueLongForm(); } - + /// @brief Assign special value @ref valueLongForm() to the field. void setLongForm() { Base::setValue(valueLongForm()); } - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { return tutorial23::field::LengthMembersCommon::ShortCommon::specialNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial23::field::LengthMembersCommon::ShortCommon::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Long field. struct LongMembers @@ -113,26 +108,21 @@ struct LengthMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial23::field::LengthMembersCommon::LongMembersCommon::ActLongCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial23::field::LengthMembersCommon::LongMembersCommon::ActLongCommon::name(); } - - }; - - }; - + /// @brief Definition of "Long" field. class Long : public comms::field::Optional< @@ -151,11 +141,8 @@ struct LengthMembers { return tutorial23::field::LengthMembersCommon::LongCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -200,25 +187,24 @@ class Length : public short, long ); - - + /// @brief Name of the field. static const char* name() { return tutorial23::field::LengthCommon::name(); } - + /// @brief Get length value std::size_t getValue() const { if (!field_short().isLongForm()) { return static_cast(field_short().value()); } - + COMMS_ASSERT(field_long().doesExist()); // Make sure the field in the consistent state return static_cast(field_long().field().value()); } - + /// @brief Set length value void setValue(std::size_t val) { @@ -227,18 +213,18 @@ class Length : public field_long().setMissing(); return; } - + field_short().setLongForm(); field_long().field().setValue(val); field_long().setExists(); } - + /// @brief Maximal possible length value static constexpr std::size_t maxValue() { return std::numeric_limits::max(); } - + /// @brief Generated read functionality. template comms::ErrorStatus read(TIter& iter, std::size_t len) @@ -249,55 +235,44 @@ class Length : public if (es != comms::ErrorStatus::Success) { break; } - + readPrepare_long(); - + es = Base::template readFrom(iter, len); - } while(false); return es; } - - + /// @brief Generated refresh functionality. bool refresh() { bool updated = Base::refresh(); updated = refresh_long() || updated; return updated; - } - - private: void readPrepare_long() { refresh_long(); - } - + bool refresh_long() { auto mode = comms::field::OptionalMode::Missing; if (field_short().getValue() == static_cast(255U)) { mode = comms::field::OptionalMode::Exists; } - + if (field_long().getMode() == mode) { return false; } - + field_long().setMode(mode); return true; - } - - }; - } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/LengthCommon.h b/tutorials/tutorial23/include/tutorial23/field/LengthCommon.h index 123018a27..4dba64b29 100644 --- a/tutorials/tutorial23/include/tutorial23/field/LengthCommon.h +++ b/tutorials/tutorial23/include/tutorial23/field/LengthCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -16,7 +16,6 @@ namespace tutorial23 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial23::field::Length field. struct LengthMembersCommon @@ -28,34 +27,33 @@ struct LengthMembersCommon /// @brief Re-definition of the value type used by /// tutorial23::field::LengthMembers::Short field. using ValueType = std::uint8_t; - + /// @brief Single special value name info entry. using SpecialNameInfo = std::pair; - + /// @brief Type returned from @ref specialNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using SpecialNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial23::field::LengthMembers::Short field. static const char* name() { return "Short"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return true; } - + /// @brief Special value "LongForm". static constexpr ValueType valueLongForm() { return static_cast(255); } - - + /// @brief Retrieve map of special value names static SpecialNamesMapInfo specialNamesMap() { @@ -63,13 +61,11 @@ struct LengthMembersCommon std::make_pair(valueLongForm(), "LongForm") }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial23::field::LengthMembers::Long field. struct LongMembersCommon @@ -81,24 +77,21 @@ struct LengthMembersCommon /// @brief Re-definition of the value type used by /// tutorial23::field::LengthMembers::LongMembers::ActLong field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial23::field::LengthMembers::LongMembers::ActLong field. static const char* name() { return "ActLong"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial23::field::LengthMembers::Long field. struct LongCommon @@ -108,9 +101,7 @@ struct LengthMembersCommon { return "Long"; } - }; - }; /// @brief Common types and functions for @@ -122,10 +113,8 @@ struct LengthCommon { return "Length"; } - }; } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/MsgId.h b/tutorials/tutorial23/include/tutorial23/field/MsgId.h index 424a6d144..eab711da3 100644 --- a/tutorials/tutorial23/include/tutorial23/field/MsgId.h +++ b/tutorials/tutorial23/include/tutorial23/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial23 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial23::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial23::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial23::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial23::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial23::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial23::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial23::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial23::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial23::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial23::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial23::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/field/MsgIdCommon.h b/tutorials/tutorial23/include/tutorial23/field/MsgIdCommon.h index ba970367f..9b162449b 100644 --- a/tutorials/tutorial23/include/tutorial23/field/MsgIdCommon.h +++ b/tutorials/tutorial23/include/tutorial23/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial23/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial23 namespace field { - /// @brief Common types and functions for /// @ref tutorial23::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial23::field::MsgId field. using ValueType = tutorial23::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial23::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial23::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial23 - diff --git a/tutorials/tutorial23/include/tutorial23/frame/Frame.h b/tutorials/tutorial23/include/tutorial23/frame/Frame.h index d143dd82d..a180cdb39 100644 --- a/tutorials/tutorial23/include/tutorial23/frame/Frame.h +++ b/tutorials/tutorial23/include/tutorial23/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -25,7 +25,6 @@ namespace tutorial23 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -38,7 +37,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::tutorial23::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -51,7 +50,7 @@ struct FrameLayers Data, typename TOpt::tutorial23::frame::FrameLayers::Id >; - + /// @brief Definition of layer "Size". template using Size = @@ -61,7 +60,7 @@ struct FrameLayers >, Id >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -84,26 +83,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial23::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial23::frame::FrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -111,11 +105,10 @@ struct FrameLayers typename SyncMembers::SyncField, Size >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "Frame" frame class. @@ -154,5 +147,3 @@ class Frame : public } // namespace frame } // namespace tutorial23 - - diff --git a/tutorials/tutorial23/include/tutorial23/frame/FrameCommon.h b/tutorials/tutorial23/include/tutorial23/frame/FrameCommon.h index 64d034ce7..03addde67 100644 --- a/tutorials/tutorial23/include/tutorial23/frame/FrameCommon.h +++ b/tutorials/tutorial23/include/tutorial23/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial23 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial23::frame::Frame frame. /// @see tutorial23::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial23::frame::FrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial23::frame::FrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial23 - - diff --git a/tutorials/tutorial23/include/tutorial23/input/AllMessages.h b/tutorials/tutorial23/include/tutorial23/input/AllMessages.h index e44f215a5..c52ca1914 100644 --- a/tutorials/tutorial23/include/tutorial23/input/AllMessages.h +++ b/tutorials/tutorial23/include/tutorial23/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial23/include/tutorial23/input/ClientInputMessages.h b/tutorials/tutorial23/include/tutorial23/input/ClientInputMessages.h index cef0a8c39..1e97f7c61 100644 --- a/tutorials/tutorial23/include/tutorial23/input/ClientInputMessages.h +++ b/tutorials/tutorial23/include/tutorial23/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial23/include/tutorial23/input/ServerInputMessages.h b/tutorials/tutorial23/include/tutorial23/input/ServerInputMessages.h index 0ba3be73c..248e10241 100644 --- a/tutorials/tutorial23/include/tutorial23/input/ServerInputMessages.h +++ b/tutorials/tutorial23/include/tutorial23/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial23/include/tutorial23/message/Msg1.h b/tutorials/tutorial23/include/tutorial23/message/Msg1.h index afadf81ba..45b328b01 100644 --- a/tutorials/tutorial23/include/tutorial23/message/Msg1.h +++ b/tutorials/tutorial23/include/tutorial23/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial23/message/Msg1Common.h" #include "tutorial23/options/DefaultOptions.h" - namespace tutorial23 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -46,11 +44,8 @@ struct Msg1Fields { return tutorial23::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public t23_ext::ns1::field::S1< @@ -67,11 +62,8 @@ struct Msg1Fields { return tutorial23::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -120,22 +112,18 @@ class Msg1 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 3U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial23::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial23 - - diff --git a/tutorials/tutorial23/include/tutorial23/message/Msg1Common.h b/tutorials/tutorial23/include/tutorial23/message/Msg1Common.h index 402364bb6..f1f22e6df 100644 --- a/tutorials/tutorial23/include/tutorial23/message/Msg1Common.h +++ b/tutorials/tutorial23/include/tutorial23/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -15,7 +15,6 @@ namespace tutorial23 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial23::message::Msg1 message. /// @see tutorial23::message::Msg1Fields @@ -30,13 +29,12 @@ struct Msg1FieldsCommon { return "F1"; } - }; - + /// @brief Common definitions of the member fields of /// @ref tutorial23::message::Msg1Fields::F2 field. using F2MembersCommon = t23_ext::ns1::field::S1MembersCommon; - + /// @brief Common types and functions for /// @ref tutorial23::message::Msg1Fields::F2 field. struct F2Common : public t23_ext::ns1::field::S1Common @@ -46,9 +44,7 @@ struct Msg1FieldsCommon { return "F2"; } - }; - }; /// @brief Common types and functions of @@ -60,12 +56,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial23 - - - diff --git a/tutorials/tutorial23/include/tutorial23/options/BareMetalDefaultOptions.h b/tutorials/tutorial23/include/tutorial23/options/BareMetalDefaultOptions.h index 43873a4da..40859d917 100644 --- a/tutorials/tutorial23/include/tutorial23/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial23/include/tutorial23/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -40,7 +40,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::tutorial23::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial23::frame::FrameLayers::Id /// layer. @@ -49,15 +49,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::tutorial23::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; // struct tutorial23 - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial23/include/tutorial23/options/ClientDefaultOptions.h b/tutorials/tutorial23/include/tutorial23/options/ClientDefaultOptions.h index 84939bb5a..4c65da6ee 100644 --- a/tutorials/tutorial23/include/tutorial23/options/ClientDefaultOptions.h +++ b/tutorials/tutorial23/include/tutorial23/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial23/include/tutorial23/options/DataViewDefaultOptions.h b/tutorials/tutorial23/include/tutorial23/options/DataViewDefaultOptions.h index 3e892e74c..a54d9b489 100644 --- a/tutorials/tutorial23/include/tutorial23/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial23/include/tutorial23/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -34,15 +34,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::tutorial23::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; // struct tutorial23 - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial23/include/tutorial23/options/DefaultOptions.h b/tutorials/tutorial23/include/tutorial23/options/DefaultOptions.h index 40e9e90f9..b57f870e2 100644 --- a/tutorials/tutorial23/include/tutorial23/options/DefaultOptions.h +++ b/tutorials/tutorial23/include/tutorial23/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -33,20 +33,14 @@ struct DefaultOptionsT : public TBase /// tutorial23::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial23::frame::FrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; // struct tutorial23 - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial23/include/tutorial23/options/ServerDefaultOptions.h b/tutorials/tutorial23/include/tutorial23/options/ServerDefaultOptions.h index f442e8138..352168378 100644 --- a/tutorials/tutorial23/include/tutorial23/options/ServerDefaultOptions.h +++ b/tutorials/tutorial23/include/tutorial23/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial3/include/tutorial3/Message.h b/tutorials/tutorial3/include/tutorial3/Message.h index 22ba20482..a3aac3bba 100644 --- a/tutorials/tutorial3/include/tutorial3/Message.h +++ b/tutorials/tutorial3/include/tutorial3/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial3 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial3/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/MsgId.h b/tutorials/tutorial3/include/tutorial3/MsgId.h index 22e2180de..04e9532d3 100644 --- a/tutorials/tutorial3/include/tutorial3/MsgId.h +++ b/tutorials/tutorial3/include/tutorial3/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial3 - diff --git a/tutorials/tutorial3/include/tutorial3/Version.h b/tutorials/tutorial3/include/tutorial3/Version.h index e10399764..02cd448b7 100644 --- a/tutorials/tutorial3/include/tutorial3/Version.h +++ b/tutorials/tutorial3/include/tutorial3/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial3 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchClientInputMessage.h index ca758c6ed..308928703 100644 --- a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial3::options::DefaultOptions. /// @headerfile tutorial3/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial3::options::DefaultOptions as template parameter. /// @note Defined in tutorial3/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchMessage.h b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchMessage.h index 73808c5a8..dc5125d3d 100644 --- a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchMessage.h +++ b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial3::options::DefaultOptions. /// @headerfile tutorial3/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial3::options::DefaultOptions as template parameter. /// @note Defined in tutorial3/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchServerInputMessage.h index 4dd48d5ff..00c3bf0e3 100644 --- a/tutorials/tutorial3/include/tutorial3/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial3/include/tutorial3/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial3::options::DefaultOptions. /// @headerfile tutorial3/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial3::options::DefaultOptions as template parameter. /// @note Defined in tutorial3/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial3/include/tutorial3/field/FieldBase.h b/tutorials/tutorial3/include/tutorial3/field/FieldBase.h index 1be0ffa91..292a22ad7 100644 --- a/tutorials/tutorial3/include/tutorial3/field/FieldBase.h +++ b/tutorials/tutorial3/include/tutorial3/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial3 - diff --git a/tutorials/tutorial3/include/tutorial3/field/MsgId.h b/tutorials/tutorial3/include/tutorial3/field/MsgId.h index af18ed6e0..4f996803b 100644 --- a/tutorials/tutorial3/include/tutorial3/field/MsgId.h +++ b/tutorials/tutorial3/include/tutorial3/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial3 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial3::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial3::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial3::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial3::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial3::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial3::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial3::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial3::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial3::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial3::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial3::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial3 - diff --git a/tutorials/tutorial3/include/tutorial3/field/MsgIdCommon.h b/tutorials/tutorial3/include/tutorial3/field/MsgIdCommon.h index f0be9c203..c81d03714 100644 --- a/tutorials/tutorial3/include/tutorial3/field/MsgIdCommon.h +++ b/tutorials/tutorial3/include/tutorial3/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial3/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial3 namespace field { - /// @brief Common types and functions for /// @ref tutorial3::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial3::field::MsgId field. using ValueType = tutorial3::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial3::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial3::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial3 - diff --git a/tutorials/tutorial3/include/tutorial3/frame/Frame.h b/tutorials/tutorial3/include/tutorial3/frame/Frame.h index 21f0ebbbb..f39af50e9 100644 --- a/tutorials/tutorial3/include/tutorial3/frame/Frame.h +++ b/tutorials/tutorial3/include/tutorial3/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial3 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "ID". template using ID = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::ID >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial3::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, ID >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/frame/FrameCommon.h b/tutorials/tutorial3/include/tutorial3/frame/FrameCommon.h index 6ef140f6c..8a819b9b7 100644 --- a/tutorials/tutorial3/include/tutorial3/frame/FrameCommon.h +++ b/tutorials/tutorial3/include/tutorial3/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial3 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial3::frame::Frame frame. /// @see tutorial3::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial3::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial3::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/input/AllMessages.h b/tutorials/tutorial3/include/tutorial3/input/AllMessages.h index df1068f17..3641f4ddf 100644 --- a/tutorials/tutorial3/include/tutorial3/input/AllMessages.h +++ b/tutorials/tutorial3/include/tutorial3/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial3/include/tutorial3/input/ClientInputMessages.h b/tutorials/tutorial3/include/tutorial3/input/ClientInputMessages.h index 06a267ab6..a734d98e0 100644 --- a/tutorials/tutorial3/include/tutorial3/input/ClientInputMessages.h +++ b/tutorials/tutorial3/include/tutorial3/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial3/include/tutorial3/input/ServerInputMessages.h b/tutorials/tutorial3/include/tutorial3/input/ServerInputMessages.h index cec02a417..c928a89f3 100644 --- a/tutorials/tutorial3/include/tutorial3/input/ServerInputMessages.h +++ b/tutorials/tutorial3/include/tutorial3/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg1.h b/tutorials/tutorial3/include/tutorial3/message/Msg1.h index ae80cc73e..e373ffcce 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg1.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial3/message/Msg1Common.h" #include "tutorial3/options/DefaultOptions.h" - namespace tutorial3 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -47,30 +45,27 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::message::Msg1FieldsCommon::F1Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial3::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::IntValue< @@ -88,30 +83,27 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::message::Msg1FieldsCommon::F2Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial3::message::Msg1FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -160,24 +152,20 @@ class Msg1 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 6U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 6U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial3::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg1Common.h b/tutorials/tutorial3/include/tutorial3/message/Msg1Common.h index 07dee4907..4b71ef06e 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg1Common.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial3 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial3::message::Msg1 message. /// @see tutorial3::message::Msg1Fields @@ -27,22 +26,20 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial3::message::Msg1Fields::F1 field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial3::message::Msg1Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial3::message::Msg1Fields::F2 field. struct F2Common @@ -50,22 +47,19 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial3::message::Msg1Fields::F2 field. using ValueType = std::int32_t; - + /// @brief Name of the @ref tutorial3::message::Msg1Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial3 - - - diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg2.h b/tutorials/tutorial3/include/tutorial3/message/Msg2.h index e19e369f5..491bfcdcc 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg2.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -16,14 +16,12 @@ #include "tutorial3/message/Msg2Common.h" #include "tutorial3/options/DefaultOptions.h" - namespace tutorial3 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -48,24 +46,20 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::message::Msg2FieldsCommon::F1Common::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial3::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief Definition of "F2" field. class F2 : public comms::field::FloatValue< @@ -83,30 +77,27 @@ struct Msg2Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::message::Msg2FieldsCommon::F2Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial3::message::Msg2FieldsCommon::F2Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1, @@ -155,24 +146,20 @@ class Msg2 : public f1, f2 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 12U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 12U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial3::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg2Common.h b/tutorials/tutorial3/include/tutorial3/message/Msg2Common.h index d6df8a135..7ebff740c 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg2Common.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial3 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial3::message::Msg2 message. /// @see tutorial3::message::Msg2Fields @@ -27,22 +26,20 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial3::message::Msg2Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial3::message::Msg2Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial3::message::Msg2Fields::F2 field. struct F2Common @@ -50,22 +47,19 @@ struct Msg2FieldsCommon /// @brief Re-definition of the value type used by /// tutorial3::message::Msg2Fields::F2 field. using ValueType = double; - + /// @brief Name of the @ref tutorial3::message::Msg2Fields::F2 field. static const char* name() { return "F2"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -77,12 +71,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial3 - - - diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg3.h b/tutorials/tutorial3/include/tutorial3/message/Msg3.h index e1b544f17..ba4df65bc 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg3.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial3/message/Msg3Common.h" #include "tutorial3/options/DefaultOptions.h" - namespace tutorial3 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -49,30 +47,27 @@ struct Msg3Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial3::message::Msg3FieldsCommon::F1Common::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial3::message::Msg3FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -117,24 +112,20 @@ class Msg3 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 4U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 4U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial3::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial3 - - diff --git a/tutorials/tutorial3/include/tutorial3/message/Msg3Common.h b/tutorials/tutorial3/include/tutorial3/message/Msg3Common.h index 9ecdffb74..35d27d630 100644 --- a/tutorials/tutorial3/include/tutorial3/message/Msg3Common.h +++ b/tutorials/tutorial3/include/tutorial3/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial3 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial3::message::Msg3 message. /// @see tutorial3::message::Msg3Fields @@ -27,22 +26,19 @@ struct Msg3FieldsCommon /// @brief Re-definition of the value type used by /// tutorial3::message::Msg3Fields::F1 field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial3::message::Msg3Fields::F1 field. static const char* name() { return "F1"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; /// @brief Common types and functions of @@ -54,12 +50,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial3 - - - diff --git a/tutorials/tutorial3/include/tutorial3/options/BareMetalDefaultOptions.h b/tutorials/tutorial3/include/tutorial3/options/BareMetalDefaultOptions.h index fdc99d46d..c540000bc 100644 --- a/tutorials/tutorial3/include/tutorial3/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial3/include/tutorial3/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial3::frame::FrameLayers::ID layer. using ID = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::ID >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial3/include/tutorial3/options/ClientDefaultOptions.h b/tutorials/tutorial3/include/tutorial3/options/ClientDefaultOptions.h index 81450973f..d540934ec 100644 --- a/tutorials/tutorial3/include/tutorial3/options/ClientDefaultOptions.h +++ b/tutorials/tutorial3/include/tutorial3/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial3/include/tutorial3/options/DataViewDefaultOptions.h b/tutorials/tutorial3/include/tutorial3/options/DataViewDefaultOptions.h index a743d5788..814129739 100644 --- a/tutorials/tutorial3/include/tutorial3/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial3/include/tutorial3/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial3/include/tutorial3/options/DefaultOptions.h b/tutorials/tutorial3/include/tutorial3/options/DefaultOptions.h index 3b0e9c306..5cdadbfe0 100644 --- a/tutorials/tutorial3/include/tutorial3/options/DefaultOptions.h +++ b/tutorials/tutorial3/include/tutorial3/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,17 +31,12 @@ struct DefaultOptionsT : public TBase /// tutorial3::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial3::frame::FrameLayers::ID layer. using ID = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial3/include/tutorial3/options/ServerDefaultOptions.h b/tutorials/tutorial3/include/tutorial3/options/ServerDefaultOptions.h index a8fb664be..4f4b9bf51 100644 --- a/tutorials/tutorial3/include/tutorial3/options/ServerDefaultOptions.h +++ b/tutorials/tutorial3/include/tutorial3/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial4/README.md b/tutorials/tutorial4/README.md index d8ca425b6..a0ba79f5c 100644 --- a/tutorials/tutorial4/README.md +++ b/tutorials/tutorial4/README.md @@ -381,6 +381,23 @@ of the detected member, while `accessField_X()` just gives as an access to the s (which already is properly initialized and holds the required data) with cast to the appropriate type. +Similar `switch` statement based functionality for better compilation times as well as runtime performance +is generated for other member functions like `write()`, `refresh()`, `length()`, and `valid()`. +```cpp +template +comms::ErrorStatus write(TIter& iter, std::size_t len) const +{ + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().write(iter, len); + case FieldIdx_prop2: return accessField_prop2().write(iter, len); + case FieldIdx_prop3: return accessField_prop3().write(iter, len); + default: break; + } + + return comms::ErrorStatus::Success; +} +``` + ## Type-Length-Value (TLV) Triplets There are protocols that introduce additional **length** information in their _properties_ definition to make them type-length-value (TLV) triplets. Let's take a look how such triplet is defined in diff --git a/tutorials/tutorial4/include/tutorial4/Message.h b/tutorials/tutorial4/include/tutorial4/Message.h index d6e8fda50..3788a915a 100644 --- a/tutorials/tutorial4/include/tutorial4/Message.h +++ b/tutorials/tutorial4/include/tutorial4/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial4 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial4/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial4 - - diff --git a/tutorials/tutorial4/include/tutorial4/MsgId.h b/tutorials/tutorial4/include/tutorial4/MsgId.h index f42000f89..adb920cc7 100644 --- a/tutorials/tutorial4/include/tutorial4/MsgId.h +++ b/tutorials/tutorial4/include/tutorial4/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -15,7 +15,7 @@ enum MsgId : std::uint8_t { MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 2, ///< Last defined value., @@ -23,4 +23,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/Version.h b/tutorials/tutorial4/include/tutorial4/Version.h index 157bfef7d..d27671bbd 100644 --- a/tutorials/tutorial4/include/tutorial4/Version.h +++ b/tutorials/tutorial4/include/tutorial4/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial4 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchClientInputMessage.h index 5d9eb3ac3..2ac075e7b 100644 --- a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial4::options::DefaultOptions. /// @headerfile tutorial4/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial4::options::DefaultOptions as template parameter. /// @note Defined in tutorial4/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchMessage.h b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchMessage.h index 20af22921..0bdc8fe67 100644 --- a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchMessage.h +++ b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -129,7 +129,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial4::options::DefaultOptions. /// @headerfile tutorial4/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct MsgDispatcher /// @ref tutorial4::options::DefaultOptions as template parameter. /// @note Defined in tutorial4/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchServerInputMessage.h index 1dc3eeee0..950863905 100644 --- a/tutorials/tutorial4/include/tutorial4/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial4/include/tutorial4/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial4::options::DefaultOptions. /// @headerfile tutorial4/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial4::options::DefaultOptions as template parameter. /// @note Defined in tutorial4/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial4/include/tutorial4/field/FieldBase.h b/tutorials/tutorial4/include/tutorial4/field/FieldBase.h index b2ac95a00..02332f687 100644 --- a/tutorials/tutorial4/include/tutorial4/field/FieldBase.h +++ b/tutorials/tutorial4/include/tutorial4/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/KeyValueProp.h b/tutorials/tutorial4/include/tutorial4/field/KeyValueProp.h index bfcdc6c36..a33b1faa0 100644 --- a/tutorials/tutorial4/include/tutorial4/field/KeyValueProp.h +++ b/tutorials/tutorial4/include/tutorial4/field/KeyValueProp.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "KeyValueProp" field. @@ -27,7 +27,6 @@ namespace tutorial4 namespace field { - /// @brief Scope for all the member fields of /// @ref KeyValueProp field. /// @tparam TOpt Protocol options. @@ -59,20 +58,19 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop1MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop1MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -82,14 +80,9 @@ struct KeyValuePropMembers }; Base::setValue(0); return true; - } - - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::IntValue< @@ -105,24 +98,20 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop1MembersCommon::ValCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop1MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -130,7 +119,7 @@ struct KeyValuePropMembers Val >; }; - + /// @brief Definition of "Prop1" field. class Prop1 : public comms::field::Bundle< @@ -158,18 +147,14 @@ struct KeyValuePropMembers key, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop1Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop2 field. struct Prop2Members @@ -197,20 +182,19 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop2MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop2MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -220,14 +204,9 @@ struct KeyValuePropMembers }; Base::setValue(2); return true; - } - - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::FloatValue< @@ -243,36 +222,33 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Generated default constructor. Val() { Base::setValue(std::numeric_limits::quiet_NaN()); } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop2MembersCommon::ValCommon::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop2MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -280,7 +256,7 @@ struct KeyValuePropMembers Val >; }; - + /// @brief Definition of "Prop2" field. class Prop2 : public comms::field::Bundle< @@ -308,18 +284,14 @@ struct KeyValuePropMembers key, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop2Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop3 field. struct Prop3Members @@ -347,20 +319,19 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop3MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop3MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -370,14 +341,9 @@ struct KeyValuePropMembers }; Base::setValue(5); return true; - } - - - }; - - + /// @brief Scope for all the member fields of /// @ref Val field. struct ValMembers @@ -397,26 +363,21 @@ struct KeyValuePropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::KeyValuePropMembersCommon::Prop3MembersCommon::ValMembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop3MembersCommon::ValMembersCommon::LengthCommon::name(); } - - }; - - }; - + /// @brief Definition of "Val" field. class Val : public comms::field::String< @@ -437,11 +398,8 @@ struct KeyValuePropMembers { return tutorial4::field::KeyValuePropMembersCommon::Prop3MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -449,7 +407,7 @@ struct KeyValuePropMembers Val >; }; - + /// @brief Definition of "Prop3" field. class Prop3 : public comms::field::Bundle< @@ -477,18 +435,14 @@ struct KeyValuePropMembers key, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropMembersCommon::Prop3Common::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -507,7 +461,9 @@ class KeyValueProp : public tutorial4::field::FieldBase<>, typename KeyValuePropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh > { using Base = @@ -515,7 +471,9 @@ class KeyValueProp : public tutorial4::field::FieldBase<>, typename KeyValuePropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh >; public: /// @brief Allow access to internal fields. @@ -538,7 +496,7 @@ class KeyValueProp : public prop2, prop3 ); - + /// @brief Optimized currFieldExec functionality. /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -562,7 +520,7 @@ class KeyValueProp : public break; } } - + /// @brief Optimized currFieldExec functionality (const variant). /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -586,13 +544,13 @@ class KeyValueProp : public break; } } - + /// @brief Name of the field. static const char* name() { return tutorial4::field::KeyValuePropCommon::name(); } - + COMMS_MSVC_WARNING_PUSH COMMS_MSVC_WARNING_DISABLE(4702) /// @brief Generated read functionality. @@ -606,17 +564,17 @@ class KeyValueProp : public comms::option::def::FailOnInvalid<> >; CommonKeyField commonKeyField; - + auto origIter = iter; auto es = commonKeyField.read(iter, len); if (es != comms::ErrorStatus::Success) { return es; } - + auto consumedLen = static_cast(std::distance(origIter, iter)); COMMS_ASSERT(consumedLen <= len); len -= consumedLen; - + switch (commonKeyField.getValue()) { case 0U /* 0x00U */: { @@ -639,13 +597,63 @@ class KeyValueProp : public default: break; }; - + return comms::ErrorStatus::InvalidMsgData; - } COMMS_MSVC_WARNING_POP - - + + /// @brief Generated write functionality. + template + comms::ErrorStatus write(TIter& iter, std::size_t len) const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().write(iter, len); + case FieldIdx_prop2: return accessField_prop2().write(iter, len); + case FieldIdx_prop3: return accessField_prop3().write(iter, len); + default: break; + } + + return comms::ErrorStatus::Success; + } + + /// @brief Generated refresh functionality. + bool refresh() + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().refresh(); + case FieldIdx_prop2: return accessField_prop2().refresh(); + case FieldIdx_prop3: return accessField_prop3().refresh(); + default: break; + } + + return false; + } + + /// @brief Generated length functionality. + std::size_t length() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().length(); + case FieldIdx_prop2: return accessField_prop2().length(); + case FieldIdx_prop3: return accessField_prop3().length(); + default: break; + } + + return 0U; + } + + /// @brief Generated validity check functionality. + bool valid() const + { + switch (Base::currentField()) { + case FieldIdx_prop1: return accessField_prop1().valid(); + case FieldIdx_prop2: return accessField_prop2().valid(); + case FieldIdx_prop3: return accessField_prop3().valid(); + default: break; + } + + return false; + } private: template @@ -657,12 +665,8 @@ class KeyValueProp : public func.template operator()(std::forward(f)); // All other compilers #endif // #ifdef _MSC_VER } - - }; - } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/KeyValuePropCommon.h b/tutorials/tutorial4/include/tutorial4/field/KeyValuePropCommon.h index bb08a9315..96b11ef71 100644 --- a/tutorials/tutorial4/include/tutorial4/field/KeyValuePropCommon.h +++ b/tutorials/tutorial4/include/tutorial4/field/KeyValuePropCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial4 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::KeyValueProp field. struct KeyValuePropMembersCommon @@ -30,22 +29,20 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop1Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop1Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop1Members::Val field. struct ValCommon @@ -53,24 +50,21 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop1Members::Val field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop1Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop1 field. struct Prop1Common @@ -80,9 +74,8 @@ struct KeyValuePropMembersCommon { return "Prop1"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::KeyValuePropMembers::Prop2 field. struct Prop2MembersCommon @@ -94,22 +87,20 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop2Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop2Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop2Members::Val field. struct ValCommon @@ -117,24 +108,21 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop2Members::Val field. using ValueType = float; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop2Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop2 field. struct Prop2Common @@ -144,9 +132,8 @@ struct KeyValuePropMembersCommon { return "Prop2"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::KeyValuePropMembers::Prop3 field. struct Prop3MembersCommon @@ -158,22 +145,20 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop3Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop3Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::KeyValuePropMembers::Prop3Members::Val field. struct ValMembersCommon @@ -185,24 +170,21 @@ struct KeyValuePropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::KeyValuePropMembers::Prop3Members::ValMembers::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::KeyValuePropMembers::Prop3Members::ValMembers::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop3Members::Val field. struct ValCommon @@ -212,11 +194,9 @@ struct KeyValuePropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::KeyValuePropMembers::Prop3 field. struct Prop3Common @@ -226,9 +206,7 @@ struct KeyValuePropMembersCommon { return "Prop3"; } - }; - }; /// @brief Common types and functions for @@ -240,10 +218,8 @@ struct KeyValuePropCommon { return "KeyValueProp"; } - }; } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/MsgId.h b/tutorials/tutorial4/include/tutorial4/field/MsgId.h index 31b8724b1..3345fe07a 100644 --- a/tutorials/tutorial4/include/tutorial4/field/MsgId.h +++ b/tutorials/tutorial4/include/tutorial4/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial4 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial4::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial4::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial4::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial4::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial4::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial4::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial4::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial4::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial4::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial4::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/MsgIdCommon.h b/tutorials/tutorial4/include/tutorial4/field/MsgIdCommon.h index e9882d575..f5125e281 100644 --- a/tutorials/tutorial4/include/tutorial4/field/MsgIdCommon.h +++ b/tutorials/tutorial4/include/tutorial4/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial4/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial4 namespace field { - /// @brief Common types and functions for /// @ref tutorial4::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial4::field::MsgId field. using ValueType = tutorial4::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial4::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -62,19 +59,15 @@ struct MsgIdCommon "Message 2" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial4::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/TlvProp.h b/tutorials/tutorial4/include/tutorial4/field/TlvProp.h index 4b15cc4ff..abe120850 100644 --- a/tutorials/tutorial4/include/tutorial4/field/TlvProp.h +++ b/tutorials/tutorial4/include/tutorial4/field/TlvProp.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "TlvProp" field. @@ -28,7 +28,6 @@ namespace tutorial4 namespace field { - /// @brief Scope for all the member fields of /// @ref TlvProp field. /// @tparam TOpt Protocol options. @@ -62,20 +61,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -85,14 +83,9 @@ struct TlvPropMembers }; Base::setValue(10); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -108,24 +101,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::IntValue< @@ -141,24 +130,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::ValCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop4MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -167,7 +152,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop4" field. class Prop4 : public comms::field::Bundle< @@ -200,18 +185,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop4Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop5 field. struct Prop5Members @@ -239,20 +220,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -262,14 +242,9 @@ struct TlvPropMembers }; Base::setValue(15); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -285,24 +260,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::FloatValue< @@ -318,36 +289,33 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Generated default constructor. Val() { Base::setValue(std::numeric_limits::infinity()); } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::ValCommon::hasSpecials(); } - + /// @brief Requested number of digits after decimal point when value /// is displayed. static constexpr unsigned displayDecimals() { return 0U; } - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop5MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -356,7 +324,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop5" field. class Prop5 : public comms::field::Bundle< @@ -389,18 +357,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop5Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop6 field. struct Prop6Members @@ -428,20 +392,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop6MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop6MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -451,14 +414,9 @@ struct TlvPropMembers }; Base::setValue(25); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -474,24 +432,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop6MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop6MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::String< @@ -510,11 +464,8 @@ struct TlvPropMembers { return tutorial4::field::TlvPropMembersCommon::Prop6MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -523,7 +474,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop6" field. class Prop6 : public comms::field::Bundle< @@ -556,18 +507,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop6Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Prop7 field. struct Prop7Members @@ -595,20 +542,19 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::KeyCommon::name(); } - + /// @brief Generated refresh functionality. bool refresh() { @@ -618,14 +564,9 @@ struct TlvPropMembers }; Base::setValue(30); return true; - } - - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -641,24 +582,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::IntValue< @@ -676,24 +613,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::ValCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop7MembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -702,7 +635,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Prop7" field. class Prop7 : public comms::field::Bundle< @@ -735,18 +668,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::Prop7Common::name(); } - - }; - - + /// @brief Scope for all the member fields of /// @ref Any field. struct AnyMembers @@ -766,24 +695,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::AnyMembersCommon::KeyCommon::name(); } - - }; - - + /// @brief Definition of "Length" field. class Length : public comms::field::IntValue< @@ -799,24 +724,20 @@ struct TlvPropMembers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::AnyMembersCommon::LengthCommon::name(); } - - }; - - + /// @brief Definition of "Val" field. class Val : public comms::field::ArrayList< @@ -837,11 +758,8 @@ struct TlvPropMembers { return tutorial4::field::TlvPropMembersCommon::AnyMembersCommon::ValCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -850,7 +768,7 @@ struct TlvPropMembers Val >; }; - + /// @brief Definition of "Any" field. class Any : public comms::field::Bundle< @@ -883,18 +801,14 @@ struct TlvPropMembers length, val ); - - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropMembersCommon::AnyCommon::name(); } - - }; - - + /// @brief All members bundled in @b std::tuple. using All = std::tuple< @@ -917,7 +831,9 @@ class TlvProp : public tutorial4::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh > { using Base = @@ -925,7 +841,9 @@ class TlvProp : public tutorial4::field::FieldBase<>, typename TlvPropMembers::All, TExtraOpts..., - comms::option::def::HasCustomRead + comms::option::def::HasCustomRead, + comms::option::def::HasCustomWrite, + comms::option::def::HasCustomRefresh >; public: /// @brief Allow access to internal fields. @@ -956,7 +874,7 @@ class TlvProp : public prop7, any ); - + /// @brief Optimized currFieldExec functionality. /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -986,7 +904,7 @@ class TlvProp : public break; } } - + /// @brief Optimized currFieldExec functionality (const variant). /// @details Replaces the currFieldExec() member function defined /// by @b comms::field::Variant. @@ -1016,13 +934,13 @@ class TlvProp : public break; } } - + /// @brief Name of the field. static const char* name() { return tutorial4::field::TlvPropCommon::name(); } - + COMMS_MSVC_WARNING_PUSH COMMS_MSVC_WARNING_DISABLE(4702) /// @brief Generated read functionality. @@ -1036,17 +954,17 @@ class TlvProp : public comms::option::def::FailOnInvalid<> >; CommonKeyField commonKeyField; - + auto origIter = iter; auto es = commonKeyField.read(iter, len); if (es != comms::ErrorStatus::Success) { return es; } - + auto consumedLen = static_cast(std::distance(origIter, iter)); COMMS_ASSERT(consumedLen <= len); len -= consumedLen; - + switch (commonKeyField.getValue()) { case 10U /* 0x0AU */: { @@ -1076,13 +994,71 @@ class TlvProp : public initField_any().field_key().setValue(commonKeyField.getValue()); return accessField_any().template readFrom<1>(iter, len); }; - + return comms::ErrorStatus::InvalidMsgData; - } COMMS_MSVC_WARNING_POP - - + + /// @brief Generated write functionality. + template + comms::ErrorStatus write(TIter& iter, std::size_t len) const + { + switch (Base::currentField()) { + case FieldIdx_prop4: return accessField_prop4().write(iter, len); + case FieldIdx_prop5: return accessField_prop5().write(iter, len); + case FieldIdx_prop6: return accessField_prop6().write(iter, len); + case FieldIdx_prop7: return accessField_prop7().write(iter, len); + case FieldIdx_any: return accessField_any().write(iter, len); + default: break; + } + + return comms::ErrorStatus::Success; + } + + /// @brief Generated refresh functionality. + bool refresh() + { + switch (Base::currentField()) { + case FieldIdx_prop4: return accessField_prop4().refresh(); + case FieldIdx_prop5: return accessField_prop5().refresh(); + case FieldIdx_prop6: return accessField_prop6().refresh(); + case FieldIdx_prop7: return accessField_prop7().refresh(); + case FieldIdx_any: return accessField_any().refresh(); + default: break; + } + + return false; + } + + /// @brief Generated length functionality. + std::size_t length() const + { + switch (Base::currentField()) { + case FieldIdx_prop4: return accessField_prop4().length(); + case FieldIdx_prop5: return accessField_prop5().length(); + case FieldIdx_prop6: return accessField_prop6().length(); + case FieldIdx_prop7: return accessField_prop7().length(); + case FieldIdx_any: return accessField_any().length(); + default: break; + } + + return 0U; + } + + /// @brief Generated validity check functionality. + bool valid() const + { + switch (Base::currentField()) { + case FieldIdx_prop4: return accessField_prop4().valid(); + case FieldIdx_prop5: return accessField_prop5().valid(); + case FieldIdx_prop6: return accessField_prop6().valid(); + case FieldIdx_prop7: return accessField_prop7().valid(); + case FieldIdx_any: return accessField_any().valid(); + default: break; + } + + return false; + } private: template @@ -1094,12 +1070,8 @@ class TlvProp : public func.template operator()(std::forward(f)); // All other compilers #endif // #ifdef _MSC_VER } - - }; - } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/field/TlvPropCommon.h b/tutorials/tutorial4/include/tutorial4/field/TlvPropCommon.h index b423c4a1f..5b84d2b79 100644 --- a/tutorials/tutorial4/include/tutorial4/field/TlvPropCommon.h +++ b/tutorials/tutorial4/include/tutorial4/field/TlvPropCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial4 namespace field { - /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::TlvProp field. struct TlvPropMembersCommon @@ -30,22 +29,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop4Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop4Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop4Members::Length field. struct LengthCommon @@ -53,22 +50,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop4Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop4Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop4Members::Val field. struct ValCommon @@ -76,24 +71,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop4Members::Val field. using ValueType = std::uint32_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop4Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop4 field. struct Prop4Common @@ -103,9 +95,8 @@ struct TlvPropMembersCommon { return "Prop4"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::TlvPropMembers::Prop5 field. struct Prop5MembersCommon @@ -117,22 +108,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop5Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop5Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop5Members::Length field. struct LengthCommon @@ -140,22 +129,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop5Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop5Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop5Members::Val field. struct ValCommon @@ -163,24 +150,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop5Members::Val field. using ValueType = double; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop5Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop5 field. struct Prop5Common @@ -190,9 +174,8 @@ struct TlvPropMembersCommon { return "Prop5"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::TlvPropMembers::Prop6 field. struct Prop6MembersCommon @@ -204,22 +187,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop6Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop6Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop6Members::Length field. struct LengthCommon @@ -227,22 +208,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop6Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop6Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop6Members::Val field. struct ValCommon @@ -252,11 +231,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop6 field. struct Prop6Common @@ -266,9 +243,8 @@ struct TlvPropMembersCommon { return "Prop6"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::TlvPropMembers::Prop7 field. struct Prop7MembersCommon @@ -280,22 +256,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop7Members::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop7Members::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop7Members::Length field. struct LengthCommon @@ -303,22 +277,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop7Members::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop7Members::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop7Members::Val field. struct ValCommon @@ -326,24 +298,21 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::Prop7Members::Val field. using ValueType = std::uint64_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::Prop7Members::Val field. static const char* name() { return "Val"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Prop7 field. struct Prop7Common @@ -353,9 +322,8 @@ struct TlvPropMembersCommon { return "Prop7"; } - }; - + /// @brief Scope for all the common definitions of the member fields of /// @ref tutorial4::field::TlvPropMembers::Any field. struct AnyMembersCommon @@ -367,22 +335,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::AnyMembers::Key field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::AnyMembers::Key field. static const char* name() { return "Key"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::AnyMembers::Length field. struct LengthCommon @@ -390,22 +356,20 @@ struct TlvPropMembersCommon /// @brief Re-definition of the value type used by /// tutorial4::field::TlvPropMembers::AnyMembers::Length field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::field::TlvPropMembers::AnyMembers::Length field. static const char* name() { return "Length"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::AnyMembers::Val field. struct ValCommon @@ -415,11 +379,9 @@ struct TlvPropMembersCommon { return "Val"; } - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::field::TlvPropMembers::Any field. struct AnyCommon @@ -429,9 +391,7 @@ struct TlvPropMembersCommon { return "Any"; } - }; - }; /// @brief Common types and functions for @@ -443,10 +403,8 @@ struct TlvPropCommon { return "TlvProp"; } - }; } // namespace field } // namespace tutorial4 - diff --git a/tutorials/tutorial4/include/tutorial4/frame/Frame.h b/tutorials/tutorial4/include/tutorial4/frame/Frame.h index 6e09cb212..22ce3a61c 100644 --- a/tutorials/tutorial4/include/tutorial4/frame/Frame.h +++ b/tutorials/tutorial4/include/tutorial4/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial4 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "ID". template using ID = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::ID >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, ID >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial4 - - diff --git a/tutorials/tutorial4/include/tutorial4/frame/FrameCommon.h b/tutorials/tutorial4/include/tutorial4/frame/FrameCommon.h index 66da3a55e..26cfb4fb4 100644 --- a/tutorials/tutorial4/include/tutorial4/frame/FrameCommon.h +++ b/tutorials/tutorial4/include/tutorial4/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial4 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial4::frame::Frame frame. /// @see tutorial4::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial4::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial4::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial4 - - diff --git a/tutorials/tutorial4/include/tutorial4/input/AllMessages.h b/tutorials/tutorial4/include/tutorial4/input/AllMessages.h index 2d6b4f19d..873a552ec 100644 --- a/tutorials/tutorial4/include/tutorial4/input/AllMessages.h +++ b/tutorials/tutorial4/include/tutorial4/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial4/include/tutorial4/input/ClientInputMessages.h b/tutorials/tutorial4/include/tutorial4/input/ClientInputMessages.h index 91ec308ee..ee60c5d93 100644 --- a/tutorials/tutorial4/include/tutorial4/input/ClientInputMessages.h +++ b/tutorials/tutorial4/include/tutorial4/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial4/include/tutorial4/input/ServerInputMessages.h b/tutorials/tutorial4/include/tutorial4/input/ServerInputMessages.h index 5bc50539e..a9958a2cb 100644 --- a/tutorials/tutorial4/include/tutorial4/input/ServerInputMessages.h +++ b/tutorials/tutorial4/include/tutorial4/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial4/include/tutorial4/message/Msg1.h b/tutorials/tutorial4/include/tutorial4/message/Msg1.h index c72771d8e..249796e76 100644 --- a/tutorials/tutorial4/include/tutorial4/message/Msg1.h +++ b/tutorials/tutorial4/include/tutorial4/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -17,14 +17,12 @@ #include "tutorial4/message/Msg1Common.h" #include "tutorial4/options/DefaultOptions.h" - namespace tutorial4 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -51,26 +49,21 @@ struct Msg1Fields public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial4::message::Msg1FieldsCommon::F1MembersCommon::CountCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial4::message::Msg1FieldsCommon::F1MembersCommon::CountCommon::name(); } - - }; - - }; - + /// @brief Definition of "F1" field. class F1 : public comms::field::ArrayList< @@ -93,11 +86,8 @@ struct Msg1Fields { return tutorial4::message::Msg1FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -142,22 +132,18 @@ class Msg1 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 1U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial4::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial4 - - diff --git a/tutorials/tutorial4/include/tutorial4/message/Msg1Common.h b/tutorials/tutorial4/include/tutorial4/message/Msg1Common.h index 64e0eefc9..383059880 100644 --- a/tutorials/tutorial4/include/tutorial4/message/Msg1Common.h +++ b/tutorials/tutorial4/include/tutorial4/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial4 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial4::message::Msg1 message. /// @see tutorial4::message::Msg1Fields @@ -31,24 +30,21 @@ struct Msg1FieldsCommon /// @brief Re-definition of the value type used by /// tutorial4::message::Msg1Fields::F1Members::Count field. using ValueType = std::uint8_t; - + /// @brief Name of the @ref tutorial4::message::Msg1Fields::F1Members::Count field. static const char* name() { return "Count"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Common types and functions for /// @ref tutorial4::message::Msg1Fields::F1 field. struct F1Common @@ -58,9 +54,7 @@ struct Msg1FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -72,12 +66,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial4 - - - diff --git a/tutorials/tutorial4/include/tutorial4/message/Msg2.h b/tutorials/tutorial4/include/tutorial4/message/Msg2.h index 6fe9feec9..9712862c7 100644 --- a/tutorials/tutorial4/include/tutorial4/message/Msg2.h +++ b/tutorials/tutorial4/include/tutorial4/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -15,14 +15,12 @@ #include "tutorial4/message/Msg2Common.h" #include "tutorial4/options/DefaultOptions.h" - namespace tutorial4 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -50,11 +48,8 @@ struct Msg2Fields { return tutorial4::message::Msg2FieldsCommon::F1Common::name(); } - - }; - - + /// @brief All the fields bundled in std::tuple. using All = std::tuple< F1 @@ -99,22 +94,18 @@ class Msg2 : public COMMS_MSG_FIELDS_NAMES( f1 ); - + // Compile time check for serialisation length. static const std::size_t MsgMinLen = Base::doMinLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial4::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial4 - - diff --git a/tutorials/tutorial4/include/tutorial4/message/Msg2Common.h b/tutorials/tutorial4/include/tutorial4/message/Msg2Common.h index f0d550985..58ef4270a 100644 --- a/tutorials/tutorial4/include/tutorial4/message/Msg2Common.h +++ b/tutorials/tutorial4/include/tutorial4/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial4 namespace message { - /// @brief Common types and functions for fields of /// @ref tutorial4::message::Msg2 message. /// @see tutorial4::message::Msg2Fields @@ -27,9 +26,7 @@ struct Msg2FieldsCommon { return "F1"; } - }; - }; /// @brief Common types and functions of @@ -41,12 +38,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial4 - - - diff --git a/tutorials/tutorial4/include/tutorial4/options/BareMetalDefaultOptions.h b/tutorials/tutorial4/include/tutorial4/options/BareMetalDefaultOptions.h index 9351293ef..150f94e79 100644 --- a/tutorials/tutorial4/include/tutorial4/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial4/include/tutorial4/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,11 +38,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::KeyValuePropMembers::Prop3Members::Val >; - }; // struct Prop3Members - }; // struct KeyValuePropMembers - + struct TlvPropMembers : public TBase::field::TlvPropMembers { struct Prop6Members : public TBase::field::TlvPropMembers::Prop6Members @@ -55,9 +53,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::Prop6Members::Val >; - }; // struct Prop6Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -68,13 +65,10 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message : public TBase::message { @@ -90,9 +84,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg1Fields::F1 >; - }; - + /// @brief Extra options for fields of /// @ref tutorial4::message::Msg2 message. struct Msg2Fields : public TBase::message::Msg2Fields @@ -105,11 +98,9 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::message::Msg2Fields::F1 >; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -125,7 +116,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial4::frame::FrameLayers::ID layer. using ID = @@ -133,13 +124,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::ID >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial4/include/tutorial4/options/ClientDefaultOptions.h b/tutorials/tutorial4/include/tutorial4/options/ClientDefaultOptions.h index 3baf0b312..bca978cfe 100644 --- a/tutorials/tutorial4/include/tutorial4/options/ClientDefaultOptions.h +++ b/tutorials/tutorial4/include/tutorial4/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial4/include/tutorial4/options/DataViewDefaultOptions.h b/tutorials/tutorial4/include/tutorial4/options/DataViewDefaultOptions.h index 133aab110..c0ddbb1c7 100644 --- a/tutorials/tutorial4/include/tutorial4/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial4/include/tutorial4/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,11 +32,9 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::KeyValuePropMembers::Prop3Members::Val >; - }; // struct Prop3Members - }; // struct KeyValuePropMembers - + struct TlvPropMembers : public TBase::field::TlvPropMembers { struct Prop6Members : public TBase::field::TlvPropMembers::Prop6Members @@ -49,9 +47,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::Prop6Members::Val >; - }; // struct Prop6Members - + struct AnyMembers : public TBase::field::TlvPropMembers::AnyMembers { /// @brief Extra options for @ref @@ -62,13 +59,10 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::field::TlvPropMembers::AnyMembers::Val >; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for frames. struct frame : public TBase::frame { @@ -84,13 +78,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial4/include/tutorial4/options/DefaultOptions.h b/tutorials/tutorial4/include/tutorial4/options/DefaultOptions.h index 7ed3c3725..abe90f881 100644 --- a/tutorials/tutorial4/include/tutorial4/options/DefaultOptions.h +++ b/tutorials/tutorial4/include/tutorial4/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,11 +31,9 @@ struct DefaultOptionsT : public TBase /// tutorial4::field::KeyValuePropMembers::Prop3Members::Val /// field. using Val = comms::option::EmptyOption; - }; // struct Prop3Members - }; // struct KeyValuePropMembers - + struct TlvPropMembers { struct Prop6Members @@ -44,22 +42,18 @@ struct DefaultOptionsT : public TBase /// tutorial4::field::TlvPropMembers::Prop6Members::Val /// field. using Val = comms::option::EmptyOption; - }; // struct Prop6Members - + struct AnyMembers { /// @brief Extra options for @ref /// tutorial4::field::TlvPropMembers::AnyMembers::Val /// field. using Val = comms::option::EmptyOption; - }; // struct AnyMembers - }; // struct TlvPropMembers - }; // struct field - + /// @brief Extra options for messages. struct message { @@ -71,9 +65,8 @@ struct DefaultOptionsT : public TBase /// tutorial4::message::Msg1Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - + /// @brief Extra options for fields of /// @ref tutorial4::message::Msg2 message. struct Msg2Fields @@ -82,11 +75,9 @@ struct DefaultOptionsT : public TBase /// tutorial4::message::Msg2Fields::F1 /// field. using F1 = comms::option::EmptyOption; - }; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -98,17 +89,12 @@ struct DefaultOptionsT : public TBase /// tutorial4::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial4::frame::FrameLayers::ID layer. using ID = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial4/include/tutorial4/options/ServerDefaultOptions.h b/tutorials/tutorial4/include/tutorial4/options/ServerDefaultOptions.h index 104dc9650..f5c82e405 100644 --- a/tutorials/tutorial4/include/tutorial4/options/ServerDefaultOptions.h +++ b/tutorials/tutorial4/include/tutorial4/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial5/include/tutorial5/Message.h b/tutorials/tutorial5/include/tutorial5/Message.h index d489a07ca..fc7a3151c 100644 --- a/tutorials/tutorial5/include/tutorial5/Message.h +++ b/tutorials/tutorial5/include/tutorial5/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial5 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial5/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/MsgId.h b/tutorials/tutorial5/include/tutorial5/MsgId.h index c508ac603..7cc0cd4eb 100644 --- a/tutorials/tutorial5/include/tutorial5/MsgId.h +++ b/tutorials/tutorial5/include/tutorial5/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial5 - diff --git a/tutorials/tutorial5/include/tutorial5/Version.h b/tutorials/tutorial5/include/tutorial5/Version.h index e58902454..6e104dae7 100644 --- a/tutorials/tutorial5/include/tutorial5/Version.h +++ b/tutorials/tutorial5/include/tutorial5/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial5 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchClientInputMessage.h index 9d2887b5a..ccb544717 100644 --- a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial5::options::DefaultOptions. /// @headerfile tutorial5/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial5::options::DefaultOptions as template parameter. /// @note Defined in tutorial5/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchMessage.h b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchMessage.h index 7b74b6ee8..793e76bea 100644 --- a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchMessage.h +++ b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial5::options::DefaultOptions. /// @headerfile tutorial5/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial5::options::DefaultOptions as template parameter. /// @note Defined in tutorial5/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchServerInputMessage.h index 0419b09c5..154f58c47 100644 --- a/tutorials/tutorial5/include/tutorial5/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial5/include/tutorial5/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial5::options::DefaultOptions. /// @headerfile tutorial5/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial5::options::DefaultOptions as template parameter. /// @note Defined in tutorial5/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial5/include/tutorial5/field/FieldBase.h b/tutorials/tutorial5/include/tutorial5/field/FieldBase.h index c511e9580..b3e954418 100644 --- a/tutorials/tutorial5/include/tutorial5/field/FieldBase.h +++ b/tutorials/tutorial5/include/tutorial5/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial5 - diff --git a/tutorials/tutorial5/include/tutorial5/field/MsgId.h b/tutorials/tutorial5/include/tutorial5/field/MsgId.h index c04d8c95d..82c9b3611 100644 --- a/tutorials/tutorial5/include/tutorial5/field/MsgId.h +++ b/tutorials/tutorial5/include/tutorial5/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial5 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial5::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial5::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial5::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial5::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial5::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial5::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial5::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial5::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial5::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial5::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial5::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial5 - diff --git a/tutorials/tutorial5/include/tutorial5/field/MsgIdCommon.h b/tutorials/tutorial5/include/tutorial5/field/MsgIdCommon.h index 1fb9c5fc2..5fe14d337 100644 --- a/tutorials/tutorial5/include/tutorial5/field/MsgIdCommon.h +++ b/tutorials/tutorial5/include/tutorial5/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial5/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial5 namespace field { - /// @brief Common types and functions for /// @ref tutorial5::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial5::field::MsgId field. using ValueType = tutorial5::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial5::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial5::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial5 - diff --git a/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrame.h b/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrame.h index b5046bc94..6f1862d28 100644 --- a/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrame.h +++ b/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "ClientToServerFrame" frame class. @@ -26,7 +26,6 @@ namespace tutorial5 namespace frame { - /// @brief Layers definition of @ref ClientToServerFrame frame class. /// @tparam TOpt Protocol options. /// @see @ref ClientToServerFrame @@ -39,7 +38,7 @@ struct ClientToServerFrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::ClientToServerFrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -52,7 +51,7 @@ struct ClientToServerFrameLayers Data, typename TOpt::frame::ClientToServerFrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -73,26 +72,21 @@ struct ClientToServerFrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial5::frame::ClientToServerFrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial5::frame::ClientToServerFrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -100,7 +94,7 @@ struct ClientToServerFrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Scope for field(s) of @ref Checksum layer. struct ChecksumMembers { @@ -119,26 +113,21 @@ struct ClientToServerFrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial5::frame::ClientToServerFrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial5::frame::ClientToServerFrameLayersCommon::ChecksumMembersCommon::ChecksumFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Checksum". template using Checksum = @@ -147,7 +136,7 @@ struct ClientToServerFrameLayers comms::protocol::checksum::Crc_CCITT, Size >; - + /// @brief Scope for field(s) of @ref Sync layer. struct SyncMembers { @@ -170,26 +159,21 @@ struct ClientToServerFrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial5::frame::ClientToServerFrameLayersCommon::SyncMembersCommon::SyncFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial5::frame::ClientToServerFrameLayersCommon::SyncMembersCommon::SyncFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Sync". template using Sync = @@ -197,11 +181,10 @@ struct ClientToServerFrameLayers typename SyncMembers::SyncField, Checksum >; - + /// @brief Final protocol stack definition. template using Stack = Sync; - }; /// @brief Definition of "ClientToServerFrame" frame class. @@ -242,5 +225,3 @@ class ClientToServerFrame : public } // namespace frame } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrameCommon.h b/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrameCommon.h index f0e7601d5..f7f403f94 100644 --- a/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrameCommon.h +++ b/tutorials/tutorial5/include/tutorial5/frame/ClientToServerFrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial5 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial5::frame::ClientToServerFrame frame. /// @see tutorial5::frame::ClientToServerFrameLayers @@ -31,24 +30,21 @@ struct ClientToServerFrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial5::frame::ClientToServerFrameLayers::SyncMembers::SyncField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial5::frame::ClientToServerFrameLayers::SyncMembers::SyncField field. static const char* name() { return "SyncField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial5::frame::ClientToServerFrameLayers::ChecksumMembers struct. struct ChecksumMembersCommon @@ -60,24 +56,21 @@ struct ClientToServerFrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial5::frame::ClientToServerFrameLayers::ChecksumMembers::ChecksumField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial5::frame::ClientToServerFrameLayers::ChecksumMembers::ChecksumField field. static const char* name() { return "ChecksumField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - + /// @brief Scope for all the common definitions of the fields defined in /// @ref tutorial5::frame::ClientToServerFrameLayers::SizeMembers struct. struct SizeMembersCommon @@ -89,28 +82,22 @@ struct ClientToServerFrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial5::frame::ClientToServerFrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial5::frame::ClientToServerFrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrame.h b/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrame.h index a4b6d13cf..d1b35e9fb 100644 --- a/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrame.h +++ b/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "ServerToClientFrame" frame class. @@ -23,7 +23,6 @@ namespace tutorial5 namespace frame { - /// @brief Layers definition of @ref ServerToClientFrame frame class. /// @tparam TOpt Protocol options. /// @see @ref ServerToClientFrame @@ -36,7 +35,7 @@ struct ServerToClientFrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::ServerToClientFrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct ServerToClientFrameLayers Data, typename TOpt::frame::ServerToClientFrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct ServerToClientFrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial5::frame::ServerToClientFrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial5::frame::ServerToClientFrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct ServerToClientFrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "ServerToClientFrame" frame class. @@ -136,5 +129,3 @@ class ServerToClientFrame : public } // namespace frame } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrameCommon.h b/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrameCommon.h index 78a8abe06..779f22a65 100644 --- a/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrameCommon.h +++ b/tutorials/tutorial5/include/tutorial5/frame/ServerToClientFrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial5 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial5::frame::ServerToClientFrame frame. /// @see tutorial5::frame::ServerToClientFrameLayers @@ -31,28 +30,22 @@ struct ServerToClientFrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial5::frame::ServerToClientFrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial5::frame::ServerToClientFrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/input/AllMessages.h b/tutorials/tutorial5/include/tutorial5/input/AllMessages.h index 1db441492..f12d05471 100644 --- a/tutorials/tutorial5/include/tutorial5/input/AllMessages.h +++ b/tutorials/tutorial5/include/tutorial5/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial5/include/tutorial5/input/ClientInputMessages.h b/tutorials/tutorial5/include/tutorial5/input/ClientInputMessages.h index c7288089d..75420f0ed 100644 --- a/tutorials/tutorial5/include/tutorial5/input/ClientInputMessages.h +++ b/tutorials/tutorial5/include/tutorial5/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial5/include/tutorial5/input/ServerInputMessages.h b/tutorials/tutorial5/include/tutorial5/input/ServerInputMessages.h index a5113acff..fa27692dd 100644 --- a/tutorials/tutorial5/include/tutorial5/input/ServerInputMessages.h +++ b/tutorials/tutorial5/include/tutorial5/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg1.h b/tutorials/tutorial5/include/tutorial5/message/Msg1.h index 8c08e244d..73c623887 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg1.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial5/message/Msg1Common.h" #include "tutorial5/options/DefaultOptions.h" - namespace tutorial5 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial5::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg1Common.h b/tutorials/tutorial5/include/tutorial5/message/Msg1Common.h index daa680807..641675d12 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg1Common.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial5 namespace message { - /// @brief Common types and functions of /// @ref tutorial5::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial5 - - - diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg2.h b/tutorials/tutorial5/include/tutorial5/message/Msg2.h index 49dbfc486..06cf31de1 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg2.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial5/message/Msg2Common.h" #include "tutorial5/options/DefaultOptions.h" - namespace tutorial5 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial5::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg2Common.h b/tutorials/tutorial5/include/tutorial5/message/Msg2Common.h index 53cde78f2..69844546b 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg2Common.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial5 namespace message { - /// @brief Common types and functions of /// @ref tutorial5::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial5 - - - diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg3.h b/tutorials/tutorial5/include/tutorial5/message/Msg3.h index 09438b6ed..bee4130f1 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg3.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial5/message/Msg3Common.h" #include "tutorial5/options/DefaultOptions.h" - namespace tutorial5 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -63,18 +61,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial5::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial5 - - diff --git a/tutorials/tutorial5/include/tutorial5/message/Msg3Common.h b/tutorials/tutorial5/include/tutorial5/message/Msg3Common.h index e86556c15..bf9328be6 100644 --- a/tutorials/tutorial5/include/tutorial5/message/Msg3Common.h +++ b/tutorials/tutorial5/include/tutorial5/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial5 namespace message { - /// @brief Common types and functions of /// @ref tutorial5::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial5 - - - diff --git a/tutorials/tutorial5/include/tutorial5/options/BareMetalDefaultOptions.h b/tutorials/tutorial5/include/tutorial5/options/BareMetalDefaultOptions.h index d0b8c9edd..ec6be1da6 100644 --- a/tutorials/tutorial5/include/tutorial5/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial5/include/tutorial5/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::ClientToServerFrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial5::frame::ClientToServerFrameLayers::Id /// layer. @@ -47,10 +47,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::ClientToServerFrameLayers::Id >; - - }; // struct ClientToServerFrameLayers - + /// @brief Extra options for layers of /// @ref tutorial5::frame::ServerToClientFrame frame. struct ServerToClientFrameLayers : public TBase::frame::ServerToClientFrameLayers @@ -63,7 +61,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::ServerToClientFrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial5::frame::ServerToClientFrameLayers::Id /// layer. @@ -72,13 +70,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::ServerToClientFrameLayers::Id >; - - }; // struct ServerToClientFrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial5/include/tutorial5/options/ClientDefaultOptions.h b/tutorials/tutorial5/include/tutorial5/options/ClientDefaultOptions.h index a163d1769..965475951 100644 --- a/tutorials/tutorial5/include/tutorial5/options/ClientDefaultOptions.h +++ b/tutorials/tutorial5/include/tutorial5/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial5/include/tutorial5/options/DataViewDefaultOptions.h b/tutorials/tutorial5/include/tutorial5/options/DataViewDefaultOptions.h index 91deb40d2..66c618a85 100644 --- a/tutorials/tutorial5/include/tutorial5/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial5/include/tutorial5/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,10 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::ClientToServerFrameLayers::Data >; - - }; // struct ClientToServerFrameLayers - + /// @brief Extra options for layers of /// @ref tutorial5::frame::ServerToClientFrame frame. struct ServerToClientFrameLayers : public TBase::frame::ServerToClientFrameLayers @@ -48,13 +46,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::ServerToClientFrameLayers::Data >; - - }; // struct ServerToClientFrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial5/include/tutorial5/options/DefaultOptions.h b/tutorials/tutorial5/include/tutorial5/options/DefaultOptions.h index 6e3c6d30d..7ba9c50cc 100644 --- a/tutorials/tutorial5/include/tutorial5/options/DefaultOptions.h +++ b/tutorials/tutorial5/include/tutorial5/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,15 +31,13 @@ struct DefaultOptionsT : public TBase /// tutorial5::frame::ClientToServerFrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial5::frame::ClientToServerFrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct ClientToServerFrameLayers - + /// @brief Extra options for layers of /// @ref tutorial5::frame::ServerToClientFrame frame. struct ServerToClientFrameLayers @@ -48,18 +46,13 @@ struct DefaultOptionsT : public TBase /// tutorial5::frame::ServerToClientFrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial5::frame::ServerToClientFrameLayers::Id /// layer. using Id = comms::option::EmptyOption; - - }; // struct ServerToClientFrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial5/include/tutorial5/options/ServerDefaultOptions.h b/tutorials/tutorial5/include/tutorial5/options/ServerDefaultOptions.h index f1fab174e..482442a0a 100644 --- a/tutorials/tutorial5/include/tutorial5/options/ServerDefaultOptions.h +++ b/tutorials/tutorial5/include/tutorial5/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial6/include/tutorial6/Message.h b/tutorials/tutorial6/include/tutorial6/Message.h index b3d1d518c..5308cdcfd 100644 --- a/tutorials/tutorial6/include/tutorial6/Message.h +++ b/tutorials/tutorial6/include/tutorial6/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial6 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial6/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/MsgId.h b/tutorials/tutorial6/include/tutorial6/MsgId.h index 99acb7f9f..300ffd749 100644 --- a/tutorials/tutorial6/include/tutorial6/MsgId.h +++ b/tutorials/tutorial6/include/tutorial6/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial6 - diff --git a/tutorials/tutorial6/include/tutorial6/Version.h b/tutorials/tutorial6/include/tutorial6/Version.h index 3101e8675..a3fb50fe2 100644 --- a/tutorials/tutorial6/include/tutorial6/Version.h +++ b/tutorials/tutorial6/include/tutorial6/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial6 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchClientInputMessage.h index c8d179b1d..ad1df18d8 100644 --- a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial6::options::DefaultOptions. /// @headerfile tutorial6/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial6::options::DefaultOptions as template parameter. /// @note Defined in tutorial6/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchMessage.h b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchMessage.h index 76f0866e7..72412d52a 100644 --- a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchMessage.h +++ b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial6::options::DefaultOptions. /// @headerfile tutorial6/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial6::options::DefaultOptions as template parameter. /// @note Defined in tutorial6/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchServerInputMessage.h index 06487cddd..82f143c87 100644 --- a/tutorials/tutorial6/include/tutorial6/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial6/include/tutorial6/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial6::options::DefaultOptions. /// @headerfile tutorial6/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial6::options::DefaultOptions as template parameter. /// @note Defined in tutorial6/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial6/include/tutorial6/field/FieldBase.h b/tutorials/tutorial6/include/tutorial6/field/FieldBase.h index 6ae366e3c..09376ab0d 100644 --- a/tutorials/tutorial6/include/tutorial6/field/FieldBase.h +++ b/tutorials/tutorial6/include/tutorial6/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial6 - diff --git a/tutorials/tutorial6/include/tutorial6/field/MsgId.h b/tutorials/tutorial6/include/tutorial6/field/MsgId.h index e7abac85f..7a9384fe4 100644 --- a/tutorials/tutorial6/include/tutorial6/field/MsgId.h +++ b/tutorials/tutorial6/include/tutorial6/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial6 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial6::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial6::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial6::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial6::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial6::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial6::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial6::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial6::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial6::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial6::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial6::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial6 - diff --git a/tutorials/tutorial6/include/tutorial6/field/MsgIdCommon.h b/tutorials/tutorial6/include/tutorial6/field/MsgIdCommon.h index de627b181..89b3cc5c6 100644 --- a/tutorials/tutorial6/include/tutorial6/field/MsgIdCommon.h +++ b/tutorials/tutorial6/include/tutorial6/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial6/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial6 namespace field { - /// @brief Common types and functions for /// @ref tutorial6::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial6::field::MsgId field. using ValueType = tutorial6::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial6::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial6::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial6 - diff --git a/tutorials/tutorial6/include/tutorial6/frame/Frame.h b/tutorials/tutorial6/include/tutorial6/frame/Frame.h index 14066d5b8..a6e9e523d 100644 --- a/tutorials/tutorial6/include/tutorial6/frame/Frame.h +++ b/tutorials/tutorial6/include/tutorial6/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial6 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial6::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial6::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/frame/FrameCommon.h b/tutorials/tutorial6/include/tutorial6/frame/FrameCommon.h index a854d82fa..409a4e738 100644 --- a/tutorials/tutorial6/include/tutorial6/frame/FrameCommon.h +++ b/tutorials/tutorial6/include/tutorial6/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial6 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial6::frame::Frame frame. /// @see tutorial6::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial6::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial6::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/input/AllMessages.h b/tutorials/tutorial6/include/tutorial6/input/AllMessages.h index 8ee96d00e..b37efe7b7 100644 --- a/tutorials/tutorial6/include/tutorial6/input/AllMessages.h +++ b/tutorials/tutorial6/include/tutorial6/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial6/include/tutorial6/input/ClientInputMessages.h b/tutorials/tutorial6/include/tutorial6/input/ClientInputMessages.h index 74c6c3c59..b7754274b 100644 --- a/tutorials/tutorial6/include/tutorial6/input/ClientInputMessages.h +++ b/tutorials/tutorial6/include/tutorial6/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial6/include/tutorial6/input/ServerInputMessages.h b/tutorials/tutorial6/include/tutorial6/input/ServerInputMessages.h index 0ebfe5992..de1e83cfb 100644 --- a/tutorials/tutorial6/include/tutorial6/input/ServerInputMessages.h +++ b/tutorials/tutorial6/include/tutorial6/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg1.h b/tutorials/tutorial6/include/tutorial6/message/Msg1.h index 481e1b2fe..57f2fb14b 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg1.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial6/message/Msg1Common.h" #include "tutorial6/options/DefaultOptions.h" - namespace tutorial6 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial6::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg1Common.h b/tutorials/tutorial6/include/tutorial6/message/Msg1Common.h index b1af7d18a..5a34d5e55 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg1Common.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial6 namespace message { - /// @brief Common types and functions of /// @ref tutorial6::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial6 - - - diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg2.h b/tutorials/tutorial6/include/tutorial6/message/Msg2.h index a2750a709..38c53879d 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg2.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial6/message/Msg2Common.h" #include "tutorial6/options/DefaultOptions.h" - namespace tutorial6 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial6::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg2Common.h b/tutorials/tutorial6/include/tutorial6/message/Msg2Common.h index 89e5e02b0..b6b339e3a 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg2Common.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial6 namespace message { - /// @brief Common types and functions of /// @ref tutorial6::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial6 - - - diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg3.h b/tutorials/tutorial6/include/tutorial6/message/Msg3.h index bb8f99551..4ff24f8e0 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg3.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial6/message/Msg3Common.h" #include "tutorial6/options/DefaultOptions.h" - namespace tutorial6 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -63,18 +61,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial6::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial6 - - diff --git a/tutorials/tutorial6/include/tutorial6/message/Msg3Common.h b/tutorials/tutorial6/include/tutorial6/message/Msg3Common.h index b5c27eec2..1d9296157 100644 --- a/tutorials/tutorial6/include/tutorial6/message/Msg3Common.h +++ b/tutorials/tutorial6/include/tutorial6/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial6 namespace message { - /// @brief Common types and functions of /// @ref tutorial6::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial6 - - - diff --git a/tutorials/tutorial6/include/tutorial6/options/BareMetalDefaultOptions.h b/tutorials/tutorial6/include/tutorial6/options/BareMetalDefaultOptions.h index 989624c7a..a0a18beb4 100644 --- a/tutorials/tutorial6/include/tutorial6/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial6/include/tutorial6/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial6::frame::FrameLayers::Id layer. using Id = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial6/include/tutorial6/options/ClientDefaultOptions.h b/tutorials/tutorial6/include/tutorial6/options/ClientDefaultOptions.h index d9e2535b0..5930c3285 100644 --- a/tutorials/tutorial6/include/tutorial6/options/ClientDefaultOptions.h +++ b/tutorials/tutorial6/include/tutorial6/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial6/include/tutorial6/options/DataViewDefaultOptions.h b/tutorials/tutorial6/include/tutorial6/options/DataViewDefaultOptions.h index 633549393..5e7e25456 100644 --- a/tutorials/tutorial6/include/tutorial6/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial6/include/tutorial6/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial6/include/tutorial6/options/DefaultOptions.h b/tutorials/tutorial6/include/tutorial6/options/DefaultOptions.h index 8ac7a17be..cf097c498 100644 --- a/tutorials/tutorial6/include/tutorial6/options/DefaultOptions.h +++ b/tutorials/tutorial6/include/tutorial6/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,17 +31,12 @@ struct DefaultOptionsT : public TBase /// tutorial6::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial6::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial6/include/tutorial6/options/ServerDefaultOptions.h b/tutorials/tutorial6/include/tutorial6/options/ServerDefaultOptions.h index 61d40c4bc..34124b47d 100644 --- a/tutorials/tutorial6/include/tutorial6/options/ServerDefaultOptions.h +++ b/tutorials/tutorial6/include/tutorial6/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial7/include/tutorial7/Message.h b/tutorials/tutorial7/include/tutorial7/Message.h index 10c7ca935..45d26820e 100644 --- a/tutorials/tutorial7/include/tutorial7/Message.h +++ b/tutorials/tutorial7/include/tutorial7/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial7 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial7/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/MsgId.h b/tutorials/tutorial7/include/tutorial7/MsgId.h index dba01b242..9582f7c55 100644 --- a/tutorials/tutorial7/include/tutorial7/MsgId.h +++ b/tutorials/tutorial7/include/tutorial7/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial7 - diff --git a/tutorials/tutorial7/include/tutorial7/Version.h b/tutorials/tutorial7/include/tutorial7/Version.h index 4e195a6ca..dd6a1adae 100644 --- a/tutorials/tutorial7/include/tutorial7/Version.h +++ b/tutorials/tutorial7/include/tutorial7/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial7 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchClientInputMessage.h index c75458b33..9808adfb6 100644 --- a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial7::options::DefaultOptions. /// @headerfile tutorial7/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial7::options::DefaultOptions as template parameter. /// @note Defined in tutorial7/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchMessage.h b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchMessage.h index 7ce3f20d9..c5aa40aef 100644 --- a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchMessage.h +++ b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial7::options::DefaultOptions. /// @headerfile tutorial7/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial7::options::DefaultOptions as template parameter. /// @note Defined in tutorial7/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchServerInputMessage.h index 640e842b7..70a23382d 100644 --- a/tutorials/tutorial7/include/tutorial7/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial7/include/tutorial7/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial7::options::DefaultOptions. /// @headerfile tutorial7/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial7::options::DefaultOptions as template parameter. /// @note Defined in tutorial7/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial7/include/tutorial7/field/FieldBase.h b/tutorials/tutorial7/include/tutorial7/field/FieldBase.h index 36e9f2e32..7a15059c6 100644 --- a/tutorials/tutorial7/include/tutorial7/field/FieldBase.h +++ b/tutorials/tutorial7/include/tutorial7/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial7 - diff --git a/tutorials/tutorial7/include/tutorial7/field/MsgId.h b/tutorials/tutorial7/include/tutorial7/field/MsgId.h index 60f00e7ca..ef912acde 100644 --- a/tutorials/tutorial7/include/tutorial7/field/MsgId.h +++ b/tutorials/tutorial7/include/tutorial7/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial7 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial7::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial7::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial7::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial7::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial7::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial7::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial7::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial7::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial7::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial7::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial7::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial7 - diff --git a/tutorials/tutorial7/include/tutorial7/field/MsgIdCommon.h b/tutorials/tutorial7/include/tutorial7/field/MsgIdCommon.h index 981f9de2d..945fa58c5 100644 --- a/tutorials/tutorial7/include/tutorial7/field/MsgIdCommon.h +++ b/tutorials/tutorial7/include/tutorial7/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial7/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial7 namespace field { - /// @brief Common types and functions for /// @ref tutorial7::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial7::field::MsgId field. using ValueType = tutorial7::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial7::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial7::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial7 - diff --git a/tutorials/tutorial7/include/tutorial7/frame/Frame.h b/tutorials/tutorial7/include/tutorial7/frame/Frame.h index 8874f5e92..5d2b1c52d 100644 --- a/tutorials/tutorial7/include/tutorial7/frame/Frame.h +++ b/tutorials/tutorial7/include/tutorial7/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial7 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial7::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial7::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/frame/FrameCommon.h b/tutorials/tutorial7/include/tutorial7/frame/FrameCommon.h index f4286bc0f..9cae0d1be 100644 --- a/tutorials/tutorial7/include/tutorial7/frame/FrameCommon.h +++ b/tutorials/tutorial7/include/tutorial7/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial7 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial7::frame::Frame frame. /// @see tutorial7::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial7::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial7::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/input/AllMessages.h b/tutorials/tutorial7/include/tutorial7/input/AllMessages.h index 0634a4e04..2f189850f 100644 --- a/tutorials/tutorial7/include/tutorial7/input/AllMessages.h +++ b/tutorials/tutorial7/include/tutorial7/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial7/include/tutorial7/input/ClientInputMessages.h b/tutorials/tutorial7/include/tutorial7/input/ClientInputMessages.h index c085a433d..f08d78d17 100644 --- a/tutorials/tutorial7/include/tutorial7/input/ClientInputMessages.h +++ b/tutorials/tutorial7/include/tutorial7/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial7/include/tutorial7/input/ServerInputMessages.h b/tutorials/tutorial7/include/tutorial7/input/ServerInputMessages.h index 4247e384a..4f85eed9c 100644 --- a/tutorials/tutorial7/include/tutorial7/input/ServerInputMessages.h +++ b/tutorials/tutorial7/include/tutorial7/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg1.h b/tutorials/tutorial7/include/tutorial7/message/Msg1.h index b223fc991..bb07c8fa0 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg1.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial7/message/Msg1Common.h" #include "tutorial7/options/DefaultOptions.h" - namespace tutorial7 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial7::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg1Common.h b/tutorials/tutorial7/include/tutorial7/message/Msg1Common.h index dea0489ec..c76a11397 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg1Common.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial7 namespace message { - /// @brief Common types and functions of /// @ref tutorial7::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial7 - - - diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg2.h b/tutorials/tutorial7/include/tutorial7/message/Msg2.h index 4d667b2ac..af35f270f 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg2.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial7/message/Msg2Common.h" #include "tutorial7/options/DefaultOptions.h" - namespace tutorial7 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial7::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg2Common.h b/tutorials/tutorial7/include/tutorial7/message/Msg2Common.h index ec5a9efff..1b6cea3d3 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg2Common.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial7 namespace message { - /// @brief Common types and functions of /// @ref tutorial7::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial7 - - - diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg3.h b/tutorials/tutorial7/include/tutorial7/message/Msg3.h index 0de6c53e7..032d5adb8 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg3.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial7/message/Msg3Common.h" #include "tutorial7/options/DefaultOptions.h" - namespace tutorial7 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -63,18 +61,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial7::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial7 - - diff --git a/tutorials/tutorial7/include/tutorial7/message/Msg3Common.h b/tutorials/tutorial7/include/tutorial7/message/Msg3Common.h index 32179b35d..9d01a33fc 100644 --- a/tutorials/tutorial7/include/tutorial7/message/Msg3Common.h +++ b/tutorials/tutorial7/include/tutorial7/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial7 namespace message { - /// @brief Common types and functions of /// @ref tutorial7::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial7 - - - diff --git a/tutorials/tutorial7/include/tutorial7/options/BareMetalDefaultOptions.h b/tutorials/tutorial7/include/tutorial7/options/BareMetalDefaultOptions.h index bc9e35a00..76140db98 100644 --- a/tutorials/tutorial7/include/tutorial7/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial7/include/tutorial7/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial7::frame::FrameLayers::Id layer. using Id = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial7/include/tutorial7/options/ClientDefaultOptions.h b/tutorials/tutorial7/include/tutorial7/options/ClientDefaultOptions.h index 80032d2e9..514ceb8cc 100644 --- a/tutorials/tutorial7/include/tutorial7/options/ClientDefaultOptions.h +++ b/tutorials/tutorial7/include/tutorial7/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial7/include/tutorial7/options/DataViewDefaultOptions.h b/tutorials/tutorial7/include/tutorial7/options/DataViewDefaultOptions.h index 0f19ad837..01d86e6d7 100644 --- a/tutorials/tutorial7/include/tutorial7/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial7/include/tutorial7/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial7/include/tutorial7/options/DefaultOptions.h b/tutorials/tutorial7/include/tutorial7/options/DefaultOptions.h index 52d1cbf2f..25733fdbb 100644 --- a/tutorials/tutorial7/include/tutorial7/options/DefaultOptions.h +++ b/tutorials/tutorial7/include/tutorial7/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,17 +31,12 @@ struct DefaultOptionsT : public TBase /// tutorial7::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial7::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial7/include/tutorial7/options/ServerDefaultOptions.h b/tutorials/tutorial7/include/tutorial7/options/ServerDefaultOptions.h index 314636579..df94e3061 100644 --- a/tutorials/tutorial7/include/tutorial7/options/ServerDefaultOptions.h +++ b/tutorials/tutorial7/include/tutorial7/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial8/include/tutorial8/Message.h b/tutorials/tutorial8/include/tutorial8/Message.h index 5d4c91655..d7970bcf5 100644 --- a/tutorials/tutorial8/include/tutorial8/Message.h +++ b/tutorials/tutorial8/include/tutorial8/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial8 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial8/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/MsgId.h b/tutorials/tutorial8/include/tutorial8/MsgId.h index b9514e343..b02b760b7 100644 --- a/tutorials/tutorial8/include/tutorial8/MsgId.h +++ b/tutorials/tutorial8/include/tutorial8/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -16,7 +16,7 @@ enum MsgId : std::uint8_t MsgId_M1 = 1, ///< message id of Message 1 message. , MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 3, ///< Last defined value., @@ -24,4 +24,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial8 - diff --git a/tutorials/tutorial8/include/tutorial8/Version.h b/tutorials/tutorial8/include/tutorial8/Version.h index 85ccec38b..b5cd7e71e 100644 --- a/tutorials/tutorial8/include/tutorial8/Version.h +++ b/tutorials/tutorial8/include/tutorial8/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial8 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchClientInputMessage.h index ae58cb504..a2039f99d 100644 --- a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial8::options::DefaultOptions. /// @headerfile tutorial8/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial8::options::DefaultOptions as template parameter. /// @note Defined in tutorial8/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchMessage.h b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchMessage.h index e9ff8687b..21ca51653 100644 --- a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchMessage.h +++ b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -134,7 +134,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial8::options::DefaultOptions. /// @headerfile tutorial8/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct MsgDispatcher /// @ref tutorial8::options::DefaultOptions as template parameter. /// @note Defined in tutorial8/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchServerInputMessage.h index bf73d3781..07876237b 100644 --- a/tutorials/tutorial8/include/tutorial8/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial8/include/tutorial8/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -134,7 +134,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial8::options::DefaultOptions. /// @headerfile tutorial8/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -194,9 +194,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial8::options::DefaultOptions as template parameter. /// @note Defined in tutorial8/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial8/include/tutorial8/field/FieldBase.h b/tutorials/tutorial8/include/tutorial8/field/FieldBase.h index 4fc384a7e..d2349b52e 100644 --- a/tutorials/tutorial8/include/tutorial8/field/FieldBase.h +++ b/tutorials/tutorial8/include/tutorial8/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial8 - diff --git a/tutorials/tutorial8/include/tutorial8/field/MsgId.h b/tutorials/tutorial8/include/tutorial8/field/MsgId.h index 3f34bdb25..2af935134 100644 --- a/tutorials/tutorial8/include/tutorial8/field/MsgId.h +++ b/tutorials/tutorial8/include/tutorial8/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial8 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial8::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial8::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial8::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial8::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial8::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial8::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial8::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial8::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial8::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial8::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial8::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial8 - diff --git a/tutorials/tutorial8/include/tutorial8/field/MsgIdCommon.h b/tutorials/tutorial8/include/tutorial8/field/MsgIdCommon.h index 5d9d05d80..41a3622b3 100644 --- a/tutorials/tutorial8/include/tutorial8/field/MsgIdCommon.h +++ b/tutorials/tutorial8/include/tutorial8/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial8/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial8 namespace field { - /// @brief Common types and functions for /// @ref tutorial8::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial8::field::MsgId field. using ValueType = tutorial8::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial8::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -63,19 +60,15 @@ struct MsgIdCommon "Message 3" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial8::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial8 - diff --git a/tutorials/tutorial8/include/tutorial8/frame/Frame.h b/tutorials/tutorial8/include/tutorial8/frame/Frame.h index 23f08606e..b342c8dea 100644 --- a/tutorials/tutorial8/include/tutorial8/frame/Frame.h +++ b/tutorials/tutorial8/include/tutorial8/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial8 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial8::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial8::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/frame/FrameCommon.h b/tutorials/tutorial8/include/tutorial8/frame/FrameCommon.h index 50c8e414e..daaac93b8 100644 --- a/tutorials/tutorial8/include/tutorial8/frame/FrameCommon.h +++ b/tutorials/tutorial8/include/tutorial8/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial8 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial8::frame::Frame frame. /// @see tutorial8::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial8::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial8::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/input/AllMessages.h b/tutorials/tutorial8/include/tutorial8/input/AllMessages.h index c12f4a35d..98bb209ae 100644 --- a/tutorials/tutorial8/include/tutorial8/input/AllMessages.h +++ b/tutorials/tutorial8/include/tutorial8/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial8/include/tutorial8/input/ClientInputMessages.h b/tutorials/tutorial8/include/tutorial8/input/ClientInputMessages.h index 186fee97d..bd7e86809 100644 --- a/tutorials/tutorial8/include/tutorial8/input/ClientInputMessages.h +++ b/tutorials/tutorial8/include/tutorial8/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial8/include/tutorial8/input/ServerInputMessages.h b/tutorials/tutorial8/include/tutorial8/input/ServerInputMessages.h index 36a1725a7..768fa5f1b 100644 --- a/tutorials/tutorial8/include/tutorial8/input/ServerInputMessages.h +++ b/tutorials/tutorial8/include/tutorial8/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg1.h b/tutorials/tutorial8/include/tutorial8/message/Msg1.h index 69a019d0d..25e6f34ef 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg1.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial8/message/Msg1Common.h" #include "tutorial8/options/DefaultOptions.h" - namespace tutorial8 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -63,18 +61,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial8::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg1Common.h b/tutorials/tutorial8/include/tutorial8/message/Msg1Common.h index 305746d68..d3b98d5af 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg1Common.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial8 namespace message { - /// @brief Common types and functions of /// @ref tutorial8::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial8 - - - diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg2.h b/tutorials/tutorial8/include/tutorial8/message/Msg2.h index 76b989971..c098e861d 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg2.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial8/message/Msg2Common.h" #include "tutorial8/options/DefaultOptions.h" - namespace tutorial8 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -63,18 +61,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial8::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg2Common.h b/tutorials/tutorial8/include/tutorial8/message/Msg2Common.h index abc2f6a60..9a4978d2f 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg2Common.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial8 namespace message { - /// @brief Common types and functions of /// @ref tutorial8::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial8 - - - diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg3.h b/tutorials/tutorial8/include/tutorial8/message/Msg3.h index 45f8e3773..db7338904 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg3.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial8/message/Msg3Common.h" #include "tutorial8/options/DefaultOptions.h" - namespace tutorial8 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -63,18 +61,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial8::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial8 - - diff --git a/tutorials/tutorial8/include/tutorial8/message/Msg3Common.h b/tutorials/tutorial8/include/tutorial8/message/Msg3Common.h index 0799e7a9f..fc9752497 100644 --- a/tutorials/tutorial8/include/tutorial8/message/Msg3Common.h +++ b/tutorials/tutorial8/include/tutorial8/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial8 namespace message { - /// @brief Common types and functions of /// @ref tutorial8::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial8 - - - diff --git a/tutorials/tutorial8/include/tutorial8/options/BareMetalDefaultOptions.h b/tutorials/tutorial8/include/tutorial8/options/BareMetalDefaultOptions.h index 60412f97b..c400b89f6 100644 --- a/tutorials/tutorial8/include/tutorial8/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial8/include/tutorial8/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial8::frame::FrameLayers::Id layer. using Id = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial8/include/tutorial8/options/ClientDefaultOptions.h b/tutorials/tutorial8/include/tutorial8/options/ClientDefaultOptions.h index 005e491c6..c145d0e24 100644 --- a/tutorials/tutorial8/include/tutorial8/options/ClientDefaultOptions.h +++ b/tutorials/tutorial8/include/tutorial8/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. diff --git a/tutorials/tutorial8/include/tutorial8/options/DataViewDefaultOptions.h b/tutorials/tutorial8/include/tutorial8/options/DataViewDefaultOptions.h index 3f3f5e945..223cf34ac 100644 --- a/tutorials/tutorial8/include/tutorial8/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial8/include/tutorial8/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial8/include/tutorial8/options/DefaultOptions.h b/tutorials/tutorial8/include/tutorial8/options/DefaultOptions.h index 4f4388008..501efbad2 100644 --- a/tutorials/tutorial8/include/tutorial8/options/DefaultOptions.h +++ b/tutorials/tutorial8/include/tutorial8/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -31,17 +31,12 @@ struct DefaultOptionsT : public TBase /// tutorial8::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial8::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial8/include/tutorial8/options/ServerDefaultOptions.h b/tutorials/tutorial8/include/tutorial8/options/ServerDefaultOptions.h index 47fae2244..6a002eabe 100644 --- a/tutorials/tutorial8/include/tutorial8/options/ServerDefaultOptions.h +++ b/tutorials/tutorial8/include/tutorial8/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. diff --git a/tutorials/tutorial9/include/tutorial9/Message.h b/tutorials/tutorial9/include/tutorial9/Message.h index 155bc8cdd..abe076a7d 100644 --- a/tutorials/tutorial9/include/tutorial9/Message.h +++ b/tutorials/tutorial9/include/tutorial9/Message.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message" interface class. @@ -12,7 +12,6 @@ namespace tutorial9 { - /// @brief Definition of "Message" common interface class. /// @tparam TOpt Interface definition options /// @headerfile tutorial9/Message.h @@ -25,5 +24,3 @@ using Message = >; } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/MsgId.h b/tutorials/tutorial9/include/tutorial9/MsgId.h index 2686ea83e..ff36193f5 100644 --- a/tutorials/tutorial9/include/tutorial9/MsgId.h +++ b/tutorials/tutorial9/include/tutorial9/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of message ids enumeration. @@ -17,7 +17,7 @@ enum MsgId : std::uint8_t MsgId_M2 = 2, ///< message id of Message 2 message. , MsgId_M3 = 3, ///< message id of Message 3 message. , MsgId_M4 = 4, ///< message id of Message 4 message. , - + // --- Extra values generated for convenience ---, MsgId_FirstValue = 1, ///< First defined value., MsgId_LastValue = 4, ///< Last defined value., @@ -25,4 +25,3 @@ enum MsgId : std::uint8_t }; } // namespace tutorial9 - diff --git a/tutorials/tutorial9/include/tutorial9/Version.h b/tutorials/tutorial9/include/tutorial9/Version.h index 1d47420fd..d8b653b64 100644 --- a/tutorials/tutorial9/include/tutorial9/Version.h +++ b/tutorials/tutorial9/include/tutorial9/Version.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains protocol version definition. @@ -22,6 +22,5 @@ inline constexpr unsigned specVersion() } // namespace tutorial9 // Generated compile time check for minimal supported version of the COMMS library -static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(), +static_assert(COMMS_MAKE_VERSION(5, 0, 3) <= comms::version(), "The version of COMMS library is too old"); - diff --git a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchClientInputMessage.h b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchClientInputMessage.h index dd2308610..6a44a1282 100644 --- a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchClientInputMessage.h +++ b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchClientInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchClientInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial9::options::DefaultOptions. /// @headerfile tutorial9/dispatch/DispatchClientInputMessage.h -template +template struct ClientInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ClientInputMsgDispatcher /// @ref tutorial9::options::DefaultOptions as template parameter. /// @note Defined in tutorial9/dispatch/DispatchClientInputMessage.h using ClientInputMsgDispatcherDefaultOptions = - ClientInputMsgDispatcher; - - + ClientInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchMessage.h b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchMessage.h index 94d5644af..4a6a24e59 100644 --- a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchMessage.h +++ b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for all input messages. @@ -139,7 +139,7 @@ auto dispatchMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial9::options::DefaultOptions. /// @headerfile tutorial9/dispatch/DispatchMessage.h -template +template struct MsgDispatcher { /// @brief Class detection tag @@ -199,9 +199,7 @@ struct MsgDispatcher /// @ref tutorial9::options::DefaultOptions as template parameter. /// @note Defined in tutorial9/dispatch/DispatchMessage.h using MsgDispatcherDefaultOptions = - MsgDispatcher; - - + MsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchServerInputMessage.h b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchServerInputMessage.h index 6a796ca9e..1e5447beb 100644 --- a/tutorials/tutorial9/include/tutorial9/dispatch/DispatchServerInputMessage.h +++ b/tutorials/tutorial9/include/tutorial9/dispatch/DispatchServerInputMessage.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains dispatch to handling function(s) for client input input messages. @@ -129,7 +129,7 @@ auto dispatchServerInputMessageDefaultOptions( /// @tparam TProtOptions Protocol options struct used for the application, /// like @ref tutorial9::options::DefaultOptions. /// @headerfile tutorial9/dispatch/DispatchServerInputMessage.h -template +template struct ServerInputMsgDispatcher { /// @brief Class detection tag @@ -189,9 +189,7 @@ struct ServerInputMsgDispatcher /// @ref tutorial9::options::DefaultOptions as template parameter. /// @note Defined in tutorial9/dispatch/DispatchServerInputMessage.h using ServerInputMsgDispatcherDefaultOptions = - ServerInputMsgDispatcher; - - + ServerInputMsgDispatcher<>; } // namespace dispatch diff --git a/tutorials/tutorial9/include/tutorial9/field/FieldBase.h b/tutorials/tutorial9/include/tutorial9/field/FieldBase.h index d2512d74d..e2b732ec0 100644 --- a/tutorials/tutorial9/include/tutorial9/field/FieldBase.h +++ b/tutorials/tutorial9/include/tutorial9/field/FieldBase.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of base class of all the fields. @@ -27,4 +27,3 @@ using FieldBase = } // namespace field } // namespace tutorial9 - diff --git a/tutorials/tutorial9/include/tutorial9/field/MsgId.h b/tutorials/tutorial9/include/tutorial9/field/MsgId.h index 89f8d08cc..22b838b04 100644 --- a/tutorials/tutorial9/include/tutorial9/field/MsgId.h +++ b/tutorials/tutorial9/include/tutorial9/field/MsgId.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "MsgId" field. @@ -17,7 +17,6 @@ namespace tutorial9 namespace field { - /// @brief Definition of "MsgId" field. /// @see @ref tutorial9::MsgId /// @tparam TOpt Protocol options. @@ -41,46 +40,48 @@ class MsgId : public public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Single value name info entry. using ValueNameInfo = tutorial9::field::MsgIdCommon::ValueNameInfo; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @see @ref tutorial9::field::MsgIdCommon::ValueNamesMapInfo. using ValueNamesMapInfo = tutorial9::field::MsgIdCommon::ValueNamesMapInfo; - + /// @brief Retrieve name of the enum value. /// @see @ref tutorial9::field::MsgIdCommon::valueName(). static const char* valueName(ValueType val) { return tutorial9::field::MsgIdCommon::valueName(val); } - + + /// @brief Retrieve name of the enum value. + /// @see @ref tutorial9::field::MsgIdCommon::valueName(). + static const char* valueNameOf(ValueType val) + { + return tutorial9::field::MsgIdCommon::valueName(val); + } + /// @brief Retrieve name of the @b current value const char* valueName() const { return valueName(Base::getValue()); } - + /// @brief Retrieve map of enum value names. /// @see @ref tutorial9::field::MsgIdCommon::valueNamesMap(). static ValueNamesMapInfo valueNamesMap() { return tutorial9::field::MsgIdCommon::valueNamesMap(); } - - + /// @brief Name of the field. static const char* name() { return tutorial9::field::MsgIdCommon::name(); } - - }; - } // namespace field } // namespace tutorial9 - diff --git a/tutorials/tutorial9/include/tutorial9/field/MsgIdCommon.h b/tutorials/tutorial9/include/tutorial9/field/MsgIdCommon.h index f07a2db96..f6392077d 100644 --- a/tutorials/tutorial9/include/tutorial9/field/MsgIdCommon.h +++ b/tutorials/tutorial9/include/tutorial9/field/MsgIdCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -6,9 +6,7 @@ #pragma once -#include #include -#include #include #include #include "tutorial9/MsgId.h" @@ -19,7 +17,6 @@ namespace tutorial9 namespace field { - /// @brief Common types and functions for /// @ref tutorial9::field::MsgId field. struct MsgIdCommon @@ -27,21 +24,21 @@ struct MsgIdCommon /// @brief Values enumerator for /// @ref tutorial9::field::MsgId field. using ValueType = tutorial9::MsgId; - + /// @brief Single value name info entry using ValueNameInfo = const char*; - + /// @brief Type returned from @ref valueNamesMap() member function. /// @details The @b first value of the pair is pointer to the map array, /// The @b second value of the pair is the size of the array. using ValueNamesMapInfo = std::pair; - + /// @brief Name of the @ref tutorial9::field::MsgId field. static const char* name() { return "MsgId"; } - + /// @brief Retrieve name of the enum value static const char* valueName(ValueType val) { @@ -49,10 +46,10 @@ struct MsgIdCommon if (namesMapInfo.second <= static_cast(val)) { return nullptr; } - + return namesMapInfo.first[static_cast(val)]; } - + /// @brief Retrieve map of enum value names static ValueNamesMapInfo valueNamesMap() { @@ -64,19 +61,15 @@ struct MsgIdCommon "Message 4" }; static const std::size_t MapSize = std::extent::value; - + return std::make_pair(&Map[0], MapSize); } - - }; /// @brief Values enumerator for /// @ref tutorial9::field::MsgId field. using MsgIdVal = MsgIdCommon::ValueType; - } // namespace field } // namespace tutorial9 - diff --git a/tutorials/tutorial9/include/tutorial9/frame/Frame.h b/tutorials/tutorial9/include/tutorial9/frame/Frame.h index 85a14c437..d3c41da8d 100644 --- a/tutorials/tutorial9/include/tutorial9/frame/Frame.h +++ b/tutorials/tutorial9/include/tutorial9/frame/Frame.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Frame" frame class. @@ -23,7 +23,6 @@ namespace tutorial9 namespace frame { - /// @brief Layers definition of @ref Frame frame class. /// @tparam TOpt Protocol options. /// @see @ref Frame @@ -36,7 +35,7 @@ struct FrameLayers comms::protocol::MsgDataLayer< typename TOpt::frame::FrameLayers::Data >; - + /// @brief Definition of layer "Id". template using Id = @@ -49,7 +48,7 @@ struct FrameLayers Data, typename TOpt::frame::FrameLayers::Id >; - + /// @brief Scope for field(s) of @ref Size layer. struct SizeMembers { @@ -68,26 +67,21 @@ struct FrameLayers public: /// @brief Re-definition of the value type. using ValueType = typename Base::ValueType; - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return tutorial9::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::hasSpecials(); } - - + /// @brief Name of the field. static const char* name() { return tutorial9::frame::FrameLayersCommon::SizeMembersCommon::SizeFieldCommon::name(); } - - }; - - }; - + /// @brief Definition of layer "Size". template using Size = @@ -95,11 +89,10 @@ struct FrameLayers typename SizeMembers::SizeField, Id >; - + /// @brief Final protocol stack definition. template using Stack = Size; - }; /// @brief Definition of "Frame" frame class. @@ -136,5 +129,3 @@ class Frame : public } // namespace frame } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/frame/FrameCommon.h b/tutorials/tutorial9/include/tutorial9/frame/FrameCommon.h index e724d0ef8..83b048772 100644 --- a/tutorials/tutorial9/include/tutorial9/frame/FrameCommon.h +++ b/tutorials/tutorial9/include/tutorial9/frame/FrameCommon.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -14,7 +14,6 @@ namespace tutorial9 namespace frame { - /// @brief Common types and functions of fields using in definition of /// @ref tutorial9::frame::Frame frame. /// @see tutorial9::frame::FrameLayers @@ -31,28 +30,22 @@ struct FrameLayersCommon /// @brief Re-definition of the value type used by /// tutorial9::frame::FrameLayers::SizeMembers::SizeField field. using ValueType = std::uint16_t; - + /// @brief Name of the @ref tutorial9::frame::FrameLayers::SizeMembers::SizeField field. static const char* name() { return "SizeField"; } - + /// @brief Compile time detection of special values presence. static constexpr bool hasSpecials() { return false; } - - }; - }; - }; } // namespace frame } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/input/AllMessages.h b/tutorials/tutorial9/include/tutorial9/input/AllMessages.h index e04d976cd..0af5ae3a7 100644 --- a/tutorials/tutorial9/include/tutorial9/input/AllMessages.h +++ b/tutorials/tutorial9/include/tutorial9/input/AllMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the AllMessages messages bundle. diff --git a/tutorials/tutorial9/include/tutorial9/input/ClientInputMessages.h b/tutorials/tutorial9/include/tutorial9/input/ClientInputMessages.h index fee66b18a..cc2ff5712 100644 --- a/tutorials/tutorial9/include/tutorial9/input/ClientInputMessages.h +++ b/tutorials/tutorial9/include/tutorial9/input/ClientInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ClientInputMessages messages bundle. diff --git a/tutorials/tutorial9/include/tutorial9/input/ServerInputMessages.h b/tutorials/tutorial9/include/tutorial9/input/ServerInputMessages.h index 224465c86..016f56a4e 100644 --- a/tutorials/tutorial9/include/tutorial9/input/ServerInputMessages.h +++ b/tutorials/tutorial9/include/tutorial9/input/ServerInputMessages.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of the ServerInputMessages messages bundle. diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg1.h b/tutorials/tutorial9/include/tutorial9/message/Msg1.h index 43823edbe..9af209949 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg1.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg1.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 1" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial9/message/Msg1Common.h" #include "tutorial9/options/DefaultOptions.h" - namespace tutorial9 { namespace message { - /// @brief Fields of @ref Msg1. /// @tparam TOpt Extra options /// @see @ref Msg1 @@ -65,18 +63,14 @@ class Msg1 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial9::message::Msg1Common::name(); } - - }; } // namespace message } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg1Common.h b/tutorials/tutorial9/include/tutorial9/message/Msg1Common.h index 0b9b09f3d..21dfe7506 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg1Common.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg1Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial9 namespace message { - /// @brief Common types and functions of /// @ref tutorial9::message::Msg1 message. struct Msg1Common @@ -22,12 +21,8 @@ struct Msg1Common { return "Message 1"; } - }; } // namespace message } // namespace tutorial9 - - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg2.h b/tutorials/tutorial9/include/tutorial9/message/Msg2.h index 40ae9eaaa..fa843853d 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg2.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg2.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 2" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial9/message/Msg2Common.h" #include "tutorial9/options/DefaultOptions.h" - namespace tutorial9 { namespace message { - /// @brief Fields of @ref Msg2. /// @tparam TOpt Extra options /// @see @ref Msg2 @@ -65,18 +63,14 @@ class Msg2 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial9::message::Msg2Common::name(); } - - }; } // namespace message } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg2Common.h b/tutorials/tutorial9/include/tutorial9/message/Msg2Common.h index 6e9f99942..57a4b43ce 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg2Common.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg2Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial9 namespace message { - /// @brief Common types and functions of /// @ref tutorial9::message::Msg2 message. struct Msg2Common @@ -22,12 +21,8 @@ struct Msg2Common { return "Message 2"; } - }; } // namespace message } // namespace tutorial9 - - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg3.h b/tutorials/tutorial9/include/tutorial9/message/Msg3.h index e4d6bc588..2eaeff3a4 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg3.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg3.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 3" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial9/message/Msg3Common.h" #include "tutorial9/options/DefaultOptions.h" - namespace tutorial9 { namespace message { - /// @brief Fields of @ref Msg3. /// @tparam TOpt Extra options /// @see @ref Msg3 @@ -65,18 +63,14 @@ class Msg3 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial9::message::Msg3Common::name(); } - - }; } // namespace message } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg3Common.h b/tutorials/tutorial9/include/tutorial9/message/Msg3Common.h index 098517670..22593363e 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg3Common.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg3Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial9 namespace message { - /// @brief Common types and functions of /// @ref tutorial9::message::Msg3 message. struct Msg3Common @@ -22,12 +21,8 @@ struct Msg3Common { return "Message 3"; } - }; } // namespace message } // namespace tutorial9 - - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg4.h b/tutorials/tutorial9/include/tutorial9/message/Msg4.h index 0a42cf418..29e4dec56 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg4.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg4.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of "Message 4" message and its fields. @@ -11,14 +11,12 @@ #include "tutorial9/message/Msg4Common.h" #include "tutorial9/options/DefaultOptions.h" - namespace tutorial9 { namespace message { - /// @brief Fields of @ref Msg4. /// @tparam TOpt Extra options /// @see @ref Msg4 @@ -65,18 +63,14 @@ class Msg4 : public static const std::size_t MsgMaxLen = Base::doMaxLength(); static_assert(MsgMinLen == 0U, "Unexpected min serialisation length"); static_assert(MsgMaxLen == 0U, "Unexpected max serialisation length"); - + /// @brief Name of the message. static const char* doName() { return tutorial9::message::Msg4Common::name(); } - - }; } // namespace message } // namespace tutorial9 - - diff --git a/tutorials/tutorial9/include/tutorial9/message/Msg4Common.h b/tutorials/tutorial9/include/tutorial9/message/Msg4Common.h index 23e2aec8b..221f5b40f 100644 --- a/tutorials/tutorial9/include/tutorial9/message/Msg4Common.h +++ b/tutorials/tutorial9/include/tutorial9/message/Msg4Common.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains common template parameters independent functionality of @@ -12,7 +12,6 @@ namespace tutorial9 namespace message { - /// @brief Common types and functions of /// @ref tutorial9::message::Msg4 message. struct Msg4Common @@ -22,12 +21,8 @@ struct Msg4Common { return "Message 4"; } - }; } // namespace message } // namespace tutorial9 - - - diff --git a/tutorials/tutorial9/include/tutorial9/options/BareMetalDefaultOptions.h b/tutorials/tutorial9/include/tutorial9/options/BareMetalDefaultOptions.h index 50ee71158..cccd2e534 100644 --- a/tutorials/tutorial9/include/tutorial9/options/BareMetalDefaultOptions.h +++ b/tutorials/tutorial9/include/tutorial9/options/BareMetalDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol bare metal default options. @@ -38,7 +38,7 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::FixedSizeStorage, typename TBase::frame::FrameLayers::Data >; - + /// @brief Extra options for @ref /// tutorial9::frame::FrameLayers::Id layer. using Id = @@ -46,13 +46,8 @@ struct BareMetalDefaultOptionsT : public TBase comms::option::app::InPlaceAllocation, typename TBase::frame::FrameLayers::Id >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref BareMetalDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial9/include/tutorial9/options/ClientDefaultOptions.h b/tutorials/tutorial9/include/tutorial9/options/ClientDefaultOptions.h index 6c6009322..aa647aa07 100644 --- a/tutorials/tutorial9/include/tutorial9/options/ClientDefaultOptions.h +++ b/tutorials/tutorial9/include/tutorial9/options/ClientDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol client default options. @@ -28,7 +28,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg1 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg2 message. using Msg2 = @@ -37,7 +37,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg2 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg3 message. using Msg3 = @@ -46,7 +46,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg3 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg4 message. using Msg4 = @@ -55,10 +55,7 @@ struct ClientDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg4 >; - }; // struct message - - }; /// @brief Alias to @ref ClientDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial9/include/tutorial9/options/DataViewDefaultOptions.h b/tutorials/tutorial9/include/tutorial9/options/DataViewDefaultOptions.h index 145fb11ea..b80a8c3e3 100644 --- a/tutorials/tutorial9/include/tutorial9/options/DataViewDefaultOptions.h +++ b/tutorials/tutorial9/include/tutorial9/options/DataViewDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol data view default options. @@ -32,13 +32,8 @@ struct DataViewDefaultOptionsT : public TBase comms::option::app::OrigDataView, typename TBase::frame::FrameLayers::Data >; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Alias to @ref DataViewDefaultOptionsT with default template parameter. diff --git a/tutorials/tutorial9/include/tutorial9/options/DefaultOptions.h b/tutorials/tutorial9/include/tutorial9/options/DefaultOptions.h index f627a9cf6..6964573a6 100644 --- a/tutorials/tutorial9/include/tutorial9/options/DefaultOptions.h +++ b/tutorials/tutorial9/include/tutorial9/options/DefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol default options. @@ -26,21 +26,20 @@ struct DefaultOptionsT : public TBase /// @brief Extra options for @ref /// tutorial9::message::Msg1 message. using Msg1 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial9::message::Msg2 message. using Msg2 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial9::message::Msg3 message. using Msg3 = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial9::message::Msg4 message. using Msg4 = comms::option::EmptyOption; - }; // struct message - + /// @brief Extra options for frames. struct frame { @@ -52,17 +51,12 @@ struct DefaultOptionsT : public TBase /// tutorial9::frame::FrameLayers::Data /// layer. using Data = comms::option::EmptyOption; - + /// @brief Extra options for @ref /// tutorial9::frame::FrameLayers::Id layer. using Id = comms::option::EmptyOption; - - }; // struct FrameLayers - }; // struct frame - - }; /// @brief Default (empty) options of the protocol. diff --git a/tutorials/tutorial9/include/tutorial9/options/ServerDefaultOptions.h b/tutorials/tutorial9/include/tutorial9/options/ServerDefaultOptions.h index 36d6b3c20..178190061 100644 --- a/tutorials/tutorial9/include/tutorial9/options/ServerDefaultOptions.h +++ b/tutorials/tutorial9/include/tutorial9/options/ServerDefaultOptions.h @@ -1,4 +1,4 @@ -// Generated by commsdsl2comms v5.0.0 +// Generated by commsdsl2comms v5.2.0 /// @file /// @brief Contains definition of protocol server default options. @@ -28,7 +28,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg1 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg2 message. using Msg2 = @@ -37,7 +37,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg2 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg3 message. using Msg3 = @@ -46,7 +46,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoRefreshImpl, typename TBase::message::Msg3 >; - + /// @brief Extra options for @ref /// tutorial9::message::Msg4 message. using Msg4 = @@ -55,10 +55,7 @@ struct ServerDefaultOptionsT : public TBase comms::option::app::NoDispatchImpl, typename TBase::message::Msg4 >; - }; // struct message - - }; /// @brief Alias to @ref ServerDefaultOptionsT with default template parameter.