Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Concatenation of templates(Error value was expected instead of template in concatenation of templates)
Concatenation of templates [message #1851038] Fri, 25 March 2022 11:46 Go to next message
Carlos Arroyo is currently offline Carlos ArroyoFriend
Messages: 12
Registered: June 2020
Junior Member
Dear all,


We are getting an error working with v8.1.0 related to handling of templates which are expected as values.
There is a template(value) concatenated with a list of templates, it may take it as an invalid matching as its seems it expects the added-on templates into values only.


/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:402.7-103: error: Reference to a value was expected instead of template `@NAS_CommonTemplates.cs_ProtocolContainer'
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:403.7-103: In component #2:
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:403.7-103: error: Reference to a value was expected instead of template `@NAS_CommonTemplates.cs_ProtocolContainer'
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:404.7-103: In component #3:
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:404.7-103: error: Reference to a value was expected instead of template `@NAS_CommonTemplates.cs_ProtocolContainer'
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:405.7-103: In component #4:
/mnt/d/STF160_LTE/Trunk/ttcn/Common/EUTRA38/EUTRA38_CommonProcedures.ttcn:405.7-103: error: Reference to a value was expected instead of template `@NAS_CommonTemplates.cs_ProtocolContainer'


In the code, this is as follows.
f_EUTRA38_NR_AdditionalProtocolConfigOptions builds a template list v_ProtocolConfigOptions in 2 parts:
function f_EUTRA38_NR_AdditionalProtocolConfigOptions(EUTRA_CellId_Type p_CellId,
boolean p_IMS_PDN_ConnEstab,
EPS_BearerIdentity p_EpsBearerId := 'C'H,
boolean p_InterworkWithEPS := true,
InterworkWithoutN26 p_IwkN26 := NOT_SUPPORTED) runs on EUTRA_PTC return template (value) NAS_ProtocolConfigOptions_Type
{
var template (value) NAS_ProtocolConfigOptions_Type v_ProtocolConfigOptions := {};
var template (value) QoS_RuleList v_QoS_RuleList;
var template (value) QoS_FlowList v_QoS_Flows;

if (p_IMS_PDN_ConnEstab) {
v_QoS_RuleList := { f_BuildDefaultQoSRule ("2") }; // QoS rules according to TS 38.508-1 [67] Table 4.8.2.1-2 // @sic R5-202585 sic@
v_QoS_Flows := { cs_QoS_Flow2 (p_InterworkWithEPS, '50'O)}; // @sic R5-204488 sic@ Qos flow descriptions refer to TS 38.508-1 [67] 4.8.2.3-2. BearerId hardcoded to 5 for IMS
} else {
v_QoS_RuleList := { f_BuildDefaultQoSRule ("1") }; // QoS rules according to TS 38.508-1 [67] Table 4.8.2.1-1 // @sic R5-202585 sic@
v_QoS_Flows := { cs_QoS_Flow1 (p_InterworkWithEPS, hex2oct(p_EpsBearerId & '0'H))}; // @sic R5-204488 sic@ Qos flow descriptions refer to TS 38.508-1 [67] 4.8.2.3-1
}

if (p_IwkN26 == NOT_SUPPORTED) { // @sic R5-221406 sic@
v_ProtocolConfigOptions := {
cs_ProtocolContainer('001D'O, bit2oct(encvalue(cs_Session_AMBR(omit, '05'O, '0004'O, '05'O, '0004'O)))),
cs_ProtocolContainer('001C'O, bit2oct(encvalue(v_QoS_RuleList))),
cs_ProtocolContainer('001F'O, bit2oct(encvalue(v_QoS_Flows)))};
}

v_ProtocolConfigOptions := v_ProtocolConfigOptions & {
cs_ProtocolContainer('001B'O, '01'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))), // @sic R5s201102, R5-204488 sic@
cs_ProtocolContainer('001B'O, '02'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))), // @sic R5-221467 default now contains 4 SSTs sic@
cs_ProtocolContainer('001B'O, '03'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))),
cs_ProtocolContainer('001B'O, '04'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId)))
};
return v_ProtocolConfigOptions;
}

