interfaceset

摘要

在联合仿真中,从 ODB 将接口设置为给定值。该命令安排在当前仿真时间、且所有当前事件执行完毕后,将值设置到接口上。

语法

interfaceset <objref> [all | index <n>] <values>

参数 类型 说明
<objref> integer 或 string 目标接口的数字对象 ID 或层次化名称
该参数的对象 ID 可通过 ODB 命令 objmap 或 objid 获取。
all n/a 对于有维接口,在整个数组上设置值。
index <n> integer 对于有维接口,在索引为 <n> 的接口上设置值。
<values> string 要在指定接口上设置的值的字符表示。多个值(用于有维接口)必须以空格分隔。

详细说明

Interfaceset 可用于在输入接口和输出接口上设置值。如果写入的是 Modeler 到外部仿真器的接口,该值会传递给外部代码。如果写入的是外部仿真器到 Modeler 的接口,该值会传递给外部系统定义,但外部代码不会获知接口值已更新。

对于无维接口,不需要 all 和 index 参数。

示例

ODB> objmap esinterface
Obj ID      Obj Name                        Obj Type               Parent ID
-----------------------------------------------------------------------------------
28          top.adder.adder.result          esys interface         24
29          top.adder.adder.addend1         esys interface         24
30          top.adder.adder.addend0         esys interface         24

ODB> interfacestop 29
Added breakpoint #1: stop at assertion of value on interface (29)

ODB> interfaceset top.adder.adder.addend1 10000

ODB> c

breakpoint #1 trapped : "stop at assertion of value on interface (29)"

ODB> objprint 29

______Attributes_______________________________________________
    object type           :  esys interface
    object ID             :  29
    parent object ID      :  24
    name                  :  addend1
    type                  :  0
    dimension             :  0
    direction             :  0
____________________________________________________________
External System Interface Value
type:   integer
value:  10000

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com