Documentation ¶
Index ¶
- Variables
- func NewBinaryLogger(w io.Writer, fSys *afero.Afero, from io.ReadWriteCloser) (in io.ReadWriteCloser)
- func NewBytesViewer(w io.Writer, from io.ReadWriteCloser) (in io.ReadWriteCloser)
- func NewReadWriteCloser(w io.Writer, fSys *afero.Afero, verbose bool, port, args string) (r io.ReadWriteCloser, err error)
Constants ¶
This section is empty.
Variables ¶
var ( // ShowInputBytes displays incoming bytes if set true. ShowInputBytes bool // Port is the trice receiver to use. Port string // PortArguments are the trice receiver device specific arguments. PortArguments string // ExecCommand is a commandline to be executed. ExecCommand string // DefaultLinkArgs replaces "default" args value for ST-LINK and J-LINK port. DefaultLinkArgs = "-Device STM32F030R8 -if SWD -Speed 4000 -RTTChannel 0 -RTTSearchRanges 0x20000000_0x1000" // DefaultCOMArgs replaces "default" args value for serial port. DefaultCOMArgs = "-baud 115200" // DefaultTCP4Args replaces "default" args value for TCP4 port. DefaultTCP4Args = "localhost:17001" // OpenOCD starts a server on localhost:17001 where it dumps all RTT messages. // DefaultFileArgs replaces "default" args value for FILE port. DefaultFileArgs = "trices.raw" // DefaultBUFFERArgs replaces "default" args value for BUFFER port. DefaultBUFFERArgs = "0 0 0 0" // DefaultDumpArgs replaces "default" args value for BUFFER port. DefaultDumpArgs = "" // Verbose gives more information on output if set. The value is injected from main packages. Verbose bool // BinaryLogfileName holds a filename, the trice messages are stored to in binary form. BinaryLogfileName string )
Functions ¶
func NewBinaryLogger ¶ added in v0.51.0
func NewBinaryLogger(w io.Writer, fSys *afero.Afero, from io.ReadWriteCloser) (in io.ReadWriteCloser)
NewBinaryLogger returns a ReadWriteCloser `in` which is internally using reader `from`. Calling the `in` Read method leads to internally calling the `from` Read method but lets to do some additional logging
func NewBytesViewer ¶ added in v0.18.4
func NewBytesViewer(w io.Writer, from io.ReadWriteCloser) (in io.ReadWriteCloser)
NewBytesViewer returns a ReadCloser `in` which is internally using reader `from`. Calling the `in` Read method leads to internally calling the `from` Read method but lets to do some additional action like logging
func NewReadWriteCloser ¶ added in v0.52.0
func NewReadWriteCloser(w io.Writer, fSys *afero.Afero, verbose bool, port, args string) (r io.ReadWriteCloser, err error)
NewReadWriteCloser returns a ReadCloser for the specified port and its args. err is nil on successful open. When port is "COMn" args can be used to be "TARM" to use a different driver for dynamic testing. When port is "DUMP", args is expected to be a space or comma separated hex print like "09 a1 fe" When port is "BUFFER", args is expected to be a decimal byte sequence in the same format as for example coming from one of the other ports. When port is "JLINK", args contains JLinkRTTLogger.exe specific parameters described inside UM08001_JLink.pdf. When port is "STLINK", args has the same format as for "JLINK" When port is "OPENOCD", args is []string{"-f", "openocd.cfg"}
Types ¶
This section is empty.