CIRCT  20.0.0git
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. More...
 
void addPoll (HWModule &module)
 Poll this module. More...
 
void stop ()
 Instruct the service thread to stop running. More...
 

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 186 of file Accelerator.h.

Constructor & Destructor Documentation

◆ AcceleratorServiceThread()

AcceleratorServiceThread::AcceleratorServiceThread ( )

Definition at line 349 of file Accelerator.cpp.

References impl.

◆ ~AcceleratorServiceThread()

AcceleratorServiceThread::~AcceleratorServiceThread ( )

Definition at line 353 of file Accelerator.cpp.

References stop().

Member Function Documentation

◆ addListener()

void 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 365 of file Accelerator.cpp.

References assert(), and impl.

◆ addPoll()

void AcceleratorServiceThread::addPoll ( HWModule module)

Poll this module.

Definition at line 372 of file Accelerator.cpp.

References assert(), impl, and esi::HWModule::poll().

◆ stop()

void AcceleratorServiceThread::stop ( )

Instruct the service thread to stop running.

Definition at line 355 of file Accelerator.cpp.

References impl.

Referenced by ~AcceleratorServiceThread().

Member Data Documentation

◆ impl

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

Definition at line 205 of file Accelerator.h.

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


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