@@ -56,8 +56,11 @@ func (s *UCLPCSuite) Test_loadControlLimitDataUpdate() {
56
56
descData := & model.LoadControlLimitDescriptionListDataType {
57
57
LoadControlLimitDescriptionData : []model.LoadControlLimitDescriptionDataType {
58
58
{
59
- LimitId : eebusutil .Ptr (model .LoadControlLimitIdType (0 )),
60
- LimitCategory : eebusutil .Ptr (model .LoadControlCategoryTypeObligation ),
59
+ LimitId : eebusutil .Ptr (model .LoadControlLimitIdType (0 )),
60
+ LimitType : eebusutil .Ptr (model .LoadControlLimitTypeTypeSignDependentAbsValueLimit ),
61
+ LimitCategory : eebusutil .Ptr (model .LoadControlCategoryTypeObligation ),
62
+ LimitDirection : eebusutil .Ptr (model .EnergyDirectionTypeConsume ),
63
+ ScopeType : eebusutil .Ptr (model .ScopeTypeTypeActivePowerLimit ),
61
64
},
62
65
},
63
66
}
@@ -69,6 +72,14 @@ func (s *UCLPCSuite) Test_loadControlLimitDataUpdate() {
69
72
s .sut .loadControlLimitDataUpdate (payload )
70
73
71
74
data := & model.LoadControlLimitListDataType {
75
+ LoadControlLimitData : []model.LoadControlLimitDataType {},
76
+ }
77
+
78
+ payload .Data = data
79
+
80
+ s .sut .loadControlLimitDataUpdate (payload )
81
+
82
+ data = & model.LoadControlLimitListDataType {
72
83
LoadControlLimitData : []model.LoadControlLimitDataType {
73
84
{
74
85
LimitId : eebusutil .Ptr (model .LoadControlLimitIdType (0 )),
@@ -77,8 +88,60 @@ func (s *UCLPCSuite) Test_loadControlLimitDataUpdate() {
77
88
},
78
89
}
79
90
80
- fErr = rFeature .UpdateData (model .FunctionTypeLoadControlLimitListData , data , nil , nil )
81
- assert .Nil (s .T (), fErr )
91
+ payload .Data = data
82
92
83
93
s .sut .loadControlLimitDataUpdate (payload )
84
94
}
95
+
96
+ func (s * UCLPCSuite ) Test_configurationDataUpdate () {
97
+ payload := spineapi.EventPayload {
98
+ Ski : remoteSki ,
99
+ Device : s .remoteDevice ,
100
+ Entity : s .monitoredEntity ,
101
+ }
102
+ s .sut .configurationDataUpdate (payload )
103
+
104
+ descData := & model.DeviceConfigurationKeyValueDescriptionListDataType {
105
+ DeviceConfigurationKeyValueDescriptionData : []model.DeviceConfigurationKeyValueDescriptionDataType {
106
+ {
107
+ KeyId : eebusutil .Ptr (model .DeviceConfigurationKeyIdType (1 )),
108
+ KeyName : eebusutil .Ptr (model .DeviceConfigurationKeyNameTypeFailsafeConsumptionActivePowerLimit ),
109
+ },
110
+ {
111
+ KeyId : eebusutil .Ptr (model .DeviceConfigurationKeyIdType (2 )),
112
+ KeyName : eebusutil .Ptr (model .DeviceConfigurationKeyNameTypeFailsafeDurationMinimum ),
113
+ },
114
+ },
115
+ }
116
+
117
+ rFeature := s .remoteDevice .FeatureByEntityTypeAndRole (s .monitoredEntity , model .FeatureTypeTypeDeviceConfiguration , model .RoleTypeServer )
118
+ fErr := rFeature .UpdateData (model .FunctionTypeDeviceConfigurationKeyValueDescriptionListData , descData , nil , nil )
119
+ assert .Nil (s .T (), fErr )
120
+
121
+ s .sut .configurationDataUpdate (payload )
122
+
123
+ data := & model.DeviceConfigurationKeyValueListDataType {
124
+ DeviceConfigurationKeyValueData : []model.DeviceConfigurationKeyValueDataType {},
125
+ }
126
+
127
+ payload .Data = data
128
+
129
+ s .sut .configurationDataUpdate (payload )
130
+
131
+ data = & model.DeviceConfigurationKeyValueListDataType {
132
+ DeviceConfigurationKeyValueData : []model.DeviceConfigurationKeyValueDataType {
133
+ {
134
+ KeyId : eebusutil .Ptr (model .DeviceConfigurationKeyIdType (1 )),
135
+ Value : & model.DeviceConfigurationKeyValueValueType {},
136
+ },
137
+ {
138
+ KeyId : eebusutil .Ptr (model .DeviceConfigurationKeyIdType (2 )),
139
+ Value : & model.DeviceConfigurationKeyValueValueType {},
140
+ },
141
+ },
142
+ }
143
+
144
+ payload .Data = data
145
+
146
+ s .sut .configurationDataUpdate (payload )
147
+ }
0 commit comments