resources

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SPECIFICATION_VERSION = "1.0.0"

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

func Max

func Max(x, y int) int

Max returns the larger of x or y.

func StringInSlice

func StringInSlice(a string, list []string) bool

Types

type BindSubscribeEntry

type BindSubscribeEntry struct {
	ClientAddress FeatureAddressType `xml:"clientAddress"`
	ServerAddress FeatureAddressType `xml:"serverAddress"`
}

type BindingManagementRequestCallType

type BindingManagementRequestCallType struct {
	ClientAddress     *FeatureAddressType `xml:"clientAddress"`
	ServerAddress     *FeatureAddressType `xml:"serverAddress"`
	ServerFeatureType string              `xml:"serverFeatureType"`
}

type CmdType

type CmdType struct {
	FunctionName string `xml:"functionName"`
	Function     string `xml:"function"`
}

type ComissioningNewSkis

type ComissioningNewSkis struct {
	Skis    string `xml:"skis"`
	Devices string `xml:"devices"`
}

type DatagramType

type DatagramType struct {
	Header  *HeaderType  `xml:"header"`
	Payload *PayloadType `xml:"payload"`
}

type DescriptionElement

type DescriptionElement struct {
	Label       string `xml:"label"`
	Description string `xml:"description"`
}

type DeviceAddressType

type DeviceAddressType struct {
	Device string `xml:"device"`
}

type DeviceModel

type DeviceModel struct {
	DeviceType    string         `xml:"deviceType"`
	DeviceAddress string         `xml:"deviceAddress"`
	Description   string         `xml:"description"`
	Entities      []*EntityModel `xml:"entities"`
}

func (*DeviceModel) CreateNodeManagement

func (device *DeviceModel) CreateNodeManagement(isGateway bool) *FeatureModel

func (*DeviceModel) MakeHeader

func (device *DeviceModel) MakeHeader(entity int, feature int, addressDestination *FeatureAddressType, cmdClassifier string, msgCounter int, ackRequest bool) *HeaderType

type EntityAddressType

type EntityAddressType struct {
	Device string `xml:"device"`
	Entity int    `xml:"entity"`
}

type EntityModel

type EntityModel struct {
	EntityType    string          `xml:"entityType"`
	EntityAddress int             `xml:"entityAddress"`
	Description   string          `xml:"description"`
	Features      []*FeatureModel `xml:"features"`
}

type FeatureAddressType

type FeatureAddressType struct {
	Device  string `xml:"device"`
	Entity  int    `xml:"entity"`
	Feature int    `xml:"feature"`
}

func MakeFeatureAddress

func MakeFeatureAddress(device string, entity int, feature int) *FeatureAddressType

type FeatureModel

type FeatureModel struct {
	FeatureType      string           `xml:"featureType"`
	FeatureAddress   int              `xml:"featureAddress"`
	Role             string           `xml:"role"`
	Description      string           `xml:"description"`
	Functions        []*FunctionModel `xml:"functions"`
	BindingTo        []string
	SubscriptionTo   []string
	MaxBindings      int
	MaxSubscriptions int
}

type FunctionElement

type FunctionElement struct {
	Function string `xml:"function"`
}

type FunctionModel

type FunctionModel struct {
	FunctionName string      `xml:"functionName"`
	ChangeNotify Notifier    `xml:"changeNotify"`
	Function     interface{} `xml:"function"`
}

func ActuatorSwitch

func ActuatorSwitch(label string, description string, ChangeNotify Notifier) []*FunctionModel

func Measurement

func Measurement(MeasurementType string, Unit string, ScopeType string, Label string, Description string) []*FunctionModel

type FunctionPropertyType

type FunctionPropertyType struct {
	Function           string `xml:"function"`
	PossibleOperations string `xml:"possibleOperations"`
}

type HeaderType

type HeaderType struct {
	SpecificationVersion string              `xml:"specificationVersion"`
	AddressSource        *FeatureAddressType `xml:"addressSource"`
	AddressDestination   *FeatureAddressType `xml:"addressDestination"`
	MsgCounter           int                 `xml:"msgCounter"`
	CmdClassifier        string              `xml:"cmdClassifier"`
	Timestamp            string              `xml:"timestamp"`
	AckRequest           bool                `xml:"ackRequest"`
}

type MeasurementDataType

type MeasurementDataType struct {
	ValueType        string         `xml:"valueType"`
	Timestamp        string         `xml:"timestamp"`
	Value            float64        `xml:"value"`
	EvaluationPeriod TimePeriodType `xml:"evaluationPeriod"`
	ValueSource      string         `xml:"valueSource"`
	ValueTendency    string         `xml:"valueTendency"`
	ValueState       string         `xml:"valueState"`
}

