COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
DisplayOffset.h
1//
2// Copyright 2019 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#pragma once
9
10#include <cstdint>
11#include <type_traits>
12
13namespace comms
14{
15
16namespace field
17{
18
19namespace adapter
20{
21
22
23template <std::intmax_t TOffset, typename TBase>
24class DisplayOffset : public TBase
25{
26 using BaseImpl = TBase;
27public:
28 using DisplayOffsetType = typename TBase::DisplayOffsetType;
29
30 static constexpr DisplayOffsetType displayOffset()
31 {
32 return static_cast<DisplayOffsetType>(TOffset);
33 }
34};
35
36} // namespace adapter
37
38} // namespace field
39
40} // namespace comms
41
42
43
44
Main namespace for all classes / functions of COMMS library.