Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidReadingType ¶
Types ¶
type B2bDetailsRecord ¶
type B2bDetailsRecord struct { TransCode string RetServiceOrder string ReadDataTime time.Time IndexRead string }
B2B details record (500)
type HeaderRecord ¶
type HeaderRecord struct { VersionHeader string DateTime time.Time FromParticipant string ToParticipant string }
Header record (100)
type HourlyReading ¶
type HourlyReading struct { StartTime time.Time EndTime time.Time EnergyKWh float64 // The hourly reading can consist of multiple measurements with different quality methods and // reason codes/descriptions so we include them all here QualityMethod []string ReasonCode []int ReasonDescription []string }
type IntervalDataRecord ¶
type IntervalDataRecord struct { IntervalDate time.Time IntervalValues []IntervalValue QualityMethod string ReasonCode *int ReasonDescription string UpdateDateTime time.Time MSATSLoadDateTime time.Time }
Interval data record (300)
type IntervalEventRecord ¶
type IntervalEventRecord struct { StartInterval int EndInterval int QualityMethod string ReasonCode *int ReasonDescription string }
Interval event record (400)
type IntervalValue ¶
type IntervalValue struct { Value float64 // A 400 record can adjust the quality method, reason code, and reason description per-value, // so we store those along with each value if applicable. Otherwise it's set to null. Quality *QualityData }
type NMIDataDetailsRecord ¶
type NMIDataDetailsRecord struct { NMI string NMIConfiguration string RegisterID string NMISuffix string MDMDataStreamIdentifier string MeterSerialNumber string UOM string IntervalLength int NextScheduledReadDate time.Time }
NMI data details record (200)
type QualityData ¶
type ReadingType ¶
type ReadingType string
Describes the type of interval data the record applies to. Mapped from the NMI suffix.
const ( GeneralUsage ReadingType = "E1" ControlledLoad ReadingType = "E2" PrimaryExport ReadingType = "B1" SecondaryExport ReadingType = "B2" )
We interpret NMI suffixes in a broad, generalised way that will be mostly correct for our purposes
type UsageData ¶
type UsageData map[NMI]map[ReadingType][]HourlyReading
Click to show internal directories.
Click to hide internal directories.