LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
asciiformat.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_ASCIIFORMAT_HPP
8#define LOGICALACCESS_ASCIIFORMAT_HPP
9
11
12namespace logicalaccess
13{
17class LLA_CORE_API ASCIIFormat : public StaticFormat
18{
19 public:
26
32 virtual ~ASCIIFormat();
33
37 unsigned int getDataLength() const override;
38
43 std::string getName() const override;
44
49 FormatType getType() const override;
50
55 void serialize(boost::property_tree::ptree &parentNode) override;
56
61 void unSerialize(boost::property_tree::ptree &node) override;
62
67 std::string getDefaultXmlNodeName() const override;
68
74 ByteVector getLinearData() const override;
75
81 void setLinearData(const ByteVector &data) override;
82
87 std::string getASCIIValue() const;
88
93 void setASCIIValue(std::string value);
94
99 unsigned int getASCIILength() const;
100
105 void setASCIILength(unsigned int length);
106
111 unsigned char getPadding() const;
112
117 void setPadding(unsigned char padding);
118
124 bool checkSkeleton(std::shared_ptr<Format> format) const override;
125
130 bool needUserConfigurationToBeUse() const override;
131
132 protected:
139 size_t getFormatLinearData(ByteVector &data) const override;
140
146 void setFormatLinearData(const ByteVector &data, size_t *indexByte) override;
147
151 std::string d_asciiValue;
152
153 struct
154 {
158 unsigned int d_asciiLength;
159
163 unsigned char d_padding;
164 } d_formatLinear;
165};
166}
167
168#endif /* LOGICALACCESS_ASCIIFORMAT_HPP */
A ASCII format.
Definition: asciiformat.hpp:18
unsigned char d_padding
The padding value.
Definition: asciiformat.hpp:163
std::string d_asciiValue
The ASCII value.
Definition: asciiformat.hpp:151
unsigned int d_asciiLength
The total ASCII length.
Definition: asciiformat.hpp:158
A static format.
Definition: staticformat.hpp:18
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
FormatType
Format type.
Definition: format.hpp:27
Static Format.