ADTF
Loading...
Searching...
No Matches
adtf::filter Namespace Reference

Namespace for the ADTF Filter SDK. More...

Namespaces

namespace  ant
 Namespace for all functionality of the ADTF Filter SDK provided since v3.0.
 
namespace  devil
 Namespace for all functionality of the ADTF Filter SDK provided since v3.3.
 
namespace  flash
 Namespace for all functionality of the ADTF Filter SDK provided since v3.5.
 
namespace  hollow
 Namespace for all functionality of the ADTF Filter SDK provided since v3.7.
 
namespace  private_implementations
 Namespace for all internally used functionality implemented..
 
namespace  riddler
 Namespace for all functionality of the ADTF Filter SDK provided since v3.17.
 
namespace  testing
 Namespace for all testing functionality of the ADTF Filter SDK.
 

Classes

class  cFilter
 
class  cGraphObject
 
class  cRunnerFallback
 
class  cSampleStreamingSink
 
class  cSampleStreamingSource
 
class  cStreamTypeHelper
 
class  cSubstreamHandling
 
class  cSubStreamTypes
 
class  cTriggerFunction
 
class  cTriggerFunctionBase
 
class  data_triggered_filter
 
class  interface_client
 
class  ITriggerConfiguration
 brings the last ant::ITriggerConfiguration to users space More...
 
class  substream_filter
 
class  thread_triggered_filter
 
class  time_triggered_filter
 
class  triggered_filter
 

Typedefs

using cDynamicFilter = cFilter
 
using cPinWriter = adtf::streaming::flash::cSampleWriter
 use cSampleWriter as cPinWriter
 
template<typename DATA_TYPE>
using pin_writer = adtf::streaming::flash::sample_writer<DATA_TYPE>
 
using cPinReader = adtf::streaming::flash::cDynamicSampleReader
 use cSampleReader as cPinReader
 
template<tTimeStamp TIME_RANGE, bool STORELASTSAMPLE = true>
using time_limited_pin_reader = adtf::streaming::flash::time_limited_sample_reader<TIME_RANGE, STORELASTSAMPLE>
 
template<size_t MAX_SIZE, bool STORELASTSAMPLE = true>
using size_limited_pin_reader = adtf::streaming::flash::size_limited_sample_reader<MAX_SIZE, STORELASTSAMPLE>
 
using cSubstreamFilter = substream_filter<>
 
template<typename BaseReader = streaming::flash::cDynamicSampleReader>
using configurable_reader
 
template<typename BaseWriter = streaming::flash::cSampleWriter>
using configurable_writer
 
template<typename TriggerFunctionImpl, typename FilterClass = cFilterWithTriggerFunction>
using filter_with_trigger_function
 

Functions

template<typename DATA_BINDING_IMPL_TYPE>
tResult filter_create_pin (DATA_BINDING_IMPL_TYPE &oFilter, adtf::streaming::flash::ISampleReader &oReader)
 
template<typename DATA_BINDING_IMPL_TYPE>
tResult filter_create_pin (DATA_BINDING_IMPL_TYPE &oFilter, adtf::streaming::flash::ISampleWriter &oWriter)
 
template<typename DATA_BINDING_IMPL_TYPE>
tResult filter_create_pin (DATA_BINDING_IMPL_TYPE &oFilter, adtf::streaming::flash::ISampleReader &oReader, const char *strName, const ucom::ant::iobject_ptr< const adtf::streaming::ant::IStreamType > &pType)
 
template<typename DATA_BINDING_IMPL_TYPE>
tResult filter_create_pin (DATA_BINDING_IMPL_TYPE &oFilter, adtf::streaming::flash::ISampleWriter &oWriter, const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType)
 
template<typename DATA_BINDING_IMPL_TYPE, typename READERWRITERTYPE, typename PINTYPE>
tResult filter_create_pin (DATA_BINDING_IMPL_TYPE &oFilter, READERWRITERTYPE &oReaderORWriter, ucom::ant::iobject_ptr< PINTYPE > &pPin)
 
std::function< tResult(cFilterWithTriggerFunction &)> pin_trigger (std::vector< util::cString > oTriggerPins)
 
std::function< tResult(cFilterWithTriggerFunction &)> thread_trigger (bool bCyclic)
 
std::function< tResult(cFilterWithTriggerFunction &)> timer_trigger (tTimeStamp tmDefaultInterval)
 

Detailed Description

Namespace for the ADTF Filter SDK.

Within this namespace all interfaces, classes and functions always refer to their last revised implementation (version namespace). When using types defined within this namespace it is guaranteed to always use the latest version of the types.

The ADTF Filter SDK Package defines a internal Filter Architecture.

The main focus of this SDK package is to develop customized filters and streaming service (sources/sinks):

Typedef Documentation

◆ configurable_reader

template<typename BaseReader = streaming::flash::cDynamicSampleReader>
using adtf::filter::wolverine::configurable_reader

Template to access pin properties via a reader. Use it as a template parameter for cGraphObject::CreateInputPin()

Note
Pin property values are only available during and after calls to cFilter::Init(StageGraphReady) and cSampleStreamingSink::Init()/cSampleStreamingSource::Init() respectively.

Example Usage

class cMyFilter: public adtf::filter::cFilter
{
public:
ADTF_CLASS_ID_NAME(cMyFilter, "my_filter.filter.example.cid", "My Filter");
cMyFilter()
{
m_pReader = CreateInputPin<adtf::filter::configurable_reader<>>("input_pin");
adtf::base::set_property<int32_t>(*m_pReader, "input_pin_property", 123);
m_pWriter = CreateOutputPin<adtf::filter::configurable_writer<>>("output_pin");
adtf::base::set_property<int32_t>(*m_pWriter, "output_pin_property", 456);
}
tResult Init(tInitStage eStage) override
{
RETURN_IF_FAILED(cFilter::Init(eStage));
// Pin properties are only available from StageGraphReady forward.
if (eStage == StageGraphReady)
{
const auto nInputPinValue = adtf::base::get_property<int32_t>(*m_pReader, "input_pin_property");
const auto nOutputPinValue = adtf::base::get_property<int32_t>(*m_pWriter, "output_pin_property");
}
}
private:
adtf::filter::configurable_reader<>* m_pReader = nullptr;
adtf::filter::configurable_writer<>* m_pWriter = nullptr;
};
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Definition class_id.h:33
Definition filter.h:289
tResult Init(tInitStage eStage) override
VALUETYPE get_property(const IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oDefaultValue)
Get the property content converted to the VALUETYPE.
Definition configuration.h:291
tResult set_property(IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oValue)
Set the property.
Definition configuration.h:327

◆ configurable_writer

template<typename BaseWriter = streaming::flash::cSampleWriter>
using adtf::filter::wolverine::configurable_writer

Template to access pin properties via a writer. Use it as a template parameter for cGraphObject::CreateOutputPin()

Note
Pin property values are only available during and after calls to cFilter::Init(StageGraphReady) and cSampleStreamingSink::Init()/cSampleStreamingSource::Init() respectively.

Example Usage

class cMyFilter: public adtf::filter::cFilter
{
public:
ADTF_CLASS_ID_NAME(cMyFilter, "my_filter.filter.example.cid", "My Filter");
cMyFilter()
{
m_pReader = CreateInputPin<adtf::filter::configurable_reader<>>("input_pin");
adtf::base::set_property<int32_t>(*m_pReader, "input_pin_property", 123);
m_pWriter = CreateOutputPin<adtf::filter::configurable_writer<>>("output_pin");
adtf::base::set_property<int32_t>(*m_pWriter, "output_pin_property", 456);
}
tResult Init(tInitStage eStage) override
{
RETURN_IF_FAILED(cFilter::Init(eStage));
// Pin properties are only available from StageGraphReady forward.
if (eStage == StageGraphReady)
{
const auto nInputPinValue = adtf::base::get_property<int32_t>(*m_pReader, "input_pin_property");
const auto nOutputPinValue = adtf::base::get_property<int32_t>(*m_pWriter, "output_pin_property");
}
}
private:
adtf::filter::configurable_reader<>* m_pReader = nullptr;
adtf::filter::configurable_writer<>* m_pWriter = nullptr;
};

◆ cSubstreamFilter

Helper typedef to use substream_filter with the default filter base class.

Example usage

class cMyFilter: public adtf::filter::substream_filter<adtf::filter::cFilter>
{
public:
ADTF_CLASS_ID_NAME(cMyFilter, "my_filter.filter.example.cid", "My Filter");
cMyFilter()
{
{
LOG_INFO("received a sample on substream 'your.substream.name'");
});
}
};
#define LOG_INFO(...)
Logs an info message.
Definition log.h:388
void AddSubstreamHandler(const std::string &strName, tGeneratorCallback fnGeneratorCallback)
Definition substream_handling.h:203
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437

◆ pin_writer

template<typename DATA_TYPE>
using adtf::filter::pin_writer = adtf::streaming::flash::sample_writer<DATA_TYPE>

Specialized Sample Writer to write DATA of type DATA_TYPE. The operator<< will be overloaded to write data.

◆ size_limited_pin_reader

template<size_t MAX_SIZE, bool STORELASTSAMPLE = true>
using adtf::filter::size_limited_pin_reader = adtf::streaming::flash::size_limited_sample_reader<MAX_SIZE, STORELASTSAMPLE>

The size_limited_sample_reader will create a sample reader which will create a internal sample queue that is sample count item limited by the given TimeRange.

Template Parameters
MAX_SIZEThe count in amount of samples (has to be set while compile time!).
STORELASTSAMPLEOption if the last sample received will be hold.
  • true - last sample is stored
  • false - last sample is droped if after Read call

◆ time_limited_pin_reader

template<tTimeStamp TIME_RANGE, bool STORELASTSAMPLE = true>
using adtf::filter::time_limited_pin_reader = adtf::streaming::flash::time_limited_sample_reader<TIME_RANGE, STORELASTSAMPLE>

The time_limited_sample_reader will create a sample reader which will create a internal sample queue that is time limited by the given TimeRange.

Template Parameters
TIME_RANGEThe timerange in micro seconds (has to be set while compile time!).
STORELASTSAMPLEOption if the last sample received will be hold.
  • true - last sample is stored
  • false - last sample is droped if after Read call