首页 / design / oaModBusNetDef

oaModBusNetDef

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaModBusNetDefoapy 中可用,可通过 _design 模块访问。

本页汇总 oaModBusNetDef 当前在 oapy 中可用的 Python 接口。

详细说明

The oaModBusNetDef class implements the definition of a module busNet, including its base name and bit-range。 All busNets in a module with the same base name are managed by the same busNet definition。 The oaModBusNetDef class tracks the minimum and maximum indices referred to by all of its corresponding busNet and busNetBit objects。 A busNetDef can be 'sparse' (have missing bits)。 Busses do not have to start or end at zero。 For example, a<22:25> is a legal bus name。 Bus indexes must be non-negative。 An busNetDef is automatically created if necessary whenever applications create busNets。 Implicitly created busNet definitions have no bitOrder。 Applications may explicitly create a busNet definition in order to specify that it has a specific bitOrder。 The bit order of an explicit oaModBusNetDef is independent of the order within individual oaModBusNets with the same base name。 Verilog requires a single wire declaration for a given base name, and the range of that declaration covers all of the bit indices used by the sub-ranges that correspond to oaModBusNets。 Implicitly created busNet definitions are automatically destroyed when the last busNet with the same base name is destroyed。 Explicitly created busNet definitions must be explicitly destroyed。 The oaModBusNetDef class can be observed by deriving from oaObserver

方法总览

状态 Python 调用
obj.destroy()
obj.getMinIndex()
obj.getMaxIndex()
obj.getNumBits()
obj.getName(name)
obj.getName(ns, name)
obj.getBitOrder()
obj.isImplicit()
obj.setBitOrder(order)
obj.getBusNets()
obj.getBusNetBits()
_design.oaModBusNetDef.create(module, name, order)
_design.oaModBusNetDef.find(module, name)

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

This function destroys this oaModBusNetDef, removing it from the database。 An exception is thrown if the oaModBusNetDef is implicit or if there are still oaModBusNets associated with it。

异常

  • oacCannotDestroyImplicitBusNetDef
  • oacCannotDestroyBusNetDefWithNets

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.destroy()

obj.getMinIndex()

绑定状态: 已绑定

Python 调用: obj.getMinIndex()

This function returns the smallest bit number in use for this oaModBusNetDef object。 This is the smallest index used across all busNets associated with this oaModBusNetDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getMinIndex()

obj.getMaxIndex()

绑定状态: 已绑定

Python 调用: obj.getMaxIndex()

This function returns the largest bit number in use for this oaModBusNetDef object。 This is the largest index used across all busNets associated with this oaModBusNetDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getMaxIndex()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits covered by the busses in this oaModBusNetDef。 The number of bits is equal to abs(maxIndex - minIndex) + 1; it is not necessarily the number of busNetBits present in this busNetDef。 To get the number of busNetBits in this busNetDef, use oaModBusNetDef::getBusNetBits() .getCount()。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getNumBits()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the name string of this oaModBusNetDef object in the specified nameSpace。

参数

  • ns: The nameSpace to search。
  • name: The oaModBusNetDef object to return。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getName(name)

obj.getName(ns, name)

绑定状态: 已绑定

Python 调用: obj.getName(ns, name)

This function returns the name of this oaModBusNetDef object。

参数

  • name: The scalar name in which to return the oaModBusNetDef object name。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getName(ns, name)

obj.getBitOrder()

绑定状态: 已绑定

Python 调用: obj.getBitOrder()

This function returns the bitOrder associated with this oaModBusNetDef。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getBitOrder()

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

This function returns a boolean indicating whether this oaModBusNetDef was implicitly created or not。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.isImplicit()

obj.setBitOrder(order)

绑定状态: 已绑定

Python 调用: obj.setBitOrder(order)

This function changes the bitOrder value associated with the oaModBusNetDef。 An exception is thrown if this busNetDef was implicitly created。

参数

  • order: The new bitOrder value for this busNetDef。

异常

  • oacBitOrderBusNetDefImplicit

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.setBitOrder(order)

obj.getBusNets()

绑定状态: 已绑定

Python 调用: obj.getBusNets()

This function returns a collection of oaModBusNet objects in this oaModBusNetDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getBusNets()

obj.getBusNetBits()

绑定状态: 已绑定

Python 调用: obj.getBusNetBits()

This function returns a collection of oaModBusNetBit objects in this oaModBusNetDef object。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetDef
obj.getBusNetBits()

_design.oaModBusNetDef.create(module, name, order)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetDef.create(module, name, order)

This function creates an oaModBusNetDef in the specified module with the given base name and bit order。 An exception is thrown if an oaModBusNetDef already exists with the specified name。 Explicitly creating an oaModBusNetDef also means that the busNet definition must be explicitly destroyed。

参数

  • module: The module to create the oaModBusNetDef object in。
  • name: The base name for the oaModBusNetDef。
  • order: The bit order for the oaModBusNetDef。

异常

  • oacBusNetDefAlreadyExists

Python 示例

from oapy._oa import _design

_design.oaModBusNetDef.create(module, name, order)

_design.oaModBusNetDef.find(module, name)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetDef.find(module, name)

This function searches the specified module for an oaModBusNetDef with the specified name。 The oaModBusNetDef is returned if found。 Otherwise, NULL is returned。

参数

  • module: The module to search for the oaModBusNetDef object。
  • name: The name of the oaModBusNetDef to find。

Python 示例

from oapy._oa import _design

_design.oaModBusNetDef.find(module, name)