Skip to content

Commit 7a60c74

Browse files
NikolasK-sourceNikolasK-git
authored andcommitted
Update usage
1 parent 5fd6276 commit 7a60c74

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ Modbus_TCP_client_shm [OPTION...]
2525
-m, --monitor output all incoming and outgoing packets to stdout
2626
-r, --reconnect do not terminate if Master disconnects.
2727
-h, --help print usage
28+
29+
30+
The modbus registers are mapped to shared memory objects:
31+
type | name | master-access | shm name
32+
-----|---------------------------|-----------------|----------------
33+
DO | Discrete Output Coils | read-write | <name-prefix>DO
34+
DI | Discrete Input Coils | read-only | <name-prefix>DI
35+
AO | Discrete Output Registers | read-write | <name-prefix>AO
36+
AI | Discrete Input Registers | read-only | <name-prefix>AI
2837
```
2938

3039
## Libraries

src/main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ int main(int argc, char **argv) {
8989
options.set_width(120);
9090
std::cout << options.help() << std::endl;
9191
std::cout << std::endl;
92+
std::cout << "The modbus registers are mapped to shared memory objects:" << std::endl;
93+
std::cout << " type | name | master-access | shm name" << std::endl;
94+
std::cout << " -----|---------------------------|-----------------|----------------" << std::endl;
95+
std::cout << " DO | Discrete Output Coils | read-write | <name-prefix>DO" << std::endl;
96+
std::cout << " DI | Discrete Input Coils | read-only | <name-prefix>DI" << std::endl;
97+
std::cout << " AO | Discrete Output Registers | read-write | <name-prefix>AO" << std::endl;
98+
std::cout << " AI | Discrete Input Registers | read-only | <name-prefix>AI" << std::endl;
99+
std::cout << std::endl;
92100
std::cout << "This application uses the following libraries:" << std::endl;
93101
std::cout << " - cxxopts by jarro2783 (https://github.com/jarro2783/cxxopts)" << std::endl;
94102
std::cout << " - libmodbus by Stéphane Raimbault (https://github.com/stephane/libmodbus)" << std::endl;

0 commit comments

Comments
 (0)