Skip to content

v4 - #19

Draft
jmw182 wants to merge 117 commits into
masterfrom
v4
Draft

v4#19
jmw182 wants to merge 117 commits into
masterfrom
v4

Conversation

@jmw182

@jmw182 jmw182 commented Nov 9, 2026

Copy link
Copy Markdown
Member

RTMA v4 update

Fully compatible with pyrtma v4

Changes include:

  • MessageManager Support for ConnectV2 with hello/goodbye/introduce messages
  • Expanded module ID range
  • Improved build process using CMake instead of QMake
  • New client logger

Breaking Changes:

  • Removed TIMING_MESSAGE
  • Remove obsolete functions such as timer functions
  • Build depends on CMake
  • Depends on fmt library (automatically included by CMake)

dmweir and others added 30 commits August 13, 2026 09:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… NUL-termination

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…Address failure

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jmw182 and others added 30 commits October 29, 2026 17:51
Co-authored-by: jmw182 <3036948+jmw182@users.noreply.github.com>
commit was revised to fix copilot's whitespace (CRLF) mangling
Allow console output stream to be configured (defaults to stderr)
Allow colorized output to be disabled, including automatically when not outputting to a terminal
Add RTMA_LevelName and RTMA_LevelFromName functions
Fix log file name format
**Logger changes** (in `RTMA_Logger.cpp` and `RTMA_Logger.h`)
- **Locking:** every getter and setter now takes the mutex, and `GetLogName()` no longer deadlocks when `LogMessage` calls it.
- **File sink:** the file stays open, and a byte counter drives rotation at 3 MiB with three backups. I flush after every line. If the file can't be opened, written, or reopened after rotating, the sink turns itself off and prints one warning on the console stream.
- **RTMA send:** the payload is built under the lock but sent after releasing it. A per-thread guard stops a log call made during a send from sending again. A thrown send turns the RTMA sink off.
- **Dangling module:** `RTMA_Module`'s destructor calls a new `Detach()`, so a `Child()` logger that outlives the module no longer touches freed memory. It still logs to console and file.
- **Truncation:** only the RTMA payload is cut at 1023 characters. Console and file get the full message.
- **Time:** `MDF_RTMA_LOG.time` is now epoch seconds, taken once per call and shared with the console and file timestamps.
- **Windows color:** in AUTO mode the logger turns on virtual terminal processing once for the console stream, and skips color if that fails.

**Docs:** `RTMA.h` now says `RTMA_Module` and `SendMessage` are not thread-safe, and that logging to RTMA from several threads needs `Logger().SetRTMAEnabled(false)`.

**Tests:** `public_api_test.cpp` gained four cases:
- a child logger outliving its module;
- rotation over 11 MB, leaving `.1` to `.3` but no `.4`;
- a 2000-character message arriving whole with no escape codes;
- a short multi-threaded logging run.

`CMakeLists.txt` links `Threads::Threads` into the test.
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.

3 participants