This repository was archived by the owner on Jun 29, 2024. It is now read-only.
File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ func (e *UCLPCServer) HandleEvent(payload spineapi.EventPayload) {
27
27
if payload .EventType == spineapi .EventTypeBindingChange &&
28
28
payload .ChangeType == spineapi .ElementChangeAdd &&
29
29
payload .LocalFeature != nil &&
30
- payload .LocalFeature .Type () == model .FeatureTypeTypeDeviceDiagnosis &&
30
+ payload .LocalFeature .Type () == model .FeatureTypeTypeLoadControl &&
31
31
payload .LocalFeature .Role () == model .RoleTypeServer {
32
32
e .subscribeHeartbeatWorkaround (payload )
33
33
return
@@ -106,16 +106,16 @@ func (e *UCLPCServer) deviceConnected(payload spineapi.EventPayload) {
106
106
return
107
107
}
108
108
109
- // we only found more one matching entity, this is not good
109
+ // we found more than one matching entity, this is not good
110
110
// according to KEO the subscription should be done on the entity that requests a binding to
111
111
// the local loadControlLimit server feature
112
- e .heartbeatWorkaround = true
112
+ e .heartbeatKeoWorkaround = true
113
113
}
114
114
115
115
// subscribe to the DeviceDiagnosis Server of the entity that created a binding
116
116
func (e * UCLPCServer ) subscribeHeartbeatWorkaround (payload spineapi.EventPayload ) {
117
117
// the workaround is not needed, exit
118
- if ! e .heartbeatWorkaround {
118
+ if ! e .heartbeatKeoWorkaround {
119
119
return
120
120
}
121
121
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func (s *UCLPCServerSuite) Test_Events() {
50
50
51
51
payload .EventType = spineapi .EventTypeBindingChange
52
52
payload .ChangeType = spineapi .ElementChangeAdd
53
- payload .LocalFeature = s .deviceDiagnosisFeature
53
+ payload .LocalFeature = s .loadControlFeature
54
54
s .sut .HandleEvent (payload )
55
55
}
56
56
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type UCLPCServer struct {
17
17
18
18
validEntityTypes []model.EntityTypeType
19
19
20
- heartbeatWorkaround bool
20
+ heartbeatKeoWorkaround bool // required because KEO Stack uses multiple identical entities for the same functionality, and it is not clear which to use
21
21
}
22
22
23
23
var _ UCLCPServerInterface = (* UCLPCServer )(nil )
You can’t perform that action at this time.
0 commit comments