ccu

package
v0.0.0-...-63b66d1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CcuCallback

type CcuCallback func(dev Device, valueKey string, value interface{})

type CcuClient

type CcuClient interface {
	GetVersion() (version string, err error)
	SetCallback(cb CcuCallback)
	StartCallbackHandler() error
	GetOwnIP() string
	GetDevices() (devices []Device, err error)
	GetDevice(addr string) (device Device, err error)
}

func NewCcuClient

func NewCcuClient(uri string) (ccuc CcuClient, err error)

type CcuClientImpl

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

func (*CcuClientImpl) GetDevice

func (ccuc *CcuClientImpl) GetDevice(addr string) (device Device, err error)

func (*CcuClientImpl) GetDeviceDescription

func (ccuc *CcuClientImpl) GetDeviceDescription(address string) (device *DeviceDescription, err error)

func (*CcuClientImpl) GetDevices

func (ccuc *CcuClientImpl) GetDevices() (devices []Device, err error)

func (*CcuClientImpl) GetLinkDescription

func (ccuc *CcuClientImpl) GetLinkDescription(address string) (paramsetDescription ParamsetDescription, err error)

func (*CcuClientImpl) GetMasterDescription

func (ccuc *CcuClientImpl) GetMasterDescription(address string) (paramsetDescription ParamsetDescription, err error)

func (*CcuClientImpl) GetOwnIP

func (ccuc *CcuClientImpl) GetOwnIP() string

func (*CcuClientImpl) GetParamset

func (ccuc *CcuClientImpl) GetParamset(address, paramsetKey string) (value map[string]interface{}, err error)

func (*CcuClientImpl) GetParamsetDescription

func (ccuc *CcuClientImpl) GetParamsetDescription(address string, paramsetType string) (paramsetDescription ParamsetDescription, err error)

func (*CcuClientImpl) GetParamsetID

func (ccuc *CcuClientImpl) GetParamsetID(address, paramsetType string) (value string, err error)

func (*CcuClientImpl) GetValue

func (ccuc *CcuClientImpl) GetValue(address, valueKey string) (value interface{}, err error)

func (*CcuClientImpl) GetValueDescription

func (ccuc *CcuClientImpl) GetValueDescription(address string) (paramsetDescription ParamsetDescription, err error)

func (*CcuClientImpl) GetVersion

func (ccuc *CcuClientImpl) GetVersion() (version string, err error)

func (*CcuClientImpl) GetWTHs

func (ccuc *CcuClientImpl) GetWTHs() (wths []*WTH, err error)

func (*CcuClientImpl) Init

func (ccuc *CcuClientImpl) Init(url string, interfaceID string) (err error)

func (*CcuClientImpl) ListDevices

func (ccuc *CcuClientImpl) ListDevices() (devices []DeviceDescription, err error)

func (*CcuClientImpl) ListMethods

func (ccuc *CcuClientImpl) ListMethods() (methods []string, err error)

func (*CcuClientImpl) ParseMethodCall

func (ccuc *CcuClientImpl) ParseMethodCall(methodName string, cb xmlrpc.MethodCallParserCB) (err error)

func (*CcuClientImpl) SetCallback

func (ccuc *CcuClientImpl) SetCallback(cb CcuCallback)

func (*CcuClientImpl) SetValue

func (ccuc *CcuClientImpl) SetValue(address, valueKey string, value interface{}) (err error)

func (*CcuClientImpl) StartCallbackHandler

func (ccuc *CcuClientImpl) StartCallbackHandler() error

type CcuMultiClientImpl

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

func (*CcuMultiClientImpl) GetDevice

func (ccumc *CcuMultiClientImpl) GetDevice(addr string) (device Device, err error)

func (*CcuMultiClientImpl) GetDevices

func (ccumc *CcuMultiClientImpl) GetDevices() (devices []Device, err error)

func (*CcuMultiClientImpl) GetOwnIP

func (ccumc *CcuMultiClientImpl) GetOwnIP() string

func (*CcuMultiClientImpl) GetVersion

func (ccumc *CcuMultiClientImpl) GetVersion() (version string, err error)

func (*CcuMultiClientImpl) SetCallback

func (ccumc *CcuMultiClientImpl) SetCallback(cb CcuCallback)

