pub fn parse_response<T>(
layout: HeaderLayout,
message: &[u8],
) -> FrankaResult<T>where
T: FromBytes + KnownLayout + Immutable + Unaligned,Expand description
Parses a response payload out of a complete TCP message.
Mirrors libfranka’s Network::tcpBlockingReceiveResponse, which only rejects a message when
header.size < sizeof(message) — a longer message is accepted and the surplus is either
handed out as variable-length data (GetRobotModel) or ignored. franka-sim pads its
one-byte status responses to four bytes, so accepting trailing bytes is required in
practice, not just for GetRobotModel.