From bc346422fbbd7c1f5031675ba2a060217b73a386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 4 Jan 2019 10:43:43 +0200 Subject: [PATCH] Add minimal CDC client Added a minimal CDC client application that uses the CDC connector library. This is mainly intended for manual testing so it is built using the accompanying Makefile instead of being a part of the CMake system. --- connectors/cdc-connector/cdc_connector.h | 2 +- connectors/cdc-connector/examples/Makefile | 5 +++++ connectors/cdc-connector/examples/main.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 connectors/cdc-connector/examples/Makefile diff --git a/connectors/cdc-connector/cdc_connector.h b/connectors/cdc-connector/cdc_connector.h index d7455c8ac..b44408d4a 100644 --- a/connectors/cdc-connector/cdc_connector.h +++ b/connectors/cdc-connector/cdc_connector.h @@ -32,7 +32,7 @@ namespace CDC // The error strings returned by the getError library. These can be used to // check for the most common errors (which right now is only the timeout). -const char* TIMEOUT = "Request timed out"; +static const char* TIMEOUT = "Request timed out"; // The typedef for the Row type class Row; diff --git a/connectors/cdc-connector/examples/Makefile b/connectors/cdc-connector/examples/Makefile new file mode 100644 index 000000000..27da805ed --- /dev/null +++ b/connectors/cdc-connector/examples/Makefile @@ -0,0 +1,5 @@ +all: + c++ -I ../ ../cdc_connector.cpp main.cpp -ljansson -lcrypto -o cdc + +clean: + rm -rf cdc diff --git a/connectors/cdc-connector/examples/main.cpp b/connectors/cdc-connector/examples/main.cpp index a51082d81..f626ea27d 100644 --- a/connectors/cdc-connector/examples/main.cpp +++ b/connectors/cdc-connector/examples/main.cpp @@ -26,7 +26,7 @@ int main(int argc, char** argv) if (conn.connect(argv[5])) { - CDC::Row row; + CDC::SRow row; while ((row = conn.read())) {