indiclient

package
v0.0.0-...-04cf83a Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAttrs

type BaseAttrs struct {
	Name  string `xml:"name,attr"`
	Label string `xml:"label,attr"`
}

type Client

type Client struct {
	Properties Properties
	// contains filtered or unexported fields
}

func New

func New(address string) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) GetProperties

func (c *Client) GetProperties() error

type DefNumber

type DefNumber struct {
	XMLName xml.Name `xml:"defNumber"`
	Format  string   `xml:"format,attr"`
	Min     string   `xml:"min,attr"`
	Max     string   `xml:"max,attr"`
	Step    string   `xml:"step,attr"`
	Value   int      `xml:",chardata"`
	BaseAttrs
}

type DefNumberVector

type DefNumberVector struct {
	XMLName   xml.Name    `xml:"defNumberVector"`
	DefNumber []DefNumber `xml:"defNumber"`
	VectorAttrs
}

type DefSwitch

type DefSwitch struct {
	XMLName xml.Name `xml:"defSwitch"`
	Value   string   `xml:",chardata"`
	BaseAttrs
}

type DefSwitchVector

type DefSwitchVector struct {
	XMLName   xml.Name    `xml:"defSwitchVector"`
	Rule      string      `xml:"rule,attr"`
	DefSwitch []DefSwitch `xml:"defSwitch"`
	VectorAttrs
}

type DefText

type DefText struct {
	XMLName xml.Name `xml:"defText"`
	Value   string   `xml:",chardata"`
	BaseAttrs
}

type DefTextVector

type DefTextVector struct {
	XMLName xml.Name  `xml:"defTextVector"`
	DefText []DefText `xml:"defText"`
	VectorAttrs
}

type Properties

type Properties []Property

func (Properties) GetDeviceGroupsSorted

func (p Properties) GetDeviceGroupsSorted(device string) []string

func (Properties) GetDevicesSorted

func (p Properties) GetDevicesSorted() []string

func (Properties) GetPropertiesForDeviceGroup

func (p Properties) GetPropertiesForDeviceGroup(device, group string) Properties

type Property

type Property struct {
	Device    string
	Group     string
	Type      PropertyType
	Name      string
	Label     string
	State     string
	Perm      string
	Timeout   int
	Timestamp string
	Rule      string
	Values    []Value
}

type PropertyType

type PropertyType int64
const (
	Number PropertyType = iota
	Switch
	Text
)

type Trimmer

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

Trimmer is used to remove blank space from received XML

func (Trimmer) Token

func (tr Trimmer) Token() (xml.Token, error)

type Value

type Value struct {
	Name  string
	Label string
	Value string
}

type VectorAttrs

type VectorAttrs struct {
	Device    string `xml:"device,attr"`
	Group     string `xml:"group,attr"`
	State     string `xml:"state,attr"`
	Perm      string `xml:"perm,attr"`
	Timeout   int    `xml:"timeout,attr"`
	Timestamp string `xml:"timestamp,attr"`
	BaseAttrs
}

Jump to

Keyboard shortcuts

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