|
ESP RFID Webui
Architecture and call graph
|
#include <freertos/queue.h>#include "TimerHandle.h"#include "AuthSync.h"#include "ConfigManager.h"#include "HardwareSerial.h"#include "HashUtils.h"#include <ArduinoJson.h>#include <HTTPClient.h>#include <LittleFS.h>#include <MFRC522.h>#include <SPI.h>#include <U8x8lib.h>#include <WiFi.h>#include <Wire.h>Go to the source code of this file.
Classes | |
| struct | ScanItem |
Functions | |
| MFRC522 | rfid (SS_PIN, RST_PIN) |
| U8X8_SSD1315_128X64_NONAME_SW_I2C | u8x8 (22, 21, U8X8_PIN_NONE) |
| String | getUidString () |
| void | updateEnrollStatus () |
| void | updateDisplay () |
| void | drawHeader () |
| void | drawEnrollIndicator (bool on) |
| void | NetworkTask (void *pv) |
| bool | postLastScan (const String &uid, JsonDocument &out) |
| static void | displayTimerCallback (TimerHandle_t xTimer) |
| void | setup () |
| void | loop () |
| void | serverCheckTimerCallback (TimerHandle_t xTimer) |
| void | authSyncTimerCallback (TimerHandle_t xTimer) |
Variables | |
| constexpr uint8_t | RST_PIN = 17 |
| constexpr uint8_t | SS_PIN = 5 |
| static constexpr unsigned long | ENROLL_POLL_INTERVAL_MS = 5000 |
| String | SSID = "" |
| String | PASS = "" |
| String | SERVER_BASE = "" |
| AuthSync * | authSync = nullptr |
| String | lastUID = "NONE" |
| String | enrollMode = "none" |
| bool | lastAuthorized = false |
| uint64_t | lastHash = 0 |
| bool | serverReachable = false |
| unsigned long | lastDisplayUpdate = 0 |
| unsigned long | enrollBlinkMillis = 0 |
| bool | enrollBlinkState = false |
| static unsigned long | lastEnrollPoll = 0 |
| String | displayedUID = "" |
| bool | displayedAuth = false |
| uint64_t | displayedHash = 0 |
| String | displayedEnrollMode = "" |
| bool | displayedEnrollBlink = false |
| bool | displayedServerReachable = false |
| static QueueHandle_t | scanQueue = nullptr |
| static volatile bool | authSyncRequested = false |
| static volatile bool | displayUpdateRequested = false |
| void authSyncTimerCallback | ( | TimerHandle_t | xTimer | ) |
Definition at line 572 of file main.cpp.
References authSyncRequested.
Referenced by NetworkTask().
|
static |
Definition at line 126 of file main.cpp.
References displayUpdateRequested.
Referenced by setup().
| void drawEnrollIndicator | ( | bool | on | ) |
Definition at line 450 of file main.cpp.
References displayedEnrollBlink, displayedEnrollMode, enrollMode, and u8x8().
Referenced by loop(), and updateDisplay().
| void drawHeader | ( | ) |
Definition at line 392 of file main.cpp.
References u8x8().
Referenced by setup(), and updateDisplay().
| String getUidString | ( | ) |
Definition at line 380 of file main.cpp.
References rfid().
Referenced by loop().
| void loop | ( | ) |
Definition at line 305 of file main.cpp.
References authSync, displayUpdateRequested, drawEnrollIndicator(), ENROLL_POLL_INTERVAL_MS, enrollBlinkMillis, enrollBlinkState, enrollMode, getUidString(), HashUtils::hashUid(), AuthSync::isAuthorized(), lastAuthorized, lastDisplayUpdate, lastEnrollPoll, lastHash, lastUID, rfid(), scanQueue, ScanItem::uid, updateDisplay(), and updateEnrollStatus().
| void NetworkTask | ( | void * | pv | ) |
Definition at line 578 of file main.cpp.
References authSync, authSyncRequested, authSyncTimerCallback(), createAuthSyncTimer(), createServerCheckTimer(), displayUpdateRequested, enrollMode, postLastScan(), scanQueue, serverCheckTimerCallback(), serverReachable, ScanItem::uid, and AuthSync::update().
Referenced by setup().
| bool postLastScan | ( | const String & | uid, |
| JsonDocument & | out ) |
Definition at line 470 of file main.cpp.
References SERVER_BASE, and serverReachable.
Referenced by NetworkTask().
| void serverCheckTimerCallback | ( | TimerHandle_t | xTimer | ) |
Definition at line 548 of file main.cpp.
References authSync, SERVER_BASE, serverReachable, and AuthSync::setServerProbeResult().
Referenced by NetworkTask().
| void setup | ( | ) |
Definition at line 129 of file main.cpp.
References AuthSync::AuthSync(), authSync, AuthSync::begin(), createDisplayTimer(), displayedAuth, displayedServerReachable, displayTimerCallback(), drawHeader(), AuthSync::dumpMemoryStats(), lastAuthorized, ConfigManager::loadConfig(), NetworkTask(), PASS, AuthSync::preloadOffline(), rfid(), scanQueue, SERVER_BASE, serverReachable, SSID, and u8x8().
| U8X8_SSD1315_128X64_NONAME_SW_I2C u8x8 | ( | 22 | , |
| 21 | , | ||
| U8X8_PIN_NONE | ) |
Referenced by drawEnrollIndicator(), drawHeader(), setup(), and updateDisplay().
| void updateDisplay | ( | ) |
Definition at line 402 of file main.cpp.
References displayedAuth, displayedEnrollMode, displayedHash, displayedServerReachable, displayedUID, drawEnrollIndicator(), drawHeader(), enrollMode, lastAuthorized, lastHash, lastUID, serverReachable, and u8x8().
Referenced by loop().
| void updateEnrollStatus | ( | ) |
Definition at line 512 of file main.cpp.
References enrollMode, SERVER_BASE, and serverReachable.
Referenced by loop().
| AuthSync* authSync = nullptr |
Definition at line 84 of file main.cpp.
Referenced by loop(), NetworkTask(), serverCheckTimerCallback(), and setup().
|
static |
Definition at line 123 of file main.cpp.
Referenced by authSyncTimerCallback(), and NetworkTask().
| bool displayedAuth = false |
Definition at line 101 of file main.cpp.
Referenced by setup(), and updateDisplay().
| bool displayedEnrollBlink = false |
Definition at line 104 of file main.cpp.
Referenced by drawEnrollIndicator().
| String displayedEnrollMode = "" |
Definition at line 103 of file main.cpp.
Referenced by drawEnrollIndicator(), and updateDisplay().
| uint64_t displayedHash = 0 |
Definition at line 102 of file main.cpp.
Referenced by updateDisplay().
| bool displayedServerReachable = false |
Definition at line 105 of file main.cpp.
Referenced by setup(), and updateDisplay().
| String displayedUID = "" |
Definition at line 100 of file main.cpp.
Referenced by updateDisplay().
|
static |
Definition at line 125 of file main.cpp.
Referenced by displayTimerCallback(), loop(), and NetworkTask().
|
staticconstexpr |
| String enrollMode = "none" |
Definition at line 88 of file main.cpp.
Referenced by drawEnrollIndicator(), loop(), NetworkTask(), updateDisplay(), and updateEnrollStatus().
| bool lastAuthorized = false |
Definition at line 89 of file main.cpp.
Referenced by loop(), setup(), and updateDisplay().
|
static |
| uint64_t lastHash = 0 |
Definition at line 90 of file main.cpp.
Referenced by loop(), and updateDisplay().
| String lastUID = "NONE" |
Definition at line 87 of file main.cpp.
Referenced by loop(), and updateDisplay().
|
static |
Definition at line 119 of file main.cpp.
Referenced by loop(), NetworkTask(), and setup().
| String SERVER_BASE = "" |
Definition at line 80 of file main.cpp.
Referenced by postLastScan(), serverCheckTimerCallback(), setup(), and updateEnrollStatus().
| bool serverReachable = false |
Definition at line 91 of file main.cpp.
Referenced by NetworkTask(), postLastScan(), serverCheckTimerCallback(), setup(), updateDisplay(), and updateEnrollStatus().