Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: A bug in Telelogic TAU 4.6 User's Manual ?
Topic Summary:
Created On: 28-Jan-2005 01:58
Status: Read Only
Rate this topic Rate this topic
Terrible Terrible
Poor Poor
Fair Fair
Good Good
Very Good Very Good
Excellent Excellent
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Tomas Gustafsson, on Friday, March 4, 2005 10:31 AM

Answer:
Hello Morton

This is a correct observation, the example is incorrect. This will be corrected in documentation that comes with TTCN Suite in future releases.

The Encode section at User's Manual -> Adaptation of Generated Code -> GCI C Code Reference -> Value Interface will say:


void EncodeT4( Buffer buf, GciValue* v )
{
  GciValue* tmp;


  BufWriteType( buf, GcT4D );


  /* Encode first field */


  EncodeT1( buf, GciGetField( v, 1 ));


  /* Now encode inline type definition */


  tmp = GciGetField( v, 2 );


  BufWriteInt( buf, GciGetField( tmp, 1 ));


  EncodeT2( buf, GciGetField( tmp, 2 ));


}


Best regards,

Tomas Gustafsson
 28-Jan-2005 01:58
User is offline View Users Profile Print this message


Morton Lin

Posts: 1
Joined: 6-Jan-2005

Hi, folks :

I found a strange example code in the Telelogic TAU 4.6 User's Manual.
In page 1496, the Encode example code :

---- 8< ----
tmp = GciGetField( v, 2 );
BufWriteInt( buf, GciGetField( tmp, 0 ) );
EncodeT2( buf, GciGetField( tmp, 1 ) );
---- >8 ----

The GciGetField function's description in page 1491 told me that
the index should be counted from "1". Why did the Encode example
above show me that the index start from "0" ? Did I misunderstand
something ? Or its a special case for In-line ASN.1 Type encoding
situation ?


Best regards,
Morton Lin.

Report this to a Moderator Report this to a Moderator
 28-Feb-2005 12:07
User is offline View Users Profile Print this message


Tomas Gustafsson

Posts: 2
Joined: 23-Nov-2004

Answer Answer
Hello Morton

This is a correct observation, the example is incorrect. This will be corrected in documentation that comes with TTCN Suite in future releases.

The Encode section at User's Manual -> Adaptation of Generated Code -> GCI C Code Reference -> Value Interface will say:


void EncodeT4( Buffer buf, GciValue* v )
{
  GciValue* tmp;


  BufWriteType( buf, GcT4D );


  /* Encode first field */


  EncodeT1( buf, GciGetField( v, 1 ));


  /* Now encode inline type definition */


  tmp = GciGetField( v, 2 );


  BufWriteInt( buf, GciGetField( tmp, 1 ));


  EncodeT2( buf, GciGetField( tmp, 2 ));


}


Best regards,

Tomas Gustafsson

Edited: 1-Mar-2005 at 16:48 by Tomas Gustafsson
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 1 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.