Codec
¶
digraph inheritanceb4a4926d7d {
rankdir=UD;
ratio=compress;
size="8.0, 12.0";
"Codec" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="The base class for all codecs"];
"Logger" -> "Codec" [arrowsize=0.5,style="setlinewidth(0.5)"];
"Logger" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="The taurus logger class. All taurus pertinent classes should inherit"];
"Object" -> "Logger" [arrowsize=0.5,style="setlinewidth(0.5)"];
"Object" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded];
}
-
class
Codec
[source]¶ Bases:
taurus.core.util.log.Logger
The base class for all codecs
-
decode
(data, *args, **kwargs)[source]¶ decodes the given data. This method is abstract an therefore must be implemented in the subclass.
Parameters: data ( sequence[str, obj]
) – a sequence of two elements where the first item is the encoding format of the second item objectReturn type: sequence[str, obj]
Returns: a sequence of two elements where the first item is the encoding format of the second item object Raise: NotImplementedError
-
encode
(data, *args, **kwargs)[source]¶ encodes the given data. This method is abstract an therefore must be implemented in the subclass.
Parameters: data ( sequence[str, obj]
) – a sequence of two elements where the first item is the encoding format of the second item objectReturn type: sequence[str, obj]
Returns: a sequence of two elements where the first item is the encoding format of the second item object Raise: NotImplementedError
-