Home » Eclipse Projects » Eclipse Titan » Native ASN.1 PER encoding/decoding
Native ASN.1 PER encoding/decoding [message #1858261] |
Sat, 25 March 2023 07:04  |
Eclipse User |
|
|
|
Hi Titan ASN.1 experts,
I understand that you guys are working on native/built-in ASN.1 PER codecs and I am very interested in experimenting with it, even if it is not yet complete.
Do you have a simple project for experimenting with ASN.1 PER encoding/decoding which you could share in this forum?
Regards,
Olaf
|
|
| | | | | |
Re: Native ASN.1 PER encoding/decoding [message #1861716 is a reply to message #1861683] |
Mon, 30 October 2023 13:25   |
Eclipse User |
|
|
|
Hi Olaf,
the difference between the two decoded values is that our decoder leaves the missing extension addition field 'dmrs-Uplink-r16' as unbound, while in 'tsc_PUSCH_Config' it is set to 'omit'.
You also haven't set which version of PER to use in your external function implementation (i.e. unaligned or aligned, and basic or canonical), but it seems to be working anyway.
For example:
p_PUSCH_Config.encode(*p_PUSCH_Config.get_descriptor(), buffer, TTCN_EncDec::CT_PER, 0);
or
p_PUSCH_Config.encode(*p_PUSCH_Config.get_descriptor(), buffer, TTCN_EncDec::CT_PER, PER_ALIGNED);
In order to use PER with 'encvalue' and 'decvalue' you need to set the string encoding parameter to "PER", like this:
v_Encoded := encvalue(tsc_PUSCH_Config, "", "PER");
There is no option to set the alignment or canonicalness in this case, encvalue and decvalue always uses unaligned, basic PER currently.
Best regards,
Botond
|
|
| | | | | | | |
Re: Native ASN.1 PER encoding/decoding [message #1861813 is a reply to message #1861769] |
Mon, 06 November 2023 03:21   |
Eclipse User |
|
|
|
Good morning Botond,
there seems to bee an inconsistency when handling ASN.1 extentsion markers {...}. To investigate this easily I prepared a simple project attached below.
Consider template tsc_SIB1
const BCCH_DL_SCH_Message tsc_SIB1 :=
{
message_ := {
c1 := {
systemInformationBlockType1 := {
cellSelectionInfo := {
q_RxLevMin := -55,
q_RxLevMinOffset := omit,
q_RxLevMinSUL := omit,
q_QualMin := omit,
q_QualMinOffset := omit
},
ims_EmergencySupport := true_,
eCallOverIMS_Support := omit,
ue_TimersAndConstants :=
{
t300 := ms1000,
t301 := ms1000,
t310 := ms1000,
n310 := n1,
t311 := ms30000,
n311 := n1,
t319 := ms1000
},
eCallOverIMS_Support2 := true_
} // systemInformationBlockType1
} //c1
} // message
};
When encoding this template we get
'760796D18500'O <-- Titan PER encoding
'7607ADA30A'O <-- Pycrate based encoding
Do you or someone else have access to commercial tools to decode these octet strings and find out whether the Titan implementation has a bug or not?
Regards,
Olaf
Attachment: T3.zip
(Size: 5.71KB, Downloaded 79 times)
|
|
| |
Re: Native ASN.1 PER encoding/decoding [message #1861829 is a reply to message #1861828] |
Tue, 07 November 2023 04:43  |
Eclipse User |
|
|
|
Great, Botond!
The reference encoding I used was done as follows: Titan OER encoding followed by Pycart OER to PER conversion. But this is error prone and was not sure whether it worked, and I cannot inspect the encoded octet string as you do :-)
I conform that now all my tests PASS.
Olaf
|
|
|
Goto Forum:
Current Time: Fri Jul 11 21:02:51 EDT 2025
Powered by FUDForum. Page generated in 0.69120 seconds
|