如何使用 op_topo_parent 在 opnet 中指定节点 ID?我尝试了很多次,结果是这个错误<<< Recoverable Error >>> Object ID (OPC_OBJID_INVALID) is out-of-range。T (36.4974), EV (483), MOD (top.Office Network.user.wlan_port_rx_0_0), KP (op_topo_parent) 谁能给我一个简单的例子来说明如何使用这个功能提前谢谢。
问问题
468 次
1 回答
1
op_topo_parent()
需要一个子对象 ID。根据您的错误消息,您希望找到哪个节点包含给定的接收器(top.Office Network.user.wlan_port_rx_0_0)。为了获取节点 ID,请尝试以下代码片段。
// Get object of current Receiver object
rx_objid = op_id_self();
// Get parent, in this case node, ID
node_objid = op_topo_parent(rx_objid)
我希望这些评论对你有所帮助。
于 2015-12-11T07:58:07.770 回答