Matching
Classes related to getting information about matching Zenoh entities.
-
struct MatchingStatus
A struct that indicates if there exist Subscribers matching the Publisher’s key expression or Queryables matching Querier’s key expression and target.
Note
Zenoh-c only.
Warning
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
-
template<class Handler>
class MatchingListener : public zenoh::detail::MatchingListenerBase A Zenoh matching listener.
A listener that sends notifications when the [
MatchingStatus] of a corresponding Zenoh entity changes. Dropping the corresponding Zenoh entity, disables the matching listener.Note
Zenoh-c only.
Warning
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
Methods
-
inline Handler undeclare(ZResult *err = nullptr) &&
Undeclare matching listener, and return its handler, which can still be used to process any messages received prior to undeclaration.
- Parameters:
err – if not null, the result code will be written to this location, otherwise ZException exception will be thrown in case of error.
Constructors
-
inline MatchingListener(MatchingListener<void> &&m, Handler handler)
Construct stream matching listener from callback matching listener and handler.
- Parameters:
m – callback matching listener, that should expose data to the handler in its callback.
handler – handler to access data exposed by
m. Zenoh handlers implement recv and try_recv methods, for blocking and non-blocking message reception. But user is free to define his own interface.
-
inline Handler undeclare(ZResult *err = nullptr) &&