7#ifndef LOGICALACCESS_OSDPCOMMANDS_HPP
8#define LOGICALACCESS_OSDPCOMMANDS_HPP
18#define CMD_ODSP "ODSP"
135#define OSDP_CMD_TEXT_MAX_LEN 32
174#define OSDP_EVENT_MAX_LEN 64
213#define OSDP_BIOTEMPLATE_MAX_LEN 512
268 void initCommands(
unsigned char address = 0,
bool installMode =
false);
270 std::shared_ptr<OSDPChannel> poll()
const;
272 std::shared_ptr<OSDPChannel> challenge()
const;
274 std::shared_ptr<OSDPChannel> sCrypt()
const;
276 std::shared_ptr<OSDPChannel> keySet(
const ByteVector& key)
const;
278 std::shared_ptr<OSDPChannel> led(
s_led_cmd &led)
const;
280 std::shared_ptr<OSDPChannel> buz(
s_buz_cmd &led)
const;
282 std::shared_ptr<OSDPChannel> text(
s_text_cmd &text)
const;
284 s_com setCommunicationSettings(uint8_t address, uint32_t baudrate)
const;
288 s_ftstat fileTransfer(uint32_t totalSize, uint32_t offset,
ByteVector fragment, uint8_t transferType = 0x01)
const;
290 std::shared_ptr<OSDPChannel> setProfile(
unsigned char profile)
const;
292 std::shared_ptr<OSDPChannel> getProfile()
const;
296 std::vector<s_pdcap_report> pdCAP()
const;
300 s_lstat_report localStatus(std::shared_ptr<OSDPChannel> channel)
const;
304 ByteVector inputStatus(std::shared_ptr<OSDPChannel> channel)
const;
308 ByteVector outputStatus(std::shared_ptr<OSDPChannel> channel)
const;
314 std::shared_ptr<OSDPChannel> abort()
const;
320 std::shared_ptr<OSDPChannel> getPIVData(
s_pivdata& data)
const;
322 std::shared_ptr<OSDPChannel> sendTransparentCommand(
const ByteVector &command)
const;
324 std::shared_ptr<OSDPChannel> disconnectFromSmartcard()
const;
338 handleCardEvent = cardHandler;
343 handleKeypadEvent = keypadHandler;
348 handleBioReadEvent = bioreadHandler;
353 handleTamperEvent = tamperHandler;
358 std::shared_ptr<OSDPChannel> stransmit()
const;
360 std::shared_ptr<OSDPChannel> transmit()
const;
The base commands class for all card commands.
Definition: commands.hpp:21
OSDP Commands class.
Definition: osdpcommands.hpp:250
void setCardEventHandler(OsdpReaderEvent cardHandler)
Definition: osdpcommands.hpp:336
~OSDPCommands()
Definition: osdpcommands.hpp:264
OsdpTamperEvent handleTamperEvent
Definition: osdpcommands.hpp:372
void setKeypadEventHandler(OsdpReaderEvent keypadHandler)
Definition: osdpcommands.hpp:341
OsdpReaderEvent handleKeypadEvent
Definition: osdpcommands.hpp:366
std::shared_ptr< OSDPChannel > getChannel() const
Definition: osdpcommands.hpp:331
OsdpBioReadEvent handleBioReadEvent
Definition: osdpcommands.hpp:368
OSDPCommands(std::string ct)
Definition: osdpcommands.hpp:258
void setTamperEventHandler(OsdpTamperEvent tamperHandler)
Definition: osdpcommands.hpp:351
OsdpReaderEvent handleCardEvent
Definition: osdpcommands.hpp:364
void setSecureChannel(std::shared_ptr< OSDPChannel > channel)
Definition: osdpcommands.hpp:326
OsdpBioMatchEvent handleBioMatchEvent
Definition: osdpcommands.hpp:370
OSDPCommands()
Definition: osdpcommands.hpp:252
std::shared_ptr< OSDPChannel > m_channel
Definition: osdpcommands.hpp:362
void setBioReadEventHandler(OsdpBioReadEvent bioreadHandler)
Definition: osdpcommands.hpp:346
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
BiometricStatus
Definition: osdpcommands.hpp:102
struct logicalaccess::t_buz_cmd s_buz_cmd
struct logicalaccess::t_pivdata s_pivdata
OSDPColor
Definition: osdpcommands.hpp:34
struct logicalaccess::t_pdcap_report s_pdcap_report
struct logicalaccess::t_text_cmd s_text_cmd
struct logicalaccess::t_bioreadr s_bioreadr
std::function< void(s_biomatchr &)> OsdpBioMatchEvent
Definition: osdpcommands.hpp:243
struct logicalaccess::t_lstat_report s_lstat_report
struct logicalaccess::t_led_cmd s_led_cmd
struct logicalaccess::t_carddata_fmt s_carddata_fmt
struct logicalaccess::t_keypad s_keypad
ReadDirection
Definition: osdpcommands.hpp:56
BiometricFormat
Definition: osdpcommands.hpp:95
ReaderTamperStatus
Definition: osdpcommands.hpp:43
FileTransferStatus
Definition: osdpcommands.hpp:62
std::function< void(uint8_t, ByteVector, uint16_t)> OsdpReaderEvent
Definition: osdpcommands.hpp:241
std::function< void(s_bioreadr &)> OsdpBioReadEvent
Definition: osdpcommands.hpp:242
BiometricType
Definition: osdpcommands.hpp:73
struct logicalaccess::t_com s_com
DataFormatCode
Definition: osdpcommands.hpp:50
std::function< void(bool, bool)> OsdpTamperEvent
Definition: osdpcommands.hpp:244
struct logicalaccess::t_biomatchr s_biomatchr
struct logicalaccess::t_pdid_report s_pdid_report
struct logicalaccess::t_ftstat s_ftstat
TemporaryControleCode
Definition: osdpcommands.hpp:21
@ CancelTemporaryOperation
PermanentControlCode
Definition: osdpcommands.hpp:28
struct logicalaccess::t_carddata_raw s_carddata_raw
#define OSDP_BIOTEMPLATE_MAX_LEN
Definition: osdpcommands.hpp:213
#define CMD_ODSP
Definition: osdpcommands.hpp:18
#define OSDP_CMD_TEXT_MAX_LEN
Definition: osdpcommands.hpp:135
#define OSDP_EVENT_MAX_LEN
Definition: osdpcommands.hpp:174
Definition: osdpcommands.hpp:226
uint8_t score
Definition: osdpcommands.hpp:229
uint8_t readerNumber
Definition: osdpcommands.hpp:227
BiometricStatus status
Definition: osdpcommands.hpp:228
Definition: osdpcommands.hpp:216
uint8_t readerNumber
Definition: osdpcommands.hpp:217
uint8_t bioLength
Definition: osdpcommands.hpp:221
uint8_t bioQuality
Definition: osdpcommands.hpp:220
BiometricStatus status
Definition: osdpcommands.hpp:218
BiometricType bioType
Definition: osdpcommands.hpp:219
uint8_t bioTemplate[OSDP_BIOTEMPLATE_MAX_LEN]
Definition: osdpcommands.hpp:222
Definition: osdpcommands.hpp:127
uint8_t reader
Definition: osdpcommands.hpp:128
uint8_t onTime
Definition: osdpcommands.hpp:130
uint8_t toneCode
Definition: osdpcommands.hpp:129
uint8_t count
Definition: osdpcommands.hpp:132
uint8_t offTime
Definition: osdpcommands.hpp:131
Definition: osdpcommands.hpp:185
uint8_t characterCount
Definition: osdpcommands.hpp:188
ReadDirection readDirection
Definition: osdpcommands.hpp:187
uint8_t readerNumber
Definition: osdpcommands.hpp:186
uint8_t data[OSDP_EVENT_MAX_LEN]
Definition: osdpcommands.hpp:189
Definition: osdpcommands.hpp:177
uint16_t bitCount
Definition: osdpcommands.hpp:180
uint8_t readerNumber
Definition: osdpcommands.hpp:178
uint8_t data[OSDP_EVENT_MAX_LEN]
Definition: osdpcommands.hpp:181
DataFormatCode formatCode
Definition: osdpcommands.hpp:179
Definition: osdpcommands.hpp:200
uint8_t address
Definition: osdpcommands.hpp:201
uint32_t baudrate
Definition: osdpcommands.hpp:202
Definition: osdpcommands.hpp:206
uint8_t action
Definition: osdpcommands.hpp:207
uint16_t updateMsgMax
Definition: osdpcommands.hpp:210
uint16_t delay
Definition: osdpcommands.hpp:208
FileTransferStatus statusDetail
Definition: osdpcommands.hpp:209
Definition: osdpcommands.hpp:193
uint8_t data[OSDP_EVENT_MAX_LEN]
Definition: osdpcommands.hpp:196
uint8_t readerNumber
Definition: osdpcommands.hpp:194
uint8_t digitCount
Definition: osdpcommands.hpp:195
Definition: osdpcommands.hpp:109
TemporaryControleCode tempControlCode
Definition: osdpcommands.hpp:112
uint8_t timerMSB
Definition: osdpcommands.hpp:118
PermanentControlCode permControlCode
Definition: osdpcommands.hpp:119
uint8_t timerLSB
Definition: osdpcommands.hpp:117
OSDPColor tempOnColor
Definition: osdpcommands.hpp:115
uint8_t tempOnTime
Definition: osdpcommands.hpp:113
uint8_t ledNumber
Definition: osdpcommands.hpp:111
uint8_t tempOffTime
Definition: osdpcommands.hpp:114
OSDPColor tempOffColor
Definition: osdpcommands.hpp:116
OSDPColor permOffColor
Definition: osdpcommands.hpp:123
uint8_t permOnTime
Definition: osdpcommands.hpp:120
uint8_t permOffTime
Definition: osdpcommands.hpp:121
uint8_t reader
Definition: osdpcommands.hpp:110
OSDPColor permOnColor
Definition: osdpcommands.hpp:122
Definition: osdpcommands.hpp:169
uint8_t tamperStatus
Definition: osdpcommands.hpp:170
uint8_t powerStatus
Definition: osdpcommands.hpp:171
Definition: osdpcommands.hpp:162
uint8_t numberOf
Definition: osdpcommands.hpp:165
uint8_t functionCode
Definition: osdpcommands.hpp:163
uint8_t compliance
Definition: osdpcommands.hpp:164
Definition: osdpcommands.hpp:149
uint8_t firmwareBuild
Definition: osdpcommands.hpp:158
uint8_t vendorCode3
Definition: osdpcommands.hpp:152
uint32_t serialNumber
Definition: osdpcommands.hpp:155
uint8_t vendorCode2
Definition: osdpcommands.hpp:151
uint8_t firmwareMinor
Definition: osdpcommands.hpp:157
uint8_t vendorCode1
Definition: osdpcommands.hpp:150
uint8_t modelNumber
Definition: osdpcommands.hpp:153
uint8_t version
Definition: osdpcommands.hpp:154
uint8_t firmwareMajor
Definition: osdpcommands.hpp:156
Definition: osdpcommands.hpp:233
uint8_t dataOffset
Definition: osdpcommands.hpp:238
uint8_t objectId3
Definition: osdpcommands.hpp:236
uint8_t objectId1
Definition: osdpcommands.hpp:234
uint8_t objectId2
Definition: osdpcommands.hpp:235
uint8_t elementId
Definition: osdpcommands.hpp:237
Definition: osdpcommands.hpp:138
uint8_t reader
Definition: osdpcommands.hpp:139
uint8_t length
Definition: osdpcommands.hpp:144
uint8_t data[OSDP_CMD_TEXT_MAX_LEN]
Definition: osdpcommands.hpp:145
uint8_t offsetRow
Definition: osdpcommands.hpp:142
uint8_t tempTime
Definition: osdpcommands.hpp:141
uint8_t controlCode
Definition: osdpcommands.hpp:140
uint8_t offsetCol
Definition: osdpcommands.hpp:143