Skip to content

Add live BRCB interoperability lab server - #60

Closed
masarray wants to merge 5 commits into
agent/complete-server-consolidationfrom
agent/live-brcb-server-harness
Closed

masarray wants to merge 5 commits into
agent/complete-server-consolidationfrom
agent/live-brcb-server-harness

Conversation

@masarray

@masarray masarray commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Stacked follow-up to PR #51. Adds a dedicated desktop BRCB interoperability lab server using the already-reviewed server core: static BRCB object bank, association/Owner lifecycle, periodic GGIO data-change capture, retained queue, asynchronous InformationReport delivery, and two-phase commit only after the full frame is sent. This PR is for lab/external IEC 61850 client interoperability evidence only; it makes no IEC 61850 conformance claim. Keep draft until PR #51 lands and GCC/Clang/MSVC self-tests plus fresh review are green.

Copy link
Copy Markdown
Owner Author

@codex review

@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: c55ac40d01

ℹ️ 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 thread tools/brcb_lab_server.cpp
return {embedded::IoStatus::timeout, 0U};
}
#else
const auto count = ::send(stream.socket, bytes.data(), bytes.size(), 0);

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 Avoid blocking indefinitely when sending to a stalled peer

On POSIX, the accepted socket remains blocking and this calls send() without first waiting for writability or configuring a send timeout. If an enabled client stops reading while reports continue, its TCP receive window eventually fills and the single-threaded server blocks here indefinitely, preventing connection cleanup, later connections, and potentially SIGINT shutdown. Use a nonblocking socket or the bounded writable-wait pattern already used by the static IED server.

Useful? React with 👍 / 👎.

Comment thread tools/brcb_lab_server.cpp
Comment on lines +626 to +627
(result.status == mms::MmsStaticServerSessionStatus::would_block ||
result.status == mms::MmsStaticServerSessionStatus::timed_out);

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 Do not require a read timeout before staging reports

When an established client sends requests continuously, every poll_once() returns progress or response activity rather than would_block/timed_out, so this condition never calls MmsStaticBrcbConnection::poll(). Captured BRCB events then accumulate and can overflow the retained queue even though the owner remains enabled and connected. Stage a report whenever the session has no buffered input or pending response after servicing the current operation, without requiring the socket to have gone idle for the full receive timeout.

Useful? React with 👍 / 👎.

masarray commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded by the consolidated reporting/server path. #51 landed the cumulative BRCB stack on main, while the newer IED Simulator line in #75 carries live URCB/BRCB third-party interoperability forward. This older lab-server branch is no longer the active path.

@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