deviceScheduler

package
v0.0.0-...-12a24cc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFirmware

func NewFirmware(sFile, dFile string) (dc.Firmware, error)

newFirmware Creates Component

func NewSchedule

func NewSchedule(networkName string, deviceID string, transport dc.OTATransport, firmwareEID dc.EID) dc.Schedule

NewSchedule Creates Component Get related device verify OTAEnabled is true [default] if false return error

func NewSchedulerProvider

func NewSchedulerProvider(dfg cc.Config, otas OTAInteractor, r dc.Repository) dc.SchedulerProvider

func Start

*

  • Start() *
  • Initialize this service

func Stop

func Stop()

*

  • Stop
  • Cleans up this service

Types

type OTAInteractor

type OTAInteractor interface {
	EnableTriggers() chan dc.DeviceMessage                                              // open notification and trigger channel
	EnableNotificationsFor(networkName, deviceName string, enabledOrDisable bool) error // watch a device ota progres
	OtaPublish(otaMessage dc.DeviceMessage)                                             // sending a ota
}

* call EnableTriggers() to see messages with ota enabled flags from devices * when triggered send the EnableNotificationFor(..., true), then OtaPublish(ota-payload

Jump to

Keyboard shortcuts

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