type MeasurementDescriptionDataType

type MeasurementDescriptionDataType struct {
	MeasurementType string `xml:"measurementType"`
	Unit            string `xml:"unit"`
	ScopeType       string `xml:"scopeType"`
	Label           string `xml:"label"`
	Description     string `xml:"description"`
}

type NetworkManagementDeviceDescriptionDataType

type NetworkManagementDeviceDescriptionDataType struct {
	DeviceAddress *DeviceAddressType `xml:"deviceAddress"`
	DeviceType    string             `xml:"deviceType"`
	Description   string             `xml:"description"`
}

type NetworkManagementEntityDescritpionDataType

type NetworkManagementEntityDescritpionDataType struct {
	EntityAddress *EntityAddressType `xml:"entityAddress"`
	EntityType    string             `xml:"entityType"`
	Description   string             `xml:"description"`
}

type NetworkManagementFeatureInformationType

type NetworkManagementFeatureInformationType struct {
	FeatureAddress    *FeatureAddressType   `xml:"featureAddress"`
	FeatureType       string                `xml:"featureType"`
	Role              string                `xml:"role"`
	SupportedFunction *FunctionPropertyType `xml:"supportedFunction"`
	Description       string                `xml:"description"`
}

type NodeManagementBindingData

type NodeManagementBindingData struct {
	BindingEntries []*BindSubscribeEntry `xml:"bindingEntries"`
}

type NodeManagementBindingRequestCall

type NodeManagementBindingRequestCall struct {
	BindingRequest *BindingManagementRequestCallType `xml:"bindingRequest"`
}

type NodeManagementDetailedDiscovery

type NodeManagementDetailedDiscovery struct {
	SpecificationVersionList []*NodeManagementSpecificationVersionListType            `xml:"specificationVersionList"`
	DeviceInformation        *NodeManagementDetailedDiscoveryDeviceInformationType    `xml:"deviceInformation"`
	EntityInformation        []*NodeManagementDetailedDiscoveryEntityInformationType  `xml:"entityInformation"`
	FeatureInformation       []*NodeManagementDetailedDiscoveryFeatureInformationType `xml:"featureInformation"`
}

type NodeManagementDetailedDiscoveryDeviceInformationType

type NodeManagementDetailedDiscoveryDeviceInformationType struct {
	Description *NetworkManagementDeviceDescriptionDataType `xml:"description"`
}

type NodeManagementDetailedDiscoveryEntityInformationType

type NodeManagementDetailedDiscoveryEntityInformationType struct {
	Description *NetworkManagementEntityDescritpionDataType `xml:"description"`
}

type NodeManagementDetailedDiscoveryFeatureInformationType

type NodeManagementDetailedDiscoveryFeatureInformationType struct {
	Description *NetworkManagementFeatureInformationType `xml:"description"`
}

type NodeManagementSpecificationVersionListType

type NodeManagementSpecificationVersionListType struct {
	SpecificationVersion string `xml:"specificationVersion"`
}

type NodeManagementSubscriptionData

type NodeManagementSubscriptionData struct {
	SubscriptionEntries []*BindSubscribeEntry `xml:"subscriptionEntries"`
}

type NodeManagementSubscriptionRequestCall

type NodeManagementSubscriptionRequestCall struct {
	SubscriptionRequest *SubscriptionManagementRequestCallType `xml:"subscriptionRequest"`
}

type Notifier

type Notifier func(string, string, FeatureAddressType)

type PayloadType

type PayloadType struct {
	Cmd *CmdType `xml:"cmd"`
}

func MakePayload

func MakePayload(FunctionName string, Function interface{}) *PayloadType

type ResultElement

type ResultElement struct {
	ErrorNumber int    `xml:"errorNumber"`
	Description string `xml:"description"`
}

func ResultData

func ResultData(errorNumber int, description string) *ResultElement

type SubscriptionManagementRequestCallType

type SubscriptionManagementRequestCallType struct {
	ClientAddress     *FeatureAddressType `xml:"clientAddress"`
	ServerAddress     *FeatureAddressType `xml:"serverAddress"`
	ServerFeatureType string              `xml:"serverFeatureType"`
}

type TimePeriodType

type TimePeriodType struct {
	StartTime string `xml:"startTime"`
	EndTime   string `xml:"endTime"`
}

Jump to

Keyboard shortcuts

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