device

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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