Book a Demo

Author Topic: Cannot code generate from state machine diagram  (Read 13030 times)

JayStoutenburg

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Cannot code generate from state machine diagram
« on: September 24, 2014, 05:12:15 am »
Using EA 11 Ultimate Trial, I can successfully generate code for the EAExample IO.cpp & IO.h files, but I cannot generate state machine code for my model.   .C and .H files are generated with the modeled attributes and operations, but the modeled substatemachine is not generated at all.

I'm reviewing EA 11 mainly for code generation purposes. What am I missing to get a statemachine diagram to be recognized ?
Thanks !

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Cannot code generate from state machine diagra
« Reply #1 on: September 24, 2014, 08:02:36 am »
Has your state machine been created under the class? That's the first thing that comes to mind.

JayStoutenburg

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Cannot code generate from state machine diagra
« Reply #2 on: September 25, 2014, 05:11:29 am »
Simon,

I thought it was, but not. After re-reading the "Embedded Systems Development using Sysml" pdf http://www.sparxsystems.com/resources/booklets/ebook_list.html and keeping my test model very simple, I'm able to get it working. "Hello, world" first and all that.
Thank you for your help !
Cheers...

JayStoutenburg

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Cannot code generate from state machine diagra
« Reply #3 on: September 25, 2014, 06:53:42 am »
Where can I find examples of using the generated code in an existing legacy code base ?  Our 'boot micro' reads sensors, handles bus I/O, and has a conglomeration of control "logic". We're looking into modeling the actual 'boot micro' control requirements & actions as a state machine. I need to fit the resulting EA-generated code into the rest of the sensor, I/O, HW, etc, code that we aren't changing.  Are examples of calling external functions, initializing the state machine before use, etc, available ?
Thank you !