ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
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
10namespace ChimeraTK {
11
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
75 [[nodiscard]] std::set<std::string> getTags() const;
76
77 protected:
78 std::unique_ptr<BackendRegisterInfoBase> _impl;
79 };
80
81} /* namespace ChimeraTK */
Set of AccessMode flags with additional functionality for an easier handling.
Definition AccessMode.h:48
DeviceBackend-independent register description.
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
RegisterInfo(RegisterInfo &&other)=default
unsigned int getNumberOfChannels() const
Return number of channels in register.
std::vector< size_t > getQualifiedAsyncId() const
Get the fully qualified async::SubDomain ID.
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=(RegisterInfo &&other)=default
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.