class documentation

class BCDRevision(Converter): (source)

View In Hierarchy

Converter for revision numbers stored in two byte BCD

A revision xx.yy is stored in BCD as xxyy.

Class Method get Converts bytes -> str
Class Method set Converts str -> bytes
@classmethod
def get(cls, data: bytes, **kwargs) -> _T: (source)

Converts bytes -> str

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
_TThe revision number stored in data
@classmethod
def set(cls, value: _T, **kwargs) -> bytes: (source)

Converts str -> bytes

Parameters
value:_TThe value to convert
**kwargsUndocumented
Returns
bytesThe BCD encoding of the revision number in value