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

Fake elodin-db that REFUSES the first subscription, the way the real one does when the calibrated VTable does not exist yet. More...

Collaboration diagram for FakeDbRefuseFirst:
[legend]

Public Member Functions

void start (std::vector< uint8_t > blob, int publishAfterSubscribes)
void stop ()

Public Attributes

std::thread th
std::atomic< bool > run {true}
std::atomic< uint16_t > port {0}
std::atomic< int > subscribes {0}

Detailed Description

Fake elodin-db that REFUSES the first subscription, the way the real one does when the calibrated VTable does not exist yet.

It says nothing back — which is the whole problem: a refusal is invisible to the C++ client, which sends request id 0 and never reads a reply. Data is published only once a RE-subscribe arrives, so this passes if and only if PressureFeed asks again.

Definition at line 129 of file test_pressure_feed.cpp.

Member Function Documentation

◆ start()

void FakeDbRefuseFirst::start ( std::vector< uint8_t > blob,
int publishAfterSubscribes )
inline

Definition at line 135 of file test_pressure_feed.cpp.

References a, port, subscribes, and th.

Referenced by main().

◆ stop()

void FakeDbRefuseFirst::stop ( )
inline

Definition at line 180 of file test_pressure_feed.cpp.

References th.

Referenced by main().

Member Data Documentation

◆ port

◆ run

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

Definition at line 131 of file test_pressure_feed.cpp.

◆ subscribes

std::atomic<int> FakeDbRefuseFirst::subscribes {0}

Definition at line 133 of file test_pressure_feed.cpp.

Referenced by main(), and start().

◆ th

std::thread FakeDbRefuseFirst::th

Definition at line 130 of file test_pressure_feed.cpp.

Referenced by start(), and stop().


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