rticommunity / rticonnextdds-connector

RTI Connector for Connext DDS is a lightweight technology that enables DDS data to be accessed with Javascript (Node.js), Python, and Lua.
Other
56 stars 33 forks source link

read/take with n parameter (CON-25) #37

Open ilya1725 opened 7 years ago

ilya1725 commented 7 years ago

Several examples (in Python) presented in this repository use either read and take functions. Generally, those functions will absorb all samples in the queue. Is there a way to use something like take_next_sample? Or perhaps use read, but then extract from the list of samples the ones that weren't read before?

gianpiero commented 7 years ago

Hello @ilya1725 ,

You are right: right now we call take or read passing max_sample = DDS_LENGTH_UNLIMITED. We could expose a take(n) and a read(n) that would allow the user to specify max_sample.

Would that work for your use case?

ilya1725 commented 7 years ago

yes, it will.

gianpiero commented 7 years ago

Added to feature request CON-25