I imagine this bug also lurks in AssociationCCReport or any other CCs that deal with segmented reports (except TransportServiceCCSubsequentSegment, which merges very differently).
I think the proper solution is to add a new member in CommandClass like:
public addPartialTo(session: CommandClass[]): CommandClass[]
It could default to the current session.push(this); but be overridden in the specific CC implementations to drop duplicate partials or do other error checking.
I've created a minimal test suite for ConfigurationCC for this bug and could make a PR if you'd like.
I imagine this bug also lurks in
AssociationCCReport
or any other CCs that deal with segmented reports (exceptTransportServiceCCSubsequentSegment
, which merges very differently).I think the proper solution is to add a new member in
CommandClass
like:public addPartialTo(session: CommandClass[]): CommandClass[]
It could default to the current
session.push(this);
but be overridden in the specificCC
implementations to drop duplicate partials or do other error checking.I've created a minimal test suite for
ConfigurationCC
for this bug and could make a PR if you'd like.