devicetwin

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//EventActionMap map for event to action
	EventActionMap map[string]map[string]string
	//ActionModuleMap map for action to module
	ActionModuleMap map[string]string
)

Functions

func Register added in v1.1.0

func Register(deviceTwin *v1alpha2.DeviceTwin, nodeName string)

Register register devicetwin

func SyncDeviceFromSqlite

func SyncDeviceFromSqlite(context *dtcontext.DTContext, deviceID string) error

SyncDeviceFromSqlite sync device from sqlite

func SyncSqlite

func SyncSqlite(context *dtcontext.DTContext) error

SyncSqlite sync sqlite

Types

type DeviceTwin

type DeviceTwin struct {
	HeartBeatToModule map[string]chan interface{}
	DTContexts        *dtcontext.DTContext
	DTModules         map[string]dtmodule.DTModule
	// contains filtered or unexported fields
}

DeviceTwin the module

func (*DeviceTwin) Enable added in v1.2.0

func (dt *DeviceTwin) Enable() bool

Enable indicates whether this module is enabled

func (*DeviceTwin) Group

func (dt *DeviceTwin) Group() string

Group get group of the module

func (*DeviceTwin) Name

func (dt *DeviceTwin) Name() string

Name get name of the module

func (*DeviceTwin) RegisterDTModule added in v1.2.0

func (dt *DeviceTwin) RegisterDTModule(name string)

RegisterDTModule register dtmodule

func (*DeviceTwin) Start

func (dt *DeviceTwin) Start()

Start run the module

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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