LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
InDataHandler Class Reference

#include <lasp_indatahandler.h>

Public Member Functions

 ~InDataHandler ()
 
 InDataHandler (SmgrHandle mgr, InCallbackType cb, InResetType resetfcn)
 When constructed, the handler is added to the stream manager, which will call the handlers's inCallback() until stop() is called.
 
void start ()
 Adds the current InDataHandler to the list of handlers in the StreamMgr. After this happens, the reset() method stored in this object is called back. When the stream is running, right after this, inCallback() is called with DaqData.
 
void stop ()
 Removes the currend InDataHandler from the list of handlers in the StreamMgr. From that point on, the object can be safely destroyed. Not calling stop() before destruction of this object is considered a BUG. I.e. a class which uses an InDataHandler should always call stop() in its destructor.
 
void checkRightThread () const
 

Public Attributes

const InCallbackType inCallback
 
const InResetType reset
 

Protected Attributes

std::weak_ptr< StreamMgr_mgr
 

Detailed Description

Definition at line 27 of file lasp_indatahandler.h.

Constructor & Destructor Documentation

◆ ~InDataHandler()

InDataHandler::~InDataHandler ( )

Definition at line 41 of file lasp_indatahandler.cpp.

◆ InDataHandler()

InDataHandler::InDataHandler ( SmgrHandle  mgr,
InCallbackType  cb,
InResetType  resetfcn 
)

When constructed, the handler is added to the stream manager, which will call the handlers's inCallback() until stop() is called.

Parameters
mgrStream manager.
cbThe callback that is stored, and called on new DAQ data
resetfcnThe callback that is stored, and called when the DAQ changes state.

Definition at line 7 of file lasp_indatahandler.cpp.

Member Function Documentation

◆ checkRightThread()

void InDataHandler::checkRightThread ( ) const
inline

Definition at line 76 of file lasp_indatahandler.h.

◆ start()

void InDataHandler::start ( )

Adds the current InDataHandler to the list of handlers in the StreamMgr. After this happens, the reset() method stored in this object is called back. When the stream is running, right after this, inCallback() is called with DaqData.

Definition at line 20 of file lasp_indatahandler.cpp.

◆ stop()

void InDataHandler::stop ( )

Removes the currend InDataHandler from the list of handlers in the StreamMgr. From that point on, the object can be safely destroyed. Not calling stop() before destruction of this object is considered a BUG. I.e. a class which uses an InDataHandler should always call stop() in its destructor.

Definition at line 30 of file lasp_indatahandler.cpp.

Member Data Documentation

◆ _mgr

std::weak_ptr<StreamMgr> InDataHandler::_mgr
protected

Definition at line 30 of file lasp_indatahandler.h.

◆ inCallback

const InCallbackType InDataHandler::inCallback

Definition at line 40 of file lasp_indatahandler.h.

◆ reset

const InResetType InDataHandler::reset

Definition at line 41 of file lasp_indatahandler.h.


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