Skip to content

Commit

Permalink
add default enum constants (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 authored Jul 15, 2024
1 parent 243a522 commit 976da6a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
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

0 comments on commit 976da6a

Please sign in to comment.