Skip to content

Commit 1ae20ab

Browse files
committed
Add DataStorm CMake files
1 parent ffd9f7b commit 1ae20ab

File tree

14 files changed

+245
-16
lines changed

14 files changed

+245
-16
lines changed

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"C_Cpp.default.cppStandard": "c++17",
77
"gradle.nestedProjects": true,
88
"cmake.sourceDirectory":[
9+
"${workspaceFolder}/cpp/DataStorm/clock",
10+
"${workspaceFolder}/cpp/DataStorm/keyFilter",
11+
"${workspaceFolder}/cpp/DataStorm/minimal",
12+
"${workspaceFolder}/cpp/DataStorm/node",
13+
"${workspaceFolder}/cpp/DataStorm/sampleFilter",
14+
"${workspaceFolder}/cpp/DataStorm/stock",
15+
916
"${workspaceFolder}/cpp/Ice/bidir",
1017
"${workspaceFolder}/cpp/Ice/callback",
1118
"${workspaceFolder}/cpp/Ice/context",
@@ -24,6 +31,11 @@
2431
"${workspaceFolder}/cpp/Ice/secure",
2532
"${workspaceFolder}/cpp/Ice/session",
2633
"${workspaceFolder}/cpp/Ice/throughput",
34+
35+
"${workspaceFolder}/cpp/IceStorm/clock",
36+
"${workspaceFolder}/cpp/IceStorm/counter",
37+
"${workspaceFolder}/cpp/IceStorm/replicated",
38+
"${workspaceFolder}/cpp/IceStorm/replicated2",
2739
],
2840
"cmake.configureSettings": {
2941
"Ice_HOME": "${workspaceFolder}/../ice",

cpp/DataStorm/clock/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(datastorm_clock CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(reader Reader.cpp)
8+
target_link_libraries(reader Ice::Ice Ice::DataStorm)
9+
10+
add_executable(writer Writer.cpp)
11+
target_link_libraries(writer Ice::Ice Ice::DataStorm)

cpp/DataStorm/clock/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
1+
# DataStorm Clock
2+
13
This demo illustrates how to implement a custom encoder and decoder for the topic value type
24
`chrono::system_clock::time_point`.
35

6+
To build the demo run:
7+
8+
```shell
9+
cmake -B build -S .
10+
cmake --build build --config Release
11+
```
12+
413
To run the demo, start the writer and specify the name of a city:
514

15+
**Linux/macOS:**
16+
617
```shell
7-
writer
18+
./build/writer
19+
```
20+
21+
**Windows:**
22+
23+
```shell
24+
build\Release\writer
825
```
926

1027
In a separate window, start the reader:
1128

29+
**Linux/macOS:**
30+
31+
```shell
32+
./build/reader
33+
```
34+
35+
**Windows:**
36+
1237
```shell
13-
reader
38+
build\Release\reader
1439
```
1540

1641
The reader will print the time sent by the writer. You can start multiple writers and readers.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(DataStorm_KeyFilter CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(reader Reader.cpp)
8+
target_link_libraries(reader Ice::Ice Ice::DataStorm)
9+
10+
add_executable(writer Writer.cpp)
11+
target_link_libraries(writer Ice::Ice Ice::DataStorm)

cpp/DataStorm/keyFilter/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
1+
# DataStorm keyFilter
2+
13
This demo illustrates the use of key filters. The reader uses the `_regex` predefined key filter. The reader will only
24
subscribe and receive samples for keys matching the regular expression provided on construction of the reader object.
35

6+
To build the demo run:
7+
8+
```shell
9+
cmake -B build -S .
10+
cmake --build build --config Release
11+
```
12+
413
To run the demo, start the writer:
514

15+
**Linux/macOS:**
16+
617
```shell
7-
writer
18+
./build/writer
19+
```
20+
21+
**Windows:**
22+
23+
```shell
24+
build\Release\writer
825
```
926

1027
In a separate window, start the reader:
1128

29+
**Linux/macOS:**
30+
31+
```shell
32+
./build/reader
33+
```
34+
35+
**Windows:**
36+
1237
```shell
13-
reader
38+
build\Release\reader
1439
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(datastorm_minimal CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(reader Reader.cpp)
8+
target_link_libraries(reader Ice::Ice Ice::DataStorm)
9+
10+
add_executable(writer Writer.cpp)
11+
target_link_libraries(writer Ice::Ice Ice::DataStorm)

cpp/DataStorm/minimal/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
1+
# DataStorm Minimal
2+
13
This demo is the minimal DataStorm "hello world" application.
24

5+
To build the demo run:
6+
7+
```shell
8+
cmake -B build -S .
9+
cmake --build build --config Release
10+
```
11+
312
To run the demo, start the writer:
413

14+
**Linux/macOS:**
15+
516
```shell
6-
writer
17+
./build/writer
18+
```
19+
20+
**Windows:**
21+
22+
```shell
23+
build\Release\writer
724
```
825

926
In a separate window, start the reader:
1027

28+
**Linux/macOS:**
29+
30+
```shell
31+
./build/reader
32+
```
33+
34+
**Windows:**
35+
1136
```shell
12-
reader
37+
build\Release\reader
1338
```

cpp/DataStorm/node/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(datastorm_node CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(reader Reader.cpp)
8+
target_link_libraries(reader Ice::Ice Ice::DataStorm)
9+
10+
add_executable(writer Writer.cpp)
11+
target_link_libraries(writer Ice::Ice Ice::DataStorm)

cpp/DataStorm/node/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
# DataStorm Node
2+
13
This demo illustrates the use of a DataStorm node to discover writers and readers without using UDP multicast.
24

35
It also demonstrates how readers and writers can exchange data through the DataStorm node when the server endpoints
46
of both the writers and readers are disabled.
57

8+
To build the demo run:
9+
10+
```shell
11+
cmake -B build -S .
12+
cmake --build build --config Release
13+
```
14+
615
To run the demo, start a DataStorm node:
716

817
```shell
@@ -11,14 +20,30 @@ dsnode --Ice.Config=config.node
1120

1221
In a separate window, start the writer:
1322

23+
**Linux/macOS:**
24+
1425
```shell
15-
writer
26+
./build/writer
27+
```
28+
29+
**Windows:**
30+
31+
```shell
32+
build\Release\writer
1633
```
1734

1835
In a separate window, start the reader:
1936

37+
**Linux/macOS:**
38+
39+
```shell
40+
./build/reader
41+
```
42+
43+
**Windows:**
44+
2045
```shell
21-
reader
46+
build\Release\reader
2247
```
2348

2449
You can start multiple readers and writers. The readers print the time sent by the writers. Stopping the DataStorm node
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(datastorm_sampleFilter CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(reader Reader.cpp)
8+
target_link_libraries(reader Ice::Ice Ice::DataStorm)
9+
10+
add_executable(writer Writer.cpp)
11+
target_link_libraries(writer Ice::Ice Ice::DataStorm)

0 commit comments

Comments
 (0)