Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c17778d14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (negotiated_mms_pdu_size_ == 0U || | ||
| application.bytes_written > negotiated_mms_pdu_size_) { | ||
| return make_result( | ||
| MmsStaticConnectionStatus::peer_limit_exceeded, | ||
| state_, | ||
| peek.frame_bytes); |
There was a problem hiding this comment.
Preflight negotiated limits before executing writes
When a peer negotiates a limit large enough for association setup but smaller than a multi-variable write response, this check runs only after dispatcher_.dispatch() has invoked every writable object's callback. The session then treats peer_limit_exceeded as terminal, so the client receives no write response even though the writes or control actions were already applied and may retry them. Reject responses that cannot fit the negotiated MMS/COTP limits before dispatching side-effecting writes.
Useful? React with 👍 / 👎.
| bool current_device_layout_supported(const SvPublisherProfile& profile) { | ||
| if (profile.no_asdu != 1U || profile.payload_size_bytes != 64U || | ||
| profile.channels.size() != 16U || !profile.publisher_rate_hz.has_value() || | ||
| *profile.publisher_rate_hz == 0U || *profile.publisher_rate_hz > 65535U || | ||
| profile.sample_counter_policy != SvSampleCounterPolicy::explicit_modulus || | ||
| !profile.sample_counter_modulus.has_value()) { |
There was a problem hiding this comment.
Reject device-invalid APPID before reporting ready
For an otherwise supported SCL stream with APPID 0000, this predicate returns true and the tool reports deviceSupport: "ready", although the device's PROFILE L2 parser explicitly rejects appid == 0. Because deployment continues through PROFILE COMMIT, staging can retain the previous APPID and emit a successful commit that the GUI interprets as the requested profile being armed, producing packets under the wrong identity.
Useful? React with 👍 / 👎.
| }).catch((error) => { | ||
| logLine(`Serial write failed: ${error.message}`, "ui"); | ||
| showToast(`Serial write failed: ${error.message}`, true); | ||
| }); | ||
| await state.sendChain; | ||
| return true; |
There was a problem hiding this comment.
Return failure when a serial write rejects
When writer.write() rejects because the port disconnects or encounters an I/O error, the catch handler resolves state.sendChain and this function still returns true. Callers such as deploySelectedProfile() therefore continue sending the remaining profile commands and leave the UI in its deploying state instead of aborting at the failed command.
Useful? React with 👍 / 👎.
Port the ARIEC61850/ARSVIN PTPv2 Layer-2 stack into the portable C++ core and integrate it with the ESP32-P4 SMV injector as a guarded lab timing companion. Includes portable Announce/Sync/Follow_Up/Pdelay codec/parser, passive monitor and analyzer, transportSpecific/VLAN diagnostics, fail-safe smpSynch behavior, ESP32-P4 hardware TX/RX timestamps for two-step Sync and Pdelay, strict cross-platform CI, and the PTP lab bench acceptance runbook. This is a troubleshooting/interoperability timing helper, not a GPS-backed or certified grandmaster.
Complete the portable PTP publisher runtime/control layer, refactor ESP32-P4 into a hardware timestamp adapter, add runtime config/status APIs and full publisher profile controls, and preserve fail-safe smpSynch=0 pending PTP-P2 clock discipline evidence.
Includes current-client MMS discovery/read/control interoperability, truthful service negotiation, URCB model structure, and exact-head CI evidence.
Addresses the remaining actionable PR #51 review findings with embedded and live-client regression coverage.
Merge the premium resizable Qt Studio shell, verified live SMV controls, Smart Discovery/device identity gating, PTP Lab tools, DC/CT saturation support, and final audit hardening for fixed 4I/4V semantics, overflow-safe Q30 scaling, and pre-verification ENABLE protection.
Mechanical synchronization only: bring the current consolidated MMS/BRCB server base (#51, now synced with main) into the R1/R2 Direct Control + URCB live-engineering-client branch before continuing external IEC 61850 client association debugging. No new feature intent in this sync PR.