ECSS SpaceWire CCSDS Transfer — Send Request (space-systems/ecss/e5053-send-request)
Use when the task is the send request a user issues to the SpaceWire CCSDS packet transfer entity, per ECSS-E-ST-50-53C clause 5.5.2 — deciding whether the request is well enough formed for the entity to build a transfer from it, and what to do when it is not.
Domain quick reference
- The request is the whole interface. It names where the packet goes and hands over the packet; everything the entity puts on the link — the address octets, the protocol identifier, the reserved octet — is derived from it, so a defect in the request becomes a defect on the link with nothing in between to catch it.
- A destination is one of two shapes. A logical address is a single octet in the range assigned to destination nodes, with the values below that range and the top value reserved. A path address is a sequence of output port numbers, optionally ending in a logical address for the last hop, and routers consume one octet per hop.
- The two shapes are distinguishable from the octet values, which is what makes an automated check possible: an octet in the port range is a hop, an octet in the node range is a destination, and anything else belongs to neither and is a request defect.
- The packet parameter carries one complete CCSDS packet. Because the space packet declares its own length in its primary header, "complete" is checkable at the interface without any agreement between sender and receiver: declared length against octets supplied, both ways.
- The transmit limit belongs to the local entity, not the standard. A request whose encoded form exceeds it is refused at the interface. The one thing that must not happen is silent truncation, which produces a transfer the receiver cannot tell from a link fault.
Workflow
- Categorize the destination into a logical address or a path, and produce the leading address octets from it. Reject reserved values rather than passing them through as routable addresses.
- Validate the packet parameter: at least a primary header, then the declared total length derived from the packet data length field compared against the octets supplied, rejecting both a shortfall and a surplus.
- Encode the transfer body in order: address octets, protocol identifier, reserved octet, then the CCSDS packet unchanged. The packet is carried, never rewritten.
- Measure the encoded length and compare it with the configured transmit limit. Equality with the limit is acceptance; exceeding it is refusal, with the reason named as a limit and not as a bad packet.
- Collect the three obligations as separate findings rather than stopping at the first, so one review round returns everything wrong with the request.
- Accept the request only when all three obligations hold, and report the encoded length and destination kind with the verdict.
Pitfalls
- Passing a reserved low address through because it is a valid octet. Reserved values are not node addresses, and a transfer aimed at one is dropped or mis-routed somewhere the sender cannot observe.
- Using the packet data length field as the packet length. It counts the data field minus one, so every comparison built on it directly fails by seven octets and rejects valid requests.
- Truncating an over-long transfer to the transmit limit. The receiver sees a short packet with no way to tell a policy truncation from a link fault; the request must be refused instead.
- Rewriting the CCSDS packet on the way through — padding it, aligning it, or fixing its length field. The entity is a carrier, and a packet that arrives different from the one submitted breaks any end-to-end check the user applied.
- Returning only the first defect. A request commonly has a bad destination and a bad packet at once, and reporting one at a time turns a single review into several.
Behavior contract (gate 3)
The destination categorization, packet completeness check, transfer encoding, transmit-limit refusal and combined verdict are exercised by the gate 3 contract test: scripts/test_e5053_send_request.py against scripts/e5053_send_request_logic.py (stdlib unittest, offline). Run: python3 scripts/test_e5053_send_request.py
Compliance
- ECSS standards are freely downloadable (ESA); cite the source and paraphrase per standards-map.yaml.
- compliance: STANDARDS-REF, gated: false.
