ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
WrongVersionBackend.cc
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
4#include "BackendFactory.h"
5#include "DeviceAccessVersion.h"
6#include "DummyBackend.h"
7
8namespace ChimeraTK {
9 using namespace ChimeraTK;
10}
11using namespace ChimeraTK;
12#define WRONG_VERSION "00.18"
13
14// LCOV_EXCL_START these lines cannot be reached because the backend cannot be
15// registered, thus it is never instantiated
18 static boost::shared_ptr<DeviceBackend> createInstance(
19 std::string address, std::map<std::string, std::string> parameters) {
20 return returnInstance<WrongVersionBackend>(address, convertPathRelativeToDmapToAbs(parameters["map"]));
21 }
22
23 // LCOV_EXCL_STOP The registerern and the version functions have to be called
24
31};
32
33static WrongVersionBackend::BackendRegisterer gWrongVersionBackendRegisterer;
#define WRONG_VERSION
static BackendFactory & getInstance()
Static function to get an instance of factory.
void registerBackendType(const std::string &backendType, boost::shared_ptr< DeviceBackend >(*creatorFunction)(std::string address, std::map< std::string, std::string > parameters), const std::vector< std::string > &sdmParameterNames={}, const std::string &deviceAccessVersion=CHIMERATK_DEVICEACCESS_VERSION)
Register a backend by the name backendType with the given creatorFunction.
The dummy device opens a mapping file instead of a device, and implements all registers defined in th...
DummyBackend(const std::string &mapFileName, const std::string &dataConsistencyKeyDescriptor="")
static std::string convertPathRelativeToDmapToAbs(std::string const &mapfileName)
static boost::shared_ptr< DeviceBackend > createInstance(std::string address, std::map< std::string, std::string > parameters)