STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
FakeDb Struct Reference

Fake elodin-db: accept one connection, write blob, then hold the socket open. More...

Collaboration diagram for FakeDb:
[legend]

Public Member Functions

void start (std::vector< uint8_t > blob, bool close_after_write)
void stop ()
void start (std::vector< uint8_t > blob)
void stop ()

Public Attributes

std::thread th
std::atomic< bool > run {true}
std::atomic< uint16_t > port {0}
std::atomic< bool > closed_early {false}

Detailed Description

Fake elodin-db: accept one connection, write blob, then hold the socket open.

Fake elodin-db: accept one connection, drain whatever the client subscribes with, then write blob and hold the socket open so the feed stays connected.

Definition at line 62 of file test_elodin_read_path.cpp.

Member Function Documentation

◆ start() [1/2]

void FakeDb::start ( std::vector< uint8_t > blob)
inline

Definition at line 78 of file test_pressure_feed.cpp.

References a, port, and th.

◆ start() [2/2]

void FakeDb::start ( std::vector< uint8_t > blob,
bool close_after_write )
inline

Definition at line 68 of file test_elodin_read_path.cpp.

References a, closed_early, port, send(), and th.

Referenced by main().

◆ stop() [1/2]

void FakeDb::stop ( )
inline

Definition at line 114 of file test_elodin_read_path.cpp.

References th.

Referenced by main().

◆ stop() [2/2]

void FakeDb::stop ( )
inline

Definition at line 114 of file test_pressure_feed.cpp.

References th.

Member Data Documentation

◆ closed_early

std::atomic<bool> FakeDb::closed_early {false}

Definition at line 66 of file test_elodin_read_path.cpp.

Referenced by start().

◆ port

◆ run

std::atomic< bool > FakeDb::run {true}

Definition at line 64 of file test_elodin_read_path.cpp.

◆ th

std::thread FakeDb::th

Definition at line 63 of file test_elodin_read_path.cpp.

Referenced by start(), start(), and stop().


The documentation for this struct was generated from the following files: