Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
/ ccsds Public archive

Open source Java implementation of publicly available CCSDS standards: SLE, TM/TC, AOS, Space Packets, COP-1, time formats, CFDP, Encapsulation Packets.

License

Notifications You must be signed in to change notification settings

dariol83/ccsds

Repository files navigation

Build FOSSA Status

An open source implementation of CCSDS protocols and formats in Java

This repository contains an open source implementation of public available CCSDS standards:

  • CCSDS 131.0-B-4 TM Synchronization and Channel Coding
  • CCSDS 132.0-B-3 TM Space Data Link Protocol
  • CCSDS 133.0-B-2 Space Packet Protocol
  • CCSDS 133.1-B-3 Encapsulation Packet Protocol
  • CCSDS 231.0-B-4 TC Synchronization and Channel Coding
  • CCSDS 232.0-B-4 TC Space Data Link Protocol
  • CCSDS 232.1-B-2 Communications Operation Procedure-1
  • CCSDS 301.0-B-4 Time Code Formats
  • CCSDS 727.0-B-5 CCSDS File Delivery Protocol (CFDP)
  • CCSDS 732.0-B-4 AOS Space Data Link Protocol
  • CCSDS 911.1-B-4 Space Link Extension--Return All Frames Service Specification
  • CCSDS 911.2-B-3 Space Link Extension--Return Channel Frames Service Specification
  • CCSDS 911.5-B-3 Space Link Extension--Return Operational Control Fields Service Specification
  • CCSDS 912.1-B-4 Space Link Extension--Forward CLTU Service Specification
  • CCSDS 913.1-B-2 Space Link Extension--Internet Protocol for Transfer Services

Disclaimer: this code is implemented as personal hobby, and it is not endorsed by any organization, association or company. As such, strict compliance to the different standards as well as correct behaviour cannot be guaranteed. As the Apache License makes clear, use the modules of this repository at your own risk.

SLE

The SLE User Test Library (eu.dariolucia.ccsds.sle.utl) is a library that implements the user side and provider side of an SLE data exchange session. It supports RAF, RCF, ROCF and CLTU. Support for FSP is currently missing and it will be implemented the request/need for it will be reported. It uses a custom format for the configuration of the service instances (currently not documented, can be derived by the classes inside the "config" package). Features:

  • support of multiple SLE versions;
  • support of credentials encoding SHA-1 and SHA-256 independently from the SLE version;
  • support of user and provider as initiator;
  • light codebase, as it heavily relies on the generated code from the ASN.1 definitions.

A simple but effective graphical interface to inspect the user-side peer is provided as separate module (eu.dariolucia.ccsds.sle.utlfx).

TM/TC

The TM/TC Library (eu.dariolucia.ccsds.tmtc) is a library that provide support to parse and build CCSDS TM frames, TC frames, AOS frames, Space Packets, Encapsulation Packets and full FARM/FOP implementation for COP-1. It allows encoding/decoding of space packets and encapsulation packets into TM frames, TC frames or AOS frames. It also provides some basic encodings (e.g. CLTU encoding/decoding, randomization, FECF encoding/checking, Reed-Solomon encoding/checking) but no error correction capabilities.

A simple graphical interface to inspect TM/TC/AOS/Space Packet data as stream is provided as separate module (eu.dariolucia.ccsds.inspector). It is possible to implement custom connectors to allow inspection of data delivered from a custom source/protocol/format by providing a new service (in Java 11 terms) implementing the interface eu.dariolucia.ccsds.inspector.api.IConnectorFactory. Some connectors to read data from file or socket are already available.

ENC/DEC

A packet identification/encoding/decoding library (eu.dariolucia.ccsds.encdec), which supports basic data types (integer, real, enumeration, CCSDS absolute and relative time formats, strings, octet streams, bit streams), array structures, ECSS TM/TC PUS headers, as derived from the ECSS Packet Utilisation Standard (http://everyspec.com/ESA/ECSS-E-70-41A_47794/) with main focus on performance.

The packet structure is defined using a custom XML format definition, built by means of JAXB annotations.

CFDP

The CCSDS File Delivery Protocol Library (eu.dariolucia.ccsds.cfdp) is a library that implements a full, standard-compliant CFDP entity (without support for proxy operations and relay operations, which can be easily developed in the application). It supports Class 1 (with and without closure) and Class 2 operations, with built-in support for TCP and UDP UT layers.

A simple but effective graphical interface to monitor transactions in a local CFDP entity using TCP and UDP as transport layers is provided as separate module (eu.dariolucia.ccsds.cfdp.fx).

Data Viewer

To ease the debug and visualisation of encoded information in telemetry and telecommand data, the module viewer (eu.dariolucia.ccsds.viewer) contains an application that can display decoded and structure information from all the data types supported by this library (CADUs, TM frames, AOS frames, TC frames, CLTU, Space and Encapsulation Packets, all SLE operations, time encodings, CLCW, CFDP PDUs).

Examples

A modules providing examples on how to use the three modules above in a combined way, to demonstrate the capabilities of the library to write compact code. The following examples are provided:

  • TM generator with output to file and/or TCP socket, from packet definition to TM CADU or TM frame;
  • TM processor with output to console, from CADU or TM frames read from a TCP socket to encoded parameter extraction;
  • TM processor with output to console, from SLE RAF to encoded parameter extraction;
  • TC generator from list of parameters (as defined in the packet definition) to CLTU with output to file and/or TCP socket;
  • TC generator from list of parameters to SLE CLTU;
  • TC processor with output to console, from CLTU to encoded parameter extraction;
  • CFDP Entity with input from/output to console, working on TCP and UDP UT layer implementations.

The main target of the examples module is not to provide final applications ready to be used, rather to explain the different levels and concepts of the libraries, and how to link the various objects together.

Code Targets

One of the targets of this repository is to produce simple, well-designed, well-documented, well-tested code with top-class performance. For each module (examples and tools excluded) the targets are:

  • full CI integration with GitHub Actions;
  • at least 90% line coverage with unit tests (measured by JaCoCo and reported in Sonarcloud);
  • a set of performance tests;
  • quality gate and QA metrics measured by Sonarcloud;
  • good documentation at package, class, instance variable and method level;
  • provision of simple, readable, specific code.

Each module is built using Maven and can be compiled out of the box (if all its dependencies are satisfied) with Maven. If you want to compile them all in one go, just run 'mvn clean install' on the root folder.

License

All original source code on this repository is released under the terms and conditions of the Apache License 2.0. The source code includes code and resources from other authors, which can be freely obtained from the web. To be more specific:

All other source code and resources, such as test data files, FXML and some images are genuine new implementation or generated using the library itself (e.g. TM data file, SLE configuration file). These resources are therefore released under the terms of the Apache License, 2.0.

Each module contains a NOTICE file that contains all the required attributions.

By using any of the resources on this repository, it is required to comply with the terms and conditions of the Apache License, including the distribution of the NOTICE files of the modules you use/modify in any software/products you deliver commercially or free of charge, in binary or source code. A copy of the relevant licenses must be provided: relevant links are provided in the NOTICE file.

If by any chance I forgot/missed to provide due credits to authors or I made inappropriate use of any license terms, please contact me here on GitHub.

Acknowledgements

I would like to thank the people behind the following technologies/libraries, which the code in this repository depends on. Too often we give things for granted, forgetting the amazing amount of work that people spend everyday to deliver good resources, efficient code and effective solutions to everybody free of charge:

A special mention goes to the people that took some of their time to contribute to this project by providing improvements via Pull Requests, suggestions, or simply their time to test the various implementations and providing feedback:

Contributions

No further updates are planned to be performed.