Skip to content

Commit

Permalink
Release 2022-08-13.
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Aug 13, 2022
2 parents 41a8f29 + a9bb76f commit 5cb413d
Show file tree
Hide file tree
Showing 1,017 changed files with 9,444 additions and 1,279 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --target install
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --target install
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --target install
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1

Expand Down Expand Up @@ -154,6 +154,6 @@ jobs:
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --target install
run: cmake --build . --config ${{matrix.type}} --target install
env:
VERBOSE: 1
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ option (USE_SANITIZERS "Compile with sanitizers." OFF)
# COMMSDSL_CXX_COMPILER - "C++" Compiler for commsdsl project

if ("${COMMSDSL_TAG}" STREQUAL "")
set (COMMSDSL_TAG "v4.0")
set (COMMSDSL_TAG "v5.0")
endif ()

if ("${CC_COMMS_TAG}" STREQUAL "")
set (CC_COMMS_TAG "v4.0")
set (CC_COMMS_TAG "v5.0")
endif ()

if (NOT CMAKE_CXX_STANDARD)
Expand Down Expand Up @@ -132,6 +132,7 @@ if ("${COMMSDSL2COMMS}" STREQUAL "")
-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}"
)
Expand All @@ -143,7 +144,7 @@ endif ()

function (dsl_parse type name)
set (prefix DSL_PARSE)
set (options)
set (options MULTI_SCHEMA)
set (oneValueArgs SRC_DIR)
set (mutiValueArgs SCHEMAS)
cmake_parse_arguments(${prefix} "${options}" "${oneValueArgs}" "${mutiValueArgs}" ${ARGN})
Expand All @@ -158,6 +159,11 @@ function (dsl_parse type name)
set (code_input_param -c ${DSL_PARSE_SRC_DIR})
file (GLOB_RECURSE src_files "${DSL_PARSE_SRC_DIR}/*")
endif ()

set (multi_schema_param)
if (DSL_PARSE_MULTI_SCHEMA)
set (multi_schema_param "-s")
endif ()

set (commsdsl_tgt_dep)
if (TARGET ${COMMSDSL_TGT})
Expand All @@ -176,7 +182,7 @@ function (dsl_parse type name)
OUTPUT ${output_dir}
DEPENDS ${DSL_PARSE_SCHEMAS} ${src_files} ${commsdsl_tgt_dep} ${name}_prot_rm
COMMAND ${CMAKE_COMMAND} -E remove_directory ${output_dir}
COMMAND ${COMMSDSL2COMMS} --warn-as-err ${code_input_param} "--comms-tag=${CC_COMMS_TAG}"
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
)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ $> nmake install
- [tutorial19](../../tree/master/tutorials/tutorial19) - Introduction to protocol version support.
- [tutorial20](../../tree/master/tutorials/tutorial20) - Reporting protocol version in one of the messages.
- [tutorial21](../../tree/master/tutorials/tutorial21) - Cast between different field types.
- [tutorial22](../../tree/master/tutorials/tutorial22) - Complex length fields.
- [tutorial23](../../tree/master/tutorials/tutorial23) - Reusing definitions from other schemas.


# How-Tos
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/Interface.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"Interface"</b> interface class.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/InterfaceCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/MsgId.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of message ids enumeration.
Expand Down
4 changes: 2 additions & 2 deletions howtos/howto1/include/howto1/Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains protocol version definition.
Expand All @@ -22,6 +22,6 @@ inline constexpr unsigned specVersion()
} // namespace howto1

// Generated compile time check for minimal supported version of the COMMS library
static_assert(COMMS_MAKE_VERSION(4, 0, 0) <= comms::version(),
static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(),
"The version of COMMS library is too old");

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains dispatch to handling function(s) for client input input messages.
Expand Down Expand Up @@ -185,7 +185,7 @@ struct ClientInputMsgDispatcher

/// @brief Message dispatcher class to be used with
/// @b comms::processAllWithDispatchViaDispatcher() function (or similar).
/// @details Same as @ref ClientInputMsgDispatcher, but passing
/// @details Same as ClientInputMsgDispatcher, but passing
/// @ref howto1::options::DefaultOptions as template parameter.
/// @note Defined in howto1/dispatch/DispatchClientInputMessage.h
using ClientInputMsgDispatcherDefaultOptions =
Expand Down
4 changes: 2 additions & 2 deletions howtos/howto1/include/howto1/dispatch/DispatchMessage.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains dispatch to handling function(s) for all input messages.
Expand Down Expand Up @@ -185,7 +185,7 @@ struct MsgDispatcher

/// @brief Message dispatcher class to be used with
/// @b comms::processAllWithDispatchViaDispatcher() function (or similar).
/// @details Same as @ref MsgDispatcher, but passing
/// @details Same as MsgDispatcher, but passing
/// @ref howto1::options::DefaultOptions as template parameter.
/// @note Defined in howto1/dispatch/DispatchMessage.h
using MsgDispatcherDefaultOptions =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains dispatch to handling function(s) for client input input messages.
Expand Down Expand Up @@ -185,7 +185,7 @@ struct ServerInputMsgDispatcher

