从状态图中生成 switch-case 函数

Generating switch-case function out of State chart

虽然我的问题很简单,但我找不到答案。

我在 Rhapsody 中创建了一个 class 并将状态图关联到此 class 但是当我生成代码时我无法在与状态相关的 class 中找到和编码图表。

是否有任何函数需要创建为触发器或者我是否遗漏了什么?

我的示例状态图:

找了半天终于找到了阻止生成的选项

首先你需要定义一个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