rhapsodymicroc

Generating switch-case function out of State chart


Although my question is very simple I can't find an answer for it.

I created a class in Rhapsody and associated a statechart to this class but when I generate the code I can't find and code in the class related to the state chart.

Is there any function that needs to be created as a trigger or am I missing something?

my example state chart: enter image description here


Solution

  • After searching for a long while I could find the option that was preventing the generation.

    First of all, you need to define a reactive class to be able to generate a code for a state machine. This point was OK for me and I thought this was only what matters until I found this property here:

    The _CG::Statechart::StatechartStateOperations property determines whether the code is generated for this feature. The possible values for this property are:

    None (default value) where code is not generated for the feature.

    WithoutReactive where the product does not generate calls to OMReactive

    WithReactive where the product generates calls to OMReactive