54 const std::string& strInputPinName,
55 bool bForwardTriggerViaOutputPins =
true);
112 using tElementValue = std::variant<bool, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double>;
131 const std::string& strElementName,
133 bool bNameHeuristic =
false);
149 template <
typename T>
151 const std::string& strElementName,
153 bool bNameHeuristic =
false)
157 std::visit([&](
auto&& xTypedValue)
159 fnCallback(tmSampleTime,
static_cast<T
>(xTypedValue));
175 class cImplementation;
176 std::unique_ptr<cImplementation> m_pImplementation;
189 template <
typename FilterBase = adtf::filter::cFilter>
Base class for adtf::filter::flash::cFilter, adtf::filter::flash::cSampleStreamingSource and adtf::fi...
Utility class to handle substream routing within a filter.
cSubstreamHandling(adtf::filter::hollow::cGraphObject *pFilter, const std::string &strInputPinName, bool bForwardTriggerViaOutputPins=true)
Constructs a new object that will create an input pin at the given graph object (i....
std::function< void(const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &)> tSampleCallback
a function that processes samples
cSubstreamHandling()
Constructs an empty object that cannot perform any operations other than being assigned another value...
void RemoveAllHandlers()
Removes all installed handlers.
void AddSubstreamHandler(const std::string &strName, tGeneratorCallback fnGeneratorCallback)
Installs a handler generator for the given substream.
std::function< tSampleCallback(const std::string &, const adtf::ucom::iobject_ptr< const adtf::streaming::IStreamType > &)> tNamedGeneratorCallback
a function that generates a function that processes samples for a given substream name and stream typ...
void AddSubstreamHandler(const std::string &strName, tSampleCallback fnCallback)
Installs a handler for samples of the given substream.
void AddElementHandler(const std::string &strSubstreamName, const std::string &strElementName, std::function< void(adtf::base::flash::tNanoSeconds, T)> fnCallback, bool bNameHeuristic=false)
Installs a handler for the given element of the given substream.
std::function< tSampleCallback(const adtf::ucom::iobject_ptr< const adtf::streaming::IStreamType > &)> tGeneratorCallback
a function that generates a function that processes samples for a given stream type.
void AddElementHandler(const std::string &strSubstreamName, const std::string &strElementName, std::function< void(adtf::base::flash::tNanoSeconds, tElementValue)> fnCallback, bool bNameHeuristic=false)
Installs a handler for the given element of the given substream.
void AddSubstreamHandler(const std::regex &strNameExpression, tNamedGeneratorCallback fnGeneratorCallback)
Installs a handler generator that will be called for each available substream that matches the regula...
Helper class to implement a filter with a single input pin that processes substreams.
Base object pointer to realize binary compatible reference counting in interface methods.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
substream_filter<> cSubstreamFilter
Helper typedef to use substream_filter with the default filter base class.
Namespace for entire ADTF SDK.
A timestamp with nanosecond precision.