主要内容

Stateflow.EventDebug

R2026b

事件的调试器属性

    描述

    使用 Stateflow.EventDebug 对象指定事件的调试器属性。

    创建对象

    每个事件都有自己的 Stateflow.EventDebug 对象。要访问 Stateflow.EventDebug 对象,请使用 Stateflow.Event 对象的 Debug 属性。

    属性

    全部展开

    Stateflow® API 对象具有与您在 Stateflow 编辑器中设置的值对应的属性。要访问或修改属性,请使用圆点表示法。要访问或修改多个 API 对象的多个属性,请分别使用 get 和 set 函数。有关详细信息,请参阅Modify Properties and Call Functions of Stateflow Objects。

    事件的断点属性,指定为具有以下属性的 Stateflow.EventBreakpoints 对象:

    • StartBroadcast - 是否设置 Start of Broadcast 断点,指定为数值或逻辑值 1 (true) 或 0 (false)。

    • EndBroadcast - 是否设置 End of Broadcast 断点,指定为数值或逻辑值 1 (true) 或 0 (false)。

    有关详细信息,请参阅Set Breakpoints to Debug Charts。

    示例

    全部折叠

    访问 event 对象 Stateflow.EventDebug 的 Stateflow.EventBreakpoints 和 Stateflow.Event 对象。

    debug = event.Debug;
    breakpoints = debug.Breakpoints;

    设置 Start of Broadcast 和 End of Broadcast 断点。

    breakpoints.StartBroadcast = true;
    breakpoints.EndBroadcast = true;

    版本历史记录

    在 R2006a 之前推出