Documentation ¶
Overview ¶
Package id List is responsible for id List managing
Package id List is responsible for id List managing ¶
Package id List is responsible for id List managing
Index ¶
- Variables
- func CompactSrcs()
- func SubCmdAddToList(w io.Writer, fSys *afero.Afero) (err error)
- func SubCmdIdAdd(w io.Writer, fSys *afero.Afero) error
- func SubCmdIdClean(w io.Writer, fSys *afero.Afero) error
- func SubCmdIdInsert(w io.Writer, fSys *afero.Afero) (e error)
- func SubCmdIdZero(w io.Writer, fSys *afero.Afero) error
- func SubCmdUpdate(w io.Writer, fSys *afero.Afero) error
- type ArrayFlag
- type TriceFmt
- type TriceID
- type TriceIDLookUp
- type TriceIDLookUpLI
- type TriceIDs
- type TriceLI
Constants ¶
This section is empty.
Variables ¶
var ( Verbose bool // Verbose gives more information on output if set. The value is injected from main packages. DryRun bool // DryRun if set, inhibits real changes FnJSON = "til.json" // FnJSON is the filename for the JSON formatted ID list. LIFnJSON string // LIFnJSON is the filename for the JSON formatted location information list. Min = TriceID(1000) // Min is the smallest allowed ID for normal trices. Max = TriceID(7999) // Max is the biggest allowed ID for normal trices. SearchMethod = "random" // SearchMethod is the next ID search method. LiPathIsRelative bool // LiPathIsRelative causes to store relative paths instead of base names only inside li.json. Srcs ArrayFlag // Srcs gets multiple files or directories. IDData idData //matchNumber = regexp.MustCompile(patNumber) //matchIncludeTriceHeader = regexp.MustCompile(patIncludeTriceHeader) ExtendMacrosWithParamCount bool // DefaultTriceBitWidth tells the bit width of TRICE macros having no bit width in their names, like TRICE32 or TRICE8. // // One target can use only one bith width for bare TRICE macros and the setting inside the target code must match DefaultTriceBitWidth. DefaultTriceBitWidth = "32" DefaultStampSize = 32 StampSizeId string )
var Logging bool // Logging is true, when sub command log is active.
var SkipAdditionalChecks bool
Functions ¶
func CompactSrcs ¶ added in v0.67.0
func CompactSrcs()
CompactSrcs adds local dir to Srcs if Srcs is empty and reduces variable Scrs to the minimum to address all intended folders.
func SubCmdAddToList ¶ added in v0.66.0
SubCmdAddToList etends the trice id list by parsing the source tree without changing any source file. It only reads FnJSON and tries to add id:tf pairs from the source tree. If equal tf are found with different ids they are all added. If the same id is found with different tf only one is added. The others are reported as warning. If any TRICE* is found without Id(n) or with Id(0), it is ignored.
func SubCmdIdAdd ¶ added in v0.66.0
SubCmdIdZero performs sub-command zero, setting trice IDs in source tree to 0.
func SubCmdIdClean ¶ added in v0.61.0
SubCmdIdClean performs sub-command clean, zeroing or removing trice IDs from source tree.
func SubCmdIdInsert ¶ added in v0.61.0
SubCmdIdInsert performs sub-command insert, adding trice IDs to source tree.
func SubCmdIdZero ¶ added in v0.61.0
SubCmdIdZero performs sub-command zero, setting trice IDs in source tree to 0.
Types ¶
type ArrayFlag ¶ added in v0.10.0
type ArrayFlag []string
ArrayFlag is a slice type for multi flag
type TriceFmt ¶ added in v0.18.4
type TriceFmt struct { Type string `json:"Type"` // format type (bit-size and number of fmt string parameters) Strg string `json:"Strg"` // format string }
TriceFmt is the trice format information assigned to a trice ID.
type TriceID ¶ added in v0.18.4
type TriceID int
TriceID is the trice ID referencing to Fmt.
type TriceIDLookUp ¶ added in v0.18.4
TriceIDLookUp is the ID-to-TriceFmt info translation map. Different IDs can refer to equal TriceFmt's. It is used during logging. Example: 1:A, 5:C, 7:C An ID can point to one and only format string.
func (TriceIDLookUp) AddFmtCount ¶ added in v0.26.0
func (ilu TriceIDLookUp) AddFmtCount(w io.Writer)
AddFmtCount adds inside ilu to all trice type names without format specifier count the appropriate count. example change: `map[10000:{Trice8_2 hi %03u, %5x} 10001:{TRICE16 hi %03u, %5x}] `map[10000:{Trice8_2 hi %03u, %5x} 10001:{TRICE16_2 hi %03u, %5x}]
func (TriceIDLookUp) FileWatcher ¶ added in v0.18.4
FileWatcher checks the id list file for changes. taken from https://medium.com/@skdomino/watch-this-file-watching-in-go-5b5a247cf71f
func (TriceIDLookUp) FromJSON ¶ added in v0.18.4
func (ilu TriceIDLookUp) FromJSON(b []byte) (err error)
FromJSON converts JSON byte slice to ilu.
type TriceIDLookUpLI ¶ added in v0.53.0
func NewLutLI ¶ added in v0.53.0
NewLutLI returns a look-up map generated from JSON map file named fn.
func (TriceIDLookUpLI) FileWatcher ¶ added in v0.53.0
func (li TriceIDLookUpLI) FileWatcher(w io.Writer, fSys *afero.Afero)
FileWatcher checks the id location information file for changes. taken from https://medium.com/@skdomino/watch-this-file-watching-in-go-5b5a247cf71f
func (TriceIDLookUpLI) FromJSON ¶ added in v0.53.0
func (li TriceIDLookUpLI) FromJSON(b []byte) (err error)
FromJSON converts JSON byte slice to li.