dswitch

package
v0.0.0-...-1830482 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Switch

type Switch struct {
	Mac                   string  `json:"mac"`
	Protocol              string  `json:"protocol"`
	IP                    string  `json:"ip"`
	LastSystemUpgradeDate string  `json:"lastUpgradeDate"`
	IsConfigured          *bool   `json:"isConfigured"`
	FriendlyName          string  `json:"friendlyName"`
	DumpFrequency         int     `json:"dumpFrequency"`
	Profil                string  `json:"profil"` //I/O card configuration none/puls
	Label                 *string `json:"label,omitempty"`
}

Switch description

func ToSwitch

func ToSwitch(val interface{}) (*Switch, error)

ToSwitch convert map interface to Switch object

func (Switch) ToJSON

func (status Switch) ToJSON() (string, error)

ToJSON dump switch struct

type SwitchCluster

type SwitchCluster struct {
	Mac string `json:"mac"`
	IP  string `json:"ip"`
}

func ToSwitchCluster

func ToSwitchCluster(val interface{}) (*SwitchCluster, error)

ToSwitchCluster convert map interface to SwitchCluster object

func (SwitchCluster) ToJSON

func (i SwitchCluster) ToJSON() (string, error)

ToJSON dump status struct

type SwitchConfig

type SwitchConfig struct {
	Switch
	Cluster       *int                                 `json:"cluster"`
	ClusterBroker map[string]SwitchCluster             `json:"clusterBroker"`
	Services      map[string]service.Service           `json:"services"`
	Groups        map[int]dgroup.GroupConfig           `json:"groups"`
	LedsSetup     map[string]dled.LedSetup             `json:"ledsSetup"`
	LedsConfig    map[string]dled.LedConf              `json:"ledsConfig"`
	BlindsSetup   map[string]dblind.BlindSetup         `json:"blindsSetup"`
	BlindsConfig  map[string]dblind.BlindConf          `json:"blindsConfig"`
	SensorsSetup  map[string]dsensor.SensorSetup       `json:"sensorsSetup"`
	SensorsConfig map[string]dsensor.SensorConf        `json:"sensorsConfig"`
	HvacsSetup    map[string]dhvac.HvacSetup           `json:"hvacsSetup"`
	HvacsConfig   map[string]dhvac.HvacConf            `json:"hvacsConfig"`
	WagosSetup    map[string]dwago.WagoSetup           `json:"wagosSetup"`
	WagosConfig   map[string]dwago.WagoConf            `json:"wagosConfig"`
	NanosSetup    map[string]dnanosense.NanosenseSetup `json:"nanosSetup"`
	NanosConfig   map[string]dnanosense.NanosenseConf  `json:"nanosConfig"`
	Users         map[string]duser.UserAccess          `json:"users"`
}

SwitchConfig content

func (SwitchConfig) ToJSON

func (config SwitchConfig) ToJSON() (string, error)

ToJSON dump switch config struct

type SwitchConsumptions

type SwitchConsumptions struct {
	TotalPower    int `json:"totalPower"`
	LightingPower int `json:"lightningPower"`
	BlindPower    int `json:"blindPower"`
	HvacPower     int `json:"hvacPower"`
}

type SwitchDefinition

type SwitchDefinition struct {
	IP                    string  `json:"ip"`
	LastSystemUpgradeDate string  `json:"lastUpgradeDate"`
	FriendlyName          string  `json:"friendlyName"`
	DumpFrequency         int     `json:"dumpFrequency"`
	Profil                string  `json:"profil"` //I/O card configuration none/puls
	Cluster               int     `json:"cluster"`
	Label                 *string `json:"label,omitempty"`
	EnergyLeds            int64   `json:"energyLeds"`
	EnergyBlinds          int64   `json:"energyBlinds"`
	EnergyHvacs           int64   `json:"energyHvacs"`
}

SwitchDefinition description

func ToSwitchDefinition

func ToSwitchDefinition(val interface{}) (*SwitchDefinition, error)

ToSwitchDefinition convert map interface to Switch object

func (SwitchDefinition) ToJSON

func (i SwitchDefinition) ToJSON() (string, error)

ToJSON dump status struct

type SwitchStatus

type SwitchStatus struct {
	Switch
	Cluster       int                              `json:"cluster"`
	ErrorCode     *int                             `json:"errorCode"`
	Services      map[string]service.ServiceStatus `json:"services"`
	Leds          map[string]dled.Led              `json:"leds"`
	Sensors       map[string]dsensor.Sensor        `json:"sensors"`
	Blinds        map[string]dblind.Blind          `json:"blinds"`
	Hvacs         map[string]dhvac.Hvac            `json:"hvacs"`
	Wagos         map[string]dwago.Wago            `json:"wagos"`
	Nanos         map[string]dnanosense.Nanosense  `json:"nanos"`
	Groups        map[int]dgroup.GroupStatus       `json:"groups"`
	ClusterBroker map[string]SwitchCluster         `json:"clusterBroker"`
	Users         map[string]duser.UserAccess      `json:"users"`
	StatePuls1    int                              `json:"statePuls1"`
	StatePuls2    int                              `json:"statePuls2"`
	StatePuls3    int                              `json:"statePuls3"`
	StatePuls4    int                              `json:"statePuls4"`
	StatePuls5    int                              `json:"statePuls5"`
	StateBaes     int                              `json:"stateBaes"`
	LedsPower     int64                            `json:"ledsPower"`
	BlindsPower   int64                            `json:"blindsPower"`
	HvacsPower    int64                            `json:"hvacsPower"`
	TotalPower    int64                            `json:"totalPower"`
	HvacsEnergy   int64                            `json:"hvacsEnergy"`
	LedsEnergy    int64                            `json:"ledsEnergy"`
	BlindsEnergy  int64                            `json:"blindsEnergy"`
	TotalEnergy   int64                            `json:"totalEnergy"`
}

SwitchStatus description

func ToSwitchStatus

func ToSwitchStatus(val interface{}) (*SwitchStatus, error)

ToSwitchStatus convert map interface to Switch object

func (SwitchStatus) ToJSON

func (status SwitchStatus) ToJSON() (string, error)

ToJSON dump status struct

Jump to

Keyboard shortcuts

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