Skip to content

Commit 81e1c33

Browse files
committed
update README.md
1 parent faa9d38 commit 81e1c33

1 file changed

Lines changed: 31 additions & 32 deletions

File tree

README.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# **ethernetip‑rs**
22

33
A Rust implementation of the EtherNet/IP™ protocol for symbolic tag access on Allen‑Bradley ControlLogix and CompactLogix PLCs.
4-
The library provides an async API for reading and writing CIP tags, including typed accessors, arrays, fragmented reads, and multi‑tag operations, with correct EPATH encoding and optional slot routing.
4+
The library provides an async API for reading and writing CIP tags, including typed accessors, arrays, fragmented reads, multi‑tag operations, EPATH encoding, and optional slot routing.
55

66
---
77

88
## Overview
99

10-
`ethernetip-rs` implements both unconnected and connected CIP explicit messaging for
11-
Rockwell Logix controllers. The client supports standard SendRRData requests as well
12-
as Class‑3 connected messaging via Forward Open / Forward Close and SendUnitData.
13-
It supports CompactLogix (no routing) and ControlLogix (CPU in a chassis slot).
10+
`ethernetip-rs` implements unconnected and connected CIP explicit messaging for Rockwell Logix controllers.
11+
The client supports SendRRData and Class‑3 connected messaging through Forward Open / Forward Close and SendUnitData.
12+
It works with CompactLogix (no routing) and ControlLogix (CPU in a chassis slot).
1413
A deterministic fake PLC is included for development and testing.
1514

1615
### Features
@@ -19,26 +18,26 @@ A deterministic fake PLC is included for development and testing.
1918
- `read_bool`, `read_sint`, `read_int`, `read_dint`, `read_real`, `read_string`
2019
- `write_bool`, `write_sint`, `write_int`, `write_dint`, `write_real`, `write_string`
2120
- Raw tag access (`read_tag`, `write_tag`)
22-
- Read arrays
23-
- unfragmented reads for small arrays
24-
- CIP Fragmented Read (0x52) for large arrays
25-
- Write arrays
26-
- Multiple Service Packet (MSP) multi‑tag read
27-
- Correct CIP EPATH encoding
21+
- Array reads:
22+
- single‑packet reads for small arrays
23+
- CIP Fragmented Read (0x52) for large arrays
24+
- Array writes
25+
- Multiple Service Packet (MSP) multi‑tag read
26+
- Correct CIP EPATH encoding:
2827
- symbolic segments
2928
- array indices
3029
- multi‑index
3130
- struct members
3231
- slot routing
33-
- Async API using `tokio`
34-
- Fake PLC for integration tests
35-
- Deterministic behavior for CI environments
36-
- Connected explicit messaging (Class 3)
32+
- Async API using `tokio`
33+
- Fake PLC for integration tests
34+
- Deterministic behavior for CI
35+
- Connected explicit messaging (Class 3):
3736
- Forward Open / Forward Close
3837
- Large Forward Open (0x5B) / Large Forward Close (0x5E)
3938
- SendUnitData transport
40-
- connection ID + sequence counter tracking
41-
- automatic routing of CIP requests over RR‑Data or Unit‑Data
39+
- connection ID and sequence counter tracking
40+
- automatic routing over RR‑Data or Unit‑Data
4241

4342
---
4443

@@ -52,8 +51,8 @@ A deterministic fake PLC is included for development and testing.
5251
- REAL
5352
- STRING
5453

55-
Typed helpers automatically validate the returned CIP type and return
56-
`CipError::TypeMismatch { expected, actual }` when the PLC tag type does not match.
54+
Typed helpers validate the returned CIP type and return
55+
`CipError::TypeMismatch { expected, actual }` when the PLC tag type differs.
5756

5857
---
5958

@@ -65,10 +64,10 @@ ControlLogix systems require routing through the backplane:
6564
- ControlLogix: CPU resides in a slot
6665

6766
```rust
68-
client.set_slot(2); // CPU in slot 2
67+
client.set_slot(2);
6968
```
7069

71-
Routing is applied across all read and write operations.
70+
Routing applies to all read and write operations.
7271

7372
---
7473

@@ -93,7 +92,7 @@ async fn main() -> anyhow::Result<()> {
9392
}
9493
```
9594

96-
### Raw API (still available)
95+
### Raw API
9796

9897
```rust
9998
use ethernetip::types::CipValue;
@@ -106,13 +105,13 @@ client.write_tag("MyTag", CipValue::DInt(42)).await?;
106105

107106
## Reading arrays
108107

109-
### Small arrays (single packet)
108+
### Small arrays
110109

111110
```rust
112111
let values = client.read_tag_multi("MyArray", 10).await?;
113112
```
114113

115-
### Large arrays (fragmented read)
114+
### Large arrays (fragmented)
116115

117116
```rust
118117
let values = client.read_array("LargeArray", 2000).await?;
@@ -124,7 +123,7 @@ Handles:
124123
- partial transfer status (0x06)
125124
- offset increments
126125
- fragment concatenation
127-
- decoding into `Vec<CipValue>`
126+
- decoding into `Vec<CipValue>`
128127

129128
---
130129

@@ -157,13 +156,13 @@ for r in results {
157156
}
158157
```
159158

160-
MSP batches multiple CIP requests into one roundtrip.
159+
MSP batches multiple CIP requests into one round trip.
161160

162161
---
163162

164163
## Fake PLC for testing
165164

166-
The test suite includes full coverage for CIP request builders, including Forward Open, Large Forward Open, and all EPATH variants.
165+
The test suite includes coverage for CIP request builders, Forward Open, Large Forward Open, and all EPATH variants.
167166

168167
---
169168

@@ -177,13 +176,13 @@ cargo run
177176

178177
## Future improvements
179178

180-
- Additional connection types (redundant owner)
179+
- Additional connection types
181180
- Automatic reconnect for connected sessions
182181
- Implicit I/O (UDP)
183-
- Class/instance/attribute access for non‑Logix devices
184-
- More realistic fake PLC behavior
185-
- Retry and backoff logic
186-
- Benchmarks for MSP and array operations
182+
- Class/instance/attribute access for non‑Logix devices
183+
- More realistic fake PLC behavior
184+
- Retry and backoff logic
185+
- Benchmarks for MSP and array operations
187186

188187
---
189188

0 commit comments

Comments
 (0)