types

package
v0.0.0-...-bbf7051 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2018 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	BoardId    string
	Properties properties.Map
}

type BufferedUntilNewLineWriter

type BufferedUntilNewLineWriter struct {
	PrintFunc PrintFunc
	Buffer    bytes.Buffer
	// contains filtered or unexported fields
}

func (*BufferedUntilNewLineWriter) Flush

func (w *BufferedUntilNewLineWriter) Flush()

func (*BufferedUntilNewLineWriter) Write

func (w *BufferedUntilNewLineWriter) Write(p []byte) (n int, err error)

type CTag

type CTag struct {
	FunctionName string
	Kind         string
	Line         int
	Code         string
	Class        string
	Struct       string
	Namespace    string
	Filename     string
	Typeref      string
	SkipMe       bool
	Signature    string

	Prototype          string
	Function           string
	PrototypeModifiers string
}

type Command

type Command interface {
	Run(ctx *Context) error
}

type Context

type Context struct {
	// Build options
	HardwareFolders         []string
	ToolsFolders            []string
	LibrariesFolders        []string
	BuiltInLibrariesFolders []string
	OtherLibrariesFolders   []string
	WatchedLocations        []string
	SketchLocation          string
	ArduinoAPIVersion       string
	FQBN                    string
	CodeCompleteAt          string

	// Build options are serialized here
	BuildOptionsJson         string
	BuildOptionsJsonPrevious string

	Hardware       *Packages
	Tools          []*Tool
	TargetBoard    *Board
	TargetPackage  *Package
	TargetPlatform *Platform
	ActualPlatform *Platform
	USBVidPid      string

	PlatformKeyRewrites    PlatforKeysRewrite
	HardwareRewriteResults map[*Platform][]PlatforKeyRewrite

	BuildProperties      properties.Map
	BuildCore            string
	BuildPath            string
	BuildCachePath       string
	SketchBuildPath      string
	CoreBuildPath        string
	CoreBuildCachePath   string
	CoreArchiveFilePath  string
	CoreObjectsFiles     []string
	LibrariesBuildPath   string
	LibrariesObjectFiles []string
	PreprocPath          string
	SketchObjectFiles    []string

	CollectedSourceFiles *UniqueSourceFileQueue

	Sketch          *Sketch
	Source          string
	SourceGccMinusE string
	CodeCompletions string

	WarningsLevel string

	// Libraries handling
	Libraries                  []*Library
	HeaderToLibraries          map[string][]*Library
	ImportedLibraries          []*Library
	LibrariesResolutionResults map[string]LibraryResolutionResult
	IncludeFolders             []string
	OutputGccMinusM            string

	// C++ Parsing
	CTagsOutput                 string
	CTagsTargetFile             string
	CTagsOfPreprocessedSource   []*CTag
	IncludeSection              string
	LineOffset                  int
	PrototypesSection           string
	PrototypesLineWhereToInsert int
	Prototypes                  []*Prototype

	// Verbosity settings
	Verbose           bool
	DebugPreprocessor bool

	// Dry run, only create progress map
	Progress ProgressStruct

	// Contents of a custom build properties file (line by line)
	CustomBuildProperties []string

	DebugLevel int

	// Reuse old tools since the backing storage didn't change
	CanUseCachedTools bool

	// Experimental: use arduino-preprocessor to create prototypes
	UseArduinoPreprocessor bool
	// contains filtered or unexported fields
}

Context structure

func (*Context) ExtractBuildOptions

func (ctx *Context) ExtractBuildOptions() properties.Map

func (*Context) GetLogger

func (ctx *Context) GetLogger() i18n.Logger

func (*Context) InjectBuildOptions

func (ctx *Context) InjectBuildOptions(opts properties.Map)

func (*Context) SetLogger

func (ctx *Context) SetLogger(l i18n.Logger)

type KeyValuePair

type KeyValuePair struct {
	Key   string
	Value string
}

type Library

type Library struct {
	Folder        string
	SrcFolder     string
	UtilityFolder string
	Layout        LibraryLayout
	Name          string
	RealName      string
	Archs         []string
	DotALinkage   bool
	Precompiled   bool
	LDflags       string
	IsLegacy      bool
	Version       string
	Author        string
	Maintainer    string
	Sentence      string
	Paragraph     string
	URL           string
	Category      string
	License       string
	Properties    map[string]string
}

func (*Library) String

func (library *Library) String() string

func (*Library) SupportsArchitectures

