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
frame_slots.h File Reference

Slot bookkeeping for camera frames: who may write which slot, and RAII leases for readers. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <utility>

Go to the source code of this file.

Classes

struct  frames::FrameMeta
 
class  frames::SlotReleaser
 Whatever a FrameLease must notify when it is released (FrameSlots natively, FrameStore on device). More...
 
class  frames::FrameLease
 Move-only handle on a published frame. Releases its slot exactly once, on release() or destruction. More...
 
class  frames::FrameSlots
 

Enumerations

enum class  AbortReason : uint8_t { Oversize , Corrupt , CaptureFailed }
 

Variables

constexpr size_t frames::kSlotCount = 4
 

Detailed Description

Slot bookkeeping for camera frames: who may write which slot, and RAII leases for readers.

Pure C++20, no platform headers, so it is unit tested natively (with ASan/UBSan in CI). NOT thread-safe on its own: on the device, FrameStore serializes every call with a mutex.

A slot is Free, Writing or Published. One Published slot is the latest. A Published slot that is no longer the latest becomes Free when its last reader releases it, so a slot with readers is never rewritten.