Discussion:
statechart drwaing & code generation
Ruud den Bekker
2010-10-28 18:40:40 UTC
Permalink
L.S.,

How can I draw statecharts using Astade.
And how to generate code from it?

Best regards,

Ruud den Bekker

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2676812

To unsubscribe from this discussion, e-mail: [users-unsubscribe-***@public.gmane.orgis.org].
Thomas Spitzer
2010-10-28 19:12:04 UTC
Permalink
Post by Ruud den Bekker
L.S.,
How can I draw statecharts using Astade.
I guess you already use Astade for generating classes?

A state chart is a special class, just create it.
(Rightclick on a "classes" element and select "add statechart"

Select the context dialog on the statechart and select "Statechart" and
it should be drawn.
Post by Ruud den Bekker
And how to generate code from it?
1. Create a state chart
2. Select a Coder (There are 5 or 6 different coders)
3. add it to your active component
4. Select "generate code"

If you try the above process and run into trouble, describe the problem
more detailed. I'll try to answer directly to the problem.

One word, why there are so many coders: A state chart needs a message
passing framework to function. C++ don't has a message passing inside
the language, so you need some library, which implements message
passing.

If you use wxWidgets, for example, you should try the
"StateChartCoderWx" by writing "Wx" into the "coder" Field inside the
state chart feature dialog.
If you want to try the Astade Message Passing framework "ACF" you might
use the coder "StateCartCoderACF".

The coder "StateChartCoder" tries a somewhat "general" implementation,
which might be used with nearly any Framework, but it needs some "glue
code" to function.

Regards

Thomas

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2676819

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
Anders Larsen
2010-10-28 20:07:09 UTC
Permalink
Post by Thomas Spitzer
If you want to try the Astade Message Passing framework "ACF" you might
use the coder "StateCartCoderACF".
Or, if you prefer C++ over C, use the StateChartCoderACF++

You'll find example statecharts for different coders in the Astade model
below the unit-test component.

Cheers
Anders

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2676831

To unsubscribe from this discussion, e-mail: [users-unsubscribe-***@public.gmane.orgis.org].
webpost-jqHnx1hy4Dsdnm+
2010-11-08 19:47:14 UTC
Permalink
Hello Thomas,

If I right-click on a class, I do not have "add statechart" in my context menu.

I can only add: attributes, operations and types.

I'm using releae 1.1.1 of the windows version.

How can I solve this?

Best regards,

Ruud

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2680112

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
Anders Larsen
2010-11-09 08:40:54 UTC
Permalink
Hello Ruud,
Post by webpost-jqHnx1hy4Dsdnm+
If I right-click on a class, I do not have "add statechart" in my context menu.
I can only add: attributes, operations and types.
a statechart is a class of its own; when you right-click "classes", the "add statechart" context menu will appear.
In the statechart-class you add the states and transitions and specify actions and guards.
The statechart-class is intended as a base-class; actions and guards are implemented in a derived class.

HTH
Cheers
Anders

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2680389

To unsubscribe from this discussion, e-mail: [users-unsubscribe-***@public.gmane.orgis.org].
webpost-jqHnx1hy4Dsdnm+
2010-11-13 09:10:18 UTC
Permalink
Hi Anders,

Ok, found it.

Is there a way to draw the statechart using a graphical editor?

Regards,

Ruud

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2681474

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
t.spitzer-sQvDcPvFtuYByEq3+
2010-11-13 13:35:35 UTC
Permalink
Post by webpost-jqHnx1hy4Dsdnm+
Is there a way to draw the statechart using a graphical editor?
You can use AstadeDraw (a graphical editor) to draw statecharts. But
there is not yet a link to the code generation.

So if you are in design phase only, you might use AstadeDraw.
If you want generated code, you have to use the tree dialog (for now).

Greetings

Thomas

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2681531

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
webpost-jqHnx1hy4Dsdnm+
2010-11-13 16:05:04 UTC
Permalink
Hi Thomas,

That's a pitty. The power of statechart views is that it can be used to discuss with others. The tree view is useless for that purpose.

are there plans to implement graphical entry connected to the code generation possibility?

Regards,

Ruud

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2681555

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
Thomas Spitzer
2010-11-13 18:22:01 UTC
Permalink
Post by webpost-jqHnx1hy4Dsdnm+
That's a pitty. The power of statechart views is that it can be used to discuss with others. The tree view is useless for that purpose.
Maybe you got me wrong. Of course you get a graphical representation of
the state chart _and_ the code for it.

The only thing I said, the edit is in the tree view.
It is not a graphical _editor_ only a graphical _view_.

The way it works:

Add a state chart. Add States. Add transitions ... (in the tree)

After each step you can select "Statechart" in the context menu (of the
state chart element) and get the graphical representation of what you
typed in.

To make it really clear: You _can_ generate state chart graphics _and_
code for them with Astade. And you are always sure, they are consistent!
And you can discuss the state chart views with others.

The _dialog_ to do that is not in the graphic (it's not a graphic
editor) but in the tree.
Post by webpost-jqHnx1hy4Dsdnm+
are there plans to implement graphical entry connected to the code generation possibility?
The AstadeDraw is designed to work for that purpose, one time.
At the moment there are no "plans" to implement it that way.
In this state AstadeDraw is just a drawing tool, mainly interesting for
Use case diagrams and component diagrams.
But it can draw state charts, too.
All diagrams done with AstadeDraw are only for documentation, there is
no code generation for them.

Code is generated based on what is in the element tree.


Regards

Thomas

------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2681566

To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].
Loading...