java - ASN.1 Decode Error -


i using objective system inc(http://www.obj-sys.com/products/asn1c/index.php) asn.1 compiler , specification file(cdr_spec.asn) generated java source code. cdrs enecoded based on format ber(basic encoding rule)

command generate java source:

./asn1c cdr_spec.asn -java -ber -reader -print -getset -pkgname com.testpkg 

the source generated:

asn1c compiler, version 6.4.5 copyright (c) 1997-2011 objective systems, inc. rights reserved.  registered to: xxxxxx parsing asn.1 definitions..  generating java source files module xxx-xxx.. 

when decode first cdr file, parses 3 lines only, cdr file supposed contain more 100 lines, partially decoded.

when try decoding cdr file, failed when decoding cdr file , gave me such error:

com.objsys.asn1j.runtime.asn1missingrequiredexception: asn.1 decode error @ offset 832: sequence or set missing required element. 10:11:30.394 [main] error com.testpkg.test - asn.1 decode error @ offset 832: sequence or set missing required element. 

my asn.1 specification file not have syntax error when use tool checking syntax.

can knows asn.1 me this?

when try decoding cdr file, failed when decoding cdr file , gave me such error:

com.objsys.asn1j.runtime.asn1missingrequiredexception: asn.1 decode error @ offset 832: sequence or set missing required element. 10:11:30.394 [main] error com.testpkg.test - asn.1 decode error @ offset 832: sequence or set missing required element. 

from description, problem appears input data, not actual specification itself. it's not unusual vendors provide specifications don't quite line data produced hardware.

if can identify element missing, can try mark field optional in specification, regenerate code, , try again.

alternatively, can contact software and/or hardware vendors assistance.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -