request

package
v0.0.0-...-6684604 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Version  string
	XmlVer   string
	Model    int
	VendorId int `xml:"vendor_id,omitempty"`
	MAC      string
	EMAI     string
	SerNum   uint64
}

func NewAgent

func NewAgent() *Agent

type Entry

type Entry struct {
	ID   int
	Name string
}

type InputEntry

type InputEntry struct {
	Entry
	Value    int
	ValueLog *ValueLog `xml:"ValueLog,omitempty"`
}

func NewInputEntry

func NewInputEntry(id int, name string) *InputEntry

func (*InputEntry) SetValueLog

func (e *InputEntry) SetValueLog(l *ValueLog)

type Inputs

type Inputs struct {
	Entry []InputEntry
}

func NewInputs

func NewInputs(e ...InputEntry) *Inputs

type MeterEntry

type MeterEntry struct {
	Entry
	Address    int
	SecAddress int
	Values     MeterValues
}

func NewMeterEntry

func NewMeterEntry(id int, name string) *MeterEntry

type MeterValueEntry

type MeterValueEntry struct {
	Entry
	Unit   string
	Value  int
	Exp    int
	Status SensorStatus
}

func NewMeterValueEntry

func NewMeterValueEntry(id int, name string) *MeterValueEntry

type MeterValues

type MeterValues struct {
	Entry []MeterValueEntry
}

func NewMeterValues

func NewMeterValues(e ...MeterValueEntry) *MeterValues

type Meters

type Meters struct {
	Entry []MeterEntry
}

func NewMeters

func NewMeters(e ...MeterEntry) *Meters

type Network

type Network struct {
	IPAddr   *netip.Addr `xml:"IPAddr,omitempty"`
	Submask  *netip.Addr `xml:"Submask,omitempty"`
	Gateway  *netip.Addr `xml:"Gateway,omitempty"`
	HttpPort int         `xml:"HttpPort,omitempty"`
}

func NewNetwork

func NewNetwork() *Network

type OutputEntry

type OutputEntry struct {
	Entry
	Value    int
	ValueLog *ValueLog `xml:"ValueLog,omitempty"`
}

func NewOutputEntry

func NewOutputEntry(id int, name string) *OutputEntry

func (*OutputEntry) SetValueLog

func (e *OutputEntry) SetValueLog(l *ValueLog)

type Outputs

type Outputs struct {
	Entry []OutputEntry
}

func NewOutputs

func NewOutputs(e ...OutputEntry) *Outputs

type Portal

type Portal struct {
	DeviceName string
	PushSource int
	PushPeriod int
	LogPeriod  int
	APLimit    int
	APSourceID int
	Endpoint   *url.URL `xml:"ServerAddres,omitempty"`
	PortalPort int
	SetupCRC   int
}

func NewPortal

func NewPortal() *Portal

type Root

type Root struct {
	Agent   *Agent       `xml:"Agent,omitempty"`
	Network *Network     `xml:"Network,omitempty"`
	Time    *common.Time `xml:Time,omitempty"`
	Portal  *Portal      `xml:"Portal,omitempty"`
	Sensors *Sensors     `xml:"Sensors,omitempty"`
	Meters  *Meters      `xml:"Meters,omitempty"`
	Inputs  *Inputs      `xml:"Inputs,omitempty"`
	Outputs *Outputs     `xml:"Outputs,omitempty"`
}

func NewRoot

func NewRoot() *Root

type SensorEntry

type SensorEntry struct {
	Entry
	Status   SensorStatus
	Value    int
	Exp      int
	Units    string
	ValueLog *ValueLog `xml:"ValueLog,omitempty"`
}

func NewSensorEntry

func NewSensorEntry(id int, name string) *SensorEntry

func (*SensorEntry) SetValueLog

func (e *SensorEntry) SetValueLog(l *ValueLog)

type SensorStatus

type SensorStatus int
const (
	ValueUnknowSensorStatus SensorStatus = iota
	ValueOKSensorStatus
	SensorInvalidSensorStatus
	DeviceInvalidSensorStatus
	OutOfRangeLowSensorStatus
	OutOfRangeHiSensorStatus
)

type Sensors

type Sensors struct {
	Entry []SensorEntry
}

func NewSensors

func NewSensors(e ...SensorEntry) *Sensors

type ValueLog

type ValueLog struct {
	Value      common.IntSequence `xml:"Value,omitempty"`
	TimeOffset common.IntSequence `xml:"TimeOffset,omitempty"`
	Status     common.IntSequence `xml:"Status,omitempty"`
}

func NewValueLog

func NewValueLog(timeOffset int, v ...int) *ValueLog

Jump to

Keyboard shortcuts

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