Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
prov_types.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <cstddef>
9#include <cstdint>
10
11namespace prov
12{
13constexpr size_t kMaxNetworks = 3;
14constexpr size_t kSsidMax = 32;
15constexpr size_t kPassMax = 64; // buffer bound; valid passwords are empty or 8-63 chars
16constexpr size_t kSaltLen = 16;
17constexpr size_t kHashLen = 32;
18
20inline size_t bounded_len(const char* s, size_t cap)
21{
22 size_t n = 0;
23 while (n < cap && s[n] != '\0')
24 {
25 ++n;
26 }
27 return n;
28}
29
32 char ssid[kSsidMax + 1] = {};
33 char pass[kPassMax + 1] = {};
34 uint32_t last_ok_seq = 0; // larger = more recently added or joined
35};
36
38struct PinRecord {
39 bool set = false;
40 uint8_t salt[kSaltLen] = {};
41 uint8_t hash[kHashLen] = {};
42};
43
45struct ScanResult {
46 char ssid[kSsidMax + 1] = {};
47 int8_t rssi = -127;
48 bool secured = true;
49};
50
52struct Candidates {
53 uint8_t idx[kMaxNetworks] = {}; // indices into NetworkList, strongest first
54 size_t count = 0;
55};
56} // namespace prov
size_t bounded_len(const char *s, size_t cap)
Length of the NUL-terminated string at s, looking at no more than cap bytes (cap if unterminated).
Definition prov_types.h:20
Saved networks present in a scan, strongest first.
Definition prov_types.h:52
One saved network. Strings are NUL-terminated.
Definition prov_types.h:31
Salted PIN hash as stored in NVS.
Definition prov_types.h:38
One access point seen by a scan.
Definition prov_types.h:45