Trace an Encoded Temperature Reading

Trace an Encoded Temperature Reading

Try Start with Step and compare the raw count arriving at the service decoder with the firmware’s contract reading of r/10 degrees.

Follow a raw count across the handoff

Integration testing

Local checks use different expectations

Firmware

Local check passes: encodes tenths.

Contract reading: r/10 degrees

Message link

Raw count r, r ≠ 0 · waiting to send

Service decoder

Local check passes: interprets whole degrees.

Old interpretation: r degrees

Store · far-side observation

Each component passes its own check while the two sides expect different units.

Observe The message link changes to Send succeeded. The Store card later marks r degrees as a mismatch, then changes to r/10 degrees and shows that the reading matches the contract.
Explain Firmware encodes tenths, but the old decoder treats r as whole degrees, so the store disagrees with the contract. The corrected decoder reads the same count as tenths and stores r/10 degrees.

Technical boundaries. The example uses a symbolic nonzero count r, with the link delivering that count intact. The store is the far-side observation used to check interpretation. The replay covers a unit mismatch and its correction. A change to the unit or encoding reopens the test.

Back to the chapter