Repository navigation
Add EnergyStartStopState listener to Controller - #32
Open
zacharyclark-Wright wants to merge 2 commits into
Open
zacharyclark-Wright wants to merge 2 commits into
zacharyclark-Wright wants to merge 2 commits into
Conversation
zacharyclark-Wright
marked this pull request as draft
October 27, 2026 14:02
Author
|
Updated initial comment to reflect that this change fixes #28 and to show the output with the updated source rather than my custom PD implementation. |
zacharyclark-Wright
marked this pull request as ready for review
October 27, 2026 15:39
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.
Fixes #28
Summary
Resolves #28 by adding a subscriber for
tms::EnergyStartStopStateto the Microgrid Controller (controller). This allows MCs to receive and track physical device energy states dynamically and synchronize device readiness during controller election, recovery, or failover.Background & Root Cause
Per Issue #28:
Per MIL-STD-3071 (TMS), power devices publish their real-time operational status over the
EnergyStartStopStatetopic using thePublishLastQoS profile (TRANSIENT_LOCALdurability,RELIABLEreliability, depth 1).Previously, the MC implementation:
ESSL_OPERATIONALupon receivingDeviceInfo.EnergyStartStopState.Replyfor an MC-initiatedEnergyStartStopRequest.Consequently, an MC recovering from downtime, resuming heartbeats, or newly started entirely had no mechanism to query or ingest current power device states, leaving its local device registry desynchronized from the actual microgrid state.
Solution
EnergyStartStopStateDataReaderListenerImpl:tms::topic::TOPIC_ENERGY_START_STOP_STATEusing standardTRANSIENT_LOCALdurability.{"*", ""}) to ingest both device-scoped partitions (dev_id) and default global partition traffic.cached_essl_caching inControllerto handle discovery race conditions where anEnergyStartStopStatesample arrives prior toDeviceInforegistration.ESSL_OFFrather than hardcodingESSL_OPERATIONAL).CMakeLists.txt.Verification: Multi-MC Failover & State Recovery Test Run