45 #define PFOD_RAW_CMD_PARSER
50 #ifdef PFOD_RAW_CMD_PARSER
61 #define pfod_MAYBE_UNUSED(x) (void)(x)
70 size_t write(
const uint8_t *buffer,
size_t size);
77 #ifdef PFOD_RAW_CMD_PARSER
118 void connect(Stream* io_arg,
const __FlashStringHelper *hexKeyPgr,
int eepromAddress = 0);
120 void connect(
pfod_Base* _pfodBase,
const __FlashStringHelper *hexKeyPgr,
int eepromAddress = 0);
140 void connect(Stream* io_arg, Print* raw_io_arg,
const __FlashStringHelper *hexKeyPgr,
int eepromAddress = 0);
141 void connect(Stream* io_arg, Print* raw_io_arg);
142 void close_pfodSecurityConnection();
143 size_t writeToPfodApp(uint8_t* idxPtr);
144 size_t writeToPfodApp(uint8_t b);
148 Print *raw_io_connect_arg;
155 unsigned long lastMillis;
156 unsigned long connectionTimerStart;
157 uint32_t timeSinceLastConnection;
159 unsigned long connectionTimer;
161 void setAuthorizeState(
int auth);
163 static const byte Msg_Hash_Size = 8;
164 static const byte Msg_Hash_Size_Bytes = (Msg_Hash_Size >> 1);
165 byte msgHashBytes[Msg_Hash_Size + 1];
167 uint32_t outMsgCount;
168 byte outputParserState;
169 boolean initialization;
170 unsigned long idleTimeout;
171 void startIdleTimeoutTimer();
172 bool setIdleTimeoutCalled;
173 const __FlashStringHelper *hexKeyPgr;
177 bool lastConnectionClosed;
179 unsigned long timerDebug_ms;
180 #ifdef PFOD_RAW_CMD_PARSER
pfod_Base for Arduino Base class for all pfod_Base_xxxx classes The subclasses pfod_Base_xxx must ove...
static const uint8_t challengeByteSize
void setIdleTimeout(unsigned long timeout_in_seconds)
Set the idle Timeout in sec i.e.
void addDwg(pfodDrawing *dwgPtr)
static uint8_t byte64ToByte(uint8_t b)
static uint32_t decodePasswordBytes(byte *bytes, int idx, int bytesLen)
size_t write(const uint8_t *buffer, size_t size)
static int getBytesFromPassword(char *hexKey, int hexKeyLen, byte *keyBytes, int keyMaxLen)
void setDebugStream(Print *debugOut)
void connect(pfod_Base *_pfodBase)
unsigned long getIdleTimeout()
void connect(Stream *io_arg, const __FlashStringHelper *hexKeyPgr, int eepromAddress=0)
void connect(pfod_Base *_pfodBase, const __FlashStringHelper *hexKeyPgr, int eepromAddress=0)
Stream * getPfodAppStream()
pfodSecurity(const char *_version)
void connect(Stream *io_arg)
initialize the Security parser args io_arg the Stream pointer to read and write to for pfod messages