feat(sfm): Series-4 call-home state and audited enable/disable (phase 4)
- micromate: ENABLEABLE_WRITES gains 0x7E/0x7F (the call-home write and its confirm; spec row 9, enable/disable only); MicromateClient.get_call_home_content() returns the 126-byte 0x2C content. - sfm/device_access: CallHomeState (serial, series, enabled, dial_string, detail with byte5 and the whole block); s4_call_home_state reads bit 0 of [5] and the dial string at [6:46]; s4_change_call_home runs the shared change core with micromate.writes.plan_call_home_enabled -- built from the read run_change made just before, and that same plan is the one sent. A unit calling home (run state 0x03) is refused, nothing sent. The read-back judges the edited bit only; the snapshot records both blocks and every changed offset -- [118:120] is unit-maintained and always moves. - The write-ceiling tests take 0x71 (the setup write, phase 5) as their over-the-ceiling example now that 0x7E is enableable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
1 parent
1dd5bfa464
commit
eeb55effe9
7 files changed
+213
-13
No files matched your search
@@ -388,6 +388,11 @@ class MicromateClient:
|
||||
# Anything else reads unknown(0x..): the safe default, which the change path refuses.
|
||||
_RUN_STATES = {0x00: "idle", 0x02: "monitoring", 0x03: "calling_home"}
|
||||
|
||||
def get_call_home_content(self) -> bytes:
|
||||
"""The `0x2C` call-home block's 126-byte content (bit 0 of [5] is the
|
||||
enable, [6:46] the dial string; [118:120] is unit-maintained)."""
|
||||
return _content(self.protocol.read_call_home_config())
|
||||
|
||||
def read_run_state(self) -> MicromateRunState:
|
||||
"""`SUB 0x49` -> the unit's run state, with the in-call-home value kept
|
||||
(connect()'s `monitoring` bool flattens 0x03 into True)."""
|
||||
|
||||
Reference in new issue
Block a user