func (library *Library) SupportsArchitectures(archs []string) bool

type LibraryLayout

type LibraryLayout uint16
const (
	LIBRARY_FLAT LibraryLayout = 1 << iota
	LIBRARY_RECURSIVE
)

type LibraryResolutionResult

type LibraryResolutionResult struct {
	Library          *Library
	NotUsedLibraries []*Library
}

type Package

type Package struct {
	PackageId  string
	Properties properties.Map
	Platforms  map[string]*Platform
}

type Packages

type Packages struct {
	Properties properties.Map
	Packages   map[string]*Package
}

type PlatforKeyRewrite

type PlatforKeyRewrite struct {
	Key      string
	OldValue string
	NewValue string
}

type PlatforKeysRewrite

type PlatforKeysRewrite struct {
	Rewrites []PlatforKeyRewrite
}

func (*PlatforKeysRewrite) Empty

func (p *PlatforKeysRewrite) Empty() bool

type Platform

type Platform struct {
	PlatformId  string
	Folder      string
	Boards      map[string]*Board
	Properties  properties.Map
	Programmers map[string]properties.Map
}

type PrintFunc

type PrintFunc func([]byte)

type ProgressStruct

type ProgressStruct struct {
	PrintEnabled bool
	Steps        float64
	Progress     float64
}

type Prototype

type Prototype struct {
	FunctionName string
	File         string
	Prototype    string
	Modifiers    string
	Line         int
}

func (*Prototype) String

func (proto *Prototype) String() string

type Sketch

type Sketch struct {
	MainFile         SketchFile
	OtherSketchFiles []SketchFile
	AdditionalFiles  []SketchFile
}

type SketchFile

type SketchFile struct {
	Name   string
	Source string
}

type SketchFileSortByName

type SketchFileSortByName []SketchFile

func (SketchFileSortByName) Len

func (s SketchFileSortByName) Len() int

func (SketchFileSortByName) Less

func (s SketchFileSortByName) Less(i, j int) bool

func (SketchFileSortByName) Swap

func (s SketchFileSortByName) Swap(i, j int)

type SourceFile

type SourceFile struct {
	// Sketch or Library pointer that this source file lives in
	Origin interface{}
	// Path to the source file within the sketch/library root folder
	RelativePath string
}

func MakeSourceFile

func MakeSourceFile(ctx *Context, origin interface{}, path string) (SourceFile, error)

Create a SourceFile containing the given source file path within the given origin. The given path can be absolute, or relative within the origin's root source folder

func (*SourceFile) DepfilePath

func (f *SourceFile) DepfilePath(ctx *Context) string

func (*SourceFile) ObjectPath

func (f *SourceFile) ObjectPath(ctx *Context) string

func (*SourceFile) SourcePath

func (f *SourceFile) SourcePath(ctx *Context) string

type SourceFolder

type SourceFolder struct {
	Folder  string
	Recurse bool
}

func LibraryToSourceFolder

func LibraryToSourceFolder(library *Library) []SourceFolder

type Tool

type Tool struct {
	Name    string
	Version string
	Folder  string
}

type UniqueSourceFileQueue

type UniqueSourceFileQueue []SourceFile

func (*UniqueSourceFileQueue) Empty

func (queue *UniqueSourceFileQueue) Empty() bool

func (UniqueSourceFileQueue) Len

func (queue UniqueSourceFileQueue) Len() int

func (UniqueSourceFileQueue) Less

func (queue UniqueSourceFileQueue) Less(i, j int) bool

func (*UniqueSourceFileQueue) Pop

func (queue *UniqueSourceFileQueue) Pop() SourceFile

func (*UniqueSourceFileQueue) Push

func (queue *UniqueSourceFileQueue) Push(value SourceFile)

func (UniqueSourceFileQueue) Swap

func (queue UniqueSourceFileQueue) Swap(i, j int)

type UniqueStringQueue

type UniqueStringQueue []string

func (*UniqueStringQueue) Empty

func (queue *UniqueStringQueue) Empty() bool

func (UniqueStringQueue) Len

func (queue UniqueStringQueue) Len() int

func (UniqueStringQueue) Less

func (queue UniqueStringQueue) Less(i, j int) bool

func (*UniqueStringQueue) Pop

func (queue *UniqueStringQueue) Pop() interface{}

func (*UniqueStringQueue) Push

func (queue *UniqueStringQueue) Push(value string)

func (UniqueStringQueue) Swap

func (queue UniqueStringQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL