Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wchswchs opened this issue Oct 12, 2021 · 0 comments
Open

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

wchswchs opened this issue Oct 12, 2021 · 0 comments

Comments

@wchswchs
Copy link

wchswchs commented Oct 12, 2021

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant