Documentation
¶
Overview ¶
Package xmlsrvdesc contains the XML data structures used in SCPD (Service Control Protocol Description).
Described in section 2.5 of https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Optional PresenceBool Name string `xml:"name"` Arguments []*Argument `xml:"argumentList>argument"` }
Action XML description data.
type AllowedValueRange ¶
type AllowedValueRange struct { Minimum string `xml:"minimum"` Maximum string `xml:"maximum"` Step string `xml:"step"` }
AllowedValueRange XML data.
func (*AllowedValueRange) Clean ¶
func (r *AllowedValueRange) Clean()
Clean removes stray whitespace in the structure.
type Argument ¶
type Argument struct { Name string `xml:"name"` Direction string `xml:"direction"` // in|out RelatedStateVariable string `xml:"relatedStateVariable"` // ? Retval string `xml:"retval"` // ? }
Argument XML data.
type PresenceBool ¶
type PresenceBool bool
PresenceBool represents an empty XML element that is true if present.
Is an error if it contains any attributes or contents.
func (*PresenceBool) UnmarshalXML ¶
func (pb *PresenceBool) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type SCPD ¶
type SCPD struct { XMLName xml.Name `xml:"scpd"` ConfigId string `xml:"configId,attr"` SpecVersion SpecVersion `xml:"specVersion"` Actions []*Action `xml:"actionList>action"` StateVariables []*StateVariable `xml:"serviceStateTable>stateVariable"` }
SCPD is the top level XML service description.
type SpecVersion ¶
SpecVersion is part of a SCPD document, describes the version of the specification that the data adheres to.
type StateVariable ¶
type StateVariable struct { Optional PresenceBool Name string `xml:"name"` SendEvents string `xml:"sendEvents,attr"` // yes|no Multicast string `xml:"multicast,attr"` // yes|no DataType DataType `xml:"dataType"` DefaultValue string `xml:"defaultValue"` AllowedValueRange *AllowedValueRange `xml:"allowedValueRange"` AllowedValues []string `xml:"allowedValueList>allowedValue"` }
StateVariable XML data.
func (*StateVariable) Clean ¶
func (v *StateVariable) Clean()
Clean removes stray whitespace in the structure.