Auto: opcuaclient-13 — Part 13 aggregate catalog mapping

Closes #285
This commit is contained in:
Joseph Doherty
2026-04-26 09:46:33 -04:00
parent 7cbc566db9
commit 0adc5adb59
7 changed files with 537 additions and 8 deletions

View File

@@ -183,19 +183,32 @@ otopcua-cli historyread -u opc.tcp://localhost:4840/OtOpcUa \
| `--start` | Start time, ISO 8601 or date string (default: 24 hours ago) |
| `--end` | End time, ISO 8601 or date string (default: now) |
| `--max` | Maximum number of values (default: 1000) |
| `--aggregate` | Aggregate function: Average, Minimum, Maximum, Count, Start, End |
| `--aggregate` | Aggregate function name (see catalog below). Case-insensitive. |
| `--interval` | Processing interval in milliseconds for aggregates (default: 3600000) |
#### Aggregate mapping
The CLI accepts the seven aggregates listed below — these are the
human-driven set the operator typically asks for from the command line.
| Name | OPC UA Node ID |
|------|---------------|
| `Average` | `AggregateFunction_Average` |
| `Minimum` | `AggregateFunction_Minimum` |
| `Maximum` | `AggregateFunction_Maximum` |
| `Average` (or `avg`) | `AggregateFunction_Average` |
| `Minimum` (or `min`) | `AggregateFunction_Minimum` |
| `Maximum` (or `max`) | `AggregateFunction_Maximum` |
| `Count` | `AggregateFunction_Count` |
| `Start` | `AggregateFunction_Start` |
| `End` | `AggregateFunction_End` |
| `Start` (or `first`) | `AggregateFunction_Start` |
| `End` (or `last`) | `AggregateFunction_End` |
| `StandardDeviation` (or `stddev` / `stdev`) | `AggregateFunction_StandardDeviationSample` |
The driver-side `IHistoryProvider.ReadProcessedAsync` API (used by the
OtOpcUa server's HistoryRead facade) supports the full OPC UA Part 13 §5
catalog — ~30 aggregates including `TimeAverage`, `Interpolative`, `Range`,
`PercentGood`, `Delta`, etc. See
[`docs/drivers/OpcUaClient.md`](drivers/OpcUaClient.md#historyread-aggregates-part-13-catalog)
for the full list. Adding a new CLI shorthand is a one-line change in
`HistoryReadCommand.ParseAggregateType` — file an issue if you need one
exposed.
#### Event-mode coverage