/// @brief Message dispatcher class to be used with
/// @b comms::processAllWithDispatchViaDispatcher() function (or similar).
/// @details Same as @ref ServerInputMsgDispatcher, but passing
/// @details Same as ServerInputMsgDispatcher, but passing
/// @ref howto1::options::DefaultOptions as template parameter.
/// @note Defined in howto1/dispatch/DispatchServerInputMessage.h
using ServerInputMsgDispatcherDefaultOptions =
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/FieldBase.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of base class of all the fields.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/InterfaceFlags.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"InterfaceFlags"</b> field.
Expand Down
6 changes: 3 additions & 3 deletions howtos/howto1/include/howto1/field/InterfaceFlagsCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down Expand Up @@ -33,12 +33,12 @@ struct InterfaceFlagsCommon
"B0",
"B1"
};

static const std::size_t MapSize = std::extent<decltype(Map)>::value;
if (MapSize <= idx) {
return nullptr;
}

return Map[idx];
}

Expand Down
4 changes: 2 additions & 2 deletions howtos/howto1/include/howto1/field/MsgId.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"MsgId"</b> field.
Expand Down Expand Up @@ -59,7 +59,7 @@ class MsgId : public
/// @brief Retrieve name of the @b current value
const char* valueName() const
{
return valueName(Base::value());
return valueName(Base::getValue());
}

/// @brief Retrieve map of enum value names.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/field/MsgIdCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/frame/Frame.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"Frame"</b> frame class.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/frame/FrameCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/input/AllMessages.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of the AllMessages messages bundle.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/input/ClientInputMessages.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of the ClientInputMessages messages bundle.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/input/ServerInputMessages.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of the ServerInputMessages messages bundle.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/message/Msg1.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"Message 1"</b> message and its fields.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/message/Msg1Common.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
4 changes: 2 additions & 2 deletions howtos/howto1/include/howto1/message/Msg2.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"Message 2"</b> message and its fields.
Expand Down Expand Up @@ -91,7 +91,7 @@ struct Msg2Fields
{
static const char Str[] = "hello";
static const std::size_t StrSize = std::extent<decltype(Str)>::value;
Base::value() = typename Base::ValueType(&Str[0], StrSize - 1);
Base::setValue(typename Base::ValueType(&Str[0], StrSize - 1));
}

/// @brief Name of the field.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto1/include/howto1/message/Msg2Common.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of protocol bare metal default options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of protocol client default options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of protocol data view default options.
Expand Down
11 changes: 9 additions & 2 deletions howtos/howto1/include/howto1/options/DefaultOptions.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of protocol default options.
Expand All @@ -13,8 +13,12 @@ namespace howto1
namespace options
{

/// @brief Empty class to serve as the base for options.
struct EmptyOptions {};

/// @brief Default (empty) options of the protocol.
struct DefaultOptions
template <typename TBase = EmptyOptions>
struct DefaultOptionsT : public TBase
{
/// @brief Extra options for messages.
struct message
Expand Down Expand Up @@ -59,6 +63,9 @@ struct DefaultOptions

};

/// @brief Default (empty) options of the protocol.
using DefaultOptions = DefaultOptionsT<>;

} // namespace options

} // namespace howto1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of protocol server default options.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto10/include/howto10/Interface.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of <b>"Interface"</b> interface class.
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto10/include/howto10/InterfaceCommon.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains common template parameters independent functionality of
Expand Down
2 changes: 1 addition & 1 deletion howtos/howto10/include/howto10/MsgId.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains definition of message ids enumeration.
Expand Down
4 changes: 2 additions & 2 deletions howtos/howto10/include/howto10/Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains protocol version definition.
Expand All @@ -22,6 +22,6 @@ inline constexpr unsigned specVersion()
} // namespace howto10

// Generated compile time check for minimal supported version of the COMMS library
static_assert(COMMS_MAKE_VERSION(4, 0, 0) <= comms::version(),
static_assert(COMMS_MAKE_VERSION(5, 0, 0) <= comms::version(),
"The version of COMMS library is too old");

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by commsdsl2comms v4.0.0
// Generated by commsdsl2comms v5.0.0

/// @file
/// @brief Contains dispatch to handling function(s) for client input input messages.
Expand Down Expand Up @@ -190,7 +190,7 @@ struct ClientInputMsgDispatcher

/// @brief Message dispatcher class to be used with
/// @b comms::processAllWithDispatchViaDispatcher() function (or similar).
/// @details Same as @ref ClientInputMsgDispatcher, but passing
/// @details Same as ClientInputMsgDispatcher, but passing
/// @ref howto10::options::DefaultOptions as template parameter.
/// @note Defined in howto10/dispatch/DispatchClientInputMessage.h
using ClientInputMsgDispatcherDefaultOptions =
Expand Down
Loading

0 comments on commit 5cb413d

Please sign in to comment.