2021-04-28 15:13:25 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class WIEGAND {
|
|
|
|
public:
|
2024-03-25 13:53:32 +03:00
|
|
|
WIEGAND(void);
|
|
|
|
void begin(void);
|
|
|
|
void end(void);
|
|
|
|
bool available(void);
|
|
|
|
unsigned long getCode(void);
|
|
|
|
unsigned long getCodeHigh(void);
|
|
|
|
int getWiegandType(void);
|
2021-04-28 15:13:25 +03:00
|
|
|
|
2024-03-25 13:53:32 +03:00
|
|
|
static void ReadD0(void);
|
|
|
|
static void ReadD1(void);
|
2021-04-28 15:13:25 +03:00
|
|
|
|
|
|
|
private:
|
2024-03-25 13:53:32 +03:00
|
|
|
static bool DoWiegandConversion(void);
|
2024-02-20 05:13:38 +03:00
|
|
|
static unsigned long
|
|
|
|
GetCardId(unsigned long* codehigh, unsigned long* codelow, char bitlength);
|
2021-04-28 15:13:25 +03:00
|
|
|
|
2024-02-20 05:13:38 +03:00
|
|
|
static unsigned long _cardTempHigh;
|
|
|
|
static unsigned long _cardTemp;
|
|
|
|
static unsigned long _lastWiegand;
|
|
|
|
static int _bitCount;
|
2021-04-28 15:13:25 +03:00
|
|
|
static int _wiegandType;
|
|
|
|
static unsigned long _code;
|
|
|
|
static unsigned long _codeHigh;
|
2022-05-06 16:37:10 +03:00
|
|
|
};
|