dnanosense

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nanosense

type Nanosense struct {
	Mac           string `json:"mac"` // Wago.MAC + "." + modbusID
	IP            string `json:"ip"`
	Group         int    `json:"group"`
	Cluster       int    `json:"cluster"`
	Temperature   int    `json:"temperature"` //in 1/10°C
	CO2           int    `json:"co2"`         //in 1/10
	Hygrometry    int    `json:"hygrometry"`  //in 1/10
	COV           int    `json:"cov"`         //in 1/10
	Error         int    `json:"error"`
	DumpFrequency int    `json:"dumpFrequency"`
	FriendlyName  string `json:"friendlyName"`
	Label         string `json:"label"`
}

Nanosense driver representation

func ToNanosense

func ToNanosense(val interface{}) (*Nanosense, error)

ToNanosense convert map interface to driver object

func (Nanosense) ToJSON

func (driver Nanosense) ToJSON() (string, error)

ToJSON dump hvac struct

type NanosenseConf

type NanosenseConf struct {
	Mac          string  `json:"mac"` // Wago.MAC + "." + modbusID
	IP           *string `json:"ip,omitempty"`
	Cluster      *int    `json:"cluster,omitempty"`
	Group        *int    `json:"group,omitempty"`
	FriendlyName *string `json:"friendlyName,omitempty"`
	Label        string  `json:"label"`
	ModbusID     *int    `json:"modbusID,omitempty"`
}

NanosenseConf customizable configuration by the server

func ToNanosenseConf

func ToNanosenseConf(val interface{}) (*NanosenseConf, error)

ToNanosenseConf convert map interface to driver object

func (NanosenseConf) ToJSON

func (driver NanosenseConf) ToJSON() (string, error)

ToJSON dump struct in json

type NanosenseDef

type NanosenseDef struct {
	Mac          string `json:"mac"` // Wago.MAC + "." + modbusID
	Group        int    `json:"group"`
	Cluster      int    `json:"cluster"`
	FriendlyName string `json:"friendlyName"`
	Label        string `json:"label"`
	Hygrometry   int    `json:"hygrometry"`  //modbusID
	Temperature  int    `json:"temperature"` //modbusID
	CO2          int    `json:"co2"`         //modbusID
	COV          int    `json:"cov"`         //modbusID
}

NanosenseDef customizable configuration by the server

type NanosenseSetup

type NanosenseSetup struct {
	Mac          string            `json:"mac"` // Wago.MAC + "." + modbusID
	IP           *string           `json:"ip,omitempty"`
	Cluster      int               `json:"cluster"`
	Group        int               `json:"group"`
	FriendlyName *string           `json:"friendlyName"`
	Label        string            `json:"label"`
	APIType      string            `json:"apiType"`
	API          map[string]string `json:"api"`
	ModbusID     int               `json:"modbusID"`
}

NanosenseSetup initial setup send by the server when the driver is authorized

func FillDefaultValue

func FillDefaultValue(cfg NanosenseSetup) NanosenseSetup

FillDefaultValue fill default parameter for setup

func ToNanosenseSetup

func ToNanosenseSetup(val interface{}) (*NanosenseSetup, error)

ToNanosenseSetup convert map interface to driver object

func UpdateConfig

func UpdateConfig(new NanosenseConf, old NanosenseSetup) NanosenseSetup

func UpdateSetup

func UpdateSetup(new NanosenseSetup, old NanosenseSetup) NanosenseSetup

UpdateSetup update blind struct

func (NanosenseSetup) ToJSON

func (driver NanosenseSetup) ToJSON() (string, error)

ToJSON dump hvac setup struct

Jump to

Keyboard shortcuts

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