func (*CcuMultiClientImpl) StartCallbackHandler

func (ccumc *CcuMultiClientImpl) StartCallbackHandler() error

type Device

type Device interface {
	Address() string
	Type() string
	GetValue(valueName string) (result interface{}, err error)
	SetValue(valueName string, value interface{}) (err error)
	SetValueIfChanged(valueName string, value interface{}) (changed bool, err error)
	SubDevices() []Device
	GetSubDevice(subdeviceType string) (subdevice Device, err error)
	GetMasterDescription() (paramsetDescription ParamsetDescription, err error)
	GetValueDescription() (paramsetDescription ParamsetDescription, err error)
	GetValues() (value map[string]interface{}, err error)
}

type DeviceDescription

type DeviceDescription struct {
	Type              string   `xmlrpc:"TYPE"`
	Address           string   `xmlrpc:"ADDRESS"`
	RFAddress         int      `xmlrpc:"RF_ADDRESS"`
	Children          []string `xmlrpc:"CHILDREN"`
	Parent            string   `xmlrpc:"PARENT,omitempty"`
	ParentType        string   `xmlrpc:"PARENT_TYPE,omitempty"`
	Index             int      `xmlrpc:"INDEX,omitempty"`
	AESActive         int      `xmlrpc:"AES_ACTIVE"`
	ParamSets         []string `xmlrpc:"PARAMSETS"`
	Firmware          string   `xmlrpc:"FIRMWARE,omitempty"`
	AvailableFirmware string   `xmlrpc:"AVAILABLE_FIRMWARE,omitempty"`
	Updateable        int      `xmlrpc:"UPDATABLE,omitempty"`
	Version           int      `xmlrpc:"VERSION"`
	Flags             int      `xmlrpc:"FLAGS"`
	LinkSourceRoles   string   `xmlrpc:"LINK_SOURCE_ROLES,omitempty"`
	LinkTargetRoles   string   `xmlrpc:"LINK_TARGET_ROLES,omitempty"`
	Direction         int      `xmlrpc:"DIRECTION,omitempty"`
	Group             string   `xmlrpc:"GROUP,omitempty"`
	Team              string   `xmlrpc:"TEAM,omitempty"`
	TeamTag           string   `xmlrpc:"TEAM_TAG,omitempty"`
	TeamChannels      []string `xmlrpc:"TEAM_CHANNELS"`
	Interface         string   `xmlrpc:"INTERFACE,omitempty"`
	Roaming           int      `xmlrpc:"ROAMING,omitempty"`
	RxMode            int      `xmlrpc:"RX_MODE,omitempty"`
}

type HttpHandler

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

func (*HttpHandler) ServeHTTP

func (h *HttpHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ParameterDescription

type ParameterDescription struct {
	Type string `xmlrpc:"TYPE"`
}

type ParamsetDescription

type ParamsetDescription map[string]*ParameterDescription

type WTH

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

func (*WTH) Address

func (dev *WTH) Address() string

func (*WTH) GetMasterDescription

func (dev *WTH) GetMasterDescription() (paramsetDescription ParamsetDescription, err error)

func (*WTH) GetSetpointTemperature

func (wth *WTH) GetSetpointTemperature() (float64, error)

func (*WTH) GetSubDevice

func (dev *WTH) GetSubDevice(subdeviceType string) (subdevice Device, err error)

func (*WTH) GetTemp

func (wth *WTH) GetTemp() (float64, error)

func (*WTH) GetValue

func (dev *WTH) GetValue(valueName string) (result interface{}, err error)

func (*WTH) GetValueDescription

func (dev *WTH) GetValueDescription() (paramsetDescription ParamsetDescription, err error)

func (*WTH) GetValues

func (dev *WTH) GetValues() (values map[string]interface{}, err error)

func (*WTH) Refresh

func (wth *WTH) Refresh() error

func (*WTH) SetValue

func (dev *WTH) SetValue(valueName string, value interface{}) (err error)

func (*WTH) SetValueIfChanged

func (dev *WTH) SetValueIfChanged(valueName string, value interface{}) (changed bool, err error)

func (*WTH) SubDevices

func (dev *WTH) SubDevices() (subdevices []Device)

func (*WTH) Type

func (dev *WTH) Type() string

Jump to

Keyboard shortcuts

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