SCPD

package
v0.0.0-...-759385d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

dependence for https://github.com/micmonay/UPnP

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	XMLName   xml.Name    `xml:"action"`
	Name      string      `xml:"name"`
	Arguments []*Argument `xml:"argumentList>argument"`
	// contains filtered or unexported fields
}

Action action

func (*Action) GetArgumentsStateVariable

func (a *Action) GetArgumentsStateVariable(name string) string

GetArgumentsStateVariable return argument with name

func (*Action) GetInArguments

func (a *Action) GetInArguments() []*Argument

GetInArguments return IN argument only

type AllowedValue

type AllowedValue struct {
	XMLName xml.Name `xml:"allowedValue"`
	Value   string   `xml:",innerxml"`
}

AllowedValue value

type AllowedValueRange

type AllowedValueRange struct {
	XMLName xml.Name `xml:"allowedValueRange"`
	Minimum string   `xml:"minimum"`
	Maximum string   `xml:"maximum"`
	Step    string   `xml:"step"`
}

AllowedValueRange value range

type Argument

type Argument struct {
	XMLName              xml.Name `xml:"argument"`
	Name                 string   `xml:"name"`
	Direction            string   `xml:"direction"`
	RelatedStateVariable string   `xml:"relatedStateVariable"`
}

Argument Argument

type SCPD

type SCPD struct {
	URL            string
	XMLName        xml.Name         `xml:"scpd"`
	Actions        []*Action        `xml:"actionList>action"`
	StateVariables []*StateVariable `xml:"serviceStateTable>stateVariable"`
}

SCPD service description

func GetDefinitionService

func GetDefinitionService(url string) (*SCPD, error)

GetDefinitionService get service description

func (*SCPD) GetAction

func (a *SCPD) GetAction(_actionName string) *Action

GetAction get action

func (*SCPD) GetStateVariable

func (a *SCPD) GetStateVariable(_stateVariable string) *StateVariable

GetStateVariable get variable

func (*SCPD) GetTypeValue

func (a *SCPD) GetTypeValue(_stateVariable string) string

GetTypeValue get type for variable

type StateVariable

type StateVariable struct {
	XMLName            xml.Name           `xml:"stateVariable"`
	SendEvents         string             `xml:"sendEvents,attr"`
	Name               string             `xml:"name"`
	DataType           string             `xml:"dataType"`
	Default            string             `xml:"defaultValue"`
	AllowedValues      []*AllowedValue    `xml:"allowedValueList>allowedValue"`
	AllowedValueRanges *AllowedValueRange `xml:"allowedValueRange"`
	// contains filtered or unexported fields
}

StateVariable StateVariable

Jump to

Keyboard shortcuts

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