-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create cmake infrastructure for durability
Signed-off-by: TheFixer <[email protected]>
- Loading branch information
Showing
8 changed files
with
147 additions
and
1 deletion.
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
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,36 @@ | ||
# Copyright(c) 2006 to 2021 ZettaScale Technology and others | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License v. 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
# v. 1.0 which is available at | ||
# http://www.eclipse.org/org/documents/edl-v10.php. | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
# | ||
set(source_dir "${CMAKE_CURRENT_SOURCE_DIR}") | ||
set(binary_dir "${CMAKE_CURRENT_BINARY_DIR}") | ||
|
||
add_library(durability INTERFACE) | ||
|
||
target_include_directories( | ||
durability INTERFACE | ||
"$<BUILD_INTERFACE:${source_dir}/include>" | ||
"$<BUILD_INTERFACE:${source_dir}/src>" | ||
"$<BUILD_INTERFACE:${binary_dir}/include>") | ||
|
||
set(headers | ||
"${source_dir}/include/dds/durability/dds_durability.h") | ||
|
||
set(sources | ||
"${source_dir}/src/dds_durability.c") | ||
|
||
target_sources(durability INTERFACE ${headers} ${sources}) | ||
|
||
install( | ||
DIRECTORY | ||
"${source_dir}/include/" | ||
"${binary_dir}/include/" | ||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
COMPONENT dev | ||
FILES_MATCHING PATTERN "*.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright(c) 2006 to 2020 ZettaScale Technology and others | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
// v. 1.0 which is available at | ||
// http://www.eclipse.org/org/documents/edl-v10.php. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
|
||
#ifndef DDS_DURABILITY_H | ||
#define DDS_DURABILITY_H | ||
|
||
#include "dds/ddsi/ddsi_domaingv.h" | ||
#include "dds/ddsrt/retcode.h" | ||
#include "ddsc/dds.h" | ||
#include "dds__types.h" | ||
#include "dds/ddsc/dds_rhc.h" | ||
|
||
#if defined (__cplusplus) | ||
extern "C" { | ||
#endif | ||
|
||
/* Integration functions for durability plugins */ | ||
typedef int (*plugin_init)(const char *argument, void **context, struct ddsi_domaingv *gv); | ||
typedef int (*plugin_finalize)(void *context); | ||
|
||
dds_return_t dds_durability_init2 (struct ddsi_domaingv* gv); | ||
dds_return_t dds_durability_fini2 (void); | ||
void dds_durability_new_local_reader (struct dds_reader *reader, struct dds_rhc *rhc); | ||
void dds_durability_wait_for_ds (uint32_t quorum, dds_time_t timeout); | ||
|
||
#if defined (__cplusplus) | ||
} | ||
#endif | ||
|
||
#endif /* DDS_DURABILITY_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright(c) 2006 to 2019 ADLINK Technology Limited and others | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
* v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
#include "dds/durability/dds_durability.h" | ||
#include "ddsc/dds.h" | ||
|
||
|
||
dds_return_t dds_durability_init2 (struct ddsi_domaingv* gv) | ||
{ | ||
printf("!!!!!!!!!!!!!!!!!!! src/durability/core/src/dds_durability_init()\n"); | ||
return DDS_RETCODE_OK; | ||
} | ||
|
||
dds_return_t dds_durability_fini2 (void) | ||
{ | ||
printf("!!!!!!!!!!!!!!!!!!! src/durability/core/src/dds_durability_fini()\n"); | ||
return DDS_RETCODE_OK; | ||
} | ||
|
||
void dds_durability_new_local_reader (struct dds_reader *reader, struct dds_rhc *rhc) | ||
{ | ||
/* create the administration to store transient data */ | ||
/* create a durability reader that sucks and stores it in the store */ | ||
|
||
DDSRT_UNUSED_ARG(reader); | ||
return; | ||
} | ||
|
||
void dds_durability_wait_for_ds (uint32_t quorum, dds_time_t timeout) | ||
{ | ||
(void)quorum; | ||
(void)timeout; | ||
return; | ||
} | ||
|
||
|