Skip to content

Filters not working #57

Open
Open
@doug1234

Description

@doug1234

Filters seem to be no longer working but it is unclear to me what is going wrong. When I enter a filter using:

Image

data does not get filtered due to an exception: Exception: FilterEvaluator::SerializedForEval::lookup:deserialization of encapsulation header failed.

The offending code is here:

    // If a filter was specified, make sure the sample passes
    if (!m_filter.isEmpty())
    {
        pass = false;
        try
        {
            OpenDDS::DCPS::FilterEvaluator filterTest(m_filter.toUtf8().data(), false);
            DynamicMetaStruct metaInfo(sample);

            const DDS::StringSeq noParams;
#if OPENDDS_MAJOR_VERSION == 3 && OPENDDS_MINOR_VERSION < 24
            pass = filterTest.eval(rawSample.sample_.get(), false, false, metaInfo, noParams, m_extensibility);
#else
            OpenDDS::DCPS::Encoding encoding;
            FilterTypeSupport typeSupport(metaInfo, m_extensibility);
            pass = filterTest.eval(rawSample.sample_.get(), encoding, typeSupport, noParams);
#endif
        }
        catch (const std::exception& e)
        {
            std::cerr << "Exception: " << e.what() << std::endl;
            pass = false;
        }

        if (!pass)
        {
            return;
        }

    } // End filter check

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions