#include <source.hpp>
|
|
static const std::string | server_name () |
| |
|
|
static const int | version = 2 |
| |
|
|
std::string | _blob_format |
| |
|
std::string | _error |
| |
template<typename Tout = std::vector<double>>
class Source< Tout >
Base class for sources
This class is the base class for all sources. It defines the interface for providing output of data internally acquired. Child classes must implement the Source::kind() and Source::get_output() methods. Optionally, they can implement the Source::set_params() method to receive parameters as a void pointer.
After deriving the class, remember to call the INSTALL_SOURCE_DRIVER(klass, type) macro to enable the plugin to be loaded by the kernel.
- Template Parameters
-
◆ blob_format()
template<typename Tout = std::vector<double>>
| std::string Source< Tout >::blob_format |
( |
| ) |
|
|
inline |
Returns the format of the blob data provided by get_output().
◆ error()
template<typename Tout = std::vector<double>>
| std::string Source< Tout >::error |
( |
| ) |
|
|
inline |
Returns the error message
This method returns the error message.
- Returns
- The error message
◆ get_output()
template<typename Tout = std::vector<double>>
| virtual return_type Source< Tout >::get_output |
( |
Tout * |
out, |
|
|
std::vector< unsigned char > * |
blob = nullptr |
|
) |
| |
|
pure virtual |
Get the output data
This method provides the output data. It returns true if the data was fetched successfully, and false otherwise.
- Parameters
-
- Returns
- True if the data was processed successfully, and false otherwise
◆ info()
template<typename Tout = std::vector<double>>
| virtual std::map<std::string, std::string> Source< Tout >::info |
( |
| ) |
|
|
pure virtual |
Returns the filter information
This method returns the filter information. It returns a map with keys and values describing the filter.
- Returns
- The filter information
◆ kind()
template<typename Tout = std::vector<double>>
| virtual std::string Source< Tout >::kind |
( |
| ) |
|
|
pure virtual |
Returns the kind of source
This method returns the kind of source. It is used to identify the source when loading it from a plugin.
- Returns
- The kind of source
◆ set_params()
template<typename Tout = std::vector<double>>
| virtual void Source< Tout >::set_params |
( |
void * |
params | ) |
|
|
inlinevirtual |
Sets the parameters
This method sets the parameters for the source. It receives a void pointer to the parameters. The child class must cast the pointer to the correct type.
- Parameters
-
| params | The parameters (typically a pointer to a struct) |
◆ dummy
template<typename Tout = std::vector<double>>
Set it to true to enable dummy mode
The documentation for this class was generated from the following file: