STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
daqtest::BoardListener Class Reference

Collects UDP actuator packets, folding the 3x retransmit of one batch into a single burst. More...

#include <BoardListener.hpp>

Collaboration diagram for daqtest::BoardListener:
[legend]

Public Member Functions

 BoardListener (uint16_t port)
 ~BoardListener ()
bool start ()
void stop ()
std::vector< Burst > bursts () const

Private Member Functions

void run ()

Private Attributes

uint16_t port_
int sock_ = -1
std::atomic< bool > running_ {false}
std::thread thread_
std::mutex mutex_
std::vector< Burst > bursts_
Clock::time_point t0_

Detailed Description

Collects UDP actuator packets, folding the 3x retransmit of one batch into a single burst.

Definition at line 43 of file BoardListener.hpp.

Constructor & Destructor Documentation

◆ BoardListener()

daqtest::BoardListener::BoardListener ( uint16_t port)
inlineexplicit

Definition at line 45 of file BoardListener.hpp.

References port, and port_.

◆ ~BoardListener()

daqtest::BoardListener::~BoardListener ( )
inline

Definition at line 47 of file BoardListener.hpp.

References stop().

Member Function Documentation

◆ bursts()

std::vector< Burst > daqtest::BoardListener::bursts ( ) const
inline

Definition at line 87 of file BoardListener.hpp.

References bursts_, lk, and mutex_.

Referenced by attemptEntry(), and main().

◆ run()

void daqtest::BoardListener::run ( )
inlineprivate

Definition at line 93 of file BoardListener.hpp.

References b, bursts_, lk, mutex_, daq::parse_actuator_command_packet(), running_, sock_, and t0_.

Referenced by start().

◆ start()

bool daqtest::BoardListener::start ( )
inline

Definition at line 51 of file BoardListener.hpp.

References port_, run(), running_, sock_, t0_, and thread_.

Referenced by attemptEntry(), and main().

◆ stop()

void daqtest::BoardListener::stop ( )
inline

Definition at line 76 of file BoardListener.hpp.

References running_, sock_, and thread_.

Referenced by attemptEntry(), main(), and ~BoardListener().

Member Data Documentation

◆ bursts_

std::vector<Burst> daqtest::BoardListener::bursts_
private

Definition at line 128 of file BoardListener.hpp.

Referenced by bursts(), and run().

◆ mutex_

std::mutex daqtest::BoardListener::mutex_
mutableprivate

Definition at line 127 of file BoardListener.hpp.

Referenced by bursts(), and run().

◆ port_

uint16_t daqtest::BoardListener::port_
private

Definition at line 123 of file BoardListener.hpp.

Referenced by BoardListener(), and start().

◆ running_

std::atomic<bool> daqtest::BoardListener::running_ {false}
private

Definition at line 125 of file BoardListener.hpp.

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

◆ sock_

int daqtest::BoardListener::sock_ = -1
private

Definition at line 124 of file BoardListener.hpp.

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

◆ t0_

Clock::time_point daqtest::BoardListener::t0_
private

Definition at line 129 of file BoardListener.hpp.

Referenced by run(), and start().

◆ thread_

std::thread daqtest::BoardListener::thread_
private

Definition at line 126 of file BoardListener.hpp.

Referenced by start(), and stop().


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