- Systems
- Parameters
- Containers
- Algorithms
- Commands
- Encodings
- Calibrators
- Alarms
- Ancillary
- Data Types
- Exceptions
- Expressions
- Verifiers
Encodings¶
Charset¶
FloatEncodingScheme¶
- class yamcs.pymdb.FloatEncodingScheme¶
Bases:
Enum
Float encoding
- IEEE754_1985 = 1¶
IEEE 754-1985
- MILSTD_1750A = 2¶
MIL-STD-1750A
- STRING = 3¶
String-encoded float
Warning
This scheme is not supported by XTCE, and will lead to invalid XML exports. However, that XML will be correctly understood by Yamcs, which does support string-based float encodings.
An alternative is to use a
StringEncoding
for aFloatParameter
, but then you will not be able to use use calibrators.
IntegerEncodingScheme¶
- class yamcs.pymdb.IntegerEncodingScheme¶
Bases:
Enum
Integer encoding
- UNSIGNED = 1¶
Unsigned
- SIGN_MAGNITUDE = 2¶
Sign-magnitude
- TWOS_COMPLEMENT = 3¶
Two’s complement
- ONES_COMPLEMENT = 4¶
Ones’ complement
- STRING = 5¶
String-encoded integer
Warning
This scheme is not supported by XTCE, and will lead to invalid XML exports. However, that XML will be correctly understood by Yamcs, which does support string-based integer encodings.
An alternative is to use a
StringEncoding
for anIntegerParameter
, but then you will not be able to use use calibrators.
Encoding¶
BinaryEncoding¶
- class yamcs.pymdb.BinaryEncoding¶
Bases:
Encoding
- __init__(bits: int | None = None, length_bits: int | None = None, encoder: UnnamedAlgorithm | None = None, decoder: UnnamedAlgorithm | None = None) → None¶
- decoder: UnnamedAlgorithm | None¶
Custom decoder, when this encoding is used for telemetry
- encoder: UnnamedAlgorithm | None¶
Custom encoder, when this encoding is used for telecommanding
IntegerEncoding¶
- class yamcs.pymdb.IntegerEncoding¶
Bases:
Encoding
- __init__(bits: int, little_endian: bool = False, scheme: IntegerEncodingScheme = IntegerEncodingScheme.UNSIGNED, string_encoding: Optional[StringEncoding] = None) → None¶
- string_encoding: StringEncoding | None¶
String encoding, required when
scheme
is set toSTRING
.
FloatEncoding¶
- class yamcs.pymdb.FloatEncoding¶
Bases:
Encoding
- __init__(bits: int, little_endian: bool = False, scheme: FloatEncodingScheme = FloatEncodingScheme.IEEE754_1985, string_encoding: Optional[StringEncoding] = None) → None¶
- string_encoding: StringEncoding | None¶
String encoding, required when
scheme
is set toSTRING
.
FloatTimeEncoding¶
- class yamcs.pymdb.FloatTimeEncoding¶
Bases:
FloatEncoding
- __init__(bits: int, little_endian: bool = False, scheme: FloatEncodingScheme = FloatEncodingScheme.IEEE754_1985, offset: float = 0, scale: float = 1) → None¶
- scheme: FloatEncodingScheme¶
- string_encoding: StringEncoding | None¶
String encoding, required when
scheme
is set toSTRING
.
IntegerTimeEncoding¶
- class yamcs.pymdb.IntegerTimeEncoding¶
Bases:
IntegerEncoding
- __init__(bits: int, little_endian: bool = False, scheme: IntegerEncodingScheme = IntegerEncodingScheme.UNSIGNED, offset: float = 0, scale: float = 1) → None¶
- scheme: IntegerEncodingScheme¶
- string_encoding: StringEncoding | None¶
String encoding, required when
scheme
is set toSTRING
.
StringEncoding¶
Common encodings¶
The encodings
module contains reusable data encodings. These are optional to use as you can create entirely custom data encodings.
Unsigned integers¶
- pymdb.uint1_t unsigned 1-bit integer¶
- pymdb.uint2_t unsigned 2-bit integer¶
- pymdb.uint3_t unsigned 3-bit integer¶
- pymdb.uint4_t unsigned 4-bit integer¶
- pymdb.uint5_t unsigned 5-bit integer¶
- pymdb.uint6_t unsigned 6-bit integer¶
- pymdb.uint7_t unsigned 7-bit integer¶
- pymdb.uint8_t unsigned 8-bit integer¶
- pymdb.uint9_t unsigned 9-bit integer¶
- pymdb.uint10_t unsigned 10-bit integer¶
- pymdb.uint11_t unsigned 11-bit integer¶
- pymdb.uint12_t unsigned 12-bit integer¶
- pymdb.uint13_t unsigned 13-bit integer¶
- pymdb.uint14_t unsigned 14-bit integer¶
- pymdb.uint15_t unsigned 15-bit integer¶
- pymdb.uint16_t unsigned 16-bit integer¶
- pymdb.uint24_t unsigned 24-bit integer¶
- pymdb.uint32_t unsigned 32-bit integer¶
Signed integers¶
- pymdb.int8_t signed 8-bit integer (big endian)¶
- pymdb.int16_t signed 16-bit integer (big endian)¶
- pymdb.int24_t signed 24-bit integer (big endian)¶
- pymdb.int32_t signed 32-bit integer (big endian)¶
Boolean integer¶
- pymdb.bool_t Same as uint8_t. 0=False, 1=True¶
Floats¶
- pymdb.float32_t 32-bit float in IEEE754-1985 encoding (big endian)¶
- pymdb.float64_t 64-bit float in IEEE754-1985 encoding (big endian)¶
Little endian variants¶
- pymdb.uint16le_t unsigned 16-bit integer (little endian)¶
- pymdb.int16le_t signed 16-bit integer in two's complement notation (little endian)¶
- pymdb.uint32le_t unsigned 32-bit integer (little endian)¶
- pymdb.int32le_t signed 32-bit integer in two's complement notation (little endian)¶
- pymdb.float32le_t 32-bit float in IEEE754-1985 encoding (little endian)¶
- pymdb.float64le_t 64-bit float in IEEE754-1985 encoding (little endian)¶