docs(phase4c): cross-driver 1-D array support + isArray/arrayLength keys + coverage matrix
This commit is contained in:
@@ -140,6 +140,35 @@ Portal under *Protection & Security* for the CPU.
|
||||
- **CLI** — [Driver.S7.Cli.md](../Driver.S7.Cli.md) documents the standalone
|
||||
read/write/probe CLI for manual checks against a real or simulated CPU.
|
||||
|
||||
## 1-D array support
|
||||
|
||||
An S7 tag becomes a **1-D OPC UA array node** when its `TagConfig` JSON carries
|
||||
`"isArray": true` and `"arrayLength": N` (N ≥ 1). The canonical rule:
|
||||
`isArray: true` + `arrayLength >= 1` → array; `isArray: false` (any length) → scalar.
|
||||
|
||||
**Read mechanism** — the driver issues a single `ReadBytesAsync` call over the contiguous
|
||||
memory span starting at the declared address for `N × (bytes per element)` bytes, then
|
||||
loops over the response buffer decoding each element individually using the same
|
||||
reinterpret/box logic as scalar reads. This keeps wire round-trips at 1 per array tag
|
||||
regardless of N.
|
||||
|
||||
**Supported element types** — any `S7DataType` that has a scalar decode path today
|
||||
(`Bool`, `Byte`, `Int16`, `UInt16`, `Int32`, `UInt32`, `Float32`). The `ReadBytesAsync`
|
||||
network half is a thin `S7.Net` call; the decode half is fully unit-tested.
|
||||
|
||||
**Unit test coverage** — `tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.S7.Tests/` covers
|
||||
the contiguous-block read and per-element decode loop. Integration fixture is down during
|
||||
normal dev (the S7 sim is on the shared Docker host but currently offline).
|
||||
|
||||
**Live-verify** — integration-fixture-gated (not Mac-verifiable without the S7 sim up).
|
||||
|
||||
**Deferrals** — array *writes*, multi-dimensional arrays, per-element historization. The
|
||||
`Timer` / `Counter` address types that are rejected at init for scalars are also excluded
|
||||
for arrays.
|
||||
|
||||
See [Uns.md §Array tags](../Uns.md#array-tags-1-d) for the cross-driver coverage matrix
|
||||
and the UI authoring flow.
|
||||
|
||||
## Further reading
|
||||
|
||||
- [`docs/v2/driver-specs.md §5`](../v2/driver-specs.md) — full per-field spec,
|
||||
|
||||
Reference in New Issue
Block a user