Skip to content

Commit cdc5963

Browse files
Update README
1 parent d9cfa31 commit cdc5963

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

cpp/IceStorm/clock/README.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,44 @@
44

55
This demo shows how to use [IceStorm][1].
66

7+
To build the demo run:
8+
9+
```shell
10+
cmake -B build -S .
11+
cmake --build build --config Release
12+
```
13+
714
To run the demo, start the IceStorm service:
815

916
```shell
1017
icebox --Ice.Config=config.icebox
1118
```
1219

13-
This configuration assumes there is a subdirectory named db in the current working directory.
20+
Next run the subscriber in a separate window:
21+
22+
**Linux/macOS:**
23+
24+
```shell
25+
./build/subscriber
26+
```
27+
28+
**Windows:**
29+
30+
```shell
31+
build\Release\subscriber
32+
```
1433

15-
In a separate window:
34+
In a separate window, start the publisher:
35+
**Linux/macOS:**
1636

1737
```shell
18-
subscriber
38+
./build/publisher
1939
```
2040

21-
In another window:
41+
**Windows:**
2242

2343
```shell
24-
publisher
44+
build\Release\publisher
2545
```
2646

2747
While the publisher continues to run, "tick" messages should be displayed in the subscriber window.
@@ -37,50 +57,50 @@ receiving messages.
3757
## Subscriber Options
3858

3959
```shell
40-
subscriber --oneway
60+
./build/subscriber --oneway
4161
```
4262

4363
The subscriber receives events as oneway messages. This is the default.
4464

4565
```shell
46-
subscriber --datagram
66+
./build/subscriber --datagram
4767
```
4868

4969
The subscriber receives events as datagrams.
5070

5171
```shell
52-
subscriber --twoway
72+
./build/subscriber --twoway
5373
```
5474

5575
The subscriber receives events as twoway messages.
5676

5777
```shell
58-
subscriber --ordered
78+
./build/subscriber --ordered
5979
```
6080

6181
The subscriber receives events as twoway messages with guaranteed ordering.
6282

6383
```shell
64-
subscriber --batch
84+
./build/subscriber --batch
6585
```
6686

6787
This is an additional flag that forwards datagram and oneway events to the subscriber in batches.
6888

6989
```shell
70-
subscriber --id <id>
90+
./build/subscriber --id <id>
7191
```
7292

7393
This option specifies a unique identity for this subscriber. When you use this option, you should also run the
7494
subscriber on a fixed port by setting the `Clock.Subscriber.Endpoints` property. For example:
7595

7696
```shell
77-
subscriber --Clock.Subscriber.Endpoints="tcp -p <port>"
97+
./build/subscriber --Clock.Subscriber.Endpoints="tcp -p <port>"
7898
```
7999

80100
Replace "tcp" with "udp" when using the --datagram option.
81101

82102
```shell
83-
subscriber --retryCount <count>
103+
./build/subscriber --retryCount <count>
84104
```
85105

86106
This option sets the retry count for a subscriber. This option should be used in conjunction with the --id option.
@@ -89,19 +109,19 @@ Setting retryCount changes the default subscriber QoS to twoway.
89109
## Publisher Options
90110

91111
```shell
92-
publisher --oneway
112+
./build/publisher --oneway
93113
```
94114

95115
The publisher sends events as oneway messages. This is the default.
96116

97117
```shell
98-
publisher --datagram
118+
./build/publisher --datagram
99119
```
100120

101121
The publisher sends events as datagrams.
102122

103123
```shell
104-
publisher --twoway
124+
./build/publisher --twoway
105125
```
106126

107127
The publisher sends events as twoway messages.

0 commit comments

Comments
 (0)