You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/test_data_blaster/README.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ The Test Data Blaster (T-DB) is a set of binaries that performs both TCP and UDP
6
6
7
7
Multiple data sender / receiver (DSR) instances are running at the same time (at least two must be running for sending and receiving data). Each TCP DSR instance can be configured for multiple TCP connectors and multiple TCP acceptors at the same time. Each (future) UDP DSR can be configured for multiple senders and receivers at the same time.
8
8
9
-
A single instance of the monitor shows statistics from the DSR instances. The monitor is also responsible for shutting down the DSRs. The same monitor instance can be running for both TCP and UDP (the messages sent to the monitor from the DSRs specify whether the test data is being sent over TCP or UDP).
9
+
A single instance of the monitor shows statistics from the DSR instances. The monitor is also responsible for shutting down the DSRs. The same monitor instance can be running for both TCP and UDP (the log messages sent to the monitor from the DSRs specify whether the test data is being sent over TCP or UDP).
10
10
11
-
While the DSRs are written in C++, the monitor app can be written in any language (and both a C++ and Python version is expected, with the Python version having a simple GUI display). The monitor message definition is text only, so binary endianness is not a factor.
11
+
While the DSRs are written in C++, there is a monitor app written in both C++ and Python version. The monitor message definitions are text only, so binary endianness is not a factor.
12
12
13
13
## Usage
14
14
@@ -22,7 +22,9 @@ While the DSRs are written in C++, the monitor app can be written in any languag
22
22
23
23
All of the C++ components can be built using CMake.
24
24
25
-
(Fill in details, including single build instructions in Linux, and future Python build instructions.)
25
+
The Python monitor is built by ...
26
+
27
+
(Fill in details, including single build instructions in Linux, and Python build instructions.)
26
28
27
29
## Internals and Design
28
30
@@ -36,30 +38,34 @@ The T-DB Monitor is run as a TCP acceptor (server) only. It accepts TCP connecti
36
38
37
39
There are no "begin" or "end" data messages that the monitor has to process, a new incoming TCP connection is the indication that a new DSR instance has started, and the end of the TCP connection is the indication that the DSR instance has ended.
38
40
39
-
The DSR will not send a monitor message for every test message sent between DSR instances. A "modulo" command line parameter specifies how often a monitor message will be sent (for each test data set). (A modulo of 1 would generate one monitor message per test data set message.)
41
+
The DSR will not send a monitor log message for every test message sent between DSR instances. A "modulo" command line parameter specifies how often a monitor log message will be sent (for each test data set). (A modulo of 1 would generate one monitor log message per test data set message.)
40
42
41
43
The monitor process will notify all DSR processes to shutdown by sending a shutdown message through each monitor connection. The monitor process will have a user initiated mechanism to send the shutdown messages and end the monitor process.
42
44
43
-
#### Monitor Message Definition
45
+
#### Monitor Log Message Contents
44
46
45
47
Each message from the DSRs to the monitor has the following fields:
46
48
- DSR name
47
49
- DSR protocol, either "tcp" or "udp"
48
50
- Remote endpoint (host, port)
49
51
- Data direction, either "incoming" or "outgoing"
50
52
- Current message number
51
-
- Total messages expected to be sent (or 0 if incoming messages -- with the previous field this makes "100th message out of 10,000 to be sent" displays possible)
52
53
- Current message size
53
54
- Current message beginning (first 15 characters)
55
+
- Total messages expected to be sent (or 0 if incoming messages -- with the previous field this makes "100th message out of 10,000 to be sent" displays possible)
54
56
- Outgoing queue size (will always be 0 for incoming data, and 0 for outgoing data if the receiving end is keeping up)
55
57
56
-
Each of the fields is a text string, and the full message is delimited by (fill in details).
58
+
#### Monitor Log Message Wire Protocol
59
+
60
+
The monitor message will be sent as a text message, with a newline ("\n") as the end character.
61
+
62
+
Each of the fields is a text string (array of Ascii characters, UTF-8 without any extended characters) with a null character ("\0") at the end of the string.
57
63
58
-
TODO - define a format that makes Python deserialization easy. Specifically, are each of the text fields nul character terminated, or is there a length prefix? Do we want name / value pairs instead of value only fields? Is the end of the message delimited by a LF (line feed) character or CR / LF (carriage return / line feed)?
64
+
#### Shutdown Message Contents and Wire Protocol
59
65
60
-
The shutdown message is the only message sent from the monitor to the DSRs and has the following fields:
66
+
The shutdown message is the only message sent from the monitor to the DSRs and consists of three characters: "s\0\n"
61
67
62
-
(Fill in details.)
68
+
These three characters are a lower case "s" (short for shutdown), a null character and a newline character.
0 commit comments