As per cl 15.11 in the TTCN3 spec, Concatenating templates of string and list types, we expect the concatenation above should be accepted as it is but only if we convert the added-on templates into values, then the error is not shown,
v_ProtocolConfigOptions := v_ProtocolConfigOptions & {
valueof(cs_ProtocolContainer ...

The type definition involved is:
type record ProtocolConfigOptions { /* 24.301 cl. 9.9.4.8 -> 24.008 cl. 10.5.6.3 */
IEI8_Type iei, // @sic R5s110420 sic@
Type4Length_Type iel,
B1_Type ext,
B4_Type spare,
B3_Type configProtocol,
record length (0..83) of
ProtocolContainer pco optional
};

type record ProtocolContainer {
O2_Type protocolID, /* id is always 2 octets */
Type4Length_Type protocolLength optional, // @sic R5s201386 Baseline Moving sic@
Type6Length_Type protocolLongLength optional, // always set to omit in UL @sic R5s201386 Baseline Moving sic@
octetstring content optional
};

type ProtocolConfigOptions.pco NAS_ProtocolConfigOptions_Type;


Please find attached the ATS for your convenience.

Best regards,
Carlos - MCC TF160
Re: Concatenation of templates [message #1851388 is a reply to message #1851038] Mon, 04 April 2022 15:51 Go to previous messageGo to next message
Botond Baranyi is currently offline Botond BaranyiFriend
Messages: 55
Registered: February 2016
Member
Hi Carlos,

this is a limitation of the template concatenation feature in TITAN. See also section 3.11 of our reference guide.

You can get around this by first assembling the 2nd operand of the concatenation in another template variable, and using this variable in the concatenation instead.

For example:
var template (value) NAS_ProtocolConfigOptions_Type v_temp := {
cs_ProtocolContainer('001B'O, '01'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))), // @sic R5s201102, R5-204488 sic@
cs_ProtocolContainer('001B'O, '02'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))), // @sic R5-221467 default now contains 4 SSTs sic@
cs_ProtocolContainer('001B'O, '03'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId))),
cs_ProtocolContainer('001B'O, '04'O & f_Asn2Nas_PlmnId (f_EUTRA_CellInfo_GetGutiPLMN (p_CellId)))
};
v_ProtocolConfigOptions := v_ProtocolConfigOptions & v_temp;


Best regards,
Botond Baranyi
Re: Concatenation of templates [message #1851439 is a reply to message #1851388] Tue, 05 April 2022 16:00 Go to previous messageGo to next message
Carlos Arroyo is currently offline Carlos ArroyoFriend
Messages: 12
Registered: June 2020
Junior Member
Hi Botond,

Thanks for the confirmation. We will go for the workaround for the time being then.

Best regards,
Carlos
Re: Concatenation of templates [message #1860144 is a reply to message #1851439] Wed, 19 July 2023 13:57 Go to previous messageGo to next message
Carlos Arroyo is currently offline Carlos ArroyoFriend
Messages: 12
Registered: June 2020
Junior Member
Hi Botond,

Quick question, as I saw there is a new release, can you please confirm whether this workaround is still needed in v9.0.0 due to the limitation of the template concatenation feature in TITAN ?

Best regards,
Carlos
Re: Concatenation of templates [message #1860158 is a reply to message #1860144] Thu, 20 July 2023 07:12 Go to previous messageGo to next message
Adam Knapp is currently offline Adam KnappFriend
Messages: 54
Registered: November 2020
Member
Hi Carlos,

Yes, it is needed. This behavior has not been changed in the recent release.
Re: Concatenation of templates [message #1862258 is a reply to message #1860158] Tue, 21 November 2023 10:40 Go to previous messageGo to next message
Carlos Arroyo is currently offline Carlos ArroyoFriend
Messages: 12
Registered: June 2020
Junior Member
Adam Knapp wrote on Thu, 20 July 2023 07:12
Hi Carlos,

Yes, it is needed. This behavior has not been changed in the recent release.


Hi Adam,

Thanks for your support. As I see this topic hasn't been updated in the last release v10.0.0, can you share whether you have this planned in a next version?

We will be using the workaround in the meantime.

Best regards,
Carlos
Re: Concatenation of templates [message #1862370 is a reply to message #1862258] Wed, 29 November 2023 10:34 Go to previous messageGo to next message
Adam Knapp is currently offline Adam KnappFriend
Messages: 54
Registered: November 2020
Member
Hi Carlos,

This improvement would require a lot of effort from our side to implement. Unfortunately, we are facing a parser limitation issue and it is not clear at the moment how we can overcome it. Therefore, this task is considered with low priority. Anyway I put it in our backlog.
Re: Concatenation of templates [message #1862371 is a reply to message #1862370] Wed, 29 November 2023 10:40 Go to previous message
Carlos Arroyo is currently offline Carlos ArroyoFriend
Messages: 12
Registered: June 2020
Junior Member
Hi Adam,

Thanks a lot for this information, it is useful for us.

Best regards,
Carlos
Previous Topic:Yang model to TTCN-3
Next Topic:Improving developer experience, profitability and sustainability in TITAN's IDE
Goto Forum:
  


Current Time: Sat Oct 05 12:54:13 GMT 2024

Powered by FUDForum. Page generated in 0.04591 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top