Skip to content
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 default enum constants #521

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function(configure_cargo_toml cargo_toml_dir CARGO_PROJECT_VERSION CARGO_LIB_NAM
file(COPY
${CMAKE_CURRENT_SOURCE_DIR}/include/zenoh.h
${CMAKE_CURRENT_SOURCE_DIR}/include/zenoh_memory.h
${CMAKE_CURRENT_SOURCE_DIR}/include/zenoh_constants.h
DESTINATION ${cargo_toml_dir}/include/)
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml.in" "${cargo_toml_dir}/Cargo.toml" @ONLY)
Expand Down
1 change: 1 addition & 0 deletions include/zenoh.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ extern "C" {
#include "zenoh_concrete.h"
#include "zenoh_opaque.h"
#include "zenoh_commons.h"
#include "zenoh_constants.h"
// clang-format on

#ifdef __cplusplus
Expand Down
20 changes: 20 additions & 0 deletions include/zenoh_constants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// 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, <zenoh@zettascale.tech>
#pragma once

#define Z_CONGESTION_CONTROL_DEFAULT Z_CONGESTION_CONTROL_BLOCK
#define Z_CONSOLIDATION_MODE_DEFAULT Z_CONSOLIDATION_MODE_AUTO
#define Z_PRIORITY_DEFAULT Z_PRIORITY_DATA
#define Z_QUERY_TARGET_DEFAULT Z_QUERY_TARGET_BEST_MATCHING
#define Z_RELIABILITY_DEFAULT Z_RELIABILITY_RELIABLE
#define Z_SAMPLE_KIND_DEFAULT Z_SAMPLE_KIND_PUT