onlinechecker

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker[T TopicDesc] struct {
	// contains filtered or unexported fields
}

func New

func New[T TopicDesc](config configuration.Config, devicerepo DeviceRepo) (result *Checker[T], err error)

func (*Checker[T]) CheckAndStoreState

func (this *Checker[T]) CheckAndStoreState(desc T, retained bool, payload []byte) (state mgw.State, ignore bool)

func (*Checker[T]) LoadState

func (this *Checker[T]) LoadState(desc T) (state mgw.State, found bool)

func (*Checker[T]) Preprocess

func (this *Checker[T]) Preprocess(topics []T) error

type DeviceRepo

type DeviceRepo interface {
	DeviceRepoForMarshaller
	GetService(deviceTypeId string, localServiceId string) (models.Service, error)
}

type DeviceRepoForMarshaller

type DeviceRepoForMarshaller interface {
	GetCharacteristic(id string) (characteristic models.Characteristic, err error)
	GetConcept(id string) (concept models.Concept, err error)
	GetConceptIdOfFunction(id string) string
	GetAspectNode(id string) (models.AspectNode, error)
}

type Marshaller

type Marshaller struct {
	// contains filtered or unexported fields
}

func NewMarshaller

func NewMarshaller(deviceRepo DeviceRepoForMarshaller) (result *Marshaller, err error)

func (*Marshaller) Unmarshal

func (this *Marshaller) Unmarshal(service models.Service, functionId string, targetCharacteristic string, message map[string]interface{}) (value interface{}, err error)

type TopicDesc

type TopicDesc interface {
	GetLocalServiceId() string
	GetDeviceTypeId() string
	GetLocalDeviceId() string
}

Jump to

Keyboard shortcuts

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