-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: rename make final interest function * feat: add Interest config token * fix: PA copy paste error * feat: add session interest type * feat: add intrest type * feat: add session interest module * feat: add interest primitives * feat: add session mutex function * feat: add interest message processing * fix: modularize process declare interest function * feat: implement trigger_interest function * fix: clone entitiy lists before sending declarations * fix: remove unused function * fix: rename file * fix: set interest_msg fields as public * feat: process undeclares as well * fix: remove unecessary enum value * fix: remove dropper function * feat: add write side filtering entity * feat: implement filtering * fix: remove interest by default (for now) * fix: rework publisher put actions order * fix: add missing const * fix: add missing dummy functions * fix: exclude dummy functions from config token * fix: remove unused defines * fix: give keyexpr ownership to declare * feat: add refcount copy function * fix: duplicate key for declare * feat: add resource copy function * fix: use keyexpr alias instead of duplicate * fix: flip early return condition * feat: send final interest * refactor: rename ambiguous functions * fix: fuse identical functions * fix: trigger local subs after push message * fix: add missing switch default label * build: add Z_FEATURE_INTEREST to build system * fix: remove unused function * refactor: regroup static functions * fix: add flag filtering on interest look-up
- Loading branch information
1 parent
0f7779a
commit ebdb01e
Showing
22 changed files
with
755 additions
and
44 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
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,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> | ||
|
||
#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 */ |
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,34 @@ | ||
// | ||
// 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> | ||
|
||
#include "zenoh-pico/net/session.h" | ||
|
||
#if Z_FEATURE_INTEREST == 1 | ||
_z_session_interest_rc_t *_z_get_interest_by_id(_z_session_t *zn, const _z_zint_t id); | ||
_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 */ |
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
Oops, something went wrong.