The European Cooperation for Space Standardisation (ECSS) Packet Utilisation Standard (PUS) defines how onboard spacecraft software exposes services to ground operators and other onboard systems. It is a service-oriented protocol: instead of raw data exchange, nodes offer named services with defined request/response semantics.
Core concepts:
- Application Process Identifier (APID): A 11-bit ID identifying the source or destination process. Each service endpoint has an APID. In SpaceCAN, each virtual node has a unique APID.
- Service Type / Subtype: Each PUS service has a type number (e.g., ST[01] = Telecommand Verification, ST[03] = Housekeeping, ST[17] = Test). Each type has subtypes (e.g., ST[17,1] = Are-You-Alive Ping).
- Telecommand (TC): A command from ground to onboard system. Request to execute a service action.
- Telemetry (TM): Data from onboard to ground. Service reports, housekeeping parameters, event notifications.
SpaceCAN PUS routing: The no_std core implements a PUS service router. Incoming CAN frames are reassembled into PUS packets (via multi-frame fragmentation), the service type is extracted, and the packet is dispatched to the appropriate handler. Handlers produce TM responses which are fragmented back into CAN frames.
pub enum PusService {
TcVerification, // ST[01]
Housekeeping, // ST[03]
EventReporting, // ST[05]
Test, // ST[17]
}
pub fn route_packet(packet: &PusPacket) -> Result<(), RoutingError> {
match PusService::from_type(packet.service_type())? {
PusService::Test => handle_test(packet),
PusService::Housekeeping => handle_hk(packet),
_ => Err(RoutingError::UnknownService),
}
}