rainforestCommon

package module
v0.0.0-...-2468613 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 5 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

rainforestCommon

Interface for Rainforest Eagle energy monitor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcVal

func CalcVal(input, mult, div string) (float32, error)

CalcVal converts hex values from an XML file to floating point and then scales the input value

func Hex2Float

func Hex2Float(in string) (float32, error)

Hex2Float converts the hex value from an XML file to floating point

func MeterTime

func MeterTime(t time.Time) time.Time

MeterTime converts time from the Epoch used by Unix/Windows to the epoch used by the utility meter (Jan 1, 2000)

func UnixTime

func UnixTime(s string) (time.Time, error)

UnixTime converts the hex string in an XML file to time in seconds since the Unix Epoch (Jan 1, 1970)

Types

type BlockPriceDetail

type BlockPriceDetail struct {
	XMLName                          xml.Name `xml:"BlockPriceDetail"`
	DeviceMacId                      string
	MeterMacId                       string
	TimeStamp                        string
	CurrentStart                     string
	CurrentDuration                  string
	BlockPeriodConsumption           string
	BlockPeriodConsumptionMultiplier string
	BlockPeriodConsumptionDivisor    string
	NumberOfBlocks                   string
	Multiplier                       string
	Divisor                          string
	Currency                         string
	TrailingDigits                   string
	Port                             string
}

Not in uploader API manual

func (BlockPriceDetail) String

func (b BlockPriceDetail) String() string

type CurrentSummation

type CurrentSummation struct {
	XMLName             xml.Name `xml:"CurrentSummation"`
	DeviceMacId         string
	MeterMacId          string
	TimeStamp           string
	SummationDelivered  string
	SummationReceived   string
	Multiplier          string
	Divisor             string
	DigitsRight         string
	DigitsLeft          string
	SuppressLeadingZero string
	Port                string
}

func (CurrentSummation) String

func (c CurrentSummation) String() string

type CurrentSummationDelivered

type CurrentSummationDelivered struct {
	XMLName             xml.Name `xml:"CurrentSummationDelivered"`
	DeviceMacId         string
	MeterMacId          string
	TimeStamp           string
	SummationDelivered  string
	SummationReceived   string
	Multiplier          string
	Divisor             string
	DigitsRight         string
	DigitsLeft          string
	SuppressLeadingZero string
	Port                string
}

func (CurrentSummationDelivered) String

func (c CurrentSummationDelivered) String() string

type DeviceInfo

type DeviceInfo struct {
	XMLName      xml.Name `xml:"DeviceInfo"`
	DeviceMacId  string
	InstallCode  string
	LinkKey      string
	FWVersion    string
	HWVersion    string
	ImageType    string
	Manufacturer string
	ModelId      string
	DateCode     string
	Port         string
}

func (DeviceInfo) String

func (d DeviceInfo) String() string

type FastPollStatus

type FastPollStatus struct {
	XMLName     xml.Name `xml:"FastPollStatus"`
	DeviceMacId string
	MeterMacId  string
	Frequency   string
	EndTime     string
	Port        string
}

func (FastPollStatus) String

func (f FastPollStatus) String() string

type HistoryData

type HistoryData struct {
	XMLName       xml.Name           `xml:"HistoryData"`
	SummationList []CurrentSummation `xml:"CurrentSummation"`
}

func (HistoryData) String

func (h HistoryData) String() string

type InstantaneousDemand

type InstantaneousDemand struct {
	XMLName             xml.Name `xml:"InstantaneousDemand"`
	DeviceMacId         string
	MeterMacId          string
	TimeStamp           string
	Demand              string
	Multiplier          string
	Divisor             string
	DigitsRight         string
	DigitsLeft          string
	SuppressLeadingZero string
	Port                string
}

func (InstantaneousDemand) String

func (d InstantaneousDemand) String() string

type LocalCommand

type LocalCommand struct {
	XMLName   xml.Name `xml:"LocalCommand"`
	Name      string   `xml:"Name"`
	MacId     string
	StartTime string
	EndTime   string
	Frequency string
}

type MessageCluster

type MessageCluster struct {
	XMLName              xml.Name `xml:"MessageCluster"`
	DeviceMacId          string
	MeterMacId           string
	TimeStamp            string
	Id                   string
	Text                 string
	Priority             string
	StartTime            string
	Duration             string
	ConfirmationRequired string
	Confirmed            string
	Queue                string
	Port                 string
}

func (MessageCluster) String

func (m MessageCluster) String() string

type MeterInfo

type MeterInfo struct {
	XMLName     xml.Name `xml:"MeterInfo"`
	DeviceMacId string
	MeterMacId  string
	Type        string
	NickName    string
	Account     string
	Auth        string
	Host        string
	Enabled     string
}

func (MeterInfo) String

func (m MeterInfo) String() string

type NetworkInfo

type NetworkInfo struct {
	XMLName      xml.Name `xml:"NetworkInfo"`
	DeviceMacId  string
	CoordMacId   string
	Status       string
	Description  string
	ExtPanId     string
	Channel      string
	ShortAddr    string
	LinkStrength string
	Port         string
}

func (NetworkInfo) String

func (n NetworkInfo) String() string

type PriceCluster

type PriceCluster struct {
	XMLName        xml.Name `xml:"PriceCluster"`
	DeviceMacId    string
	MeterMacId     string
	TimeStamp      string
	Price          string
	Currency       string
	TrailingDigits string
	Tier           string
	StartTime      string
	Duration       string
	RateLabel      string
	Port           string
}

func (PriceCluster) String

func (p PriceCluster) String() string

type ProfileData

type ProfileData struct {
	XMLName                  xml.Name `xml:"ProfileData"`
	DeviceMacId              string
	MeterMacId               string
	EndTime                  string
	Status                   string
	ProfileIntervalPeriod    string
	NumberOfPeriodsDelivered string
	IntervalData1            string
	IntervalData2            string
	IntervalData3            string
	IntervalData4            string
	IntervalData5            string
	IntervalData6            string
	IntervalData7            string
	IntervalData8            string
	IntervalData9            string
	IntervalData10           string
	IntervalData11           string
	IntervalData12           string
	Port                     string
}

func (ProfileData) String

func (p ProfileData) String() string

type Root

type Root struct {
	XMLName     xml.Name `xml:"rainforest"`
	Current     CurrentSummationDelivered
	Device      DeviceInfo
	Demand      InstantaneousDemand
	History     HistoryData
	Message     MessageCluster
	Meter       MeterInfo
	Net         NetworkInfo
	Poll        FastPollStatus
	Price       PriceCluster
	PriceDetail BlockPriceDetail
	Profile     ProfileData
	Schedule    ScheduleInfo
	Time        TimeCluster
}

All the different packets that might be sent from the eagle

func (Root) String

func (r Root) String() string

type ScheduleInfo

type ScheduleInfo struct {
	XMLName     xml.Name `xml:"ScheduleInfo"`
	DeviceMacId string
	MeterMacId  string
	Event       string
	Frequency   string
	Enabled     string
}

Not in uploader API manual

func (ScheduleInfo) String

func (s ScheduleInfo) String() string

type TimeCluster

type TimeCluster struct {
	XMLName     xml.Name `xml:"TimeCluster"`
	DeviceMacId string
	MeterMacId  string
	UTCTime     string
	LocalTime   string
	Port        string
}

Not in uploader API manual

func (TimeCluster) String

func (t TimeCluster) String() string

Jump to

Keyboard shortcuts

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