Reference/API¶
ccsdspy Package¶
IO Interface for Reading CCSDS Data in Python.
Functions¶
|
Split a stream of mixed APIDs into separate streams by APID. |
Classes¶
|
Define a fixed length packet to decode binary data. |
|
An array contained in a packet, similar to |
|
A field contained in a packet. |
|
Define a variable length packet to decode binary data. |
Class Inheritance Diagram¶
digraph inheritance1e103196a5 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "FixedLength" [URL="api/ccsdspy.FixedLength.html#ccsdspy.FixedLength",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Define a fixed length packet to decode binary data."]; "_BasePacket" -> "FixedLength" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PacketArray" [URL="api/ccsdspy.PacketArray.html#ccsdspy.PacketArray",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An array contained in a packet, similar to :py:class:`~ccsdspy.PacketField` but with multiple"]; "PacketField" -> "PacketArray" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PacketField" [URL="api/ccsdspy.PacketField.html#ccsdspy.PacketField",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A field contained in a packet."]; "VariableLength" [URL="api/ccsdspy.VariableLength.html#ccsdspy.VariableLength",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Define a variable length packet to decode binary data."]; "_BasePacket" -> "VariableLength" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BasePacket" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class of FixedLength and VariableLength. Not to be instantiated"]; }ccsdspy.converters Module¶
This class hold the implementation of the converter system, which applies post-process to decoded packet fields. This post-processing includes applying linear/polynomial calibration curves, dictionary replacement, and time parsing.
Classes¶
During conversion a value was encountered which did not have a corresponding key in the replacement dictionary. |
|
Base class for all converter objects. |
|
|
Post-processing conversion which applies calibration using a series of coefficients ordered from highest power to intercept. |
|
Post-processing conversion which applies a linear (y=mx+b) transformation. |
|
Post-processing conversion for applying dictionary replacement of integers to strings. |
|
Post-processing conversion for converting timestamp fields to datetime instances, computed using offset(s) from a reference time. |
|
Post-processing conversion which converts byte arrays or multi-byte numbers to strings in numeric representations such as binary, hexadecimal, or octal. |
Class Inheritance Diagram¶
digraph inheritancea239824f34 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Converter" [URL="api/ccsdspy.converters.Converter.html#ccsdspy.converters.Converter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for all converter objects."]; "DatetimeConverter" [URL="api/ccsdspy.converters.DatetimeConverter.html#ccsdspy.converters.DatetimeConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Post-processing conversion for converting timestamp fields to datetime"]; "Converter" -> "DatetimeConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "EnumConverter" [URL="api/ccsdspy.converters.EnumConverter.html#ccsdspy.converters.EnumConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Post-processing conversion for applying dictionary replacement of"]; "Converter" -> "EnumConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "EnumConverterMissingKey" [URL="api/ccsdspy.converters.EnumConverterMissingKey.html#ccsdspy.converters.EnumConverterMissingKey",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="During conversion a value was encountered which did not have a"]; "LinearConverter" [URL="api/ccsdspy.converters.LinearConverter.html#ccsdspy.converters.LinearConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Post-processing conversion which applies a linear (y=mx+b)"]; "PolyConverter" -> "LinearConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PolyConverter" [URL="api/ccsdspy.converters.PolyConverter.html#ccsdspy.converters.PolyConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Post-processing conversion which applies calibration using a series"]; "Converter" -> "PolyConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; "StringifyBytesConverter" [URL="api/ccsdspy.converters.StringifyBytesConverter.html#ccsdspy.converters.StringifyBytesConverter",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Post-processing conversion which converts byte arrays or multi-byte"]; "Converter" -> "StringifyBytesConverter" [arrowsize=0.5,style="setlinewidth(0.5)"]; }ccsdspy.utils Module¶
Utils for the CCSDSPy package.
Functions¶
|
Count the number of packets in a file and check if there are any missing bytes in the last packet. |
|
Parse the APID of a packet from the bytes associated with a packet's primary header. |
|
Parse the number of bytes in a packet from the bytes associated with a packet's primary header. |
|
Iterate through packets as raw bytes objects, in the order they appear in a file. |
|
Read primary header fields and return contents as a dictionary of arrays. |
|
Split a stream of mixed APIDs into separate streams by APID. |
|
Retrieve a list of bytes objects corresponding to each packet in a file. |