ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0005989 | Part 06: TTCN-3 Control Interface | Clarification | public | 21-12-2011 15:01 | 14-12-2012 12:57

Reporter | Anthony Baire |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.3.1 (published 2011-06) |
Target Version | v4.5.1 (published 2013-04) | Fixed in Version | v4.5.1 (published 2013-04) |
Clause Reference(s) | 7.3.4.1
Source (company - Author) |

Summary | 0005989: the timestamp parameter ts has no unit

Description

The TL document does not specify the unit of the timestamp parameter (ts) in each TL operation.
Should it be seconds ? milliseconds ? microseconds ? and which epoch should be used ?
Using second may not be granular enough. I would prefer having a stuctured value, like the timeval representation commonly used on POSIX systems:
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
21-12-2011 15:01 | Anthony Baire | New Issue |
21-12-2011 15:01 | Anthony Baire | Clause Reference(s) | => 7.3.4.1
21-12-2011 15:01 | Anthony Baire | Source (company - Author) | =>
10-07-2012 14:20 | Gyorgy Rethy | Note Added: 0010761 |
10-07-2012 14:20 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
10-07-2012 14:20 | Gyorgy Rethy | Status | new => assigned
10-07-2012 14:20 | Gyorgy Rethy | Resolution | open => fixed
10-07-2012 14:20 | Gyorgy Rethy | Target Version | => Edition 4.5.1
10-07-2012 14:20 | Gyorgy Rethy | Description Updated |
13-12-2012 16:22 | Ina Schieferdecker | Note Added: 0011256 |
13-12-2012 16:22 | Ina Schieferdecker | Note Added: 0011257 |
13-12-2012 16:23 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Tomas Urban
14-12-2012 08:38 | Tomas Urban | Note Added: 0011264 |
14-12-2012 08:38 | Tomas Urban | Assigned To | Tomas Urban => Ina Schieferdecker
14-12-2012 10:38 | Ina Schieferdecker | Note Added: 0011269 |
14-12-2012 10:39 | Ina Schieferdecker | Note Added: 0011270 |
14-12-2012 10:39 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Tomas Urban
14-12-2012 12:45 | Tomas Urban | Note Added: 0011276 |
14-12-2012 12:45 | Tomas Urban | Assigned To | Tomas Urban => Ina Schieferdecker
14-12-2012 12:57 | Ina Schieferdecker | Note Added: 0011280 |
14-12-2012 12:57 | Ina Schieferdecker | Status | assigned => closed
14-12-2012 12:57 | Ina Schieferdecker | Fixed in Version | => Edition 4.5.1

Notes

(0010761)
Gyorgy Rethy
10-07-2012 14:20

STF discussion 2012-07-10: add a note refering to Part-1, where time units are defined in sec/s

(0011256)
Ina Schieferdecker
13-12-2012 16:22

Add in "7.3.4.1 TCI TL provided
This clause specifies the operations the TL shall provide to the TE.
..."
a note that explains the timestamp:
"7.3.4.1 TCI TL provided
This clause specifies the operations the TL shall provide to the TE.
Note: A logging event is timestamped by non-negative float values where the base unit is seconds, e.g. millisecond or microsecond precision are possible. The encoding of timestamps as well as their representation in different time formats, e.g. in an execution trace or log file, are tool-specific.
..."

(0011257)
Ina Schieferdecker
13-12-2012 16:22

Please check the note given in the comment above.

(0011264)
Tomas Urban
14-12-2012 08:38

I am afraid I cannot completely agree with this solution. First of all, time stamp mapping is platform-specific. There are already two mappings that provide unambiguous time stamps: the C# mapping uses a System.DataTime object and C++ mapping uses the timeval structure. Thus, the problem Anthony mentioned affects only the remaining mappings: java, C and XML (and I guess Anthony had in mind the C mapping in particular). Therefore the solution cannot be a general one as proposed, because it would reduce functionality of C# and C++ versions of the interface.
The proposed change is also not backwards compatible. If we already decide for this kind of change, I would prefer to have a solution that is not tool-specific. Both java and XML contain well-defined representations of time stamps: java.util.Date and xsd:dateTime. The situation is a bit more problematic in case of C, because there's no standardized time stamp implementation. However, I think it would be reasonable to use the timeval structure as in case of C++ mapping (and as proposed by Anthony). The timeval structure is defined in the POSIX standard (the C++ mapping shall contain a reference to this standard, but currently it doesn't).

(0011269)
Ina Schieferdecker
14-12-2012 10:38

Revised proposal:
"7.3.4.1 TCI TL provided
This clause specifies the operations the TL shall provide to the TE.
NOTE: A logging event is timestamped. The timestamps are specific to the language mapping and to the tool used. For example, C# mapping uses System.DataTime objects and C++ mapping uses the POSIX timeval structure. Java, C and XML use integer instead, so that a tool has to choose its timestamp handling. For example, for Java System.currentTimeMillis() could be used or for C time()."

(0011270)
Ina Schieferdecker
14-12-2012 10:39

Please check.

(0011276)
Tomas Urban
14-12-2012 12:45

I think this solution is the best what we can achieve without resorting to changes that would cause problems with backwards compatibility. So it is fine with me.

(0011280)
Ina Schieferdecker
14-12-2012 12:57

Thanks.