dserver

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlindCmd

type BlindCmd struct {
	Mac    string `json:"mac"`
	Blind1 *int   `json:"blind1,omitempty"`
	Blind2 *int   `json:"blind2,omitempty"`
	Slat1  *int   `json:"slat1,omitempty"`
	Slat2  *int   `json:"slat2,omitempty"`
}

func ToBlindCmd

func ToBlindCmd(val interface{}) (*BlindCmd, error)

ToBlindCmd convert map interface to ToBlindCmd object

func (BlindCmd) ToJSON

func (m BlindCmd) ToJSON() (string, error)

ToJSON dump BlindCmd struct

type Conf

type Conf struct {
	Leds    []dled.LedConf       `json:"leds"`
	Sensors []dsensor.SensorConf `json:"sensors"`
	Blinds  []dblind.BlindConf   `json:"blinds"`
	Hvacs   []dhvac.HvacConf     `json:"hvacs"`
	Wagos   []dwago.WagoConf     `json:"wagos"`
	Groups  []dgroup.GroupConfig `json:"groups"`
	Switchs []SwitchConfig       `json:"switchs"`
}

type Dump

type Dump struct {
	Leds       []DumpLed       `json:"leds"`
	Sensors    []DumpSensor    `json:"sensors"`
	Blinds     []DumpBlind     `json:"blinds"`
	Hvacs      []DumpHvac      `json:"hvacs"`
	Wagos      []DumpWago      `json:"wagos"`
	Switchs    []DumpSwitch    `json:"switchs"`
	Groups     []DumpGroup     `json:"groups"`
	Frames     []DumpFrame     `json:"frames"`
	Nanosenses []DumpNanosense `json:"nanos"`
}

Dump

type DumpBlind

type DumpBlind struct {
	Ifc    IfcInfo           `json:"ifc"`
	Status dblind.Blind      `json:"status"`
	Config dblind.BlindSetup `json:"config"`
}

DumpBlind

type DumpFrame

type DumpFrame struct {
	Ifc    IfcInfo     `json:"ifc"`
	Config Frame       `json:"config"`
	Status FrameStatus `json:"status"`
}

DumpFrame

type DumpGroup

type DumpGroup struct {
	Status dgroup.GroupStatus `json:"status"`
	Config dgroup.GroupConfig `json:"config"`
}

DumpSwitch

type DumpHvac

type DumpHvac struct {
	Ifc    IfcInfo         `json:"ifc"`
	Status dhvac.Hvac      `json:"status"`
	Config dhvac.HvacSetup `json:"config"`
}

DumpHvac

type DumpLed

type DumpLed struct {
	Ifc    IfcInfo       `json:"ifc"`
	Status dled.Led      `json:"status"`
	Config dled.LedSetup `json:"config"`
}

DumpLed

type DumpNanosense

type DumpNanosense struct {
	Ifc    IfcInfo                   `json:"ifc"`
	Status dnanosense.Nanosense      `json:"status"`
	Config dnanosense.NanosenseSetup `json:"config"`
}

DumpNano

type DumpSensor

type DumpSensor struct {
	Ifc    IfcInfo             `json:"ifc"`
	Status dsensor.Sensor      `json:"status"`
	Config dsensor.SensorSetup `json:"config"`
}

DumpSensor

type DumpSwitch

type DumpSwitch struct {
	Ifc    IfcInfo      `json:"ifc"`
	Status SwitchDump   `json:"status"`
	Config SwitchConfig `json:"config"`
}

DumpSwitch

type DumpWago

type DumpWago struct {
	Ifc    IfcInfo         `json:"ifc"`
	Status dwago.Wago      `json:"status"`
	Config dwago.WagoSetup `json:"config"`
}

DumpWago

type Frame

type Frame struct {
	Label        string `json:"label"`
	FriendlyName string `json:"friendlyName"`
	Cluster      int    `json:"cluster"`
}

Frame represent device object in the building map

func ToFrame

func ToFrame(val interface{}) (*Frame, error)

ToFrame convert map interface to Model object

func (Frame) ToJSON

func (m Frame) ToJSON() (string, error)

ToJSON dump Model struct

type FrameStatus

type FrameStatus struct {
	Label        string `json:"label"`
	FriendlyName string `json:"friendlyName"`
	Cluster      int    `json:"cluster"`
	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"`
	Profil       string `json:"profil"`
	Error        int    `json:"error"`
}

type GroupCmd

type GroupCmd struct {
	Group              int   `json:"group"`
	Auto               *bool `json:"auto"`
	SetpointLeds       *int  `json:"setpointLeds,omitempty"`
	SetpointBlinds     *int  `json:"setpointBlinds,omitempty"`
	SetpointSlats      *int  `json:"setpointSlats,omitempty"`
	SetpointTempOffset *int  `json:"setpointTempOffset,omitempty"` //temperature offset
}

func ToGroupCmd

func ToGroupCmd(val interface{}) (*GroupCmd, error)

ToGroupCmd convert map interface to ToGroupCmd object

func (GroupCmd) ToJSON

func (m GroupCmd) ToJSON() (string, error)

ToJSON dump GroupCmd struct

type HvacCmd

type HvacCmd struct {
	Mac       string `json:"mac"`
	ShiftTemp int    `json:"shiftTemp"`
}

func ToHvacCmd

func ToHvacCmd(val interface{}) (*HvacCmd, error)

ToHvacCmd convert map interface to HvacCmd object

func (HvacCmd) ToJSON

func (m HvacCmd) ToJSON() (string, error)

ToJSON dump HvacCmd struct

type IfcInfo

type IfcInfo struct {
	Label          string `json:"label"` //cable label
	ModelName      string `json:"modelName"`
	Mac            string `json:"mac"` //device Mac address
	Vendor         string `json:"vendor"`
	URL            string `json:"url"`
	ProductionYear string `json:"productionYear"`
	DeviceType     string `json:"deviceType"`
	ModbusID       *int   `json:"modbusID,omitempty"`
	SlaveID        *int   `json:"slaveID,omitempty"`
}

IfcInfo ifc component description

type LedCmd

type LedCmd struct {
	Mac      string `json:"mac"`
	Auto     bool   `json:"auto"`
	Setpoint int    `json:"setpoint"`
}

func ToLedCmd

func ToLedCmd(val interface{}) (*LedCmd, error)

ToLedCmd convert map interface to ToLedCmd object

func (LedCmd) ToJSON

func (m LedCmd) ToJSON() (string, error)

ToJSON dump LedCmd struct

type Server

type Server struct {
	Mac      string `json:"mac"`
	Protocol string `json:"protocol"`
	IP       string `json:"ip"`
}

Server description

type ServerConfig

type ServerConfig struct {
	Server
}

ServerConfig content

func ToServer

func ToServer(val interface{}) (*ServerConfig, error)

ToServer convert map interface to ServerConfig object

func (ServerConfig) ToJSON

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

ToJSON dump status struct

type Status

type Status struct {
	Leds       []dled.Led             `json:"leds"`
	Sensors    []dsensor.Sensor       `json:"sensors"`
	Blinds     []dblind.Blind         `json:"blinds"`
	Hvacs      []dhvac.Hvac           `json:"hvacs"`
	Wagos      []dwago.Wago           `json:"wagos"`
	Nanosenses []dnanosense.Nanosense `json:"nanosenses"`
}

Status

type SwitchCmd

type SwitchCmd struct {
	Mac          string `json:"mac"`
	IsConfigured *bool  `json:"isConfigured,omitempty"`
}

SwitchCmd content

type SwitchConfig

type SwitchConfig struct {
	Mac           *string `json:"mac,omitempty"`
	FriendlyName  *string `json:"friendlyName,omitempty"`
	IP            *string `json:"ip,omitempty"`
	Cluster       *int    `json:"cluster,omitempty"`
	Profil        string  `json:"profil"` // I/O card configuration none/pulse
	IsConfigured  *bool   `json:"isConfigured,omitempty"`
	DumpFrequency *int    `json:"dumpFrequency,omitempty"`
	Label         *string `json:"label,omitempty"`
}

SwitchConfig content

func ToSwitchConfig

func ToSwitchConfig(val interface{}) (*SwitchConfig, error)

ToSwitchConfig convert map interface to SwitchConfig object

type SwitchDump

type SwitchDump struct {
	dswitch.Switch
	Cluster      int   `json:"cluster"`
	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"`
	ErrorCode    *int  `json:"errorCode"`
}

func ToSwitchDump

func ToSwitchDump(val interface{}) (*SwitchDump, error)

ToSwitchDump convert map interface to SwitchDump object

Jump to

Keyboard shortcuts

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