device

package
v2.25.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDeviceByName

func FindDeviceByName(ctx context.Context, name string, getResourceOpts ...GetResourceOpts) (deviceID string, _ error)

Types

type BaseDevice

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

func MakeBaseDevice

func MakeBaseDevice(id, name string) BaseDevice

func (*BaseDevice) GetID

func (bd *BaseDevice) GetID() string

func (*BaseDevice) GetName

func (bd *BaseDevice) GetName() string

func (*BaseDevice) GetSDKClientOptions

func (bd *BaseDevice) GetSDKClientOptions() []sdk.Option

func (*BaseDevice) SetID

func (bd *BaseDevice) SetID(id string)

type Device

type Device interface {
	// GetType returns device type
	GetType() Type

	// GetID returns device ID
	GetID() string

	// SetID sets device ID
	SetID(id string)

	// GetName returns device name
	GetName() string

	// GetRetryInterval returns retry interval of the device before retrying provisioning
	GetRetryInterval(attempt int) time.Duration

	// GetDefaultResources returns default device resources
	GetDefaultResources() schema.ResourceLinks

	// GetSDKClientOptions returns options for the SDK client used with this device
	GetSDKClientOptions() []sdk.Option
}

type GetResourceOpts added in v2.19.0

type GetResourceOpts func(*core.Device) deviceCoap.OptionFunc

type Type

type Type int
const (
	OCF Type = iota
	Bridged
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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