Keyple Service C++ Library - 3.3.5
Component of the Keyple C++ middleware
ObservableLocalConfigurableReaderAdapter.cpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional *
5 * information regarding copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the *
8 * terms of the Eclipse Public License 2.0 which is available at *
9 * http://www.eclipse.org/legal/epl-2.0 *
10 * *
11 * SPDX-License-Identifier: EPL-2.0 *
12 ******************************************************************************/
13
14#include "keyple/core/service/ObservableLocalConfigurableReaderAdapter.hpp"
15
16#include <memory>
17#include <string>
18
19namespace keyple {
20namespace core {
21namespace service {
22
23ObservableLocalConfigurableReaderAdapter::
24 ObservableLocalConfigurableReaderAdapter(
25 std::shared_ptr<ConfigurableReaderSpi> configurableReaderSpi,
26 const std::string& pluginName)
27: ObservableLocalReaderAdapter(
28 std::dynamic_pointer_cast<ObservableReaderSpi>(configurableReaderSpi),
29 pluginName)
30{
31}
32
33void
34ObservableLocalConfigurableReaderAdapter::activateProtocol(
35 const std::string& readerProtocol, const std::string& applicationProtocol)
36{
37 activateReaderProtocol(readerProtocol, applicationProtocol);
38}
39
40void
41ObservableLocalConfigurableReaderAdapter::deactivateProtocol(
42 const std::string& readerProtocol)
43{
44 deactivateReaderProtocol(readerProtocol);
45}
46
47const std::string&
48ObservableLocalConfigurableReaderAdapter::getCurrentProtocol() const
49{
50 return getCurrentPhysicalProtocolName();
51}
52
53} /* namespace service */
54} /* namespace core */
55} /* namespace keyple */