Skip to content

Decoder generated for a Set does not provide a convenience method to determine if no choices have been set #576

Closed
@JerryShea

Description

@JerryShea

The decoder generated for a Set does not provide a convenience method to determine if nothing has been set. If we look at sbe_samples and Car's OptionalExtras, the only way to determine if no OptionalExtras
have been set is to call

    notSet = ! (sunRoof() || sportsPack() || cruiseControl());

And this code is fragile and inefficient. This PR modifies SbeTool to generate a new method in OptionalExtrasDecoder

    public boolean isEmpty()
    {
        return 0 == buffer.getByte(offset);
    }

PR here: #575

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions