feat(cli): historyread --page-size/--pause-after-page/--abandon/--release and --at-time
Hand-paged raw reads in one session print each page's status and continuation (a refused resume is printed, not thrown), can hold the session across a failover (resume when a file appears, then one fresh read), abandon a point to the session close or release it explicitly. --at-time reads AtTime and prints value types. Backed by IOpcUaClientService.HistoryReadPageAsync (default-throwing interface member so existing fakes compile). Used by the gRPC data H3 live gate on projected nodes.
This commit is contained in:
@@ -259,6 +259,28 @@ continuation points up to `--max`. `--events` cannot be combined with `--modifie
|
||||
| `--events` | Read event history (Part 11 HistoryReadEvents) from an event notifier instead of raw samples |
|
||||
| `--fields` | With `--events`: comma-separated event fields to select (default `EventId,EventType,Time,SourceName,Severity,Message,ConditionName,SourceNode`) |
|
||||
| `--of-type` | With `--events`: keep only events of this type or a subtype (an `OfType` where-clause), e.g. `i=2955` |
|
||||
| `--at-time` | HistoryRead-AtTime at these comma-separated ISO 8601 UTC times; prints the status, the rows and each value's CLR type |
|
||||
| `--page-size` | Raw only: page by hand at this `NumValuesPerNode`, printing every page as `Page k: <status> values=<n> continuation=<yes\|no>[ resumed]` (a refused page is printed, never thrown) |
|
||||
| `--pause-after-page` / `--resume-when-file` / `--pause-timeout` | With `--page-size`: after page k hold the session (and its continuation point) until the file exists, then resume |
|
||||
| `--fresh-after-failure` | With `--page-size`: after a refused resumed page, issue one fresh read of the same window (`Fresh: …`) |
|
||||
| `--abandon-after-page` | With `--page-size`: stop after page k WITHOUT releasing its continuation point — the disconnect (session close) releases it |
|
||||
| `--release-after-page` | With `--page-size`: send `releaseContinuationPoints` for page k's point and stop |
|
||||
| `--hold-seconds` | With `--abandon-after-page` / `--release-after-page`: keep the session open this long before disconnecting |
|
||||
|
||||
The hand-paged modes exist for continuation-point lifecycle checks — most usefully on **projected** nodes of a gRPC data
|
||||
connection (`DataConnections.md` §"OPC UA HistoryRead on projected nodes"), where a resumed page is bound to the origin endpoint
|
||||
that issued it: pause after page 1, fail the origin over, create the resume file, and the resumed page prints
|
||||
`BadContinuationPointInvalid` while `--fresh-after-failure` shows the fresh read moving to the new endpoint.
|
||||
|
||||
```bash
|
||||
# Page 1 of a projected node, hold the session, resume once /tmp/go exists; then one fresh read if the resume is refused
|
||||
otopcua-cli historyread -u opc.tcp://localhost:4841/OtOpcUa -U apikey -P "$KEY" -n "$P" \
|
||||
--start 2026-11-20T10:00:00Z --end 2026-11-20T11:00:00Z --page-size 5 \
|
||||
--pause-after-page 1 --resume-when-file /tmp/go --fresh-after-failure
|
||||
# AtTime on an integer node
|
||||
otopcua-cli historyread -u opc.tcp://localhost:4841/OtOpcUa -U apikey -P "$KEY" -n "$P" \
|
||||
--at-time 2026-11-20T10:00:00Z,2026-11-20T10:00:05Z
|
||||
```
|
||||
|
||||
### historyupdate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user