Replies: 2 comments 1 reply
-
In order to apply a transformation, you need to provide it in the form of C (or Ada) code. Given this grammar:
You can write this
And if you provide these 2 C functions:
The ASN.1 compiler will generate a call to these functions automatically. We did consider in the past the inclusion of arithmetic functions but we soon realized that they could not easily cover a variety of cases, for which the value is transformed in more complex ways. There is an example in the documentation for the MILBUS 1553 packets, where the transformation is the following: length determinants of size (1..32) arrays are encoded using 5 bits and the size 32 is encoded with value 0 (i.e. 0 means 32 elements). This is easy to write in C ( |
Beta Was this translation helpful? Give feedback.
-
That makes sense and the Would you be able to point me to any documentation regarding the Thanks again! |
Beta Was this translation helpful? Give feedback.
-
I would like to be able to apply basic arithmetic operations to the values in size determinants for ACN encoding
As an example, the CCSDS Space Packet specification defines the packet data length field as the number of octets trailing the primary header, minus 1.
So I would like to define the data field as, e.g.:
Is something like this possible?
Beta Was this translation helpful? Give feedback.
All reactions