Hi all,
Thanks very much for your help, it has been really useful, our problem = is
solved. Thanks Best Regards,
Sergio Lobato
Cetecom, Spain.
Mensaje original
De: active_ttcn3 : mts stf133 ttcn version 3 - active members only =
[
This email address is being protected from spambots. You need JavaScript enabled to view it.] En nombre de Pavel Yakovenko Enviado el: jueves, 22
de junio de 2006 10:26
Para:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Asunto: Re: Decode question
Hi Sergio
You may create value instance from the provided type and then step = through all
its fields. Smth like:
TciValue val = tciNewInstance(decHypothesis);
if (tciGetTypeClass(decHypothesis) == TCI_RECORD_TYPE) {
String *all_field_names = tciGetRecFieldNames(val);
for (int i = 0; all_field_names && all_field_names
; i++)
{
String field_name = all_field_names;
TciValue field_val = tciGetRecFieldValue(val, field_name);
TciType field_type = tciGetType(field_val);
printf ("Type name of field %s is %s.%s\n", field_name, =
tciGetDefiningModule(field_type), tciGetName(field_type)));
}
}
Best regards,
/Pavel Yakovenko
Original Message
From: active_ttcn3 : mts stf133 ttcn version 3 - active members only =
[
This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Sergio Lobato Lopez
Sent: Thursday, June 22, 2006 9:59 AM
To:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: Decode question
Hi,
It is useful whenever we work with types defined in the same module, but = let's
suppose that we have a record type defined within a module A, and = one of its
fields is i.e. union type and has been defined in a module B, = and furthermore,
its fields (union) have been defined in other module C. = When tciDecode is
called, we only can retrieve the module name A, but = not the remaining modules.
The type name (string) is obtained from a table defined previously (PERL) which contains every type names. So I need to know the module = where
types are defined to achieve a TciType.
Thans very much,
Warm Regards,
Sergio Lobato
Mensaje original
De: active_ttcn3 : mts stf133 ttcn version 3 - active members only =
[
This email address is being protected from spambots. You need JavaScript enabled to view it.] En nombre de Valentin Zaharescu Enviado el: =
miércoles, 21 de junio de 2006 15:10
Para:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Asunto: Re: Decode question
Hi Sergio,
where do you have the type name from? Accordingly to the TCI standard, = the
decode operation of the interface TciCDProvided get called with two =
parameters, one of them being the type as TciType. From this TCI Type = you will
be able to get also the name of the module defining this type.
Best regards,
Valentin Zaharescu
Sergio Lobato López wrote:
> Hi everyone,
> I'm working on a decode, and I need to know the modulename where
> are declared the types defined by the user, and I only have the
> type name stored in a string var but not TciType, hence I can't use
> the fuction tciGetDefiningModule because its argument must be TciType.
> Could anyone tell me if there is any other way to achieve this modulename?
>
> Thanks & Regards
> Sergio Lobato
> Cetecom, Spain
>
>
--
Valentin Zaharescu
Testing Technologies IST GmbH
Rosenthaler Str. 13, 10119 Berlin, Germany
phone: +49 30 726 19 19 17
fax : +49 30 726 19 19 20
email:
This email address is being protected from spambots. You need JavaScript enabled to view it.
web :
www.testingtech.de