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 |
Carlos Arroyo 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 |
Botond Baranyi 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
|
|
| | | | | | |
Goto Forum:
Current Time: Sat Oct 05 12:54:13 GMT 2024
Powered by FUDForum. Page generated in 0.04591 seconds
|