ChimeraTK-DeviceAccess-TangoBackend 00.01.02
Loading...
Searching...
No Matches
TangoBackend.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 "RegisterCatalogue.h"
6
7#include <ChimeraTK/DeviceBackend.h>
8#include <ChimeraTK/DeviceBackendImpl.h>
9
10namespace Tango {
11 class DeviceProxy;
12} // namespace Tango
13
14namespace ChimeraTK {
15 class TangoBackend : public DeviceBackendImpl {
16 public:
17 static boost::shared_ptr<DeviceBackend> createInstance(
18 std::string address, std::map<std::string, std::string> parameters);
19
20 template<typename UserType>
21 boost::shared_ptr<NDRegisterAccessor<UserType>> getRegisterAccessor_impl(
22 const RegisterPath& registerPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags);
24
25 explicit TangoBackend(std::string address, std::optional<std::string> cacheFile);
26
27 void open() override;
28 void close() override;
29
30 RegisterCatalogue getRegisterCatalogue() const override;
31
32 std::string readDeviceInfo() override;
33
34 std::shared_ptr<Tango::DeviceProxy> getDeviceProxy() { return _deviceProxy; }
35
36 private:
37 std::string _address;
38 std::shared_ptr<Tango::DeviceProxy> _deviceProxy;
39 mutable TangoRegisterCatalogue _registerCatalogue{};
40 DataDescriptor mapTangoType();
41 };
42} // namespace ChimeraTK
std::string readDeviceInfo() override
std::shared_ptr< Tango::DeviceProxy > getDeviceProxy()
RegisterCatalogue getRegisterCatalogue() const override
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_impl(const RegisterPath &registerPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER(DoocsBackend, getRegisterAccessor_impl, 4)
static boost::shared_ptr< DeviceBackend > createInstance(std::string address, std::map< std::string, std::string > parameters)