Keypop Reader C++ API - 2.1.0
Component of the Keypop C++ API
ChannelControl.hpp
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 MIT License which is available at *
9
* https://opensource.org/licenses/MIT *
10
* *
11
* SPDX-License-Identifier: MIT *
12
******************************************************************************/
13
14
#pragma once
15
16
#include <stdexcept>
17
18
namespace
keypop
{
19
namespace
reader {
20
26
enum class
ChannelControl
{
32
KEEP_OPEN
,
33
41
CLOSE_AFTER
42
};
43
53
inline
ChannelControl
54
valueOf
(
const
int
value)
55
{
56
switch
(value) {
57
case
static_cast<
int
>
(
ChannelControl::KEEP_OPEN
):
58
return
ChannelControl::KEEP_OPEN
;
59
case
static_cast<
int
>
(
ChannelControl::CLOSE_AFTER
):
60
return
ChannelControl::CLOSE_AFTER
;
61
default
:
62
throw
std::invalid_argument(
"invalid ChannelControl value"
);
63
}
64
}
65
66
}
/* namespace reader */
67
}
/* namespace keypop */
keypop::reader::ChannelControl
ChannelControl
Policy for managing the physical channel after a card request is executed.
Definition:
ChannelControl.hpp:26
keypop::reader::ChannelControl::CLOSE_AFTER
@ CLOSE_AFTER
Terminates communication with the card.
keypop::reader::ChannelControl::KEEP_OPEN
@ KEEP_OPEN
Leaves the physical channel open.
keypop::reader::valueOf
ChannelControl valueOf(const int value)
Returns the enum constant of this type with the specified value.
Definition:
ChannelControl.hpp:54
keypop
Definition:
CardCommunicationException.hpp:20
keypop
reader
ChannelControl.hpp
Generated by
1.9.2