Skip to content

fix: use a single Generic client feature instead of typed client features (SPINE IG 3.4) - #262

Open
ckast-enqs wants to merge 2 commits into
devfrom
fix/generic-client-feature
Open

ckast-enqs wants to merge 2 commits into
devfrom
fix/generic-client-feature

Conversation

@ckast-enqs

Copy link
Copy Markdown

Use a single Generic client feature instead of typed client features

Problem

The SPINE IG "Protocol and Resource Guidelines" V1.0.0, §3.4 ("Uniqueness of Feature Types per Entity") requires:

Each "featureType" SHALL occur at most once per Entity.

The rule has no exception for the feature role. Several use cases currently violate it:

  • cs/lpc, cs/lpp, eg/lpc, eg/lpp add DeviceDiagnosis both as client and as server on the same entity.
  • ma/mgcp and ma/mpc add typed client features (DeviceConfiguration, ElectricalConnection, Measurement). When combined with cs/lpc/cs/lpp on the same CEM entity, these duplicate the CS server features DeviceConfiguration and ElectricalConnection.

This was flagged during EEBUS certification in the nodeManagementDetailedDiscoveryData of a CEM implementing CS LPC/LPP and MA MGCP/MPC.

Solution

Add one client feature of type Generic instead of the typed client features, as recommended by:

  • SPINE Resource Specification V1.3.0, §4.3.11: "it is preferable that a client uses the Generic Feature Type"
  • UC IG LPC V1.1.0 / LPP V1.0.0, §3.3: "Each Actor SHOULD use a client Feature with featureType Generic for all its client functionality"

No further changes are needed:

  • features/client.Feature already falls back to the local Generic client feature if no typed client feature exists (getLocalAndRemoteFeatures).
  • spine-go accepts Generic as client feature for subscriptions and bindings (subscription_manager.go, binding_manager.go).
  • Server features are unchanged.

Scope

The change is intentionally minimal and limited to cs/lpc, cs/lpp, eg/lpc, eg/lpp, ma/mgcp and ma/mpc (6 files, +8/−17). Other use cases are not affected and still work when mixed (typed client features are still preferred by the fallback if present).

Possible follow-ups (not part of this PR):

  • cem/opev, cem/oscev, cem/cevc also add DeviceDiagnosis as client and server.
  • cem/evcc checks responseMsg.FeatureLocal.Type() == DeviceDiagnosis in results.go, so it needs a logic change before switching to Generic.

Discovery before / after (CEM entity, CS LPC/LPP + MA MGCP/MPC)

Address Before After
1.1 DeviceDiagnosis client Generic client
1.2 LoadControl server LoadControl server
1.3 DeviceConfiguration server DeviceConfiguration server
1.4 DeviceDiagnosis server DeviceDiagnosis server
1.5 ElectricalConnection server ElectricalConnection server
1.6 DeviceConfiguration client –
1.7 ElectricalConnection client –
1.8 Measurement client –

Tests

go build ./..., go vet ./usecases/... and go test ./... pass.

@ckast-enqs

Copy link
Copy Markdown
Author

This feature is mandatory for certification, even though it is not covered in any test case. (got notified during certification process)

@sthelen-enqs

Copy link
Copy Markdown
Contributor

Can we do this for all the client use cases as well?

@ckast-enqs

Copy link
Copy Markdown
Author

yes, i will take care of it

@ckast-enqs ckast-enqs self-assigned this Nov 4, 2026
@ckast-enqs

Copy link
Copy Markdown
Author

Extended to all remaining client use cases: cem/cevc, cem/evcc, cem/evcem, cem/evsecc, cem/evsoc, cem/ohpcf, cem/opev, cem/oscev, cem/vabd, cem/vapd and ma/mdt now only add a single Generic client feature instead of typed ones.

cem/evcc/results.go now checks FeatureRemote.Type() == DeviceDiagnosis instead of the local feature type, which would always be Generic now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants