-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unicast interest feature #349
Changes from 35 commits
ccf2a25
d15bc99
461a8c1
33a8e3f
80707df
7e95df8
b29af1e
bf7bdfc
9682d98
bf99b97
432a341
99fafd8
979d486
0cd5ec4
d40a4be
c056220
864a979
ab18413
51dee17
60b4fcb
3b73e07
9c0be52
6f66d03
46528e9
6c6abf9
2add7ed
e4385dc
14d6310
4d04ac5
0e3ea7c
02bb3a7
dc64050
ecdd57b
18649c3
68eca1f
ba254d5
de5c901
a6a9c14
679d1ac
0415cbf
2dd09f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// Copyright (c) 2022 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 ZENOH_PICO_FILTERING_NETAPI_H | ||
#define ZENOH_PICO_FILTERING_NETAPI_H | ||
|
||
#include <stdint.h> | ||
Check warning Code scanning / Cppcheck (reported by Codacy) Include file: <stdint.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. Warning
Include file: <stdint.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
|
||
|
||
#include "zenoh-pico/api/constants.h" | ||
#include "zenoh-pico/net/session.h" | ||
#include "zenoh-pico/protocol/core.h" | ||
|
||
typedef enum { | ||
WRITE_FILTER_INIT = 0, | ||
WRITE_FILTER_ACTIVE = 1, | ||
WRITE_FILTER_OFF = 2, | ||
} _z_write_filter_state_t; | ||
|
||
typedef struct { | ||
uint32_t decl_id; | ||
uint8_t state; | ||
} _z_writer_filter_ctx_t; | ||
|
||
/** | ||
* Return type when declaring a queryable. | ||
*/ | ||
typedef struct _z_interest_t { | ||
uint32_t _interest_id; | ||
_z_writer_filter_ctx_t *ctx; | ||
} _z_write_filter_t; | ||
|
||
typedef struct _z_publisher_t _z_publisher_t; | ||
|
||
int8_t _z_write_filter_create(_z_publisher_t *pub); | ||
int8_t _z_write_filter_destroy(const _z_publisher_t *pub); | ||
_Bool _z_write_filter_active(const _z_publisher_t *pub); | ||
|
||
#endif /* ZENOH_PICO_FILTERING_NETAPI_H */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// Copyright (c) 2022 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 ZENOH_PICO_SESSION_INTEREST_H | ||
#define ZENOH_PICO_SESSION_INTEREST_H | ||
|
||
#include <stdbool.h> | ||
Check warning Code scanning / Cppcheck (reported by Codacy) Include file: <stdbool.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. Warning
Include file: <stdbool.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
|
||
|
||
#include "zenoh-pico/net/session.h" | ||
|
||
#if Z_FEATURE_INTEREST == 1 | ||
Check warning Code scanning / Cppcheck (reported by Codacy) misra violation 2009 with no text in the supplied rule-texts-file Warning
misra violation 2009 with no text in the supplied rule-texts-file
|
||
_z_session_interest_rc_t *_z_get_interest_by_id(_z_session_t *zn, const _z_zint_t id); | ||
_z_session_interest_rc_list_t *_z_get_interest_by_key(_z_session_t *zn, const _z_keyexpr_t key); | ||
_z_session_interest_rc_t *_z_register_interest(_z_session_t *zn, _z_session_interest_t *intr); | ||
void _z_unregister_interest(_z_session_t *zn, _z_session_interest_rc_t *intr); | ||
void _z_flush_interest(_z_session_t *zn); | ||
#endif // Z_FEATURE_INTEREST == 1 | ||
|
||
int8_t _z_interest_process_declares(_z_session_t *zn, const _z_declaration_t *decl); | ||
int8_t _z_interest_process_final_interest(_z_session_t *zn, uint32_t id); | ||
int8_t _z_interest_process_undeclare_interest(_z_session_t *zn, uint32_t id); | ||
int8_t _z_interest_process_declare_interest(_z_session_t *zn, _z_keyexpr_t key, uint32_t id, uint8_t flags); | ||
|
||
#endif /* ZENOH_PICO_SESSION_INTEREST_H */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push messages are now sent to the network after local subscriptions trigger. We tend to have the previous order on purpose.