Hi, I'm currently using the ASN1 definitions of SBc-AP (3GPP TS 29.168) in ttcn3 [1],
So I end up with a template like this, which is fine:
template (value) SBC_AP_PDU
ts_SBCAP_WRITE_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
successfulOutcome := {
procedureCode := id_Write_Replace_Warning,
criticality := reject,
value_ := {
write_Replace_Warning_Response := {
protocolIEs := {
{
id := SBC_AP_Constants.id_Message_Identifier,
criticality := reject,
value_ := { Message_Identifier := p_msg_id }
}, {
id := SBC_AP_Constants.id_Serial_Number,
criticality := reject,
value_ := { Serial_Number := p_ser_nr }
}, {
id := SBC_AP_Constants.id_Cause,
criticality := reject,
value_ := { Cause := enum2int(valueof(cause)) }
}
},
protocolExtensions := omit
}
}
}
}
Now, I wanted to replace each {...} IE content with a template, something like:
template (value) ProtocolIE_Container ts_Containerrr(integer bla) := {
id := SBC_AP_Constants.id_Cause,
criticality := reject,
value_ := { Cause := bla }
}
But I got a compilation error:
"SBC_AP_Containers.asn:84: error: `@SBC-AP-Containers.ProtocolIE-Container' is a parameterized type assignment
Checking at ETSI ES 201 873-7 V4.8.1, that doesn't seem to be possible?
Quote:
10 Parameterization in ASN.1
It is not permitted to reference parameterized ASN.1 definitions from within the TTCN-3 module. However,
non-parameterized ASN.1 definitions may reference parameterized ASN.1 definitions by providing the actual
parameters. Such ASN.1 definitions can be imported to and used in TTCN-3 and when importing all definitions of an
ASN.1 module, such definitions shall also be imported.
[1] https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/branch/master/library/sbcap