Skip to content

Uniqueness of RDM personality IDs #530

Open
@peternewman

Description

@peternewman

More for info, I don't really have a solution, but some fixtures, e.g. this:
http://www.sunricher.com/industrial-level-5-channel-dmx512-rdm-decoder-sr-2108a-m5-5.html

Have different sets of personalities, depending on other fixture settings. In this case, changing the Channels from 1-5 presents either 8/16 bit control in 1 channel mode, through to 8 or 16 bit, or 8+strobe+master dimmer in 5 channel mode, so there may be two channel layouts with the same RDM Personality ID. I'm not sure without checking if it's in spec with the RDM standard, but it's out there as a fixture.

Your code here would error on that:

const rdmPersonalityIndices = new Set();
for (const mode of fixture.modes) {
if (mode.rdmPersonalityIndex !== null) {
checkUniqueness(
rdmPersonalityIndices,
`${mode.rdmPersonalityIndex}`,
result,
`RDM personality index '${mode.rdmPersonalityIndex}' in mode '${mode.shortName}' is not unique in the fixture.`
);
}
}

But I don't really have a better idea, unless you have some concept of sub modes the device might be in, and move the uniqueness check to that level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component-testAffects the automated tests.priority-lowNice-to-have / wishlist.questionOpen questions to be resolved before implementation, insights wanted from anyone.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions