ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
RegisterInfo.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
4#include "RegisterInfo.h"
5
6namespace ChimeraTK {
7
8 /********************************************************************************************************************/
9
10 RegisterInfo::RegisterInfo(std::unique_ptr<BackendRegisterInfoBase>&& impl) : _impl(std::move(impl)) {}
11
12 /********************************************************************************************************************/
13
15 operator=(other);
16 }
17
18 /********************************************************************************************************************/
19
21 if(other.isValid()) {
22 _impl = other.getImpl().clone();
23 }
24 else {
25 _impl = nullptr;
26 }
27 return *this;
28 }
29
30 /********************************************************************************************************************/
31
33 return _impl->getRegisterName();
34 }
35
36 /********************************************************************************************************************/
37
38 unsigned int RegisterInfo::getNumberOfElements() const {
39 return _impl->getNumberOfElements();
40 }
41
42 /********************************************************************************************************************/
43
44 unsigned int RegisterInfo::getNumberOfChannels() const {
45 return _impl->getNumberOfChannels();
46 }
47
48 /********************************************************************************************************************/
49
51 return _impl->getNumberOfDimensions();
52 }
53
54 /********************************************************************************************************************/
55
57 return _impl->getDataDescriptor();
58 }
59
60 /********************************************************************************************************************/
61
63 return _impl->isReadable();
64 }
65
66 /********************************************************************************************************************/
67
69 return _impl->isWriteable();
70 }
71
72 /********************************************************************************************************************/
73
75 return _impl->getSupportedAccessModes();
76 }
77
78 /********************************************************************************************************************/
79
80 bool RegisterInfo::isValid() const {
81 return _impl != nullptr;
82 }
83
84 /********************************************************************************************************************/
85
89
90 /********************************************************************************************************************/
91
93 return *_impl;
94 }
95
96 /********************************************************************************************************************/
97
98 std::vector<size_t> RegisterInfo::getQualifiedAsyncId() const {
99 return _impl->getQualifiedAsyncId();
100 }
101
102 /********************************************************************************************************************/
103
104 std::set<std::string> RegisterInfo::getTags() const {
105 return _impl->getTags();
106 }
107
108 /********************************************************************************************************************/
109} // namespace ChimeraTK
Set of AccessMode flags with additional functionality for an easier handling.
Definition AccessMode.h:48
DeviceBackend-independent register description.
virtual std::unique_ptr< BackendRegisterInfoBase > clone() const =0
Create copy of the object.
virtual std::vector< size_t > getQualifiedAsyncId() const
Return the fully qualified async::SubDomain ID.
Class describing the actual payload data format of a register in an abstract manner.
RegisterPath getRegisterName() const
Return full path name of the register (including modules)
unsigned int getNumberOfDimensions() const
Return number of dimensions of this register.
bool isWriteable() const
Return whether the register is writeable.
BackendRegisterInfoBase & getImpl()
Return a reference to the implementation object.
std::unique_ptr< BackendRegisterInfoBase > _impl
unsigned int getNumberOfChannels() const
Return number of channels in register.
std::vector< size_t > getQualifiedAsyncId() const
Get the fully qualified async::SubDomain ID.
RegisterInfo(std::unique_ptr< BackendRegisterInfoBase > &&impl)
const DataDescriptor & getDataDescriptor() const
Return desciption of the actual payload data for this register.
std::set< std::string > getTags() const
Get the list of tags that are associated with this register.
AccessModeFlags getSupportedAccessModes() const
Return all supported AccessModes for this register.
RegisterInfo & operator=(const RegisterInfo &other)
bool isValid() const
Check whether the RegisterPath object is valid (i.e.
unsigned int getNumberOfElements() const
Return number of elements per channel.
bool isReadable() const
Return whether the register is readable.
Class to store a register path name.
STL namespace.