diff --git a/proxyclient/hv/trace_dcp.py b/proxyclient/hv/trace_dcp.py index 455f39d21739..bfdd66e5fb24 100644 --- a/proxyclient/hv/trace_dcp.py +++ b/proxyclient/hv/trace_dcp.py @@ -161,15 +161,16 @@ class EPICEp(AFKEp): chexdump(fd.read(), print_fn=self.log) def handle_reply(self, hdr, sub, fd): - cmd = EPICCmd.parse_stream(fd) - payload = fd.read() - self.log(f"Response {sub.type:#x}: {cmd.retcode:#x}") - if payload: + if sub.inline_len: + payload = fd.read() self.log("Inline payload:") chexdump(payload, print_fn=self.log) - if cmd.rxbuf: - self.log(f"RX buf @ {cmd.rxbuf:#x} ({cmd.rxlen:#x} bytes):") - chexdump(self.dart.ioread(0, cmd.rxbuf, cmd.rxlen), print_fn=self.log) + else: + cmd = EPICCmd.parse_stream(fd) + self.log(f"Response {sub.type:#x}: {cmd.retcode:#x}") + if cmd.rxbuf: + self.log(f"RX buf @ {cmd.rxbuf:#x} ({cmd.rxlen:#x} bytes):") + chexdump(self.dart.ioread(0, cmd.rxbuf, cmd.rxlen), print_fn=self.log) def handle_cmd(self, hdr, sub, fd): cmd = EPICCmd.parse_stream(fd)