Post by webpost-jqHnx1hy4Dsdnm+Your AT128 project, was that done in C or C++?
It is in C.
Post by webpost-jqHnx1hy4Dsdnm+I would be interested in the model, to see how you approached the problem with Astade to get C code.
I can send the Model to you.
Post by webpost-jqHnx1hy4Dsdnm+Also, if you have a simple state machine set up in c, that builds (like your light switch or similar) that would help.
In the Astade Model there is an example. In the Unit Test section there
is an component "ACF_test" which is an example for a state chart use in
C environment.
Post by webpost-jqHnx1hy4Dsdnm+I wasn't able to get anything to build within the model.
So lets do a "step by step" tutorial:
Lets start in a desktop environment. You use Windows, correct?
And you want to generate state charts using only C, correct?
So you should start the following way:
1. Install Astade
2. Check out the Astade Model
3. Open the Model
4. Test weather you installation is OK: Can you see object model
diagrams? Can you see state charts?
5. Select ACF_test as active component
6. generate code for it (should be in the "auto" folder
7. Have a rough look into the generated code
If you work in Windows, some additional work to do:
8. Adapt the file ACF_Hal.c (in "manual") so it can work for Windows
9. Add a Configuration for Windows (if you need help, mail in this list)
10. Switch on "tracing" for the classes "TickTackToe" and friends
11. Compile the Program
12. You should get the following Text output:
Initialisation done!
[1291570132.795] ~ (!) 0x7fff0f0e7020:trigger_impl
[1291570132.795] 0x7fff0f0e7020:trigger_impl (!) 0x7fff0f0e7020:trigger
[1291570132.795] ~ (!) 0x7fff0f0e7060:TickTackToe_impl
[1291570132.795] 0x7fff0f0e7060:TickTackToe_impl (!)
0x7fff0f0e7060:TickTackToe
[1291570132.795] ~ ==> 0x7fff0f0e7060:TickTackToe Initialize()
[1291570132.795] 0x7fff0f0e7060:TickTackToe >>> tick
[1291570132.795] ~ <== 0x7fff0f0e7060:TickTackToe
[1291570132.795] ~ ==> 0x7fff0f0e7020:trigger Initialize()
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
testonly()
[1291570132.795] 0x7fff0f0e7020:trigger >-- 0x7fff0f0e7060:TickTackToe
push
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570132.795] 0x7fff0f0e7020:trigger >>> onlystate
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
falseAlways()
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570132.795] ~ <== 0x7fff0f0e7020:trigger
[1291570132.795] ~ --> 0x7fff0f0e7020:trigger ACF_timeout
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger
TakeEvent()
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
test()
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
testonly()
[1291570132.795] 0x7fff0f0e7020:trigger >-- 0x7fff0f0e7060:TickTackToe
push
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570132.795] 0x7fff0f0e7020:trigger >>> onlystate
[1291570132.795] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
falseAlways()
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570132.795] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger
[1291570132.795] 0x7fff0f0e7020:trigger --> 0x7fff0f0e7060:TickTackToe
push
[1291570132.795] 0x7fff0f0e7060:TickTackToe ==>
0x7fff0f0e7060:TickTackToe TakeEvent()
[1291570132.795] 0x7fff0f0e7060:TickTackToe >>> tack
[1291570132.795] 0x7fff0f0e7060:TickTackToe <==
0x7fff0f0e7060:TickTackToe
[1291570132.795] 0x7fff0f0e7020:trigger --> 0x7fff0f0e7060:TickTackToe
push
[1291570132.795] 0x7fff0f0e7060:TickTackToe ==>
0x7fff0f0e7060:TickTackToe TakeEvent()
[1291570132.795] 0x7fff0f0e7060:TickTackToe >>> toe
[1291570132.795] 0x7fff0f0e7060:TickTackToe >>> tick
[1291570132.795] 0x7fff0f0e7060:TickTackToe <==
0x7fff0f0e7060:TickTackToe
[1291570133.295] ~ --> 0x7fff0f0e7020:trigger ACF_timeout
[1291570133.295] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger
TakeEvent()
[1291570133.295] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
test()
[1291570133.295] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570133.295] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
testonly()
[1291570133.295] 0x7fff0f0e7020:trigger >-- 0x7fff0f0e7060:TickTackToe
push
[1291570133.295] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570133.295] 0x7fff0f0e7020:trigger >>> onlystate
[1291570133.295] 0x7fff0f0e7020:trigger ==> 0x7fff0f0e7020:trigger_impl
falseAlways()
[1291570133.295] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger_impl
[1291570133.295] 0x7fff0f0e7020:trigger <== 0x7fff0f0e7020:trigger
[1291570133.295] 0x7fff0f0e7020:trigger --> 0x7fff0f0e7060:TickTackToe
push
If you put this text into Trace2UML (the Astade Seqence chart drawer)
you get the attached picture
Lets try to follow this 12 steps.
Thomas
------------------------------------------------------
http://astade.tigris.org/ds/viewMessage.do?dsForumId=3430&dsMessageId=2688009
To unsubscribe from this discussion, e-mail: [users-unsubscribe-HcrAt6aCZFAWBrYXtHbyV9i2O/***@public.gmane.org].