File transform_plugin.hpp
File List > astutedds > routing > transform_plugin.hpp
Go to the documentation of this file
//
// Copyright (c) 2026, Astute Systems PTY LTD
//
// This file is part of the Astute DDS developed by Astute Systems.
//
// See the commercial LICENSE file in the project root for full license details.
//
// @file transform_plugin.hpp
// @brief Abstract interface for pluggable sample transformation in the routing service.
//
// A TransformPlugin receives a raw CDR payload (as received from the input DataReader)
// and may mutate it in-place before it is forwarded to the output DataWriter.
// Returning false drops the sample entirely.
//
#ifndef ASTUTEDDS_ROUTING_TRANSFORM_PLUGIN_HPP
#define ASTUTEDDS_ROUTING_TRANSFORM_PLUGIN_HPP
#include <astutedds/dcps/dcps.hpp>
#include <cstdint>
#include <vector>
namespace astutedds::routing
{
class TransformPlugin
{
public:
virtual ~TransformPlugin() = default;
virtual bool transform(const dcps::SampleInfo& info, std::vector<uint8_t>& payload) = 0;
};
} // namespace astutedds::routing
#endif // ASTUTEDDS_ROUTING_TRANSFORM_PLUGIN_HPP