Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
map_storage.h File Reference

Integrity checks and bounded disk-backed intermediates for surveys. More...

#include "sha256fst.h"
#include <opencv2/core.hpp>
#include <filesystem>
#include <fstream>
#include <array>
#include <algorithm>
#include <functional>
#include <cerrno>
#include <cstdlib>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
Include dependency graph for map_storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  pangea_survey::StorageDescriptor
 Own a working-file descriptor through success and exception paths. More...
class  pangea_survey::DiskRaster
 Read bounded rectangular regions from a lossless BGRA disk raster. More...

Namespaces

namespace  pangea_survey

Functions

std::string pangea_survey::dataDigest (const void *data, std::size_t size)
 Compute a lowercase SHA-256 digest for an in-memory byte range.
std::string pangea_survey::fileDigest (const std::filesystem::path &path, const std::function< bool()> &stopped={})
 Hash a file in bounded chunks, optionally honoring cancellation.
void pangea_survey::storageHeadroom (const std::filesystem::path &directory, std::uint64_t bytes)
 Require requested free space plus a fixed safety reserve.
void pangea_survey::publishWorkingFile (const std::filesystem::path &temporary, const std::filesystem::path &target, bool replace=true)
 Fsync a completed working file, rename it, then sync its directory.
void pangea_survey::saveWorkingText (const std::filesystem::path &target, const std::string &text)
 Save checkpoint text through the durable working-file publisher.

Detailed Description

Integrity checks and bounded disk-backed intermediates for surveys.

Checkpoints are identified by content hashes and published through fsync plus rename so resume can distinguish complete work from interrupted writes. SHA-256 here detects accidental mismatch; it is not an authenticity or security boundary.

Definition in file map_storage.h.