Skip to content

Sync consolidated MMS server base into R1-R2 live branch - #59

Closed
masarray wants to merge 138 commits into
agent/mms-server-r1-r2-current-mainfrom
agent/complete-server-consolidation
Closed

masarray wants to merge 138 commits into
agent/mms-server-r1-r2-current-mainfrom
agent/complete-server-consolidation

Conversation

@masarray

@masarray masarray commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +474 to +479
if (negotiated_mms_pdu_size_ == 0U ||
application.bytes_written > negotiated_mms_pdu_size_) {
return make_result(
MmsStaticConnectionStatus::peer_limit_exceeded,
state_,
peek.frame_bytes);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread tools/smv_profile_inspect.cpp Outdated
Comment on lines +110 to +115
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()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +213 to +218
}).catch((error) => {
logLine(`Serial write failed: ${error.message}`, "ui");
showToast(`Serial write failed: ${error.message}`, true);
});
await state.sendChain;
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

masarray commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Closing this mechanical synchronization PR as obsolete. The server consolidation landed through #51 and the maintained wire-parity/live-client line moved forward through #61, #66 and #67, so this branch-to-branch sync is no longer needed.

@masarray masarray closed this Sep 5, 2026
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