openPSTD  2.0
Open source simulation for sound propagation in urban environments
Public Member Functions | List of all members
OpenPSTD::Kernel::KernelCallback Class Referenceabstract

Callback interface for communication with the CLI or the GUI. More...

#include <KernelInterface.h>

Inheritance diagram for OpenPSTD::Kernel::KernelCallback:
Inheritance graph
Collaboration diagram for OpenPSTD::Kernel::KernelCallback:
Collaboration graph

Public Member Functions

virtual void Callback (CALLBACKSTATUS status, std::string message, int frame)=0
 This callback will be called with information how far the kernel is progressed. More...
 
virtual void WriteFrame (int frame, int domain, PSTD_FRAME_PTR data)=0
 Return pressure data of scene to callback handler. More...
 
virtual void WriteSample (int startSample, int receiver, std::vector< float > data)=0
 Return receiver data of scene to callback handler. More...
 

Detailed Description

Callback interface for communication with the CLI or the GUI.

This callback is passed to the kernel to return simulation information to the requester. Main use case is passing the observed pressure values, the warnings and the errors.

Member Function Documentation

virtual void OpenPSTD::Kernel::KernelCallback::Callback ( CALLBACKSTATUS  status,
std::string  message,
int  frame 
)
pure virtual

This callback will be called with information how far the kernel is progressed.

Parameters
statusCALLBACKSTATUS enum, either one of starting/running/finishing/error.
messageMessage to pass to callback handler
frameeither positive integer corresponding to time step of data or -1 when kernel is not running.

Implemented in OpenPSTD::CLI::CLIOutput.

virtual void OpenPSTD::Kernel::KernelCallback::WriteFrame ( int  frame,
int  domain,
PSTD_FRAME_PTR  data 
)
pure virtual

Return pressure data of scene to callback handler.

Parameters
framePositive integer corresponding to time step of data.
domainan identifier that identifies the domain
data1D row-major vector of pressure data.

Implemented in OpenPSTD::CLI::CLIOutput.

virtual void OpenPSTD::Kernel::KernelCallback::WriteSample ( int  startSample,
int  receiver,
std::vector< float >  data 
)
pure virtual

Return receiver data of scene to callback handler.

Parameters
startSamplePositive integer corresponding to time step of the first data point.
receiveran identifier that identifies the receiver
dataa set of data points

Implemented in OpenPSTD::CLI::CLIOutput.


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