Movatterモバイル変換


[0]ホーム

URL:


cores

package
v1.3.1Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License:GPL-3.0Imports:23Imported by:0

Details

Repository

github.com/arduino/arduino-cli

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcGetMonitorSettings

func GetMonitorSettings(protocolstring, boardProperties *properties.Map) *properties.Map

GetMonitorSettings returns the settings for the pluggable monitor of the given protocoland set of board properties.

Types

typeBoard

type Board struct {BoardIDstringProperties      *properties.Map  `json:"-"`PlatformRelease *PlatformRelease `json:"-"`// contains filtered or unexported fields}

Board represents a board loaded from an installed platform

func (*Board)FQBN

func (b *Board) FQBN()string

FQBN return the Fully-Qualified-Board-Name for the default configuration of this board

func (*Board)GeneratePropertiesForConfiguration

func (b *Board) GeneratePropertiesForConfiguration(configstring) (*properties.Map,error)

GeneratePropertiesForConfiguration returns the board properties for a particularconfiguration. The parameter is the latest part of the FQBN, for example ifthe full FQBN is "arduino:avr:mega:cpu=atmega2560" the config part must be"cpu=atmega2560".FIXME: deprecated, use GetBuildProperties instead

func (*Board)GetBuildProperties

func (b *Board) GetBuildProperties(fqbn *fqbn.FQBN) (*properties.Map,error)

GetBuildProperties returns the build properties and the buildplatform for the Board with the configuration passed as parameter.

func (*Board)GetConfigOptionValues

func (b *Board) GetConfigOptionValues(optionstring) *properties.Map

GetConfigOptionValues returns an OrderedMap of possible values for a specific configuratio optionsfor this board. The returned map will have key and value as option value and option value name,respectively.

func (*Board)GetConfigOptions

func (b *Board) GetConfigOptions() *properties.Map

GetConfigOptions returns an OrderedMap of configuration options for this board.The returned map will have key and value as option id and option name, respectively.

func (*Board)GetDefaultProgrammerID

func (b *Board) GetDefaultProgrammerID()string

GetDefaultProgrammerID returns the board's default programmer asdefined in 'programmer.default' property of the board. If the boardhas no default programmer the empty string is returned.

func (*Board)GetIdentificationProperties

func (b *Board) GetIdentificationProperties() []*properties.Map

GetIdentificationProperties calculates and returns a list of properties setscontaining the properties required to identify the board. The returned setsmust not be changed by the caller.

func (*Board)HasUsbID

func (b *Board) HasUsbID(reqVid, reqPidstring)bool

HasUsbID returns true if the board match the usb vid and pid parameters

func (*Board)IdentifyBoardConfiguration

func (b *Board) IdentifyBoardConfiguration(query *properties.Map) *properties.Map

IdentifyBoardConfiguration returns the configuration of the board that can bededuced from the given upload port identification properties

func (*Board)IsBoardMatchingIDProperties

func (b *Board) IsBoardMatchingIDProperties(query *properties.Map)bool

IsBoardMatchingIDProperties returns true if the board match the givenupload port identification properties

func (*Board)IsHidden

func (b *Board) IsHidden()bool

IsHidden returns true if the board is marked as hidden in the platform

func (*Board)Name

func (b *Board) Name()string

Name returns the board name as defined in boards.txt properties

func (*Board)String

func (b *Board) String()string

typeBoardManifest

type BoardManifest struct {Namestring             `json:"-"`ID   []*BoardManifestID `json:"-"`}

BoardManifest contains information about a board. These metadata are usuallyprovided by the package_index.json

func (*BoardManifest)HasUsbID

func (bm *BoardManifest) HasUsbID(vid, pidstring)bool

HasUsbID returns true if the BoardManifes contains the specified USB id asidentification for this board. usbID should be in the format "0000:0000"

typeBoardManifestID

type BoardManifestID struct {USBstring `json:"-"`}

BoardManifestID contains information on how to identify a board. These metadataare usually provided by the package_index.json

typeDiscoveryDependencies

type DiscoveryDependencies []*DiscoveryDependency

DiscoveryDependencies is a list of DiscoveryDependency

func (DiscoveryDependencies)Sort

func (dDiscoveryDependencies) Sort()

Sort the DiscoveryDependencies by name.

typeDiscoveryDependency

type DiscoveryDependency struct {NamestringPackagerstring}

DiscoveryDependency identifies a specific discovery, version is omittedsince the latest version will always be used

func (*DiscoveryDependency)String

func (d *DiscoveryDependency) String()string

typeFlavor

type Flavor struct {OSstring `json:"os"`// The OS Supported by this flavor.Resource *resources.DownloadResource}

Flavor represents a flavor of a Tool version.

typeMonitorDependencies

type MonitorDependencies []*MonitorDependency

MonitorDependencies is a list of MonitorDependency

func (MonitorDependencies)Sort

func (dMonitorDependencies) Sort()

Sort the DiscoveryDependencies by name.

typeMonitorDependency

type MonitorDependency struct {NamestringPackagerstring}

MonitorDependency identifies a specific monitor, version is omittedsince the latest version will always be used

func (*MonitorDependency)String

func (d *MonitorDependency) String()string

typePackage

type Package struct {Namestring// Name of the package.Maintainerstring// Name of the maintainer.WebsiteURLstring// Website of maintainer.URLstring// origin URL for package index json file.Emailstring// Email of maintainer.Platforms  map[string]*Platform// The platforms in the system.Tools      map[string]*Tool// The tools in the system.HelpPackageHelp          `json:"-"`PackagesPackages             `json:"-"`}

Package represents a package in the system.

func (*Package)GetOrCreatePlatform

func (targetPackage *Package) GetOrCreatePlatform(architecturestring) *Platform

GetOrCreatePlatform returns the Platform object with the specified architectureor creates a new one if not found

func (*Package)GetOrCreateTool

func (targetPackage *Package) GetOrCreateTool(namestring) *Tool

GetOrCreateTool returns the Tool object with the specified nameor creates a new one if not found

func (*Package)String

func (targetPackage *Package) String()string

typePackageHelp

type PackageHelp struct {Onlinestring `json:"online,omitempty"`}

PackageHelp contains info on how to reach maintainers for help

typePackages

type Packages map[string]*Package// Maps packager name to Package

Packages represents a set of Packages

funcNewPackages

func NewPackages()Packages

NewPackages creates a new Packages object

func (Packages)GetOrCreatePackage

func (packagesPackages) GetOrCreatePackage(packagerstring) *Package

GetOrCreatePackage returns the specified Package or creates an empty onefilling all the cross-references

func (Packages)GetPackageadded inv1.3.0

func (packagesPackages) GetPackage(packagerstring) (*Package,bool)

GetPackage returns the specified Package if it existsand a boolean indicating whether it was found or not.

func (Packages)GetPlatformReleaseDiscoveryDependencies

func (packagesPackages) GetPlatformReleaseDiscoveryDependencies(release *PlatformRelease) ([]*ToolRelease,error)

GetPlatformReleaseDiscoveryDependencies returns the discovery releases needed by the specified PlatformRelease

func (Packages)GetPlatformReleaseMonitorDependencies

func (packagesPackages) GetPlatformReleaseMonitorDependencies(release *PlatformRelease) ([]*ToolRelease,error)

GetPlatformReleaseMonitorDependencies returns the monitor releases needed by the specified PlatformRelease

func (Packages)GetPlatformReleaseToolDependencies

func (packagesPackages) GetPlatformReleaseToolDependencies(release *PlatformRelease) ([]*ToolRelease,error)

GetPlatformReleaseToolDependencies returns the tool releases needed by the specified PlatformRelease

func (Packages)Names

func (packagesPackages) Names() []string

Names returns the array containing the name of the packages.

typePlatform

type Platform struct {Architecturestring// The name of the architecture of this package.Releases          map[semver.NormalizedString]*PlatformRelease// The Releases of this platform, labeled by version.Package           *Package                                     `json:"-"`ManuallyInstalledbool// true if the Platform has been installed without the CLIDeprecatedbool// true if the latest PlatformRelease of this Platform has been deprecatedIndexedbool// true if the Platform has been indexed from additional-urlsLatest            *semver.Version                              `json:"-"`}

Platform represents a platform package.

func (*Platform)FindReleaseWithVersion

func (platform *Platform) FindReleaseWithVersion(version *semver.Version) *PlatformRelease

FindReleaseWithVersion returns the specified release corresponding the provided version,or nil if not found.

func (*Platform)GetAllCompatibleReleasesVersions

func (platform *Platform) GetAllCompatibleReleasesVersions() []*semver.Version

GetAllCompatibleReleasesVersions returns all the version numbers in this Platform Package that contains compatible tools.

func (*Platform)GetAllInstalled

func (platform *Platform) GetAllInstalled() []*PlatformRelease

GetAllInstalled returns all installed PlatformRelease

func (*Platform)GetAllReleases

func (platform *Platform) GetAllReleases() []*PlatformRelease

GetAllReleases returns all the releases of this platform, or an emptyslice if no releases are available

func (*Platform)GetAllReleasesVersions

func (platform *Platform) GetAllReleasesVersions() []*semver.Version

GetAllReleasesVersions returns all the version numbers in this Platform Package.

func (*Platform)GetLatestCompatibleRelease

func (platform *Platform) GetLatestCompatibleRelease() *PlatformRelease

GetLatestCompatibleRelease returns the latest compatible release of this platform, or nil if nocompatible releases are available.

func (*Platform)GetLatestRelease

func (platform *Platform) GetLatestRelease() *PlatformRelease

GetLatestRelease returns the latest release of this platform, or nil if no releasesare available

func (*Platform)GetOrCreateRelease

func (platform *Platform) GetOrCreateRelease(version *semver.Version) *PlatformRelease

GetOrCreateRelease returns the specified release corresponding the provided version,or creates a new one if not found.

func (*Platform)String

func (platform *Platform) String()string

typePlatformRelease

type PlatformRelease struct {NamestringCategorystringResource              *resources.DownloadResourceVersion               *semver.VersionBoardsManifest        []*BoardManifestToolDependenciesToolDependenciesDiscoveryDependenciesDiscoveryDependenciesMonitorDependenciesMonitorDependenciesDeprecatedboolHelpPlatformReleaseHelp `json:"-"`Platform              *Platform           `json:"-"`Properties            *properties.Map     `json:"-"`Boards                map[string]*Board   `json:"-"`Programmers             map[string]*Programmer        `json:"-"`Menus                   *properties.Map               `json:"-"`InstallDir              *paths.Path                   `json:"-"`Timestamps              *TimestampsStore// Contains the timestamps of the files used to build this PlatformReleaseIsTrustedbool                          `json:"-"`PluggableDiscoveryAwarebool                          `json:"-"`// true if the Platform supports pluggable discovery (no compatibility layer required)Monitors                map[string]*MonitorDependency `json:"-"`MonitorsDevRecipes      map[string]string             `json:"-"`Compatiblebool                          `json:"-"`// true if at all ToolDependencies are available for the current OS/ARCH.// contains filtered or unexported fields}

PlatformRelease represents a release of a plaform package.

func (*PlatformRelease)Dirty

func (release *PlatformRelease) Dirty()bool

Dirty returns true if one of the files of this PlatformRelease has been changed(it means that the PlatformRelease should be rebuilt to be used correctly).

func (*PlatformRelease)GetBoards

func (release *PlatformRelease) GetBoards() []*Board

GetBoards returns the boards in this platforms in the order theyare defined in the platform.txt file.

func (*PlatformRelease)GetLibrariesDir

func (release *PlatformRelease) GetLibrariesDir() *paths.Path

GetLibrariesDir returns the path to the core libraries or nil if notpresent

func (*PlatformRelease)GetOrCreateBoard

func (release *PlatformRelease) GetOrCreateBoard(boardIDstring) *Board

GetOrCreateBoard returns the Board object with the specified boardIDor creates a new one if not found

func (*PlatformRelease)HasMetadata

func (release *PlatformRelease) HasMetadata()bool

HasMetadata returns true if the PlatformRelease installation dir contains the installed.json file

func (*PlatformRelease)IsCompatible

func (release *PlatformRelease) IsCompatible()bool

IsCompatible returns true if all the tools dependencies of a PlatformReleaseare available in the current OS/ARCH.

func (*PlatformRelease)IsInstalled

func (release *PlatformRelease) IsInstalled()bool

IsInstalled returns true if the PlatformRelease is installed

func (*PlatformRelease)MarshalJSON

func (release *PlatformRelease) MarshalJSON() ([]byte,error)

MarshalJSON provides a more user friendly serialization forPlatformRelease objects.

func (*PlatformRelease)RequiresToolRelease

func (release *PlatformRelease) RequiresToolRelease(toolRelease *ToolRelease)bool

RequiresToolRelease returns true if the PlatformRelease requires thetoolReleased passed as parameter

func (*PlatformRelease)RuntimeProperties

func (release *PlatformRelease) RuntimeProperties() *properties.Map

RuntimeProperties returns the runtime properties for this PlatformRelease

func (*PlatformRelease)String

func (release *PlatformRelease) String()string

func (*PlatformRelease)ToRPCPlatformReference

func (release *PlatformRelease) ToRPCPlatformReference() *rpc.InstalledPlatformReference

ToRPCPlatformReference creates a gRPC PlatformReference message out of this PlatformRelease

typePlatformReleaseHelp

type PlatformReleaseHelp struct {Onlinestring `json:"-"`}

PlatformReleaseHelp represents the help URL for this Platform release

typeProgrammer

type Programmer struct {NamestringProperties      *properties.MapPlatformRelease *PlatformRelease}

Programmer represents an external programmer

typeTimestampsStore

type TimestampsStore struct {// contains filtered or unexported fields}

TimestampsStore is a generic structure to store timestamps

funcNewTimestampsStore

func NewTimestampsStore() *TimestampsStore

NewTimestampsStore creates a new TimestampsStore

func (*TimestampsStore)AddFile

func (t *TimestampsStore) AddFile(path *paths.Path)

AddFile adds a file to the TimestampsStore

func (*TimestampsStore)Dirty

func (t *TimestampsStore) Dirty()bool

Dirty returns true if one of the files stored in the TimestampsStore has beenchanged after being added to the store.

typeTool

type Tool struct {Namestring                                   `json:"name"`// The Name of the Tool.Releases map[semver.NormalizedString]*ToolRelease `json:"releases"`// Maps Version to Release.Package  *Package                                 `json:"-"`}

Tool represents a single Tool, part of a Package.

func (*Tool)FindReleaseWithRelaxedVersion

func (tool *Tool) FindReleaseWithRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease

FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version,or nil if not found.

func (*Tool)GetAllReleasesVersions

func (tool *Tool) GetAllReleasesVersions() []*semver.RelaxedVersion

GetAllReleasesVersions returns all the version numbers in this Core Package.

func (*Tool)GetLatestInstalled

func (tool *Tool) GetLatestInstalled() *ToolRelease

GetLatestInstalled returns the latest installed ToolRelease for the Tool, or nil if no releases are installed.

func (*Tool)GetOrCreateRelease

func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolRelease

GetOrCreateRelease returns the ToolRelease object with the specified versionor creates a new one if not found

func (*Tool)LatestRelease

func (tool *Tool) LatestRelease() *ToolRelease

LatestRelease obtains latest version of a core package.

func (*Tool)String

func (tool *Tool) String()string

typeToolDependencies

type ToolDependencies []*ToolDependency

ToolDependencies is a set of tool dependency

func (ToolDependencies)Sort

func (depsToolDependencies) Sort()

Sort sorts the ToolDependencies by name and (if multiple instance of the sametool is required) by version.

typeToolDependency

type ToolDependency struct {ToolNamestringToolVersion  *semver.RelaxedVersionToolPackagerstring}

ToolDependency is a tuple that uniquely identifies a specific version of a Tool

func (*ToolDependency)InternalUniqueIdentifier

func (dep *ToolDependency) InternalUniqueIdentifier(platformIndexURL *url.URL)string

InternalUniqueIdentifier returns the unique identifier for this object

func (*ToolDependency)String

func (dep *ToolDependency) String()string

typeToolRelease

type ToolRelease struct {Version    *semver.RelaxedVersion `json:"version"`// The version number of this Release.Flavors    []*Flavor              `json:"systems"`// Maps OS to FlavorTool       *Tool                  `json:"-"`InstallDir *paths.Path            `json:"-"`}

ToolRelease represents a single release of a tool

func (*ToolRelease)GetCompatibleFlavour

func (tr *ToolRelease) GetCompatibleFlavour() *resources.DownloadResource

GetCompatibleFlavour returns the downloadable resource compatible with the running O.S.

func (*ToolRelease)GetFlavourCompatibleWith

func (tr *ToolRelease) GetFlavourCompatibleWith(osName, osArchstring) *resources.DownloadResource

GetFlavourCompatibleWith returns the downloadable resource compatible with the specified O.S.

func (*ToolRelease)IsInstalled

func (tr *ToolRelease) IsInstalled()bool

IsInstalled returns true if the ToolRelease is installed

func (*ToolRelease)RuntimeProperties

func (tr *ToolRelease) RuntimeProperties() *properties.Map

RuntimeProperties returns the runtime properties for this tool

func (*ToolRelease)String

func (tr *ToolRelease) String()string

Source Files

View all Source files

Directories

PathSynopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp