interfaces

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComFactory

type ComFactory func(ctx context.Context, config configuration.Config, responseListener func(msg messages.ProtocolMsg) error, errorListener func(msg messages.ProtocolMsg) error) (producer Producer, err error)

type Iot

type Iot interface {
	ListFunctions(token string) (functionInfos []model.Function, err error)
	GetFunction(token string, id string) (result model.Function, err error)
	GetConcept(token string, id string) (result model.Concept, err error)
	GetCharacteristic(token string, id string) (result model.Characteristic, err error)
	GetDevice(token string, id string) (result model.Device, err error)
	GetProtocol(token string, id string) (result model.Protocol, err error)
	GetService(token string, device model.Device, id string) (result model.Service, err error)
	GetDeviceType(token string, id string) (result model.DeviceType, err error)
	GetDeviceGroup(token string, id string) (result model.DeviceGroup, err error)
	GetAspectNode(token string, id string) (model.AspectNode, error)
	GetConceptIds(token string) ([]string, error)
}

type IotFactory

type IotFactory func(ctx context.Context, config configuration.Config) (Iot, error)

type Marshaller

type Marshaller interface {
	MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, characteristicData interface{}, configurables []marshaller.Configurable) (result map[string]string, err error)
	UnmarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, message map[string]string, hints []string) (characteristicData interface{}, err error)

	MarshalV2(service model.Service, protocol model.Protocol, data []marshaller.MarshallingV2RequestData) (result map[string]string, err error)
	UnmarshalV2(request marshaller.UnmarshallingV2Request) (characteristicData interface{}, err error)
}

type MarshallerFactory

type MarshallerFactory func(ctx context.Context, config configuration.Config, iot Iot) (Marshaller, error)

type Producer

type Producer interface {
	SendCommand(msg messages.ProtocolMsg) (err error)
}

type Timescale

type Timescale interface {
	Query(token auth.Token, request []TimescaleRequest, timeout time.Duration) (result []TimescaleResponse, err error)
}

type TimescaleFactory

type TimescaleFactory func(ctx context.Context, config configuration.Config) (Timescale, error)

type TimescaleRequest

type TimescaleRequest struct {
	Device     model.Device
	Service    model.Service
	ColumnName string
}

type TimescaleResponse

type TimescaleResponse struct {
	Time  *string     `json:"time"`
	Value interface{} `json:"value"`
}

Jump to

Keyboard shortcuts

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