Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStreamMeterHandler ¶
func DefaultStreamMeterHandler(obj *StreamMeter)
Types ¶
type Envoy ¶
type Envoy struct {
SerialNumber string
InstallerUsername string
InstallerPassword string
URL string
}
func (*Envoy) GetProduction ¶
func (e *Envoy) GetProduction() (*Production, error)
func (*Envoy) GetStreamMeter ¶
func (e *Envoy) GetStreamMeter(handler func(*StreamMeter)) error
type Production ¶
type Production struct {
Production []*ProductionInfo `json:"production"`
Consumption []*ProductionInfo `json:"consumption"`
Storage []*ProductionInfo `json:"storage"`
}
func (*Production) String ¶
func (p *Production) String() string
type ProductionInfo ¶
type ProductionInfo struct {
Type string `json:"type"`
ActiveCount int `json:"activeCount"` // 1
MeasurementType string `json:"measurementType"` // "production",
ReadingTime int64 `json:"readingTime"` // 1660454270,
WNow float32 `json:"wNow"` // 5261.947
WhLifetime float32 `json:"whLifetime"` // 30015.385,
VarhLeadLifetime float32 `json:"varhLeadLifetime"` // 3655.084,
VarhLagLifetime float32 `json:"varhLagLifetime"` // 14644.192,
VahLifetime float32 `json:"vahLifetime"` // 44573.333,
RmsCurrent float32 `json:"rmsCurrent"` // 22.295,
RmsVoltage float32 `json:"rmsVoltage"` // 715.657,
ReactPwr float32 `json:"reactPwr"` // -744.02,
ApprntPwr float32 `json:"apprntPwr"` // 5319.274,
PwrFactor float32 `json:"pwrFactor"` // 0.99,
WhToday float32 `json:"whToday"` // 16796.385,
WhLastSevenDays float32 `json:"whLastSevenDays"` // 29147.385,
VahToday float32 `json:"vahToday"` // 20645.333,
VarhLeadToday float32 `json:"varhLeadToday"` // 2802.084,
VarhLagToday float32 `json:"varhLagToday"` // 3578.192
}
type StreamMeter ¶
type StreamMeter struct {
Production struct {
A StreamMeterInfo `json:"ph-a"`
B StreamMeterInfo `json:"ph-b"`
C StreamMeterInfo `json:"ph-c"`
} `json:"production"`
Net struct {
A StreamMeterInfo `json:"ph-a"`
B StreamMeterInfo `json:"ph-b"`
C StreamMeterInfo `json:"ph-c"`
} `json:"net-consumption"`
Consumption struct {
A StreamMeterInfo `json:"ph-a"`
B StreamMeterInfo `json:"ph-b"`
C StreamMeterInfo `json:"ph-c"`
} `json:"total-consumption"`
}
func (*StreamMeter) String ¶
func (s *StreamMeter) String() string
Click to show internal directories.
Click to hide internal directories.