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
22template <std::intmax_t TOffset, typename TBase>
23class DisplayOffset : public TBase
24{
25 using BaseImpl = TBase;
26public:
27 using DisplayOffsetType = typename TBase::DisplayOffsetType;
28
29 static constexpr DisplayOffsetType displayOffset()
30 {
31 return static_cast<DisplayOffsetType>(TOffset);
32 }
33};
34
35} // namespace adapter
36
37} // namespace field
38
39} // namespace comms
40
Main namespace for all classes / functions of COMMS library.