CIRCT 22.0.0git
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
esi::AcceleratorServiceThread Class Reference

Background thread which services various requests. More...

#include <Accelerator.h>

Collaboration diagram for esi::AcceleratorServiceThread:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

 AcceleratorServiceThread ()
 
 ~AcceleratorServiceThread ()
 
void addListener (std::initializer_list< ReadChannelPort * > listenPorts, std::function< void(ReadChannelPort *, MessageData)> callback)
 When there's data on any of the listenPorts, call the callback.
 
void addPoll (HWModule &module)
 Poll this module.
 
void stop ()
 Instruct the service thread to stop running.
 

Private Attributes

std::unique_ptr< Implimpl
 

Detailed Description

Background thread which services various requests.

Currently, it listens on ports and calls callbacks for incoming messages on said ports.

Definition at line 196 of file Accelerator.h.

Constructor & Destructor Documentation

◆ AcceleratorServiceThread()

esi::AcceleratorServiceThread::AcceleratorServiceThread ( )

Definition at line 443 of file Accelerator.cpp.

References impl.

◆ ~AcceleratorServiceThread()

esi::AcceleratorServiceThread::~AcceleratorServiceThread ( )

Definition at line 447 of file Accelerator.cpp.

References stop().

Member Function Documentation

◆ addListener()

void esi::AcceleratorServiceThread::addListener ( std::initializer_list< ReadChannelPort * >  listenPorts,
std::function< void(ReadChannelPort *, MessageData)>  callback 
)

When there's data on any of the listenPorts, call the callback.

Callable from any thread.

Definition at line 459 of file Accelerator.cpp.

References assert(), and impl.

◆ addPoll()

void esi::AcceleratorServiceThread::addPoll ( HWModule module)

Poll this module.

Definition at line 466 of file Accelerator.cpp.

References assert(), and impl.

Referenced by main(), printTelemetry(), and printTelemetryJson().

◆ stop()

void esi::AcceleratorServiceThread::stop ( )

Instruct the service thread to stop running.

Definition at line 449 of file Accelerator.cpp.

References impl.

Referenced by ~AcceleratorServiceThread().

Member Data Documentation

◆ impl

std::unique_ptr<Impl> esi::AcceleratorServiceThread::impl
private

Definition at line 215 of file Accelerator.h.

Referenced by AcceleratorServiceThread(), addListener(), addPoll(), and stop().


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