v2

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathNotFoundInMessage = errors.New("path not found in message")

Functions

This section is empty.

Types

type CharacteristicId

type CharacteristicId = string

type CharacteristicsRepo

type CharacteristicsRepo interface {
	GetCharacteristic(id string) (characteristic model.Characteristic, err error)
	GetConcept(id string) (concept model.Concept, err error)
	GetConceptIdOfFunction(id string) string
}

type Converter

type Converter interface {
	Cast(in interface{}, from CharacteristicId, to CharacteristicId) (out interface{}, err error)
	CastWithExtension(in interface{}, from CharacteristicId, to CharacteristicId, extensions []models.ConverterExtension) (out interface{}, err error)
}

type DeviceRepository

type DeviceRepository interface {
	GetAspectNode(id string) (model.AspectNode, error)
}

type Marshaller

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

func New

func New(config config.Config, converter Converter, characteristics CharacteristicsRepo) *Marshaller

func (*Marshaller) GetInputPaths

func (this *Marshaller) GetInputPaths(service model.Service, functionId string, aspectNode *model.AspectNode) (result []string)

func (*Marshaller) GetOutputPaths

func (this *Marshaller) GetOutputPaths(service model.Service, functionId string, aspectNode *model.AspectNode) (result []string)

func (*Marshaller) Marshal

func (this *Marshaller) Marshal(protocol model.Protocol, service model.Service, data []model.MarshallingV2RequestData) (result map[string]string, err error)

func (*Marshaller) SortPathsByAspectDistance

func (this *Marshaller) SortPathsByAspectDistance(repo DeviceRepository, service model.Service, aspect *model.AspectNode, paths []string) (result []string, err error)

func (*Marshaller) Unmarshal

func (this *Marshaller) Unmarshal(protocol model.Protocol, service model.Service, characteristicId string, path string, msg map[string]string, outputObjectMap map[string]interface{}) (result interface{}, err error)

type PathAspectInfo

type PathAspectInfo struct {
	Path     string
	Aspect   string
	Distance int
}

Jump to

Keyboard shortcuts

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