-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
cd ./install | ||
rm -rf build | ||
mkdir build | ||
cd build | ||
|
||
cmake ${CMAKE_ARGS} -GNinja $SRC_DIR \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_TESTING:BOOL=OFF \ | ||
-DZENOHCXX_ZENOHC:BOOL=ON \ | ||
-DZENOHCXX_ZENOHPICO:BOOL=OFF \ | ||
-DZENOHCXX_EXAMPLES_PROTOBUF:BOOL=OFF | ||
|
||
cmake --build . --config Release | ||
cmake --build . --config Release --target install |
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,33 @@ | ||
diff --git a/examples/universal/z_queryable.cxx b/examples/universal/z_queryable.cxx | ||
index ac145ee..b334608 100644 | ||
--- a/examples/universal/z_queryable.cxx | ||
+++ b/examples/universal/z_queryable.cxx | ||
@@ -60,14 +60,14 @@ int _main(int argc, char **argv) { | ||
} | ||
std::cout << "'\n"; | ||
std::cout << "[Queryable ] Responding ('" << keyexpr << "': '" << payload << "')\n"; | ||
- query.reply(keyexpr, payload); | ||
+ query.reply(KeyExpr(keyexpr), payload); | ||
}; | ||
|
||
auto on_drop_queryable = []() { std::cout << "Destroying queryable\n"; }; | ||
|
||
Session::QueryableOptions opts; | ||
opts.complete = args.flag("complete"); | ||
- auto queryable = session.declare_queryable(keyexpr, on_query, on_drop_queryable, std::move(opts)); | ||
+ auto queryable = session.declare_queryable(KeyExpr(keyexpr), on_query, on_drop_queryable, std::move(opts)); | ||
|
||
printf("Press CTRL-C to quit...\n"); | ||
while (true) { | ||
diff --git a/include/zenoh/api/session.hxx b/include/zenoh/api/session.hxx | ||
index f22c26b..563d183 100644 | ||
--- a/include/zenoh/api/session.hxx | ||
+++ b/include/zenoh/api/session.hxx | ||
@@ -26,6 +26,7 @@ | ||
#include "keyexpr.hxx" | ||
#include "liveliness.hxx" | ||
#include "publisher.hxx" | ||
+#include "queryable.hxx" | ||
#include "query_consolidation.hxx" | ||
#include "subscriber.hxx" | ||
#include "timestamp.hxx" |
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,39 @@ | ||
context: | ||
name: zenoh-cpp | ||
version: 1.1.0 | ||
|
||
package: | ||
name: ${{ name }} | ||
version: ${{ version }} | ||
|
||
source: | ||
- git: https://github.com/eclipse-zenoh/zenoh-cpp.git | ||
tag: ${{ version }} | ||
patches: | ||
- fix_queryable.patch | ||
|
||
build: | ||
number: 1000 | ||
|
||
requirements: | ||
build: | ||
- ${{ compiler('c') }} | ||
- ${{ compiler('cxx') }} | ||
- cmake | ||
- pkg-config | ||
- ninja | ||
host: | ||
- zenoh-c ${{ version }}.* | ||
|
||
tests: | ||
- script: | ||
- if: unix | ||
then: test -f ${PREFIX}/include/zenoh.hxx | ||
- if: win | ||
then: if not exist %LIBRARY_PREFIX%\\include\\zenoh.hxx exit 1 | ||
|
||
about: | ||
license: Apache-2.0 OR EPL-2.0 | ||
license_file: LICENSE | ||
summary: C++ API for zenoh | ||
homepage: https://github.com/eclipse-zenoh/zenoh-cpp |