digi.ccble.utils module
- digi.ccble.utils.hex_to_string(byte_array, pretty=True)[source]
Returns the provided bytearray in string format.
- Parameters:
byte_array (Bytearray) – the bytearray to format as string.
pretty (Boolean, optional) – True to use a white space separator between bytes, False otherwise.
- Returns:
the bytearray formatted as string.
- Return type:
String
- digi.ccble.utils.doc_enum(enum_class, descriptions=None)[source]
Returns a string with the description of each value of an enumeration.
- Parameters:
enum_class (Enumeration) – the Enumeration to get its values documentation.
descriptions (dictionary) – each enumeration’s item description. The key is the enumeration element name and the value is the description.
- Returns:
the string listing all the enumeration values and their descriptions.
- Return type:
String