pyModbusTCP-cli 0.4.0a2__py3-none-any.whl → 0.4.0a3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pyModbusTCP-cli
3
- Version: 0.4.0a2
3
+ Version: 0.4.0a3
4
4
  Summary: Command line tools for pyModbusTCP: Modbus/TCP server, client and Modbus TCP/RTU gateways
5
5
  Project-URL: Source, https://github.com/sourceperl/pyModbusTCP
6
6
  Project-URL: Issues, https://github.com/sourceperl/pyModbusTCP/issues
@@ -14,7 +14,7 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Topic :: System :: Networking
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: pymodbustcp[serial]==0.4.0a2
17
+ Requires-Dist: pymodbustcp[serial]==0.4.0a3
18
18
  Description-Content-Type: text/markdown
19
19
 
20
20
  # pyModbusTCP-cli
@@ -39,7 +39,7 @@ command in the PATH and installs no dependency.
39
39
  pipx install pyModbusTCP-cli
40
40
 
41
41
  # or in a virtual environment, with the library
42
- pip install "pyModbusTCP[cli]==0.4.0a2"
42
+ pip install "pyModbusTCP[cli]==0.4.0a3"
43
43
  ```
44
44
 
45
45
  **Alpha**: pyModbusTCP-cli is new with pyModbusTCP 0.4.0, only pre-releases exist for now. The commands, their
@@ -51,7 +51,7 @@ Without this package, the tools can still be run from the library alone:
51
51
  ```bash
52
52
  python -m pyModbusTCP.tools server --help
53
53
  python -m pyModbusTCP.tools client --help
54
- pip install "pyModbusTCP[serial]==0.4.0a2" # pyserial, only needed by the gateways
54
+ pip install "pyModbusTCP[serial]==0.4.0a3" # pyserial, only needed by the gateways
55
55
  python -m pyModbusTCP.tools tcp2rtu --help
56
56
  python -m pyModbusTCP.tools rtu2tcp --help
57
57
  ```
@@ -65,7 +65,11 @@ mbtcp-server --log-changes
65
65
  # read 4 holding registers from address 0, write some values
66
66
  mbtcp-client -p 5020 read-holding 0 -n 4
67
67
  mbtcp-client -p 5020 write-registers 0 100 200 0x1234
68
+ mbtcp-client -p 5020 write-read 0 20 22 1 -n 4 # write then read in one request (function 0x17)
68
69
  mbtcp-client -p 5020 write-coil 10 on
70
+ # float32 values on 2 registers, word swapped (CDAB): -T/--type and -b/--byte-order
71
+ mbtcp-client -p 5020 write-registers 20 3.14 -2.5 -T float32 -b CDAB
72
+ mbtcp-client -p 5020 read-holding 20 -n 2 -T float32 -b CDAB
69
73
 
70
74
  # TCP clients of the 192.168.1.0/24 network can read (only) the RTU slaves of /dev/ttyUSB0
71
75
  mbtcp-tcp2rtu -H 0.0.0.0 -A 192.168.1.0/24 --read-only -b 19200 --parity E /dev/ttyUSB0
@@ -74,7 +78,11 @@ mbtcp-tcp2rtu -H 0.0.0.0 -A 192.168.1.0/24 --read-only -b 19200 --parity E /dev/
74
78
  mbtcp-rtu2tcp -a 30 -H 192.168.1.10 /dev/ttyUSB0
75
79
  ```
76
80
 
77
- Run any command with `--help` for all its options.
81
+ On a terminal, `mbtcp-client` prints a table (registers in hexadecimal, unsigned, signed, binary and ASCII, bits
82
+ in a grid); with `-i` it is refreshed in place and the changed values are highlighted. For a script, `-f plain`,
83
+ `-f csv` or `-f json` (the default output of a pipe is `plain`: one `address value` line per item).
84
+
85
+ Run any command with `--help` for all its options, `-v/--version` for its version.
78
86
 
79
87
  ## Security
80
88
 
@@ -84,9 +92,13 @@ The server and the TCP to RTU gateway are designed to be safe by default:
84
92
  - they listen on `localhost` and on port 5020 by default: use `-H` with the address of the network interface that
85
93
  needs it (`0.0.0.0` only if every network of the host is trusted);
86
94
  - `-A/--allow` restricts the clients to some IP addresses or networks, `--read-only` refuses every write;
87
- - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set;
95
+ - the TCP to RTU gateway only relays the standard data functions by default (no diagnostics, file records or vendor
96
+ functions): `--functions` sets the list;
97
+ - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set (and then only
98
+ for the write functions, answered at once);
88
99
  - `--max-connections-per-host` (default 16) keeps a single client host from taking every connection, and the TCP
89
- to RTU gateway shares the serial line between the client hosts (at most 2 pending requests per host).
100
+ to RTU gateway shares the serial line between the client hosts (at most 2 requests per host waiting for the line or
101
+ in progress).
90
102
 
91
103
  Port 502 (the standard Modbus/TCP port) is a privileged port on Unix systems. **Never run these commands as root (or
92
104
  with sudo) to listen on it.** Give the `CAP_NET_BIND_SERVICE` capability to the Python interpreter of a virtual
@@ -0,0 +1,5 @@
1
+ pymodbustcp_cli-0.4.0a3.dist-info/METADATA,sha256=HlQjtBbi8I4fBmDG66dOK9LC6eInVZRJsQTotg0Xe_4,6164
2
+ pymodbustcp_cli-0.4.0a3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
3
+ pymodbustcp_cli-0.4.0a3.dist-info/entry_points.txt,sha256=mui54qZCX_q1fqQAy91019E49Ygr0udexBRFOsRQJMk,226
4
+ pymodbustcp_cli-0.4.0a3.dist-info/licenses/LICENSE,sha256=Q-TwRxZ_Hhz-lD3EK2MX1_4yE70R2LsYsWlVkA5ehwc,1077
5
+ pymodbustcp_cli-0.4.0a3.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- pymodbustcp_cli-0.4.0a2.dist-info/METADATA,sha256=EGqBiDsQ3fMQA1_qBwb7kApiFepvWgce0CjuNtdRmW8,5241
2
- pymodbustcp_cli-0.4.0a2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
3
- pymodbustcp_cli-0.4.0a2.dist-info/entry_points.txt,sha256=mui54qZCX_q1fqQAy91019E49Ygr0udexBRFOsRQJMk,226
4
- pymodbustcp_cli-0.4.0a2.dist-info/licenses/LICENSE,sha256=Q-TwRxZ_Hhz-lD3EK2MX1_4yE70R2LsYsWlVkA5ehwc,1077
5
- pymodbustcp_cli-0.4.0a2.dist-info/RECORD,,