1#ifndef CARASPACE_H_INCLUDED
2#define CARASPACE_H_INCLUDED
7#include "tof_typedefs.h"
8#include "packets/tof_packet.h"
9#include "telemetry_dataclasses.hpp"
10#include "calibration.h"
12#include "result/result.h"
32 static constexpr u16 HEAD = 0xAAAA;
33 static constexpr u16 TAIL = 0x5555;
48 static constexpr u16 HEAD = 0xAAAA;
49 static constexpr u16 TAIL = 0x5555;
51 static auto from_bytestream(Vec<u8> stream, usize &pos) ->
CRFrame;
53 std::map<std::string, std::tuple<u64, CRFrameObjectType>> index;
55 auto to_string()
const -> std::string;
57 static auto parse_index(Vec<u8> stream, usize &pos) -> std::map<std::string, std::tuple<u64, CRFrameObjectType>>;
60 auto get_tofpacket(std::string name) -> r::Result<TofPacket,Gaps::IOError>;
69 auto set_path(std:: string pathname) -> void;
78 auto get_filenames() const -> Vec<std::
string>;
95 usize n_packets_read_ ;
96 Vec<std::string> filenames_ ;
97 std::ifstream stream_file_ ;
99 auto prime_next_file_() -> void;
Definition calibration.h:105
std::map< u8, TofPaddle > TofPaddleMap
A map of paddle id -> TofPaddle.
Definition database.h:62
CRFrameObjectType
These are objects which can be stored in a caraspace frame
Definition caraspace.hpp:25
std::vector< std::string > list_path_contents_sorted(const std::string &input)
Definition caraspace.hpp:31
auto to_string() -> std::string
string representation for printing
static auto from_bytestream(Vec< u8 > stream, usize &pos) -> CRFrameObject
Decode a serializable from a bytestream
Definition caraspace.hpp:47
auto get_tofpacket(std::string name) -> r::Result< TofPacket, Gaps::IOError >
extract a tofpacket if this frame object is of the correct type
Definition caraspace.hpp:64
auto is_exhausted() const -> bool
auto get_next_frame() -> CRFrame
auto get_rbcalibrations(u8 n_rb) -> RBCalibrationMap
auto n_packets_read() const -> bool
Definition telemetry_dataclasses.hpp:72
Definition tof_packet.h:83