Documentation ¶
Overview ¶
Package decoder provides several decoders for differently encoded trice streams.
Package decoder provides several decoders for differently encoded trice streams.
Package decoder provides several decoders for differently encoded trice streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Verbose gives more information on output if set. The value is injected from main packages. Verbose bool // ShowID is used as format string for displaying the first trice ID at the start of each line if not "". ShowID string // Encoding describes the way the byte stream is coded. Encoding string // TargetEndianness if bigEndian assumes a big endian encoded trice stream from the target. // To keep target load small, the encoded trice stream from the target matches the target endianess, what us usually littleEndian. TargetEndianness string // TestTableMode is a special option for easy decoder test table generation. TestTableMode bool // Unsigned if true, forces hex and in values printed as unsigned values. Unsigned bool DebugOut = false // DebugOut enables debug information. DumpLineByteCount int // DumpLineByteCount is the bytes per line for the dumpDec decoder. ShowTargetTimestamp string // ShowTargetTimestamp is the format string for target timestamps. LocationInformationFormatString string // LocationInformationFormatString is the format string for target location: line number and file name. )
Functions ¶
func Translate ¶
func Translate(w io.Writer, sw *emitter.TriceLineComposer, lut id.TriceIDLookUp, m *sync.RWMutex, li id.TriceIDLookUpLI, rwc io.ReadWriteCloser) error
Translate performs the trice log task.
Bytes are read with rc. Then according decoder.Encoding they are translated into strings. Each read returns the amount of bytes for one trice. rc is called on every Translate returns true on io.EOF or false on hard read error or sigterm.
Types ¶
Click to show internal directories.
Click to hide internal directories.