Home » Eclipse Projects » Eclipse Titan » Native ASN.1 PER encoding/decoding
| | | | | |
Re: Native ASN.1 PER encoding/decoding [message #1861716 is a reply to message #1861683] |
Mon, 30 October 2023 17:25 |
Botond Baranyi Messages: 55 Registered: February 2016 |
Member |
|
|
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 08:21 |
Olaf Bergengruen Messages: 127 Registered: November 2018 |
Senior Member |
|
|
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 46 times)
|
|
| | |
Goto Forum:
Current Time: Wed Oct 09 19:41:42 GMT 2024
Powered by FUDForum. Page generated in 0.06536 seconds
|