Git Product home page Git Product logo

Comments (5)

mhanna123 avatar mhanna123 commented on August 14, 2024

@oaitamrane
this is the code I am using right now, constr_SEQUENCE.c at line 1320:

     if(edx != (td->elements_count-1))
      {
         if(!edx && specs->roms_count && (padding > 0))
            ASN_DEBUG(">>>>> not getting padding of %d bits for element:%d out of %d (specs->roms_count:%d)", padding, edx, td->elements_count, specs->roms_count);
         else
            per_get_few_bits(pd, padding);
      }
      else //
      {
         if(specs->roms_count && (padding > 0))
            ASN_DEBUG(">>>>> not getting padding of %d bits for element:%d out of %d (specs->roms_count:%d)", padding, edx, td->elements_count, specs->roms_count);
         else
            per_get_few_bits(pd, padding);
      }

I didn't report it in the previous issue cause I honestly don't remember the context of that fix.
Anyway, you can try it and see if it solves your problem

from asn1c.

oaitamrane avatar oaitamrane commented on August 14, 2024

@mhanna123
Unfortuantely your proposed patch did not solve the problem.
Can you execute the small program I sent you.

from asn1c.

mhanna123 avatar mhanna123 commented on August 14, 2024

@oaitamrane
in constr_SEQUENCE.c, at line 1324 or in the code in my previous comment, change
if(!edx && specs->roms_count && (padding > 0))

with
if( (edx < specs->roms_count) && (padding > 0))

from asn1c.

mouse07410 avatar mouse07410 commented on August 14, 2024

@oaitamrane and @mhanna123 can you post here sample data for Request-Type.asn? I'd like to check whether the current vlm_master branch resolves this problem.

from asn1c.

mouse07410 avatar mouse07410 commented on August 14, 2024

Actually, my tests show that the current vlm_master branch resolves this issue. Please post here or re-open if you have additional info or problems.

These are my test-cases:

Request-Type.asn

-- **************************************************************
--
-- Common definitions
--
-- **************************************************************

Messages

DEFINITIONS AUTOMATIC TAGS ::= 

BEGIN

-- **************************************************************
--
-- Request Type
--
-- **************************************************************
RequestType ::= SEQUENCE {
	event			RequestTypeEvent,
	reportArea		RequestTypeReportArea,
	horizontalaccuracyCode	RequestTypeAccuracyCode		OPTIONAL,
	iE-Extensions		NULL	OPTIONAL,
	...
}

RequestTypeEvent ::= ENUMERATED {
	stop-change-of-service-area,
	direct,
	change-of-service-area,
	stop-direct,
	...,
	periodic,
	stop-periodic
}

RequestTypeReportArea ::= ENUMERATED {
	service-area,
	geographical-area,
	...
}

RequestTypeAccuracyCode ::= INTEGER (0..127)

END

sample.xer:

<RequestType>
  <event><direct/></event>
  <reportArea><geographical-area/></reportArea>
  <horizontalaccuracyCode>31</horizontalaccuracyCode>
</RequestType>

sample2.xer:

<RequestType>
  <event><direct/></event>
  <reportArea><geographical-area/></reportArea>
  <iE-Extensions></iE-Extensions>
</RequestType>

from asn1c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.