-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API and example for matching subscribers
- Loading branch information
Showing
10 changed files
with
515 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// | ||
// Copyright (c) 2025 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef INCLUDE_ZENOH_PICO_NET_MATCHING_H | ||
#define INCLUDE_ZENOH_PICO_NET_MATCHING_H | ||
|
||
#include "zenoh-pico/net/filtering.h" | ||
#include "zenoh-pico/net/session.h" | ||
#include "zenoh-pico/protocol/core.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* Return type when declaring a matching. | ||
*/ | ||
typedef struct _z_matching_listener_t { | ||
_z_keyexpr_t _key; | ||
_z_session_weak_t _zn; | ||
/* | ||
_z_zint_t _id; | ||
_z_encoding_t _encoding; | ||
z_congestion_control_t _congestion_control; | ||
z_priority_t _priority; | ||
z_reliability_t reliability; | ||
bool _is_express; | ||
#if Z_FEATURE_INTEREST == 1 | ||
_z_write_filter_t _filter; | ||
#endif | ||
*/ | ||
} _z_matching_listener_t; | ||
|
||
#if Z_FEATURE_PUBLICATION == 1 | ||
// Warning: None of the sub-types require a non-0 initialization. Add a init function if it changes. | ||
static inline _z_matching_listener_t _z_matching_listener_null(void) { return (_z_matching_listener_t){0}; } | ||
static inline bool _z_matching_listener_check(const _z_matching_listener_t *matching_listener) { | ||
return !_Z_RC_IS_NULL(&matching_listener->_zn); | ||
} | ||
void _z_matching_listener_clear(_z_matching_listener_t *pub); | ||
void _z_matching_listener_free(_z_matching_listener_t **pub); | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* INCLUDE_ZENOH_PICO_NET_MATCHING_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.