Skip to content

BIT STRING bit descriptions are missing from the generated code #9

Description

@jbeyerstedt

The MAPEM contains BIT STRINGs with a fixed definition what each bit means. It looks like this in ASN.1:

LaneAttributes-Vehicle ::= BIT STRING {
 isVehicleRevocableLane (0),
 isVehicleFlyOverLane (1),
 hovLaneUseOnly (2),
 restrictedToBusUse (3),
 restrictedToTaxiUse (4),
 restrictedFromPublicUse (5),
 hasIRbeaconCoverage (6),
 permissionOnRequest (7)
} (SIZE (8,...))

But the only generated code is this:

#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
#[rasn(delegate, identifier = "LaneAttributes-Vehicle", size("8", extensible))]
pub struct LaneAttributesVehicle(pub BitString);

The information which bit offset has which meaning (e.g. by providing an enum with integer mapping) is missing from the generated code! So there's no way to extract information like restrictedToBusUse from the LaneAttributesVehicle data type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions