LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
readerprovider.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_READER_PROVIDER_HPP
8#define LOGICALACCESS_READER_PROVIDER_HPP
9
11#include <map>
12
13namespace logicalaccess
14{
18typedef std::vector<std::shared_ptr<ReaderUnit>> ReaderList;
19
20bool hasEnding(std::string const &fullString, std::string ending);
21
26class LLA_CORE_API ReaderProvider
27 : public std::enable_shared_from_this<ReaderProvider>
28{
29 public:
34
38 virtual ~ReaderProvider();
39
43 virtual void release() = 0;
44
49 virtual bool refreshReaderList() = 0;
50
55 virtual const ReaderList &getReaderList() = 0;
56
61 virtual const ReaderList waitForReaders(std::vector<std::string> readers,
62 double maxwait, bool all);
63
68 virtual std::string getRPType() const = 0;
69
74 virtual std::string getRPName() const = 0;
75
80 virtual std::shared_ptr<ReaderUnit> createReaderUnit() = 0;
81
87 static std::shared_ptr<ReaderProvider> getReaderProviderFromRPType(std::string rpt);
88};
89}
90
91#endif /* LOGICALACCESS_READER_PROVIDER_HPP */
A Reader Provider base class. It provide a available list of specific reader kind.
Definition: readerprovider.hpp:28
virtual std::string getRPType() const =0
Get the reader provider type.
virtual std::string getRPName() const =0
Get the reader provider name.
virtual const ReaderList & getReaderList()=0
Get reader list for this reader provider.
virtual bool refreshReaderList()=0
List all readers of the system.
virtual void release()=0
Release the provider resources.
virtual std::shared_ptr< ReaderUnit > createReaderUnit()=0
Create a new reader unit for the reader provider.
Definition: asn1.hpp:9
std::vector< std::shared_ptr< ReaderUnit > > ReaderList
A reader unit list.
Definition: readerprovider.hpp:18
bool hasEnding(std::string const &fullString, std::string ending)
Reader unit.