LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
commands.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_COMMANDS_HPP
8#define LOGICALACCESS_COMMANDS_HPP
9
12
13namespace logicalaccess
14{
15class Chip;
16
20class LLA_CORE_API Commands : public ICommands
21{
22 public:
26 Commands() = delete;
27
28 virtual ~Commands();
29
34 std::shared_ptr<Chip> getChip() const override
35 {
36 return d_chip.lock();
37 }
38
43 virtual void setChip(std::shared_ptr<Chip> chip)
44 {
45 d_chip = chip;
46 }
47
52 std::shared_ptr<ReaderCardAdapter> getReaderCardAdapter() const override
53 {
54 return d_readerCardAdapter;
55 }
56
61 virtual void setReaderCardAdapter(std::shared_ptr<ReaderCardAdapter> adapter)
62 {
63 d_readerCardAdapter = adapter;
64 }
65
70 virtual const std::string &getCmdType() const
71 {
72 return d_commandtype;
73 }
74
79 virtual void setCmdType(const std::string &command_type)
80 {
81 d_commandtype = command_type;
82 }
83
84 protected:
89 explicit Commands(std::string commandtype)
90 : d_commandtype(commandtype)
91 {
92 }
93
97 std::shared_ptr<ReaderCardAdapter> d_readerCardAdapter;
98
102 std::weak_ptr<Chip> d_chip;
103
107 std::string d_commandtype;
108};
109}
110
111#endif
The base commands class for all card commands.
Definition: commands.hpp:21
virtual void setReaderCardAdapter(std::shared_ptr< ReaderCardAdapter > adapter)
Set the reader/card adapter.
Definition: commands.hpp:61
std::shared_ptr< ReaderCardAdapter > getReaderCardAdapter() const override
Get the reader/card adapter.
Definition: commands.hpp:52
std::shared_ptr< Chip > getChip() const override
Get the chip.
Definition: commands.hpp:34
virtual void setCmdType(const std::string &command_type)
Set the cmd name.
Definition: commands.hpp:79
virtual const std::string & getCmdType() const
Get the cmd name.
Definition: commands.hpp:70
virtual void setChip(std::shared_ptr< Chip > chip)
Set the chip.
Definition: commands.hpp:43
Commands(std::string commandtype)
Constructor.
Definition: commands.hpp:89
std::shared_ptr< ReaderCardAdapter > d_readerCardAdapter
The reader/card adapter.
Definition: commands.hpp:97
Commands()=delete
Constructor.
std::weak_ptr< Chip > d_chip
The chip.
Definition: commands.hpp:102
std::string d_commandtype
The command type.
Definition: commands.hpp:107
The base abstract commands class for all card commands.
Definition: icommands.hpp:20
ICommands.
Definition: asn1.hpp:9
Reader/card adapter.