ChimeraTK-DeviceAccess  03.18.00
RegisterInfo.h
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 #pragma once
4 
6 
7 #include <iostream>
8 #include <memory>
9 
10 namespace ChimeraTK {
11 
12  class RegisterInfo {
13  public:
14  explicit RegisterInfo(std::unique_ptr<BackendRegisterInfoBase>&& impl);
15 
16  RegisterInfo(const RegisterInfo& other);
17  RegisterInfo(RegisterInfo&& other) = default;
18 
19  RegisterInfo& operator=(const RegisterInfo& other);
20  RegisterInfo& operator=(RegisterInfo&& other) = default;
21 
23  [[nodiscard]] RegisterPath getRegisterName() const;
24 
26  [[nodiscard]] unsigned int getNumberOfElements() const;
27 
29  [[nodiscard]] unsigned int getNumberOfChannels() const;
30 
32  [[nodiscard]] unsigned int getNumberOfDimensions() const;
33 
36  [[nodiscard]] const DataDescriptor& getDataDescriptor() const;
37 
39  [[nodiscard]] bool isReadable() const;
40 
42  [[nodiscard]] bool isWriteable() const;
43 
45  [[nodiscard]] AccessModeFlags getSupportedAccessModes() const;
46 
48  [[nodiscard]] bool isValid() const;
49 
54  [[nodiscard]] BackendRegisterInfoBase& getImpl();
55 
60  [[nodiscard]] const BackendRegisterInfoBase& getImpl() const;
61 
68  [[nodiscard]] std::vector<size_t> getQualifiedAsyncId() const;
69 
70  protected:
71  std::unique_ptr<BackendRegisterInfoBase> _impl;
72  };
73 
74 } /* namespace ChimeraTK */
ChimeraTK::RegisterInfo::getNumberOfDimensions
unsigned int getNumberOfDimensions() const
Return number of dimensions of this register.
Definition: RegisterInfo.cpp:50
ChimeraTK::RegisterInfo::getNumberOfChannels
unsigned int getNumberOfChannels() const
Return number of channels in register.
Definition: RegisterInfo.cpp:44
ChimeraTK::RegisterInfo::getRegisterName
RegisterPath getRegisterName() const
Return full path name of the register (including modules)
Definition: RegisterInfo.cpp:32
ChimeraTK::RegisterInfo::getQualifiedAsyncId
std::vector< size_t > getQualifiedAsyncId() const
Get the fully qualified async::SubDomain ID.
Definition: RegisterInfo.cpp:98
ChimeraTK::DataDescriptor
Class describing the actual payload data format of a register in an abstract manner.
Definition: DataDescriptor.h:19
ChimeraTK::RegisterInfo
Definition: RegisterInfo.h:12
ChimeraTK::RegisterInfo::getDataDescriptor
const DataDescriptor & getDataDescriptor() const
Return desciption of the actual payload data for this register.
Definition: RegisterInfo.cpp:56
ChimeraTK::RegisterInfo::getSupportedAccessModes
AccessModeFlags getSupportedAccessModes() const
Return all supported AccessModes for this register.
Definition: RegisterInfo.cpp:74
ChimeraTK::RegisterInfo::operator=
RegisterInfo & operator=(const RegisterInfo &other)
Definition: RegisterInfo.cpp:20
ChimeraTK::RegisterInfo::isWriteable
bool isWriteable() const
Return whether the register is writeable.
Definition: RegisterInfo.cpp:68
ChimeraTK::RegisterInfo::getImpl
BackendRegisterInfoBase & getImpl()
Return a reference to the implementation object.
Definition: RegisterInfo.cpp:86
ChimeraTK::RegisterPath
Class to store a register path name.
Definition: RegisterPath.h:16
ChimeraTK::RegisterInfo::isValid
bool isValid() const
Check whether the RegisterPath object is valid (i.e.
Definition: RegisterInfo.cpp:80
ChimeraTK::AccessModeFlags
Set of AccessMode flags with additional functionality for an easier handling.
Definition: AccessMode.h:48
BackendRegisterInfoBase.h
ChimeraTK::RegisterInfo::RegisterInfo
RegisterInfo(std::unique_ptr< BackendRegisterInfoBase > &&impl)
Definition: RegisterInfo.cpp:10
ChimeraTK::RegisterInfo::isReadable
bool isReadable() const
Return whether the register is readable.
Definition: RegisterInfo.cpp:62
ChimeraTK::RegisterInfo::getNumberOfElements
unsigned int getNumberOfElements() const
Return number of elements per channel.
Definition: RegisterInfo.cpp:38
ChimeraTK
Definition: DummyBackend.h:16
ChimeraTK::BackendRegisterInfoBase
DeviceBackend-independent register description.
Definition: BackendRegisterInfoBase.h:16
ChimeraTK::RegisterInfo::_impl
std::unique_ptr< BackendRegisterInfoBase > _impl
Definition: RegisterInfo.h:71