ChimeraTK-DeviceAccess-DoocsBackend  01.09.02
RegisterInfo.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <ChimeraTK/BackendRegisterCatalogue.h>
4 #include <ChimeraTK/BackendRegisterInfoBase.h>
5 
6 /**********************************************************************************************************************/
7 
9 
10 /**********************************************************************************************************************/
11 
12 class DoocsBackendRegisterCatalogue : public ChimeraTK::BackendRegisterCatalogue<DoocsBackendRegisterInfo> {
13  public:
14  // Add all registers for the given property. Registers which exist already in the catalogue (with the same name) are
15  // skipped.
16  void addProperty(const std::string& name, unsigned int length, int doocsType, ChimeraTK::AccessModeFlags flags);
17 };
18 
19 /**********************************************************************************************************************/
20 
21 class DoocsBackendRegisterInfo : public ChimeraTK::BackendRegisterInfoBase {
22  public:
23  ChimeraTK::RegisterPath getRegisterName() const override { return _name; }
24 
25  unsigned int getNumberOfElements() const override { return _length; }
26 
27  unsigned int getNumberOfChannels() const override { return 1; }
28 
29  bool isReadable() const override { return _readable; }
30 
31  bool isWriteable() const override { return _writable; }
32 
33  ChimeraTK::AccessModeFlags getSupportedAccessModes() const override { return accessModeFlags; }
34 
35  const ChimeraTK::DataDescriptor& getDataDescriptor() const override { return dataDescriptor; }
36 
37  std::unique_ptr<BackendRegisterInfoBase> clone() const override;
38 
39  ChimeraTK::RegisterPath _name;
40  unsigned int _length;
41  ChimeraTK::DataDescriptor dataDescriptor;
42  ChimeraTK::AccessModeFlags accessModeFlags{};
44  bool _readable{true};
45  bool _writable{true};
46 };
DoocsBackendRegisterInfo::getNumberOfElements
unsigned int getNumberOfElements() const override
Definition: RegisterInfo.h:25
DoocsBackendRegisterInfo::_readable
bool _readable
Definition: RegisterInfo.h:44
DoocsBackendRegisterCatalogue::addProperty
void addProperty(const std::string &name, unsigned int length, int doocsType, ChimeraTK::AccessModeFlags flags)
Definition: RegisterInfo.cc:9
DoocsBackendRegisterInfo::isReadable
bool isReadable() const override
Definition: RegisterInfo.h:29
DoocsBackendRegisterInfo::isWriteable
bool isWriteable() const override
Definition: RegisterInfo.h:31
DoocsBackendRegisterInfo::doocsTypeId
int doocsTypeId
Definition: RegisterInfo.h:43
DoocsBackendRegisterInfo::_length
unsigned int _length
Definition: RegisterInfo.h:40
DoocsBackendRegisterInfo::getRegisterName
ChimeraTK::RegisterPath getRegisterName() const override
Definition: RegisterInfo.h:23
DoocsBackendRegisterCatalogue
Definition: RegisterInfo.h:12
DoocsBackendRegisterInfo::_name
ChimeraTK::RegisterPath _name
Definition: RegisterInfo.h:39
DoocsBackendRegisterInfo::getSupportedAccessModes
ChimeraTK::AccessModeFlags getSupportedAccessModes() const override
Definition: RegisterInfo.h:33
DoocsBackendRegisterInfo::getDataDescriptor
const ChimeraTK::DataDescriptor & getDataDescriptor() const override
Definition: RegisterInfo.h:35
DoocsBackendRegisterInfo::dataDescriptor
ChimeraTK::DataDescriptor dataDescriptor
Definition: RegisterInfo.h:41
DoocsBackendRegisterInfo::getNumberOfChannels
unsigned int getNumberOfChannels() const override
Definition: RegisterInfo.h:27
DoocsBackendRegisterInfo::clone
std::unique_ptr< BackendRegisterInfoBase > clone() const override
Definition: RegisterInfo.cc:106
DoocsBackendRegisterInfo::accessModeFlags
ChimeraTK::AccessModeFlags accessModeFlags
Definition: RegisterInfo.h:42
DoocsBackendRegisterInfo
Definition: RegisterInfo.h:21
DoocsBackendRegisterInfo::_writable
bool _writable
Definition: RegisterInfo.h:45