Documentation ¶
Index ¶
- func NewFirmware(sFile, dFile string) (dc.Firmware, error)
- func NewSchedule(networkName string, deviceID string, transport dc.OTATransport, ...) dc.Schedule
- func NewSchedulerProvider(dfg cc.Config, otas OTAInteractor, r dc.Repository) dc.SchedulerProvider
- func Start(dfg cc.Config, s OTAInteractor, r dc.Repository) dc.SchedulerProvider
- func Stop()
- type OTAInteractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFirmware ¶
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 ¶
func Start(dfg cc.Config, s OTAInteractor, r dc.Repository) dc.SchedulerProvider
*
- Start() *
- Initialize 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
Click to show internal directories.
Click to hide internal directories.