Movatterモバイル変換


[0]ホーム

URL:


libraries

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:12Imported by:0

Details

Repository

github.com/arduino/arduino-cli

Links

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MandatoryProperties = []string{"name", "version", "author", "maintainer"}

MandatoryProperties FIXMEDOC

View Source
var OptionalProperties = []string{"sentence", "paragraph", "url"}

OptionalProperties FIXMEDOC

View Source
var ValidCategories = map[string]bool{"Display":true,"Communication":true,"Signal Input/Output":true,"Sensors":true,"Device Control":true,"Timing":true,"Data Storage":true,"Data Processing":true,"Other":true,"Uncategorized":true,}

ValidCategories FIXMEDOC

Functions

This section is empty.

Types

typeLibrary

type Library struct {NamestringAuthorstringMaintainerstringSentencestringParagraphstringWebsitestringCategorystringArchitectures []stringTypes []string `json:"types,omitempty"`InstallDir             *paths.PathDirNamestringSourceDir              *paths.PathUtilityDir             *paths.PathLocationLibraryLocationContainerPlatform      *cores.PlatformRelease `json:""`LayoutLibraryLayoutDotALinkageboolPrecompiledboolPrecompiledWithSourcesboolLDflagsstringIsLegacyboolInDevelopmentboolVersion                *semver.VersionLicensestringProperties             *properties.MapExamplespaths.PathListCompatibleWith map[string]bool// contains filtered or unexported fields}

Library represents a library in the system

funcLoad

func Load(libDir *paths.Path, locationLibraryLocation) (*Library,error)

Load loads a library from the given LibraryLocation

func (*Library)DeclaredHeaders

func (library *Library) DeclaredHeaders() []string

DeclaredHeaders returns the C++ headers that the library declares in library.properties

func (*Library)IsArchitectureIndependent

func (library *Library) IsArchitectureIndependent()bool

IsArchitectureIndependent returns true if the library declares to becompatible with all architectures (the `architecture` field inlibrary.properties contains the `*` item)

func (*Library)IsCompatibleWith

func (library *Library) IsCompatibleWith(archstring)bool

IsCompatibleWith returns true if the library declares compatibility withthe given architecture. If this function returns false, the library may stillbe compatible with the given architecture, but it's not explicitly declared.

func (*Library)IsOptimizedForArchitecture

func (library *Library) IsOptimizedForArchitecture(archstring)bool

IsOptimizedForArchitecture returns true if the library declares to beexplicitly compatible for a specific architecture (the `architecture` fieldin library.properties contains the architecture passed as parameter)

func (*Library)SourceDirs

func (library *Library) SourceDirs() []SourceDir

SourceDirs return all the source directories of a library

func (*Library)SourceHeaders

func (library *Library) SourceHeaders() ([]string,error)

SourceHeaders returns all the C++ headers in the library even if not declared in library.properties

func (*Library)String

func (library *Library) String()string

func (*Library)SupportsAnyArchitectureIn

func (library *Library) SupportsAnyArchitectureIn(archs ...string)bool

SupportsAnyArchitectureIn returns true if any of the following is true:- the library supports at least one of the given architectures- the library is architecture independent- the library doesn't specify any `architecture` field in library.properties

func (*Library)ToRPCLibrary

func (library *Library) ToRPCLibrary() (*rpc.Library,error)

ToRPCLibrary converts this library into an rpc.Library

typeLibraryLayout

type LibraryLayoutuint16

LibraryLayout represents how the library source code is laid out in the library

const (// FlatLayout is a library without a `src` directoryFlatLayoutLibraryLayout =iota// RecursiveLayout is a library with `src` directory (that allows recursive build)RecursiveLayout)

func (LibraryLayout)MarshalJSON

func (dLibraryLayout) MarshalJSON() ([]byte,error)

MarshalJSON implements the json.Marshaler interface

func (*LibraryLayout)String

func (d *LibraryLayout) String()string

func (*LibraryLayout)ToRPCLibraryLayout

func (d *LibraryLayout) ToRPCLibraryLayout()rpc.LibraryLayout

ToRPCLibraryLayout converts this LibraryLayout to rpc.LibraryLayout

func (*LibraryLayout)UnmarshalJSON

func (d *LibraryLayout) UnmarshalJSON(b []byte)error

UnmarshalJSON implements the json.Unmarshaler interface

typeLibraryLocation

type LibraryLocationint

LibraryLocation represents where the library is installed

const (// IDEBuiltIn are libraries bundled in the IDEIDEBuiltInLibraryLocation =iota// PlatformBuiltIn are libraries bundled in a PlatformReleasePlatformBuiltIn// ReferencedPlatformBuiltIn are libraries bundled in a PlatformRelease referenced for buildReferencedPlatformBuiltIn// User are user installed librariesUser// Unmanaged is for libraries set manually by the user in the CLI command or from the gRPC function.// Ideally it's used for `libraries` outside folders managed by the CLI.Unmanaged// Profile is for libraries that are part of a sketch profileProfile)

The enumeration is listed in ascending order of priority

funcFromRPCLibraryInstallLocation

func FromRPCLibraryInstallLocation(lrpc.LibraryInstallLocation)LibraryLocation

FromRPCLibraryInstallLocation converts a rpc.LibraryInstallLocation to a LibraryLocation

funcFromRPCLibraryLocation

func FromRPCLibraryLocation(lrpc.LibraryLocation)LibraryLocation

FromRPCLibraryLocation converts a rpc.LibraryLocation to a LibraryLocation

func (LibraryLocation)MarshalJSON

func (dLibraryLocation) MarshalJSON() ([]byte,error)

MarshalJSON implements the json.Marshaler interface

func (*LibraryLocation)String

func (d *LibraryLocation) String()string

func (*LibraryLocation)ToRPCLibraryLocation

func (d *LibraryLocation) ToRPCLibraryLocation()rpc.LibraryLocation

ToRPCLibraryLocation converts this LibraryLocation to rpc.LibraryLocation

func (*LibraryLocation)UnmarshalJSON

func (d *LibraryLocation) UnmarshalJSON(b []byte)error

UnmarshalJSON implements the json.Unmarshaler interface

typeList

type List []*Library

List is a list of Libraries

func (*List)Add

func (list *List) Add(libs ...*Library)

Add appends all libraries passed as parameter in the list

func (*List)Contains

func (list *List) Contains(lib *Library)bool

Contains check if a lib is contained in the list

func (*List)FilterByVersionAndInstallLocation

func (list *List) FilterByVersionAndInstallLocation(version *semver.Version, installLocationLibraryLocation)List

FilterByVersionAndInstallLocation returns the libraries matching the provided version and install location. If versionis nil all version are matched.

func (*List)FindByName

func (list *List) FindByName(namestring) *Library

FindByName returns the first library in the list that matchthe specified name or nil if not found

func (*List)Remove

func (list *List) Remove(libraryToRemove *Library)

Remove removes the given library from the list

func (*List)SortByName

func (list *List) SortByName()

SortByName sorts the libraries by name

typeSourceDir

type SourceDir struct {Dir     *paths.PathRecursebool}

SourceDir represents a source dir of a library

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