Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type InputEntry ¶
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 ¶
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 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"` }
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 ¶
Click to show internal directories.
Click to hide internal directories.