C++ Documentation
DataSamples
-
class DataSample
This class is the C++ variant of
nexxT.interface.DataSamples.DataSamplePublic Functions
-
DataSample(const QByteArray &content, const QString &datatype, int64_t timestamp)
Constructor, see
nexxT.interface.DataSamples.DataSample.__init__()
-
virtual ~DataSample()
Destructor
-
QByteArray getContent() const
-
int64_t getTimestamp() const
-
QString getDatatype() const
Public Static Functions
Return a shared pointer referencing the given instance. The ownership of the pointer is transferred to the shared pointer.
-
static int64_t currentTime()
Public Static Attributes
-
static const double TIMESTAMP_RES
The resolution of the timstamps in [seconds]
-
DataSample(const QByteArray &content, const QString &datatype, int64_t timestamp)
A typedef for a Datasample handled by a shared pointer.
Filters
-
class Filter : public QObject
This class is the C++ variant of
nexxT.interface.Filters.FilterPublic Functions
-
virtual ~Filter()
Destructor
-
virtual void onInit()
-
virtual void onOpen()
-
virtual void onStart()
-
virtual void onPortDataChanged(const InputPortInterface &inputPort)
-
virtual void onStop()
-
virtual void onClose()
-
virtual void onDeinit()
-
virtual QList<QList<QString>> onSuggestDynamicPorts()
-
BaseFilterEnvironment *environment() const
Public Static Functions
Return a shared pointer referencing the given instance. The ownership of the pointer is transferred to the shared pointer.
Protected Functions
-
Filter(bool dynInPortsSupported, bool dynOutPortsSupported, BaseFilterEnvironment *env)
Constructor, see
nexxT.interface.Filters.Filter.__init__()
-
PropertyCollection *propertyCollection()
-
PropertyCollection *guiState()
-
SharedPortPtr addStaticOutputPort(const QString &name)
-
SharedPortPtr addStaticInputPort(const QString &name, int queueSizeSamples = 1, double queueSizeSeconds = -1)
-
virtual ~Filter()
-
struct FilterState
This struct is the C++ variant of
nexxT.interface.Filters.FilterStatePublic Static Functions
-
static QString state2str(int state)
Public Static Attributes
-
static const int CONSTRUCTING = 0
During constructor.
-
static const int CONSTRUCTED = 1
After constructor before calling onInit.
-
static const int INITIALIZING = 2
During onInit.
-
static const int INITIALIZED = 3
After onInit before onOpen.
-
static const int OPENING = 4
During onOpen.
-
static const int OPENED = 5
After onOpen before onStart.
-
static const int STARTING = 6
During onStart.
-
static const int ACTIVE = 7
After onStart before onStop.
-
static const int STOPPING = 8
During onStop.
-
static const int CLOSING = 9
During onClose.
-
static const int DEINITIALIZING = 10
During onDeinit.
-
static const int DESTRUCTING = 11
During destructor.
-
static const int DESTRUCTED = 12
After destructor.
-
static QString state2str(int state)
A typedef for a Filter instance handled by a shared pointer.
Ports
Port
-
class Port : public QObject
This class is the C++ variant of
nexxT.interface.Ports.PortSubclassed by nexxT::InputPortInterface, nexxT::OutputPortInterface
Public Functions
-
Port(bool dynamic, const QString &name, BaseFilterEnvironment *env)
Constructor, see
nexxT.interface.Ports.Port.__init__()
-
virtual ~Port()
Destructor
-
bool dynamic() const
-
const QString &name() const
-
void setName(const QString &name)
-
BaseFilterEnvironment *environment() const
-
bool isOutput() const
-
bool isInput() const
-
virtual SharedPortPtr clone(BaseFilterEnvironment*) const = 0
Public Static Functions
Return a shared pointer referencing the given instance. The ownership of the pointer is transferred to the shared pointer.
-
Port(bool dynamic, const QString &name, BaseFilterEnvironment *env)
A typedef for a Port instance handled by a shared pointer.
OutputPortInterface
-
class OutputPortInterface : public nexxT::Port
This class is the C++ variant of
nexxT.interface.Ports.OutputPortInterface.In contrast to the python version, this class is not abstract but directly implements the functionality.
Public Functions
-
OutputPortInterface(bool dynamic, const QString &name, BaseFilterEnvironment *env)
Constructor.
-
virtual SharedPortPtr clone(BaseFilterEnvironment*) const
Signals
QT signal for transmitting a sample over threads. Note that this signal is not intended to be used directly. Use the transmit method instead.
See
nexxT.interface.Ports.OutputPortInterface.transmitSample.
Public Static Functions
Called by the nexxT framework, not intended to be used directly.
Called by the nexxT framework, not intended to be used directly.
-
OutputPortInterface(bool dynamic, const QString &name, BaseFilterEnvironment *env)
A typedef for a Port instance handled by a shared pointer.
InputPortInterface
-
class InputPortInterface : public nexxT::Port
This class is the C++ variant of
nexxT.interface.Ports.InputPortInterface.In contrast to the python version, this class is not abstract but directly implements the functionality.
Public Functions
-
InputPortInterface(bool dynamic, const QString &name, BaseFilterEnvironment *env, int queueSizeSamples = 1, double queueSizeSeconds = -1.0)
Constructor.
-
virtual ~InputPortInterface()
Destructor
-
SharedDataSamplePtr getData(int delaySamples = 0, double delaySeconds = -1.) const
-
virtual SharedPortPtr clone(BaseFilterEnvironment*) const
-
void setQueueSize(int queueSizeSamples, double queueSizeSeconds)
See
nexxT.interface.Ports.InputPortInterface.setQueueSize().
-
int queueSizeSamples()
See
nexxT.interface.Ports.InputPortInterface.queueSizeSamples().
-
double queueSizeSeconds()
See
nexxT.interface.Ports.InputPortInterface.queueSizeSeconds().
-
void setInterthreadDynamicQueue(bool enabled)
See
nexxT.interface.Ports.InputPortInterface.setInterthreadDynamicQueue().
-
bool interthreadDynamicQueue()
See
nexxT.interface.Ports.InputPortInterface.interthreadDynamicQueue().
Public Slots
Called by the nexxT framework, not intended to be used directly.
Called by the nexxT framework, not intended to be used directly.
-
InputPortInterface(bool dynamic, const QString &name, BaseFilterEnvironment *env, int queueSizeSamples = 1, double queueSizeSeconds = -1.0)
A typedef for an InputPortInterface instance handled by a shared pointer.
A typedef for a Port instance handled by a shared pointer.
PropertyCollections
PropertyCollection
-
class PropertyCollection : public QObject
This class is the C++ variant of
nexxT.interface.PropertyCollections.PropertyCollectionPublic Functions
-
PropertyCollection()
Constructor
-
virtual ~PropertyCollection()
Destructor
-
virtual void defineProperty(const QString &name, const QVariant &defaultVal, const QString &helpstr)
See
nexxT.interface.PropertyCollections.PropertyCollection.defineProperty()Variant with no options and no handler.
-
virtual void defineProperty(const QString &name, const QVariant &defaultVal, const QString &helpstr, const QVariantMap &options)
See
nexxT.interface.PropertyCollections.PropertyCollection.defineProperty()Variant with options. C++ example
defineProperty("intProp", 1, "a bound integer", {{"min", -4},{"max", 9}}); defineProperty("enumProp", "Hello", "an enum prop", {{"enum", QStringList{"Hello", "World"}}});
-
virtual void defineProperty(const QString &name, const QVariant &defaultVal, const QString &helpstr, const PropertyHandler *handler)
See
nexxT.interface.PropertyCollections.PropertyCollection.defineProperty()Variant with a custom handler.
-
virtual QVariant getProperty(const QString &name) const
See
nexxT.interface.PropertyCollections.PropertyCollection.getProperty()
Public Slots
-
virtual void setProperty(const QString &name, const QVariant &variant)
Called from the nexxT framework, not intended to be used publicly
-
virtual QString evalpath(const QString &path) const
See
nexxT.interface.PropertyCollections.PropertyCollection.evalpath()
Signals
-
void propertyChanged(nexxT::PropertyCollection *sender, const QString &name)
See
nexxT.interface.PropertyCollections.PropertyCollection.propertyChanged
-
PropertyCollection()
PropertyHandler
-
class PropertyHandler
This class is the C++ variant of
nexxT.interface.PropertyCollections.PropertyHandlerPublic Functions
-
PropertyHandler()
Constructor
-
virtual ~PropertyHandler()
Destructor
-
virtual QVariantMap options()
See
nexxT.interface.PropertyCollections.PropertyHandler.options()The python dict is translated to a QVariantMap in the C++ world.
-
virtual QVariant fromConfig(const QVariant &value)
See
nexxT.interface.PropertyCollections.PropertyHandler.fromConfig()
-
virtual QVariant toConfig(const QVariant &value)
See
nexxT.interface.PropertyCollections.PropertyHandler.toConfig()
-
virtual QVariant toViewValue(const QVariant &value)
See
nexxT.interface.PropertyCollections.PropertyHandler.toViewValue()
-
virtual QWidget *createEditor(QWidget *parent)
See
nexxT.interface.PropertyCollections.PropertyHandler.createEditor()
-
virtual void setEditorData(QWidget *editor, const QVariant &value)
See
nexxT.interface.PropertyCollections.PropertyHandler.setEditorData()
-
virtual QVariant getEditorData(QWidget *editor)
See
nexxT.interface.PropertyCollections.PropertyHandler.getEditorData()
-
PropertyHandler()
Services
-
class Services
This class is the C++ variant of
nexxT.interface.Services.ServicesPublic Functions
-
Services()
Constructor (intended to be used by the nexxT framework only)
-
virtual ~Services()
Destructor
Public Static Functions
-
static SharedQObjectPtr getService(const QString &name)
See
nexxT.interface.Services.Services.getService()
-
static void addService(const QString &name, QObject *service)
See
nexxT.interface.Services.Services.addService()This function takes ownership of the given QObject instance.
See
nexxT.interface.Services.Services.addService()This function uses a shared pointer to the object and therefore doesn’t suffer from ownership issues. A common use case for this is to add a filter as a service, the shared pointer to the filter is available with environment()->getPlugin() from within the filter.
-
static void removeService(const QString &name)
See
nexxT.interface.Services.Services.removeService()
-
static void removeAll()
See
nexxT.interface.Services.Services.removeAll()
-
Services()
A typedef for a QObject handled by a shared pointer.
In principle it is not really necessary to use a shared pointer to handle QObjects, because of the parent/child ownership principle. However for consistency, the design decision has been made to also wrap the services in a smart pointer just like datasamples, filters and ports.
Logging
-
NEXXT_LOG_INTERNAL(msg)
Log msg using the nexxT mechanism with priority INTERNAL (lowest)
- Parameters:
msg – QString instance
-
NEXXT_LOG_DEBUG(msg)
Log msg using the nexxT mechanism with priority DEBUG
- Parameters:
msg – QString instance
-
NEXXT_LOG_INFO(msg)
Log msg using the nexxT mechanism with priority INFO
- Parameters:
msg – QString instance
-
NEXXT_LOG_WARN(msg)
Log msg using the nexxT mechanism with priority WARNING
- Parameters:
msg – QString instance
-
NEXXT_LOG_ERROR(msg)
Log msg using the nexxT mechanism with priority ERROR
- Parameters:
msg – QString instance
-
NEXXT_LOG_CRITICAL(msg)
Log msg using the nexxT mechanism with priority CRITICAL (highest)
- Parameters:
msg – QString instance
Plugin Definition
-
NEXXT_PLUGIN_DECLARE_FILTER(classname)
This macro must be present in the Filter’s class declaration.
- Parameters:
classname – the name of the Filter class
-
NEXXT_PLUGIN_DEFINE_START()
Start to define the plugin introspection code section. To define the introspection code section, one of the .cpp files must call these macros once:
NEXXT_PLUGIN_DEFINE_START() NEXXT_PLUGIN_ADD_FILTER(...) NEXXT_PLUGIN_ADD_FILTER(...) NEXXT_PLUGIN_ADD_FILTER(...) NEXXT_PLUGIN_DEFINE_FINISH()
-
NEXXT_PLUGIN_ADD_FILTER(filtertype)
Add the given filtertype to the plugin
- Parameters:
filtertype – the name of the Filter class
-
NEXXT_PLUGIN_DEFINE_FINISH()
Finish the plugin introspection code section