Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Uffe

Pages: 1 ... 122 123 [124]
1846
Automation Interface, Add-Ins and Tools / DDS Add-In: QoS tags go missing
« on: September 18, 2007, 08:21:47 pm »
Hey everybody,


I've bumped into a pretty serious issue with the DDS Add-In and I'm wondering if anyone's got a workaround.

Topics and other DDS entities have QoS parameters assigned to them using tagged values. These vanish, making it impossible to change the QoS settings.

I have not been able to ascertain under which exact circumstances the tags go AWOL, but once it happens it's universal through the project. The only QoS tags that remain are those whose value you have already changed at least once.

I've exported identical data structures from a corrupt and a good project. In the corrupt XMI file the QosProperty for a topic had lost its own "classifier" and "classname" tags.

Does anyone know why this is, and what steps can be taken to remedy the situation? At present, all I can do is create a new project and start from scratch. Not really acceptable.

Cheers,


/Uffe

1847
Automation Interface, Add-Ins and Tools / Re: DDS Add-In modifications
« on: August 09, 2007, 09:43:49 pm »
Hey dudes,

Sorry, but I've been travelling for a couple of days and now I'm off on a three-week vacation, so the posting of my code gen hacks will have to wait.

/Uffe

1848
Automation Interface, Add-Ins and Tools / DDS Add-In modifications
« on: August 05, 2007, 04:51:10 pm »
Hello,

I've made some modifications to the DDS Add-In code generation template I'd like to submit for possible inclusion into the next version.
Should I post them here or send them by e-mail and if so, who to?

Cheers,


/Uffe

1849
Automation Interface, Add-Ins and Tools / Re: Stereotype inheritance
« on: July 31, 2007, 04:24:26 pm »
Hi again,


I am most dreadfully sorry - what was I drinking thinking? I meant stereotype, of course.

What I want to do is define a profile where a class stereotype S contains a tagged value of stereotype A (in the same profile).
I then want to create a stereotype B as a generalization of A (still in the same profile), and (in a class diagram that uses the profile) be allowed to use both <<A>> and <<B>> classes as values for the tagged value in an <<S>> class. This doesn't seem physically possible.

Sorry about the confusion, which I have now probably only added to. But the question remains: is there a way around this?

Cheers,


/Uffe

1850
Automation Interface, Add-Ins and Tools / Stereotype inheritance
« on: July 30, 2007, 08:36:19 pm »
Hello gurus,

If I in a UML profile define a prototype for a class, say, can I generalize it and have that work in f'rinstance code generation?
In other words, is prototype inheritance possible?
I've done some tests and they seem to indicate the answer is no, but then again I simply might not be getting it. It's happened before once.

Cheers,


/Uffe

1851
Alright, here's a 100% all-natural newbie question: how do I extract the properties? Other than the %package...%, and there's only four of them, I don't know any method of finding package properties.

In other news, the workaround I'm currently using is to create a package stereotype which has an enumerated tagged value. The enumeration type contains the different kinds of package I want to be able to recognize, and I can use the %packageTag% macro to find this value.

/Uffe

1852
Greetings,

In a Code Generation Template, is there any way to grab hold of a package stereotype?
There's no %packageStereotype% macro, and a Namespace stereotyped override seems to have no effect.
I'm on 6.5.806 in production, but my 7.0.813 evaluation installation appears to behave identically.

Cheers,


/Uffe

1853
Hi again,

Thanks for that, works like a charm.
However, I noticed that part of the problem was the fact that some of my packages only contain other packages, no classes.
These classless packages seem to be ignored in the generation process; the Namespace template only produces output for packages with classes (although a subpackage of a childless package is processed).

Any hints?

Cheers,


/Uffe

1854
Hey people!

I'm creating UML profiles and code generation templates for various nefarious purposes. There's a couple of things I don't get, or just can't do properly:

1) Packages. It seems the %packagePath% always comes out the same as the %packageName%, even if the class being generated is three levels into a hierarchy. It seems that only the View level package is actually translated into a %packageName%. What am I missing?

2) Multi-class files. I'd like to generate all classes in a package into one and the same file, but when I specify the same file name for the classes they end up overwriting each other. Ideally, I'd like to be able to generate a whole hierarchy of packages into one file. Considering that there's no %package% template hook, is this possible? Are there any plans to incorporate a %package% hook in a future version?

All help appreciated.

Cheers,


/Uffe

1855
Hi again,


Thanks for that. It solved one of my problems, and got me thinking in a different direction which enabled me to hack something together for the numbering as well, and it ain't pretty but it works.

Attribute__Name
Code: [Select]
%attName%

Attribute__Id
Code: [Select]
$attrNames = %list="Attribute__Name" @separator="#"%
$attrName = %attName%
$attrPos = %FIND($attrNames, $attrName)%
$attrNames = %LEFT($attrNames, $attrPos)%
$attrNames = %TO_UPPER($attrNames)%
$attrNames = %REPLACE($attrNames, "A", "")%
$attrNames = %REPLACE($attrNames, "B", "")%
$attrNames = %REPLACE($attrNames, "C", "")%
... (one for each legal attribute name character)
$attrNames = %REPLACE($attrNames, "8", "")%
$attrNames = %REPLACE($attrNames, "9", "")%
%LENGTH($attrNames)%


The above puts all the attribute names in a #-separated string, then finds the current attribute's name in that string and cuts everything from that position. We're then left with only the names of those attributes preceding the current one in the #-separated string.
Deleting all the legal attribute name characters leaves us with a string with just #'s in it, one for each attribute preceding the current one. The length of this string is the zero-based attribute number.

So it can be done. Please everybody, don't use this code. It's not something I'd care to put my name to. :)

1856
Hey everyone,


I'm setting up code generation templates for some proprietary config / scripting languages we use.

In one of these, I need to be able to
a) Output the number of elements in a class, and
b) Output the (zero-based) element numbers.

According to the help files there are no numeric variables in the code generation language; all variables are strings.

Variables are local to a template and do not retain their values between successive calls. So I can't, say, initialise a (string) variable in the Class Body template, then in Attribute output LENGTH($var) and set $var = $var + "x" to increase the length by one. Which would have been neat.

If you fiddle around with the attribute list in the Attributes dialog for a class you'll find an ID column to the right of the Initial Value column. These IDs are one-based, but if I could subtract 1 from each of them (or write a monster %if statement to output one less than the ID), I'd get what I need. However, the field is not mentioned in the help file's list of Field Substitution Macros, and %attID% is not recognised by the framework (produces no output).

So:

1) Does anyone know of a simple way to access the number of elements in a class, rather than counting them?

2) Does anyone know of a way to do simple arithmetic in the code generation language?

3) Does anyone know of a way to access the Attribute ID field? No, it's not the GUID. Thanks.

4) Does anyone know of a way to create a global variable?

5) Does anyone have any other bright ideas?

I know that with a full-fledged Add-In you've got all the freedom you need, it's just it seems a bit excessive to me to go through that whole process just for x = x + 1.

I'm using EA 6.5.806 on my production machine, 7.0.813 is still in evaluation (by me), but seems to be no different in this regard.

(Adding %attID% and %classNrAttributes% would of course solve my problems too...)


Cheers,


/Uffe

1857
Hi there,

In the DDS Add-In Beta 1, defining an application which uses more than one domain participant results in a warning during model validation.
Code can be generated, but the resulting application has only one domain participant, whose publisher and/or subscriber has readers/writers for all the topics specified in the participants the application uses in the model. This is not an equivalent solution, since the topics (in the model) belong to different domains and a domain participant participates in one domain only.
Also, in the generated (C++) applications the domain identity is passed as a single command-line argument, meaning the application can participate in only one domain.

The RTIDDS User's Manual 4.1 explicitly lists multiple participants in a single application as a possibility (section 2.4, page 2-10).
Is this Add-In limitation just an artifact in the Beta (and as such one that will be removed in the production release), and if not, what is the reason for it?

Thanks,


/Uffe

1858
Automation Interface, Add-Ins and Tools / DDS Add-In Java generation
« on: February 04, 2007, 04:53:00 pm »
Hi all,

I've been trying out the DDS Add-In over a few weeks and have not once managed to get it to generate Java code.
I've specified Java and the j2sdk platform in the applications' tagged values, and Java as the language in everything else - but still it generates C++ code.
Does anyone know what I'm doing wrong?

Cheers,

/Uffe

1859
Automation Interface, Add-Ins and Tools / DDS Add-In release?
« on: February 04, 2007, 04:47:16 pm »
Hi!

I've been evaluating the DDS Add-In, Beta 1. I like it a lot, but of course it is not yet at production grade.
Could anyone enlighten me as to the release schedule and pricing?

Thanks,

/Uffe

Pages: 1 ... 122 123 [124]