Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { Bootloader *string Debug *extenders.DebugConfig IsRouter bool `yaml:"is_router"` FactoryResetButton string `yaml:"factory_reset_button"` NetworkStateLED string `yaml:"network_state_led"` LEDs types.PinWithIDSlice // Buttons provide definitions(or references) to board buttons. // They will be used in other configuration places to // reference specific button. Buttons types.PinWithIDSlice I2C []extenders.I2CInstance UART []extenders.UARTInstance }
type Device ¶
func ParseFromFile ¶
func (*Device) PrependCommonClusters ¶
func (d *Device) PrependCommonClusters()
PrependCommonClusters adds common device clusters as first endpoint.
This allows to have dynamic set of common device clusters, such as Identify(server), basic, poll control, etc.
FIXME: It is mostly a "workaround" to simplify device endpoint generation. While the solution is sound to me, the implementation of this function is questionable. Should it be here? Should it look like this? Should this common clusters be a sensor, rather then converting templates to handle endpoints rather than sensors directly?
func (*Device) UnmarshalYAML ¶
UnamrshalYAML is implemented to intercept the original configuration file and resolve any known tags inside.
type General ¶
type General struct { NCSToolChainBase string `yaml:"ncs_toolchain_base"` NCSVersion string `yaml:"ncs_version"` ZephyrBase string `yaml:"zephyr_base"` Manufacturer string `yaml:"manufacturer"` DeviceName string `yaml:"device_name"` // Zephyr name for the board Board string RunEvery time.Duration // ZigbeeChannels will define which endpoints device should try to use. // By default device will try all available channels. ZigbeeChannels []int `yaml:"zigbee_channels"` // Flasher defines the way the board should be flashed. Flasher string FlasherOptions map[string]any }
func (General) GetToochainsPath ¶
func (g General) GetToochainsPath() NCSLocation
type NCSLocation ¶
func FindNCSLocation ¶
func FindNCSLocation(ncsBase, version string) (NCSLocation, error)
FindNCSLocation will return paths for NCS and Zephyr toolchains.
If toolchain of required version was not found - it will try to use default version from toolchain file, and if it is not present - latest available in list of toolchains.
As such this function can return different toolchain version that was requested, and caller can check it by comparing to version returned in NCSLocation.