Skip to content

Commit d70f3c5

Browse files
committed
Release v5.4.1
2 parents 57308a5 + ae2bbdf commit d70f3c5

16 files changed

Lines changed: 83 additions & 59 deletions

doxygen/page_custom_checksum_layer.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
/// >
299299
/// {
300300
/// // Generate convenience access functions for various layers
301-
/// COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(checksum, size, size, checksumType, payload);
301+
/// COMMS_FRAME_LAYERS_ACCESS_OUTER(checksum, size, size, checksumType, payload);
302302
/// };
303303
///
304304
/// } // namespace my_prot

doxygen/page_custom_size_layer.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
/// >
216216
/// {
217217
/// // Generate convenience access functions for various layers
218-
/// COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(id, size, payload);
218+
/// COMMS_FRAME_LAYERS_ACCESS_OUTER(id, size, payload);
219219
/// };
220220
///
221221
/// } // namespace my_prot
@@ -321,7 +321,7 @@
321321
/// >
322322
/// {
323323
/// // Generate convenience access functions for various layers
324-
/// COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(size, id, flags, payload);
324+
/// COMMS_FRAME_LAYERS_ACCESS_OUTER(size, id, flags, payload);
325325
/// };
326326
///
327327
/// } // namespace my_prot

doxygen/page_custom_sync_prefix_layer.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
/// >
131131
/// {
132132
/// // Generate convenience access functions for various layers
133-
/// COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(sync, size, size, payload);
133+
/// COMMS_FRAME_LAYERS_ACCESS_OUTER(sync, size, size, payload);
134134
/// };
135135
///
136136
/// } // namespace my_prot

doxygen/page_custom_transport_value_layer.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
/// >
226226
/// {
227227
/// // Generate convenience access functions for various layers
228-
/// COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(size, size, versionFlags, payload);
228+
/// COMMS_FRAME_LAYERS_ACCESS_OUTER(size, size, versionFlags, payload);
229229
/// };
230230
///
231231
/// } // namespace my_prot

doxygen/page_frame.dox

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@
535535
/// Every protocol layer provides an ability to access the next one using
536536
/// @ref comms::frame::FrameLayerBase::nextLayer() "nextLayer()" member function.
537537
/// It is strongly recommended to generate convenience access functions using
538-
/// #COMMS_PROTOCOL_LAYERS_ACCESS() macro.
538+
/// #COMMS_FRAME_LAYERS_ACCESS() macro.
539539
/// @code
540540
/// template <
541541
/// typename TMessage, // common interface class defined by the application
@@ -545,7 +545,7 @@
545545
/// struct Frame : public
546546
/// MySyncPrefix<TMessage, TInputMessages, TAllocationOptions>
547547
/// {
548-
/// COMMS_PROTOCOL_LAYERS_ACCESS(payload, id, size, checksum, sync);
548+
/// COMMS_FRAME_LAYERS_ACCESS(payload, id, size, checksum, sync);
549549
/// };
550550
/// @endcode
551551
/// It is equivalent to having the following member function being defined:
@@ -591,14 +591,14 @@
591591
/// @endcode
592592
/// Please note the following:
593593
/// @li Every provided name is prefixed with @b layer_.
594-
/// @li The names inside the #COMMS_PROTOCOL_LAYERS_ACCESS() macro specify
594+
/// @li The names inside the #COMMS_FRAME_LAYERS_ACCESS() macro specify
595595
/// innermost layer first and outermost one last. There is a convenience
596-
/// wrapper macro #COMMS_PROTOCOL_LAYERS_ACCESS_OUTER() which allows
596+
/// wrapper macro #COMMS_FRAME_LAYERS_ACCESS_OUTER() which allows
597597
/// listing in the opposite order (outermost first and innermost last).
598598
///
599599
/// <b style="color:red">WARNING:</b> Some compilers, such as @b clang or earlier
600600
/// versions of @b gcc (v4.9 and earlier) may have problems compiling the
601-
/// #COMMS_PROTOCOL_LAYERS_ACCESS() macro
601+
/// #COMMS_FRAME_LAYERS_ACCESS() macro
602602
/// even though it contains valid C++11 code. If the compilation failure
603603
/// happens there is a need to define inner @b Base type which specifies exact type
604604
/// of the frame base class.
@@ -613,7 +613,7 @@
613613
/// {
614614
/// using Base = MySyncPrefix<TMessage, TInputMessages, TAllocationOptions>;
615615
/// public:
616-
/// COMMS_PROTOCOL_LAYERS_ACCESS(payload, id, size, checksum, sync);
616+
/// COMMS_FRAME_LAYERS_ACCESS(payload, id, size, checksum, sync);
617617
/// };
618618
/// @endcode
619619
/// @b NOTE, that @b COMMS library also defines @b COMMS_MUST_DEFINE_BASE in
@@ -634,12 +634,12 @@
634634
/// using Base = ...
635635
/// #endif
636636
/// public:
637-
/// COMMS_PROTOCOL_LAYERS_ACCESS(payload, id, size, checksum, sync);
637+
/// COMMS_FRAME_LAYERS_ACCESS(payload, id, size, checksum, sync);
638638
/// };
639639
/// @endcode
640-
/// Since **v5.2** the COMMS library defines #COMMS_PROTOCOL_LAYERS_NAMES() and
641-
/// #COMMS_PROTOCOL_LAYERS_NAMES_OUTER() macros they are similar to
642-
/// the #COMMS_PROTOCOL_LAYERS_NAMES() and #COMMS_PROTOCOL_LAYERS_NAMES_OUTER()
640+
/// Since **v5.2** the COMMS library defines #COMMS_FRAME_LAYERS_NAMES() and
641+
/// #COMMS_FRAME_LAYERS_NAMES_OUTER() macros they are similar to
642+
/// the #COMMS_FRAME_LAYERS_NAMES() and #COMMS_FRAME_LAYERS_NAMES_OUTER()
643643
/// respectively, but also provide aliases to the layer types. However usage of these
644644
/// macros requires inner **Base** type definition of the base class:
645645
/// @code
@@ -654,7 +654,7 @@
654654
/// // Base type definition is a requirement
655655
/// using Base = MySyncPrefix<TMessage, TInputMessages, TAllocationOptions>
656656
/// public:
657-
/// COMMS_PROTOCOL_LAYERS_NAMES(payload, id, size, checksum, sync);
657+
/// COMMS_FRAME_LAYERS_NAMES(payload, id, size, checksum, sync);
658658
/// };
659659
/// @endcode
660660
/// It is equivalent to having the following types and member function being defined:

doxygen/page_use_prot.dox

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@
22382238
/// struct Frame : public
22392239
/// MySyncPrefix<TMessage, TInputMessages, TAllocationOptions>
22402240
/// {
2241-
/// COMMS_PROTOCOL_LAYERS_ACCESS(...);
2241+
/// COMMS_FRAME_LAYERS_ACCESS(...);
22422242
/// };
22432243
///
22442244
/// } // namespace my_protocol
@@ -2300,7 +2300,7 @@
23002300
/// struct Frame : public
23012301
/// MySyncPrefix<TMessage, TInputMessages, TOpt>
23022302
/// {
2303-
/// COMMS_PROTOCOL_LAYERS_ACCESS(...);
2303+
/// COMMS_FRAME_LAYERS_ACCESS(...);
23042304
/// };
23052305
///
23062306
/// } // namespace my_protocol
@@ -2574,7 +2574,7 @@
25742574
/// one another. Access to the appropriate layer may be obtained using a
25752575
/// sequence of calls to @b nextLayer() member functions (see
25762576
/// @ref comms::frame::FrameLayerBase::nextLayer()). Alternatively, the frame
2577-
/// definition is also expected to use #COMMS_PROTOCOL_LAYERS_ACCESS()
2577+
/// definition is also expected to use #COMMS_FRAME_LAYERS_ACCESS()
25782578
/// macro to generate a convenience access functions. For example
25792579
/// @code
25802580
/// namespace my_protocol
@@ -2588,7 +2588,7 @@
25882588
/// struct Frame : public
25892589
/// MySyncPrefix<TMessage, TInputMessages, TAllocationOptions>
25902590
/// {
2591-
/// COMMS_PROTOCOL_LAYERS_ACCESS(payload, id, size, checksum, sync);
2591+
/// COMMS_FRAME_LAYERS_ACCESS(payload, id, size, checksum, sync);
25922592
/// };
25932593
///
25942594
/// } // namespace my_protocol
@@ -3129,7 +3129,7 @@
31293129
/// struct Frame : public
31303130
/// MySizePrefix<TMessage, TInputMessages, TAllocationOptions>
31313131
/// {
3132-
/// COMMS_PROTOCOL_LAYERS_ACCESS(payload, version, id, size);
3132+
/// COMMS_FRAME_LAYERS_ACCESS(payload, version, id, size);
31333133
/// };
31343134
///
31353135
/// } // namespace my_protocol

include/comms/frame/FrameLayerBase.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,48 +1662,48 @@ details::MsgPayloadRetriever<TIter> msgPayload(TIter& iter, std::size_t& len)
16621662
/// (@ref comms::frame::MsgDataLayer), while the last one
16631663
/// is the name for the outermost one.
16641664
/// @related comms::frame::FrameLayerBase
1665-
#define COMMS_PROTOCOL_LAYERS_ACCESS(...) \
1665+
#define COMMS_FRAME_LAYERS_ACCESS(...) \
16661666
COMMS_DO_ACCESS_LAYER_ACC_FUNC(__VA_ARGS__)
16671667

16681668
/// @brief Provide names and convenience access functions to protocol
16691669
/// layers.
1670-
/// @details Similar to #COMMS_PROTOCOL_LAYERS_ACCESS() but
1670+
/// @details Similar to #COMMS_FRAME_LAYERS_ACCESS() but
16711671
/// defines "Layer_<name>" type names.
16721672
/// @pre Requires definition of inner "Base" type aliasing the base class.
16731673
/// @related comms::frame::FrameLayerBase
1674-
#define COMMS_PROTOCOL_LAYERS_NAMES(...) \
1674+
#define COMMS_FRAME_LAYERS_NAMES(...) \
16751675
COMMS_DO_LAYER_TYPE_ALIAS(Base, __VA_ARGS__) \
16761676
COMMS_DO_ACCESS_LAYER_ACC_FUNC(__VA_ARGS__)
16771677

16781678

1679-
/// @brief Same as #COMMS_PROTOCOL_LAYERS_ACCESS()
1679+
/// @brief Same as #COMMS_FRAME_LAYERS_ACCESS()
16801680
/// @related comms::frame::FrameLayerBase
1681-
#define COMMS_PROTOCOL_LAYERS_ACCESS_INNER(...) \
1682-
COMMS_PROTOCOL_LAYERS_ACCESS(__VA_ARGS__)
1681+
#define COMMS_FRAME_LAYERS_ACCESS_INNER(...) \
1682+
COMMS_FRAME_LAYERS_ACCESS(__VA_ARGS__)
16831683

1684-
/// @brief Same as #COMMS_PROTOCOL_LAYERS_NAMES()
1684+
/// @brief Same as #COMMS_FRAME_LAYERS_NAMES()
16851685
/// @related comms::frame::FrameLayerBase
1686-
#define COMMS_PROTOCOL_LAYERS_NAMES_INNER(...) \
1687-
COMMS_PROTOCOL_LAYERS_NAMES(__VA_ARGS__)
1686+
#define COMMS_FRAME_LAYERS_NAMES_INNER(...) \
1687+
COMMS_FRAME_LAYERS_NAMES(__VA_ARGS__)
16881688

16891689
/// @brief Provide convenience access functions to protocol
16901690
/// layers.
1691-
/// @details Similar to #COMMS_PROTOCOL_LAYERS_ACCESS(), but
1691+
/// @details Similar to #COMMS_FRAME_LAYERS_ACCESS(), but
16921692
/// the arguments are expected to be in reverse order, i.e.
16931693
/// the first argument is the name of the outermost layer, while
16941694
/// the last one is the name for the innermost one
16951695
/// (@ref comms::frame::MsgDataLayer)
16961696
/// @related comms::frame::FrameLayerBase
1697-
#define COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(...) \
1698-
COMMS_PROTOCOL_LAYERS_ACCESS(COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS(__VA_ARGS__)))
1697+
#define COMMS_FRAME_LAYERS_ACCESS_OUTER(...) \
1698+
COMMS_FRAME_LAYERS_ACCESS(COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS(__VA_ARGS__)))
16991699

17001700
/// @brief Provide names and convenience access functions to protocol
17011701
/// layers.
1702-
/// @details Similar to #COMMS_PROTOCOL_LAYERS_ACCESS_OUTER() but
1702+
/// @details Similar to #COMMS_FRAME_LAYERS_ACCESS_OUTER() but
17031703
/// defines "Layer_<name>" type names.
17041704
/// @pre Requires definition of inner "Base" type aliasing the base class.
17051705
/// @related comms::frame::FrameLayerBase
1706-
#define COMMS_PROTOCOL_LAYERS_NAMES_OUTER(...) \
1707-
COMMS_PROTOCOL_LAYERS_NAMES(COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS(__VA_ARGS__)))
1706+
#define COMMS_FRAME_LAYERS_NAMES_OUTER(...) \
1707+
COMMS_FRAME_LAYERS_NAMES(COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS(__VA_ARGS__)))
17081708

17091709
COMMS_MSVC_WARNING_POP

include/comms/protocol/ProtocolLayerBase.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,27 @@ auto msgPayload(TIter& iter, std::size_t& len) -> decltype(comms::frame::msgPayl
7272
} // namespace protocol
7373

7474
} // namespace comms
75+
76+
/// @brief Same as #COMMS_FRAME_LAYERS_ACCESS()
77+
/// @deprecated Use #COMMS_FRAME_LAYERS_ACCESS() instead
78+
#define COMMS_PROTOCOL_LAYERS_ACCESS(...) COMMS_FRAME_LAYERS_ACCESS(__VA_ARGS__)
79+
80+
/// @brief Same as #COMMS_FRAME_LAYERS_NAMES()
81+
/// @deprecated Use #COMMS_FRAME_LAYERS_NAMES() instead
82+
#define COMMS_PROTOCOL_LAYERS_NAMES(...) COMMS_FRAME_LAYERS_NAMES(__VA_ARGS__)
83+
84+
/// @brief Same as #COMMS_FRAME_LAYERS_ACCESS_INNER()
85+
/// @deprecated Use #COMMS_FRAME_LAYERS_ACCESS_INNER() instead
86+
#define COMMS_PROTOCOL_LAYERS_ACCESS_INNER(...) COMMS_FRAME_LAYERS_ACCESS_INNER(__VA_ARGS__)
87+
88+
/// @brief Same as #COMMS_FRAME_LAYERS_NAMES_INNER()
89+
/// @deprecated Use #COMMS_FRAME_LAYERS_NAMES_INNER() instead
90+
#define COMMS_PROTOCOL_LAYERS_NAMES_INNER(...) COMMS_FRAME_LAYERS_NAMES_INNER(__VA_ARGS__)
91+
92+
/// @brief Same as #COMMS_FRAME_LAYERS_ACCESS_OUTER()
93+
/// @deprecated Use #COMMS_FRAME_LAYERS_ACCESS_OUTER() instead
94+
#define COMMS_PROTOCOL_LAYERS_ACCESS_OUTER(...) COMMS_FRAME_LAYERS_ACCESS_OUTER(__VA_ARGS__)
95+
96+
/// @brief Same as #COMMS_FRAME_LAYERS_NAMES_OUTER()
97+
/// @deprecated Use #COMMS_FRAME_LAYERS_NAMES_OUTER() instead
98+
#define COMMS_PROTOCOL_LAYERS_NAMES_OUTER(...) COMMS_FRAME_LAYERS_NAMES_OUTER(__VA_ARGS__)

include/comms/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define COMMS_MINOR_VERSION 4U
1818

1919
/// @brief Patch level of the library
20-
#define COMMS_PATCH_VERSION 0U
20+
#define COMMS_PATCH_VERSION 1U
2121

2222
/// @brief Macro to create numeric version as single unsigned number
2323
#define COMMS_MAKE_VERSION(major_, minor_, patch_) \

test/ChecksumLayer.th

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private:
200200
>
201201
>;
202202
public:
203-
COMMS_PROTOCOL_LAYERS_NAMES_OUTER(sync, checksum, size, id, payload);
203+
COMMS_FRAME_LAYERS_NAMES_OUTER(sync, checksum, size, id, payload);
204204
};
205205

206206
template <typename TSyncField, typename TChecksumField, typename TSizeField, typename TIdField, typename TMessage>
@@ -260,7 +260,7 @@ private:
260260
>
261261
>;
262262
public:
263-
COMMS_PROTOCOL_LAYERS_NAMES(payload, id, size, checksum, sync);
263+
COMMS_FRAME_LAYERS_NAMES(payload, id, size, checksum, sync);
264264
static_assert(comms::frame::isSyncPrefixLayer<Layer_sync>(), "Invalid type");
265265
static_assert(comms::frame::isChecksumPrefixLayer<Layer_checksum>(), "Invalid type");
266266
static_assert(comms::frame::isMsgSizeLayer<Layer_size>(), "Invalid type");

0 commit comments

Comments
 (0)