Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: TriTimerId questions

TriTimerId questions 23 Feb 2009 14:52 #7540

I'm trying to understand the intention behind the C language binding for
TriTimerId, defined to be BinaryString:

- Is the data of a BinaryString that represents a timer intended to
convey any specific information? (The specs for the Java binding say
a little bit more, but are still vague on issues such as the naming of
timers that are in arrays.) If it's supposed to be something like the
name of the variable in the TTCN-3 program, why is it a BinaryString
and not a "regular" string?

- What determines the identity of a timer? The address passed to the
various triTimerXXX functions, or the binary string? I.e., if I have
two different objects that have the same bits in their BinaryString
representation, do they represent the same timer or different timers?
(I'm assuming different timers, but am not sure.)

Any help is much appreciated!

--
Regards,
Mike
The administrator has disabled public write access.

TriTimerId questions 24 Feb 2009 08:40 #7541

Hi Michael,

> I'm trying to understand the intention behind the C language binding
> for
> TriTimerId, defined to be BinaryString:
>
> - Is the data of a BinaryString that represents a timer intended to
> convey any specific information? (The specs for the Java binding
say
> a little bit more, but are still vague on issues such as the naming
> of
> timers that are in arrays.) If it's supposed to be something like
> the
> name of the variable in the TTCN-3 program, why is it a BinaryString
> and not a "regular" string?
[STS] A binary string has been chosen as it leaves more implementation
freedom for run time system implementers. These strings are "generated"
or assigned in the TE and passed into the PA and each string value
corresponds to exactly one timer. A character string may be one way of
implementing the standard.

Note that there are explicit as well as implicit timers, e.g., a timer
guarding a test case or procedure based call ... so assigning a
meaningful name is not always as easy as it looks.

> - What determines the identity of a timer? The address passed to the
> various triTimerXXX functions, or the binary string? I.e., if I
have
[STS] I am not sure what you mean .. the answer is the timerId parameter
in the various functions which should be of type binary string.

> two different objects that have the same bits in their BinaryString
> representation, do they represent the same timer or different
timers?
> (I'm assuming different timers, but am not sure.)
[STS] No it is the same timer. Think of it as a character string (which
is one valid way of representing a timer identifier. The same string
refers to the same timer.

BTW - there is no objects in the C .. so your statement about different
objects is a bit confusing.

Salut,
stephan

>
> Any help is much appreciated!
>
> --
> Regards,
> Mike
The administrator has disabled public write access.

TriTimerId questions 28 Feb 2009 13:08 #7542

Thanks for the explanation!

Stephan Schulz <This email address is being protected from spambots. You need JavaScript enabled to view it.> writes:

> [STS] No it is the same timer. Think of it as a character string (which
> is one valid way of representing a timer identifier. The same string
> refers to the same timer.

So this means I can't use the name of the variable holding the timer, as
seems to be the intention of the Java bindings, correct?

> BTW - there is no objects in the C .. so your statement about different
> objects is a bit confusing.

Sure there are objects in C. (At least the ANSI C standard and my copy
of K&R use this term.)

I'll try to clarify:

typedef struct { ... } BinaryString;

BinaryString b1 = { blabla };
BinaryString b2 = { blabla };

There are two different objects b1 and b2. They may denote the same bit
sequence, however: You're saying that, in that case, they also refer to
the same timer. Correct?

This is contrast to this situation:

BinaryString b = { blabla };
BinaryString* b1 = &b;
BinaryString* b2 = &b;

... where b1 and b2 point to the same object.

--
Regards,
Mike
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin