Comments (9)
1.0.0 release was a mistake. Please use the current vlm_master
branch (the default), as it's the only branch that gets updates and fixes (and it provides the most capabilities). I doubt you can make 1.0.0 work properly with s1ap-f40.asn
.
Regarding parsing IEs, I don't really know - but AFAIK it should be possible to tell the code to parse a single PDU. Now, if that PDU is comprised of several IEs - I doubt you can tell it to stop mid-way after the IE you're interested in was parsed, but I'll let @brchiu and @velichkov to weigh in on this.
from asn1c.
@mouse07410
vlm_master branch can generate the codes, but something is wrong.
the cmdline asn1c -pdu=S1AP-PDU -pdu=all -fcompound-names -findirect-choice -fno-include-deps -flink-skeletons -no-gen-OER - gen-PER ../36413/s1ap-f40.asn ../36331/lte-rrc-f40.asn
lte-rrc-f40.zip
s1ap-f40.zip
then execute make -f converter-example.mk
,
cc -DASN_DISABLE_OER_SUPPORT -DPDU=S1AP_PDU -DASN_PDU_COLLECTION -I. -o S1AP-PDU.o -c S1AP-PDU.c cc -DASN_DISABLE_OER_SUPPORT -DPDU=S1AP_PDU -DASN_PDU_COLLECTION -I. -o InitiatingMessage.o -c InitiatingMessage.c InitiatingMessage.c:138:39: error: ‘asn_DEF_HandoverCommand’ undeclared here (not in a function) { "&SuccessfulOutcome", aioc__type, &asn_DEF_HandoverCommand }, ^ InitiatingMessage.c:252:39: error: ‘asn_DEF_Paging’ undeclared here (not in a function) { "&InitiatingMessage", aioc__type, &asn_DEF_Paging }, ^ make: *** [InitiatingMessage.o] Error 1
Within brchiu's repo , the same cmdline works well.
https://github.com/brchiu/asn1c/tree/velichkov_s1ap_plus_option_group
.................................................
the difference is asn_DEF_(S1AP_PDU_Contens)HandoverCommand, details likes bellow:
from asn1c.
@jeick2008, to avoid name clash from ASN.1 modules, it is practically not recommended to combine ASN.1 of two different protocols.
from asn1c.
@brchiu
thank you so much
from asn1c.
@jeick2008, I forgot mentioning that , at application level, if a program indeed has to include the header files generated from two different protocols, thus name clash becomes inevitible. One trick is setting environment variable ASN1C_PREFIX=LTE_
and ASN1C_PREFIX=S1AP_
when create C files, then the types created will be appended with specified prefixes.
from asn1c.
@brchiu thank you,
from asn1c.
@brchiu @mouse07410 @velichkov
the S1AP message's datastruct in rencently repo is defined as :(for example struct InitiatingMessage->HandoverRequired)
typedef struct S1AP_InitiatingMessage {
S1AP_ProcedureCode_t procedureCode;
S1AP_Criticality_t criticality;
struct S1AP_InitiatingMessage__value {
S1AP_InitiatingMessage__value_PR present;
union S1AP_InitiatingMessage__S1AP_value_u {
S1AP_HandoverRequired_t HandoverRequired; -------------------------
S1AP_HandoverRequest_t HandoverRequest;
...........
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} value;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} S1AP_InitiatingMessage_t;
And two years ago(maybe) ,the data struct was defined as
typedef struct InitiatingMessage {
ProcedureCode_t procedureCode;
Criticality_t criticality;
ANY_t value; --------------
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} InitiatingMessage_t;
Within old version(two years ago)parsing the InitiatingMessage_t->ANY_t value,
HandoverRequired_t *handover_require = NULL;
ANY_to_type_aper(value, &asn_DEF_HandoverRequired, (void**)&handover_require)
ASN_STRUCT_FREE(asn_DEF_HandoverRequired, handover_require);
In this way, if the procedureCode is concerned, invoking ANY_to_type_aper manually. It is more efficient than the current approach.
Is there any way to make the data struct in asn1c generate code like ANY_t value not choice?
Thank you so much.
from asn1c.
@jeick2008 , you can do it on your own.
from asn1c.
I don't think we can do anything about this - I suggest @jeick2008 to follow what @brchiu recommended.
Closing this issue - if you need more help with it, please feel free to re-open.
from asn1c.
Related Issues (20)
- Decode expectedUEBehaviour IE failed HOT 1
- Type with (size) constraint HOT 4
- Join LFC? HOT 1
- Output from encoding an OpenType extension is wrong (APER) HOT 5
- Help debugging "Segmentation fault (core dumped)" HOT 7
- Problem compiling. HOT 4
- Question about v1.0.0. HOT 1
- Problem compiling: contains no objects HOT 4
- APER encoding failed on a 32-bit machine HOT 8
- INTEGER_decode_aper decode failed for 3GPP 38.473 f1ap ASN HOT 4
- Using fuzzing with asn1c HOT 1
- safe_fwrite: warning: 'ret' may be used uninitialized HOT 4
- Several defects detected by coverity HOT 1
- (token "::="): syntax error and (token "}"): syntax error HOT 4
- ImportError: undefined symbols in Shared Library HOT 3
- Circular Reference in Generated C Code for NodeOffsetPointXY structure HOT 6
- Typedef error and not included code HOT 3
- aper_support.c error parsing BMPString HOT 5
- parse parameterized Type failed HOT 7
- The new version per_decode NGAP protocol NGSetupResopnse error HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn1c.