Lesson 2 of 3 · Packet meaning and versioned interfaces
Agree on every byte
12 minute lesson · 3 checks along the way
Your goal for this lessonDecode a simple versioned packet and explain why valid bytes can still produce a wrong physical value.
In this lesson 4 sections · 3 checks
Read & understand
A connection needs an agreed meaning
The collaboration route in CUBICS 2026 brings a spacecraft bus team together with a primary payload team from another Canadian post-secondary institution. An electrical connection is only one part of their agreement. The receiver must also know how to interpret each field. NASA’s interface-management guidance connects shared definitions with integration and verification. Here we use a small original packet to practice that idea, without claiming it is the format used by any CUBICS mission.
Our invented packet contains three bytes: a version identifier followed by two bytes holding a temperature code. A byte can represent an integer from zero through 255. The packet is shown as hexadecimal 01 01 02; hexadecimal uses sixteen symbols, so 0A represents ten and 10 represents sixteen. The first 01 means version one. For that version, the next two bytes form an unsigned integer with the most significant byte first.
Read & understand
Decode the representation before the units
With most significant byte first, the code is 256 times the first data byte plus the second. Data bytes 01 02 therefore represent 256 × 1 + 2 = 258. Version one defines temperature as T = 0.1 × code − 40 degrees Celsius. Applying that rule gives 25.8 − 40 = −14.2 degrees Celsius. The scale and offset are part of the contract just as much as the order of the bytes.
If the receiver reverses the two bytes, it interprets the code as 256 × 2 + 1 = 513. Applying the same temperature rule now produces 11.3 degrees Celsius. Both values can look plausible on a screen. Neither the arrival of three bytes nor a successful checksum tells us which interpretation the sender intended. A checksum can help detect some changes in transmitted bytes; it does not verify the physical meaning that software assigns to unchanged bytes.
Check 1 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Make a changed schema explicit
Now define version two to use the same unsigned byte order but a scale of 0.2, retaining the minus-forty offset. Packet 02 01 02 then means 0.2 × 258 − 40 = 11.6 degrees Celsius. A decoder that ignores the version would silently display the version-one value, −14.2. The bytes would be intact while the scientific record would be wrong. A format change therefore needs coordinated handling on both sides of the interface.
A receiver should follow a documented policy for unsupported versions, such as preserving the raw packet and marking its value undecoded. Guessing the newest or oldest meaning hides uncertainty. The team also needs to specify packet length, signedness, units, valid ranges, missing-value markers and time conventions. If one team timestamps seconds and the other reads milliseconds, field values can be numerically valid while observations are assigned to the wrong times.
The version is part of the measurement
An invented interface exercise, not a CUBICS protocol. Both versions use unsigned most-significant-byte-first representation; the scale changes. Preserve unknown versions as undecoded evidence rather than guessing.
Open full-size diagram in a new tab: The version is part of the measurementCheck 2 of 3
10 pointsUse the reading above. You can try again without losing points.
Read & understand
Test a known packet through the whole chain
Create a shared test fixture containing the exact packet bytes and the independently calculated expected result. Include 01 01 02 expecting −14.2 and 02 01 02 expecting 11.6. Use a non-symmetric byte pair: 01 01 would conceal a byte-order reversal. Test boundary values and malformed lengths too, with expected rejection behavior. Store the fixture with the interface version so a later student can repeat the same checks after a decoder or payload update.
Then run a known input through payload encoding, bus transport, ground decoding and the displayed or exported record. Testing only a decoder does not establish that the encoder emits the agreed schema. NASA’s configuration-management guidance supports identifying the versions that were actually tested and coordinating changes affecting other teams. A useful handover preserves raw packets, expected outputs, software identifiers and the reason for each convention. That turns a working demonstration into knowledge another team can reproduce.
Check 3 of 3
10 pointsUse the reading above. You can try again without losing points.
Put it together
Your lesson progress
Each check connects to a part of the story. Complete all 3 to earn your 25-point lesson bonus.
Explore further · Optional
Go to the source
Explore the evidence behind this lesson. These optional readings and videos open in a new tab.
- Read: CSA: CUBICS 2026 mission development guidanceDated August 2026 opportunity: 6U collaboration and up-to-3U streams. Appendix B addresses payload accommodation and end-to-end testing; this course is not application guidance.
- Read: NASA: interface managementA shared interface definition connects separate teams, integration and verification. The classroom packet and rates below are original examples.
- Read: NASA: configuration managementIdentify versions, coordinate changes and preserve the tested configuration. Our packet schema is not a CUBICS flight protocol.