Custom key filter for dynamic data topics.
#include <CustomKeyFilter.hpp>
|
| CustomKeyFilter (const eprosima::fastdds::dds::TopicDataType *data_type, const std::string &type_name, const eprosima::fastdds::dds::LoanableTypedCollection< const char * > ¶meters) |
| Construct a new CustomKeyFilter object. More...
|
|
bool | has_reader_GUID (const std::string &guid) |
| Check if the filter has registered reader with given GUID. More...
|
|
bool | add_type (const eprosima::fastdds::dds::TopicDataType *data_type, const std::string &type_name, const eprosima::fastdds::dds::LoanableTypedCollection< const char * > ¶meters) |
| Registers a new data type with associated dynamic data type pointer. More...
|
|
virtual | ~CustomKeyFilter ()=default |
|
bool | evaluate (const SerializedPayload &payload, const FilterSampleInfo &sample_info, const GUID_t &reader_guid) const override |
| Evaluate filter discriminating whether the sample is relevant or not, i.e. whether it meets the filtering criteria. More...
|
|
◆ CustomKeyFilter()
ddsfmu::detail::CustomKeyFilter::CustomKeyFilter |
( |
const eprosima::fastdds::dds::TopicDataType * |
data_type, |
|
|
const std::string & |
type_name, |
|
|
const eprosima::fastdds::dds::LoanableTypedCollection< const char * > & |
parameters |
|
) |
| |
|
inline |
- Parameters
-
[in] | data_type | A DynamicPubSubType pointer |
[in] | type_name | Dynamic data type name |
[in] | parameters | List of string parameters [Reader GUID | "|GUID UNKNOWN|", key1, .., keyN] |
◆ ~CustomKeyFilter()
virtual ddsfmu::detail::CustomKeyFilter::~CustomKeyFilter |
( |
| ) |
|
|
virtualdefault |
◆ add_type()
bool ddsfmu::detail::CustomKeyFilter::add_type |
( |
const eprosima::fastdds::dds::TopicDataType * |
data_type, |
|
|
const std::string & |
type_name, |
|
|
const eprosima::fastdds::dds::LoanableTypedCollection< const char * > & |
parameters |
|
) |
| |
- Parameters
-
[in] | data_type | Dynamic data type to be registered |
[in] | type_name | Name of type to be registered |
[in] | parameters | List of string parameters [Reader GUID | "|GUID UNKNOWN|", key1, .., keyN] |
◆ evaluate()
bool ddsfmu::detail::CustomKeyFilter::evaluate |
( |
const SerializedPayload & |
payload, |
|
|
const FilterSampleInfo & |
sample_info, |
|
|
const GUID_t & |
reader_guid |
|
) |
| const |
|
override |
- Parameters
-
[in] | payload | Serialized sample |
[in] | sample_info | FilterSampleInfo (unused) |
[in] | reader_guid | Reader GUID |
- Returns
- true if sample meets filter requirements. false otherwise.
◆ has_reader_GUID()
bool ddsfmu::detail::CustomKeyFilter::has_reader_GUID |
( |
const std::string & |
guid | ) |
|
|
inline |
- Parameters
-
- Returns
- Boolean whether it is registered or not