Skip to content

Commit

Permalink
hv/trace_dcp: Support commands with retcode only replies
Browse files Browse the repository at this point in the history
Seen with the SetProperty command of DCP's system EP.

Signed-off-by: Janne Grunau <j@jannau.net>
  • Loading branch information
jannau committed Sep 3, 2023
1 parent b7e269e commit a6d2e54
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxyclient/hv/trace_dcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ def handle_reply(self, hdr, sub, fd):
self.log("Inline payload:")
chexdump(payload, print_fn=self.log)
else:
off = fd.tell()
data = fd.read()
if len(data) == 4:
retcode = struct.unpack("<I", data)[0]
self.log(f"EPIC: retcode only reply retcode={retcode:#x}")
return
fd.seek(off)
cmd = EPICCmd.parse_stream(fd)
if not cmd.rxbuf:
self.log(f"Response {sub.type:#x}: {cmd.retcode:#x}")
Expand Down

0 comments on commit a6d2e54

Please sign in to comment.