Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jan 16, 2025
1 parent ee4832d commit ce01ea0
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
58 changes: 58 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,41 @@ See details at :ref:`owned_types_concept`
.. c:function:: void z_closure_zid_drop(z_moved_closure_zid_t * closure)
Matching closure
----------
Types
^^^^^
See details at :ref:`owned_types_concept`
.. c:type:: z_owned_closure_matching_status_t
.. c:type:: z_loaned_closure_matching_status_t
.. c:type:: z_moved_closure_matching_status_t
.. c:type:: void (* z_closure_matching_status_callback_t)(z_matching_status_t * status, void * arg);
Function pointer type for handling matching status response.
Represents a callback function that is invoked when a matching status was changed.

Parameters:
- **status** - Pointer to a :c:type:`z_matching_status_t`.
- **arg** - A user-defined pointer to additional data that can be used during the processing of the matching status.


Functions
^^^^^^^^^
.. autocfunction:: primitives.h::z_closure_matching_status
.. autocfunction:: primitives.h::z_closure_matching_status_call

Ownership Functions
^^^^^^^^^^^^^^^^^^^

See details at :ref:`owned_types_concept`

.. c:function:: const z_loaned_closure_matching_status_t * z_closure_matching_status_loan(const z_owned_closure_matching_status_t * closure)
.. c:function:: void z_closure_matching_status_drop(z_moved_closure_matching_status_t * closure)
.. _channels_concept:
Channels
Expand Down Expand Up @@ -955,6 +990,26 @@ See details at :ref:`owned_types_concept`
.. c:function:: void z_session_drop(z_moved_session_t * closure)
Matching
========
Types
-----
See details at :ref:`owned_types_concept`
.. c:type:: z_owned_matching_listener_t
.. c:type:: z_loaned_matching_listener_t
.. c:type:: z_moved_matching_listener_t
.. autoctype:: types.h::z_matching_status_t
Functions
---------
.. autocfunction:: primitives.h::z_undeclare_matching_listener
Publication
===========
Expand Down Expand Up @@ -1002,6 +1057,9 @@ Functions
.. autocfunction:: primitives.h::z_publisher_put_options_default
.. autocfunction:: primitives.h::z_publisher_delete_options_default
.. autocfunction:: primitives.h::z_reliability_default
.. autocfunction:: primitives.h::z_publisher_get_matching_status
.. autocfunction:: primitives.h::z_publisher_declare_matching_listener
.. autocfunction:: primitives.h::z_publisher_declare_background_matching_listener
Ownership Functions
-------------------
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"-DZ_FEATURE_QUERYABLE=1",
"-DZ_FEATURE_ENCODING_VALUES=1",
"-DZ_FEATURE_LIVELINESS=1",
"-DZ_FEATURE_MATCHING=1",
]

# -- Options for HTML output -------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions include/zenoh-pico/api/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ _Z_OWNED_TYPE_VALUE(_z_encoding_t, encoding)
*/
_Z_OWNED_TYPE_VALUE(_z_value_t, reply_err)

#if defined(Z_FEATURE_MATCHING)
/**
* A struct that indicates if there exist Subscribers matching the Publisher's key expression or Queryables matching
* Querier's key expression and target.
* Members:
* bool matching: true if there exist matching Zenoh entities, false otherwise.
*/
typedef _z_matching_status_t z_matching_status_t;
#endif

/**
* Represents the configuration used to configure a subscriber upon declaration :c:func:`z_declare_subscriber`.
Expand Down Expand Up @@ -491,14 +491,12 @@ typedef struct {
*/
_Z_OWNED_TYPE_VALUE(_z_closure_zid_t, closure_zid)

#if defined(Z_FEATURE_MATCHING)
typedef _z_closure_matching_status_callback_t z_closure_matching_status_callback_t;
typedef _z_closure_matching_status_t z_closure_matching_status_t;
/**
* Represents the matching status callback closure.
*/
_Z_OWNED_TYPE_VALUE(_z_closure_matching_status_t, closure_matching_status)
#endif

#ifdef __cplusplus
}
Expand Down

0 comments on commit ce01ea0

Please sign in to comment.