Repository navigation
P3-H P1: separate SV sampling and Ethernet frame cadence - #142
Merged
Merged
Conversation
Introduce an explicit rational timing model for sampling basis, configured sample rate, ASDUs per Ethernet frame, samples/s and frames/s. Honor SmpPerPeriod as the SCL default, represent SecPerSample without guessing, keep legacy Studio bridge keys derived from the new authority, and keep the current ESP32-P4 target fail-closed to its proven SmpPerSec/one-ASDU boundary. Tracks #139.
6 tasks
Allow Studio and the inspector CLI to supply nominal system frequency explicitly, keep counter confirmation independent, surface sample/frame cadence separately in the UI, and add explicit sampleRateHz/frameRateHz outputs while preserving publisherRate compatibility aliases. Tracks #139.
Accept both current SecPerSample and legacy SecPerSmp engineering tokens as the same seconds-per-sample semantic, add regression coverage, and keep CLI fatal-error JSON on schema v2. Tracks #139.
masarray
marked this pull request as ready for review
October 6, 2026 14:11
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracks #139 after merged #140 and #141.
Base:
main@f3a107ec4cc4eca553ee467911c979afd057ce4dHead:
213d31235b665556e339af82c147daa1ab4100b3Purpose
Remove the remaining semantic ambiguity between sampling cadence and Ethernet publication cadence.
IEC 61850 SCL gives
smpRate,smpModandnofASDU; these are not one interchangeable "publisher rate". A stream may carry multiple consecutive ASDUs per Ethernet publication, so sample cadence and frame cadence must be represented independently.Model
New
SvPublicationTimingauthority contains:smpRate;Rates remain exact rational values; no floating point or truncating scheduler inference is used in the engineering model.
Standards / interoperability behavior
smpModcompiles as the SCL default SmpPerPeriod;Device boundary remains narrow
This does not expand the ESP32-P4 runtime claim.
classify_esp32p4_sv_profile()still requires:Thus host semantics become broader while deployment remains fail-closed.
Compatibility
Studio and the CLI preserve the existing
publisherRate/publisherRateHzcompatibility key, but it is now derived from frame cadence, not copied fromsmpRate.The profile/inspection schema moves to v2 and additionally exposes rational sample/frame-rate metadata.
Explicit resolution path
Class B is no longer treated as synonymous with an unresolved counter.
--nominal-frequency-hz N; no 50/60 Hz value is inferred from a vendor, filename, or profile shape.Tests
Regression coverage includes:
Non-goals
No multi-ASDU ESP packet builder, no multi-stream scheduler, no new IEC 61869-9 conformance claim, and no runtime wire protocol change in this PR.
Next node after this is accepted: profile-family authority + explicit device compilation from the timing model.