Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Order of members of type in a template
Order of members of type in a template [message #1721714] Fri, 29 January 2016 11:49 Go to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

Is it neccesary for the order of types initialized in a template to be same as in the definition?
For example for the following type:
type record Details {
        integer n1 optional,
        integer n2
}

Can't we define a template with order of the members changed as:
template Details fill_details := {
        n2 := 2,
        n1 := 1
}


Thanks
Murli
Re: Order of members of type in a template [message #1721716 is a reply to message #1721714] Fri, 29 January 2016 12:00 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

I'm pretty sure this is not permitted by the standard for a record.

Best regards

Elemer


Re: Order of members of type in a template [message #1726659 is a reply to message #1721716] Tue, 15 March 2016 11:43 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

We've got some TTCN-3 Scripts from one vendor.
In these scripts, the order of members initialized in templates is different from what is defined in corresponding ASN types.
We said them that this is not as per TTCN-3 spec (as mentioned by you) and asked them to fix it but they say that there is no such restriction and this is legal according to TTCN-3 spec.
I couldn't find a reference about it in the TTCN-3 spec to give to the vender. Can you please help me with this.

Thanks
Murli
Re: Order of members of type in a template [message #1726661 is a reply to message #1726659] Tue, 15 March 2016 12:32 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

please see

The Testing and Test Control Notation version 3;
Part 7: Using ASN.1 with TTCN-3

11 Defining ASN.1 message templates

11.3 Ordering of template fields
When TTCN-3 templates are used for ASN.1 types the significance of the order of the fields in the template will depend on the type of ASN.1 construct used to define the message type. For example: if SEQUENCE or SEQUENCE OF is used
then the message fields shall be sent or matched in the order specified in the template. If SET or SET OF is used then the message fields may be sent or matched in any order.

I think this is quite straightforward.



Best regards
Elemer
Re: Order of members of type in a template [message #1726750 is a reply to message #1726661] Wed, 16 March 2016 07:45 Go to previous message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the info.
Previous Topic:Support for anytype
Next Topic:Manual Operations
Goto Forum:
  


Current Time: Thu Apr 25 02:03:52 GMT 2024

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

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

Back to the top