#include <random>
#include "demo_property_extension.h"
#include <easy/profiler.h>
#include <sstream>
ADTF_PLUGIN(
"Demo Property Qml Extension Plugin", cSimpleFilter);
cSimpleFilter::cSimpleFilter()
{
m_propFilename.SetDescription("Select a single file.");
RegisterPropertyVariable("Filename", m_propFilename);
m_propFilenameList.SetDescription("Select a list of files.");
RegisterPropertyVariable("FilenameList", m_propFilenameList);
m_propFilepath.SetDescription("Select a directory.");
RegisterPropertyVariable("Filepath", m_propFilepath);
set_description(*
this,
"Use this filter to provide properties of type 'Filename', 'FilenameList' and 'Filepath'.");
set_help_link(*
this,
"$(ADTF_DIR)/doc/adtf_html/page_demo_qml_property_filter.html");
}
tResult cSimpleFilter::Process(tNanoSeconds tmTimeOfTrigger, IRunner* )
{
std::ostringstream stream;
stream << "Timestamp: ";
stream << tmTimeOfTrigger.nCount;
stream << " | ";
stream << "Filename: ";
stream << *m_propFilename;
stream << " | ";
stream << "FilenameList: ";
for (const auto &item : *m_propFilenameList)
{
stream << item;
stream << ", ";
}
stream << " | ";
stream << "Filepath: ";
stream << *m_propFilepath;
}
Copyright © Audi Electronics Venture GmbH.
#define ADTF_PLUGIN(__plugin_identifier,...)
The ADTF Plugin Macro will add the code of a adtf::ucom::ant::IPlugin implementation.
#define LOG_INFO(...)
Logs an info message.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
void set_description(base::ant::IConfiguration &oConfig, const char *strDescription)
Sets description information.
void set_help_link(base::ant::IConfiguration &oConfig, const char *strUrl)
Set the link to the corresponding help/documentation.