Does ASN1SCC support extensibility without the use of extension markers? #267
-
Hi, I'm evaluating the use of ASN1SCC on our projects, but we need extensibility of the SEQUENCES to support forward and backward compatibility fo the PDUs. I read that ASN1SCC does not support the extension marker, does it support extensibility of the data types and versioning in some other way? Thank you very much, Álvaro |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Extensibility is out of scope in ASN1SCC because it implies that the message receiver cannot know in advance the size of the message. Therefore it cannot have a static allocation of the buffer to store it and this is incompatible with embedded systems (in space at least) where malloc is forbidden. As a workaround, you can probably mimick the extensibility mechanism by allocating a spare space in your type (version 1) and use it differently in following versions. ACN helps by giving fine control over the encoding. For example:
and in ACN
This data structure should be compatible with v1 and optional additional data (up to the size limit defined in the "spare" field octet string). If Then later you can create the V2 like this:
then in ACN:
You can generate the ICD to visualize the resulting encoding:
This will provide this table: Of course you can add new versions indefinitely following this pattern. |
Beta Was this translation helpful? Give feedback.
Extensibility is out of scope in ASN1SCC because it implies that the message receiver cannot know in advance the size of the message. Therefore it cannot have a static allocation of the buffer to store it and this is incompatible with embedded systems (in space at least) where malloc is forbidden.
To my knowledge there is no other means in ASN.1 to provide extensibility or versionning of a type.
As a workaround, you can probably mimick the extensibility mechanism by allocating a spare space in your type (version 1) and use it differently in following versions. ACN helps by giving fine control over the encoding.
For example: