taurus taurus

Previous topic

CircBuf

Next topic

CodecFactory

This Page

Codec

Inheritance diagram of Codec

class Codec

Bases: taurus.core.util.log.Logger

The base class for all codecs

decode(data, *args, **kwargs)

decodes the given data. This method is abstract an therefore must be implemented in the subclass.

Parameters:data (:class:~`sequence[str, obj]`) – a sequence of two elements where the first item is the encoding format of the second item object
Return type::class:~`sequence[str, obj]`
Returns:a sequence of two elements where the first item is the encoding format of the second item object
Raise:RuntimeError
encode(data, *args, **kwargs)

encodes the given data. This method is abstract an therefore must be implemented in the subclass.

Parameters:data (:class:~`sequence[str, obj]`) – a sequence of two elements where the first item is the encoding format of the second item object
Return type::class:~`sequence[str, obj]`
Returns:a sequence of two elements where the first item is the encoding format of the second item object
Raise:RuntimeError