ChimeraTK-DeviceAccess  03.18.00
DummyBackendRegisterCatalogue.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 namespace ChimeraTK {
8 
9  /********************************************************************************************************************/
10 
12  public:
13  [[nodiscard]] NumericAddressedRegisterInfo getBackendRegister(const RegisterPath& registerPathName) const override;
14 
15  [[nodiscard]] bool hasRegister(const RegisterPath& registerPathName) const override;
16 
17  // Helper function to get x from DUMMY_INTERRUPT_x.
18  // The first parameter is "true" if an according interrupt is in the catalogue. If the registerPathName
19  // is not DUMMY_INTERRUPT_x or the interrupt is not in the catalogue, the first parameter is "false", and the second
20  // parameter is invalid.
21  [[nodiscard]] std::pair<bool, int> extractControllerInterrupt(const RegisterPath& registerPathName) const;
22 
23  [[nodiscard]] std::unique_ptr<BackendRegisterCatalogueBase> clone() const override;
24  };
25 
26  /********************************************************************************************************************/
27 
28 } // namespace ChimeraTK
ChimeraTK::DummyBackendRegisterCatalogue::hasRegister
bool hasRegister(const RegisterPath &registerPathName) const override
Check if register with the given path name exists.
Definition: DummyBackendRegisterCatalogue.cc:37
ChimeraTK::NumericAddressedRegisterInfo
Definition: NumericAddressedRegisterCatalogue.h:15
ChimeraTK::DummyBackendRegisterCatalogue
Definition: DummyBackendRegisterCatalogue.h:11
NumericAddressedRegisterCatalogue.h
ChimeraTK::DummyBackendRegisterCatalogue::clone
std::unique_ptr< BackendRegisterCatalogueBase > clone() const override
Create deep copy of the catalogue.
Definition: DummyBackendRegisterCatalogue.cc:77
ChimeraTK::DummyBackendRegisterCatalogue::getBackendRegister
NumericAddressedRegisterInfo getBackendRegister(const RegisterPath &registerPathName) const override
Note: Override this function if backend has "hidden" registers which are not added to the map and hen...
Definition: DummyBackendRegisterCatalogue.cc:15
ChimeraTK::RegisterPath
Class to store a register path name.
Definition: RegisterPath.h:16
ChimeraTK::NumericAddressedRegisterCatalogue
Definition: NumericAddressedRegisterCatalogue.h:136
ChimeraTK::DummyBackendRegisterCatalogue::extractControllerInterrupt
std::pair< bool, int > extractControllerInterrupt(const RegisterPath &registerPathName) const
Definition: DummyBackendRegisterCatalogue.cc:53
ChimeraTK
Definition: DummyBackend.h:16