You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use the "contentfilteredtopic" feature. Here is my test code. Could you please tell me where I went wrong?
Here is the full error message: 2023-06-10 16:01:28.942 [DDSSQLFILTER Error] No TypeObject found for type HelloWorldtype -> Function eprosima::fastdds::dds::DDSSQLFilter::DDSFilterFactory::create_content_filter 2023-06-10 16:01:28.942 [PARTICIPANT Error] Could not create filter of class DDSSQL for expression "index > 5 -> Function eprosima::fastdds::dds::DomainParticipantImpl::create_contentfilteredtopic
Here is the full code:
`
import asyncio
import os
import argparse
import time
from ctypes import byref
from threading import Condition
if os.name == 'nt':
import win32api
win32api.LoadLibrary('HelloWorld')
import fastdds
import HelloWorld
class ReaderListener(fastdds.DataReaderListener):
def init(self, callback):
super().init()
self._callback = callback
def on_data_available(self, reader):
info = fastdds.SampleInfo()
data = HelloWorld.HelloWorld()
reader.take_next_sample(data, info)
self._callback.put_nowait(f"Received {data.message()} {data.index()}")
def on_subscription_matched(self, datareader, info):
print(f"ReaderListener info.current_count_change {info.current_count_change}")
if (0 < info.current_count_change):
print("Subscribers matching Publishers {}\r\n".format(info.last_publication_handle))
else:
print("Publisher with mismatched subscribers {}\r\n".format(info.last_publication_handle))
I would like to use the "contentfilteredtopic" feature. Here is my test code. Could you please tell me where I went wrong?
Here is the full error message:
2023-06-10 16:01:28.942 [DDSSQLFILTER Error] No TypeObject found for type HelloWorldtype -> Function eprosima::fastdds::dds::DDSSQLFilter::DDSFilterFactory::create_content_filter 2023-06-10 16:01:28.942 [PARTICIPANT Error] Could not create filter of class DDSSQL for expression "index > 5 -> Function eprosima::fastdds::dds::DomainParticipantImpl::create_contentfilteredtopic
Here is the full code:
`
import asyncio
import os
import argparse
import time
from ctypes import byref
from threading import Condition
if os.name == 'nt':
import win32api
import fastdds
import HelloWorld
class ReaderListener(fastdds.DataReaderListener):
def init(self, callback):
super().init()
self._callback = callback
class Reader():
def init(self, domain=0, callback=None):
factory = fastdds.DomainParticipantFactory.get_instance()
self.participant_qos = fastdds.DomainParticipantQos()
factory.get_default_participant_qos(self.participant_qos)
self.participant = factory.create_participant(domain, self.participant_qos)
import asyncio.queues
async def task_handler(_queue):
async def msg(info):
print(11)
if name == 'main':
async def main():
try:
_queue = asyncio.Queue()
bb = Reader(callback=_queue)
asyncio.create_task(task_handler(_queue))
while 1:
await asyncio.sleep(1)
except Exception as e:
print(e)
`
The text was updated successfully, but these errors were encountered: