Politician 1.0.0
WiFi Auditing Library for ESP32
Loading...
Searching...
No Matches
politician::storage Namespace Reference

Namespaces

namespace  detail
 

Classes

class  EnterpriseCsvLogger
 Helper for logging harvested 802.1X Enterprise Credentials. More...
 
class  Hc22000FileLogger
 Helper for writing HandshakeRecords to an HC22000 text file. More...
 
class  NvsBssidCache
 Helper for persistently storing captured BSSIDs in NVS memory. More...
 
class  PcapngFileLogger
 Helper for writing HandshakeRecords and raw packets to a standard PCAPNG file. More...
 
class  WigleCsvLogger
 Helper for writing precise GPS location coordinates to a Wigle.net compatible CSV file. More...
 

Functions

void setTimestampProvider (detail::TimestampCb cb)
 Sets a global timestamp provider called by all CSV loggers when no explicit timestamp string is supplied.
 

Function Documentation

◆ setTimestampProvider()

void politician::storage::setTimestampProvider ( detail::TimestampCb  cb)
inline

Sets a global timestamp provider called by all CSV loggers when no explicit timestamp string is supplied.

The callback should return a pointer to a static or long-lived buffer with a datetime string in Wigle CSV format: "YYYY-MM-DD HH:MM:SS". It is called once per log entry.

// NTP example
storage::setTimestampProvider([]() -> const char* {
static char buf[20];
time_t now = time(nullptr);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", localtime(&now));
return buf;
});
void setTimestampProvider(detail::TimestampCb cb)
Sets a global timestamp provider called by all CSV loggers when no explicit timestamp string is suppl...

Definition at line 78 of file PoliticianStorage.h.

References politician::storage::detail::_timestampCb().