interfaceset

Abstract

In a cosimulation, sets an interface to a given value from ODB. Schedules a value to be set on the interface at current simulation time, after all current events have been executed.

Syntax

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

Argument Type Description
<objref> integer or string numeric object ID or hierarchical name of the interface-of-interest
An object ID for this argument can be obtained by using the ODB commands objmap or objid.
all n/a For a dimensioned interface, set values on the entire array.
index <n> integer For a dimensioned interface, set a value on the interface with index <n>.
<values> string Character representations of the values to set on the specified interface. Multiple values (for dimensioned interfaces) must be separated by spaces.

Details

Interfaceset can be used to set values on both input and output interfaces. If the value is written to an Modeler-to-cosim interface, the value is passed to the external code. If the value is written to a cosim-to-Modeler interface, the value is passed to the external system definition, but the external code is not notified of the new interface value.

For an undimensioned interface, the all and index arguments are not required.

Example

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