Skip to content

mms: data sets of whole data objects, a clock the node can be given - #38

Draft
tkeairns wants to merge 1 commit into
mainfrom
feat/mms-report-time
Draft

tkeairns wants to merge 1 commit into
mainfrom
feat/mms-report-time

Conversation

@tkeairns

@tkeairns tkeairns commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

What

  • lib/mms: data sets of whole data objects. A data set may list data objects (functionally constrained data) instead of single attributes. Such a member is named to its data object and reported as the structure a read of it gives: value, q and t. It is reported when any leaf of it triggers, with that leaf's reason for inclusion, or both.
  • lib/mms: a clock. zelos_mms_clock(utc_ms, quality) gives the server UTC and a TimeQuality. A change is stamped with the clock as it was then, and TimeofEntry follows it. Without a call nothing changes: time since boot, flagged not synchronized.
  • lib/mms: buffered entries keep t. An entry holds the values with their change times, so a replayed data object carries the t it had when it changed.
  • full: data set ds_pos (XSWI1-8 Pos whole) with the buffered block brcb_pos01. ds_pdu and ds_dcdc are GOOSE's too and are unchanged, as are their blocks and frames.
  • Test knob: UDS routine 0x6186 (extended session) sets the clock: the TimeQuality octet, then UTC in ms (6 bytes), 0 for time since boot. ZELOS_UDS_ROUTINE_OPTION_MAX goes from 4 to 8 for it.

Why

A client that places a reported value at its own t had nothing on this node to be checked against: the data sets list values only, and the clock could be neither set nor flagged.

Cost

main this branch
RAM (full image) 202.7 KB 224.2 KB of 512 KB
Flash 230.2 KB 231.3 KB
MMS thread stack, most used 1776 of 4096 bytes (measured with CONFIG_INIT_STACKS)

The RAM is the two buffered blocks' 32 entries each, which now hold every value with its change time.

Tested

  • tests/lib/mms: new test_data_objects (a data object reported whole with both reasons, named to the object, t and TimeofEntry by the clock; a stamp keeps the quality it was made with); the model check refuses a data object listed from its second leaf.
  • testing/suites/mms: new test_data_objects_report_with_the_time_of_the_change; the station-file test covers the new data set and block.
  • Renode: just test-bench mms can-full/build/full.elf.
  • NUCLEO-H753ZI: suites mms, eth, doip; the goose suite skips where capture is not permitted.
  • On the board, against an MMS client that places rows by t, with the host's time of each switch as truth: no clock, synchronized (3 s and 15 s off), not synchronized, clock failure; live and replayed changes; a 1 s buffer time with two channels in one report.

A data set may list data objects (functionally constrained data): such a
member is named to its data object and reported as the structure a read of
it gives, value, q and t. It is reported when a leaf of it triggers, with
that leaf's reason, or both.

zelos_mms_clock() gives the server UTC and a TimeQuality; a change is stamped
with the clock as it was then, and TimeofEntry follows it. Without a call
nothing changes: time since boot, not synchronized. A buffered entry keeps
the values with their change times, so a replayed data object carries the t
it had.

full: data set ds_pos (XSWI1-8 Pos whole) with the buffered block brcb_pos01;
ds_pdu and ds_dcdc are GOOSE's too and stay as they are. UDS routine 0x6186
sets the clock for a test; the routine option record may now be 8 bytes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant