Skip to content

use 1.13.0 to convert asn file to java code failed #43

@wchswchs

Description

@wchswchs
  1. asn file content below

`VehStatus DEFINITIONS AUTOMATIC TAGS ::= BEGIN

-- imports and exports

EXPORTS TransmissionState, VehicleEventFlags, ExteriorLights;
IMPORTS ;

TransmissionState ::= ENUMERATED {
	neutral (0), -- Neutral
	park (1), -- Park
	forwardGears (2), -- Forward gears
	reverseGears (3), -- Reverse gears
	reserved1 (4),
	reserved2 (5),
	reserved3 (6),
	unavailable (7)-- not-equipped or unavailable value,
	-- Any related speed is relative to the vehicle reference frame used
}

VehicleEventFlags ::= BIT STRING {
	eventHazardLights (0),
	eventStopLineViolation (1), -- Intersection Violation
	eventABSactivated (2),
	eventTractionControlLoss (3),
	eventStabilityControlactivated (4),
	eventHazardousMaterials (5),
	eventReserved1 (6),
	eventHardBraking (7),
	eventLightsChanged (8),
	eventWipersChanged (9),
	eventFlatTire (10),
	eventDisabledVehicle (11), -- The DisabledVehicle DF may also be sent
	eventAirBagDeployment (12)
	} (SIZE (13, ...))	

ExteriorLights ::= BIT STRING { 
	-- All lights off is indicated by no bits set
	lowBeamHeadlightsOn (0),
	highBeamHeadlightsOn (1),
	leftTurnSignalOn (2),
	rightTurnSignalOn (3),
	hazardSignalOn (4),
	automaticLightControlOn (5),
	daytimeRunningLightsOn (6),
	fogLightOn (7),
	parkingLightsOn (8)
	} (SIZE (9, ...))

END`

  1. run command
    ./bin/asn1bean-compiler -f VehStatus.asn

  2. error info
    line 38:28: expecting R_PAREN, found ','
    line 38:34: expecting "END", found ')'
    line 40:24: unexpected token: ::=
    line 53:1: expecting "DEFINITIONS", found 'null'
    Generating classes for module "VehStatus"
    Generating classes for module "ExteriorLights"
    done

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