Class astutedds::routing::TransformPlugin
ClassList > astutedds > routing > TransformPlugin
Pluggable sample transform / filter for a TopicRoute .More...
#include <transform_plugin.hpp>
Public Functions
| Type | Name |
|---|---|
| virtual bool | transform (const dcps::SampleInfo & info, std::vector< uint8_t > & payload) = 0 Called for each received sample before forwarding. |
| virtual | ~TransformPlugin () = default |
Detailed Description
Implement this interface and pass the object to TopicRoute::set_transform() to intercept every sample before forwarding. Returning false drops the sample (counted in TopicRoute::samples_dropped()).
The payload is the raw CDR bytes exactly as delivered by the DataReader; it may be modified in-place or replaced entirely.
Public Functions Documentation
function transform
Called for each received sample before forwarding.
virtual bool astutedds::routing::TransformPlugin::transform (
const dcps::SampleInfo & info,
std::vector< uint8_t > & payload
) = 0
Parameters:
infoSampleInfo from the input DataReader.payloadRaw CDR bytes; modify in-place to transform the sample.
Returns:
true to forward the (possibly modified) sample.
Returns:
false to drop the sample silently.
function ~TransformPlugin
virtual astutedds::routing::TransformPlugin::~TransformPlugin () = default
The documentation for this class was generated from the following file include/astutedds/routing/transform_plugin.hpp