ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
BackendRegisterInfoBase.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
5#include "AccessMode.h"
6#include "DataDescriptor.h"
7#include "RegisterPath.h"
8
9#include <memory>
10
11namespace ChimeraTK {
12
13 /********************************************************************************************************************/
14
17 public:
19 virtual ~BackendRegisterInfoBase() = default;
20
22 [[nodiscard]] virtual RegisterPath getRegisterName() const = 0;
23
25 [[nodiscard]] virtual unsigned int getNumberOfElements() const = 0;
26
28 [[nodiscard]] virtual unsigned int getNumberOfChannels() const = 0;
29
31 [[nodiscard]] unsigned int getNumberOfDimensions() const;
32
35 [[nodiscard]] virtual const DataDescriptor& getDataDescriptor() const = 0;
36
38 [[nodiscard]] virtual bool isReadable() const = 0;
39
41 [[nodiscard]] virtual bool isWriteable() const = 0;
42
44 [[nodiscard]] virtual AccessModeFlags getSupportedAccessModes() const = 0;
45
47 [[nodiscard]] virtual std::unique_ptr<BackendRegisterInfoBase> clone() const = 0;
48
53 [[nodiscard]] virtual std::vector<size_t> getQualifiedAsyncId() const { return {}; }
54
60 [[nodiscard]] virtual std::set<std::string> getTags() const { return {}; };
61
67 [[nodiscard]] virtual bool isHidden() const { return false; }
68 };
69
70 /********************************************************************************************************************/
71
73 if(getNumberOfChannels() > 1) return 2;
74 if(getNumberOfElements() > 1) return 1;
75 return 0;
76 }
77
78} // namespace ChimeraTK
Set of AccessMode flags with additional functionality for an easier handling.
Definition AccessMode.h:48
DeviceBackend-independent register description.
virtual bool isReadable() const =0
Return whether the register is readable.
virtual RegisterPath getRegisterName() const =0
Return full path name of the register (including modules)
virtual const DataDescriptor & getDataDescriptor() const =0
Return description of the actual payload data for this register.
virtual bool isHidden() const
Returns whether the register is "hidden", meaning it won't be listed when iterating the catalogue.
virtual std::unique_ptr< BackendRegisterInfoBase > clone() const =0
Create copy of the object.
unsigned int getNumberOfDimensions() const
Return number of dimensions of this register.
virtual unsigned int getNumberOfChannels() const =0
Return number of channels in register.
virtual AccessModeFlags getSupportedAccessModes() const =0
Return all supported AccessModes for this register.
virtual ~BackendRegisterInfoBase()=default
Virtual destructor.
virtual bool isWriteable() const =0
Return whether the register is writeable.
virtual std::vector< size_t > getQualifiedAsyncId() const
Return the fully qualified async::SubDomain ID.
virtual unsigned int getNumberOfElements() const =0
Return number of elements per channel.
virtual std::set< std::string > getTags() const
Get the list of tags associated with this register.
Class describing the actual payload data format of a register in an abstract manner.
Class to store a register path name.