-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeasurement.go
43 lines (39 loc) · 1.17 KB
/
measurement.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package resources
type TimePeriodType struct {
StartTime string `xml:"startTime"`
EndTime string `xml:"endTime"`
}
type MeasurementDataType struct {
ValueType string `xml:"valueType"`
Timestamp string `xml:"timestamp"`
Value float64 `xml:"value"`
EvaluationPeriod TimePeriodType `xml:"evaluationPeriod"`
ValueSource string `xml:"valueSource"`
ValueTendency string `xml:"valueTendency"`
ValueState string `xml:"valueState"`
}
type MeasurementDescriptionDataType struct {
MeasurementType string `xml:"measurementType"`
Unit string `xml:"unit"`
ScopeType string `xml:"scopeType"`
Label string `xml:"label"`
Description string `xml:"description"`
}
func Measurement(MeasurementType string, Unit string, ScopeType string, Label string, Description string) []*FunctionModel {
return []*FunctionModel{
{
FunctionName: "measurementData",
Function: &MeasurementDataType{},
},
{
FunctionName: "measurementDescription",
Function: &MeasurementDescriptionDataType{
MeasurementType,
Unit,
ScopeType,
Label,
Description,
},
},
}
}