plugins

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPlugin

func AddPlugin(adaptors *adaptors.Adaptors, name string, opts ...m.AttributeValue) (err error)

AddPlugin ...

func AddScript added in v0.5.2

func AddScript(name, src string, adaptors *adaptors.Adaptors, scriptService scripts.ScriptService) (script *m.Script, err error)

AddScript ...

func AddTask added in v0.12.0

func AddTask(newTask *m.NewTask, adaptors *adaptors.Adaptors, eventBus bus.Bus) (task1Id int64, err error)

func AddTrigger added in v0.12.0

func AddTrigger(trigger *m.NewTrigger, adaptors *adaptors.Adaptors, eventBus bus.Bus) (id int64, err error)

func GetNewBitmineL3

func GetNewBitmineL3(name string) *m.Entity

GetNewBitmineL3 ...

func GetNewButton

func GetNewButton(id string, scripts []*m.Script) *m.Entity

GetNewButton ...

func GetNewModbusRtu

func GetNewModbusRtu(name string) *m.Entity

GetNewModbusRtu ...

func GetNewModbusTcp

func GetNewModbusTcp(name string) *m.Entity

GetNewModbusTcp ...

func GetNewMoon

func GetNewMoon(name string) *m.Entity

GetNewMoon ...

func GetNewNode

func GetNewNode(name string) *m.Entity

GetNewNode ...

func GetNewPlug

func GetNewPlug(id string, scrits []*m.Script) *m.Entity

GetNewPlug ...

func GetNewScene

func GetNewScene(id string, scripts []*m.Script) *m.Entity

GetNewScene ...

func GetNewSensor

func GetNewSensor(name string) *m.Entity

GetNewSensor ...

func GetNewSun

func GetNewSun(name string) *m.Entity

GetNewSun ...

func GetNewTelegram

func GetNewTelegram(name string) *m.Entity

GetNewTelegram ...

func GetNewWeatherMet added in v0.9.0

func GetNewWeatherMet(name string) *m.Entity

GetNewWeatherMet ...

func GetPort

func GetPort() int64

GetPort ...

func MockHttpServer

func MockHttpServer(ctx context.Context, ip string, port int64, payload []byte) (err error)

MockHttpServer ...

func MockTCPServer

func MockTCPServer(ctx context.Context, ip string, port int64, payloads ...[]byte) (err error)

MockTCPServer ...

func RegisterConvey

func RegisterConvey(scriptService scripts.ScriptService, ctx convey.C)

RegisterConvey ...

func Wait

func Wait(timeOut time.Duration, ch chan interface{}) (ok bool)

Wait ...

func WaitEntity added in v0.16.1

func WaitEntity(eventBus bus.Bus, timeOut time.Duration, entities ...string) (result chan bool)

func WaitGroupTimeout added in v0.15.0

func WaitGroupTimeout(wg *sync.WaitGroup, timeOut time.Duration) bool

func WaitMessage added in v0.16.1

func WaitMessage[T events.EventStateChanged | events.EventTriggerCompleted | events.EventTriggerLoaded](
	eventBus bus.Bus, timeOut time.Duration, topic string, options ...interface{},
) (msg T, ok bool)

func WaitPlugins added in v0.16.1

func WaitPlugins(eventBus bus.Bus, timeOut time.Duration, plugins ...string) (result chan bool)

func WaitService added in v0.16.1

func WaitService(eventBus bus.Bus, timeOut time.Duration, services ...string) (result chan bool)

func WaitT added in v0.15.0

func WaitT[T events.EventTriggerLoaded | events.EventTriggerCompleted | events.EventStateChanged | alexa.EventAlexaAction | []byte | struct{}](timeOut time.Duration, ch chan T) (v T, ok bool)

WaitT ...

func WaitTask added in v0.16.1

func WaitTask(eventBus bus.Bus, timeOut time.Duration, tasks ...int64) (result chan bool)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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