首页 / design / oaModBusNetBit

oaModBusNetBit

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

概览

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

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

详细说明

The oaModBusNetBit class implements an oaModBitNet that represents a single bit of an oaModBusNet which is a busNet in the module domain。 When a busNet is created, a corresponding set of busNetBits is automatically created。 When the busNet is destroyed, the automatically created busNetBits are also destroyed。 An implicitly created busNetBit cannot be used to connect to terminals or instTerms。 An oaModBusNetBit can be explicitly created and used in other operations like creating terminals or instTerms。 An explicitly created busNetBit must be explicitly destroyed。 oaModBusNetBit, oaOccBusNetmBit, and oaBusNetBit each represent a bit of a busNet on a different kind of master, where in each case the master represents a level of hierarchy in the design。 For oaModBusNetBit, the master is a module, and each module in a design will have a set of zero or more oaModBusNetBits。 For oaOccBusNetBit , the master is an oaOccurrence 。 For oaBusNet , the master is an oaBlock , and the top block for the design will have a set of zero or more modBusNetBits。 Typically, many of the oaBusNetBits on the top oaBlock have a corresponding oaModBusNetBit on the top oaModule 。 All of the oaBusNetBits on the top oaBlock have a corresponding oaOccBusNetBit on the top oaOccurrence 。 When oaBusNetBit objects are created in the block domain, the corresponding oaModBusNetBit objects are automatically created on the top oaModule 。

方法总览

状态 Python 调用
obj.getDef()
obj.getBitIndex()
obj.getName(name)
obj.setName(baseName, bitIndex)
obj.getName(name)
obj.getName(ns, name)
_design.oaModBusNetBit.create(module, baseName, bitIndex, type=oacSignalSigType, isGlobal=false)
_design.oaModBusNetBit.create(module, bitName, type=oacSignalSigType, isGlobal=false)
_design.oaModBusNetBit.find(module, baseName, bitIndex)
_design.oaModBusNetBit.isValidName(module, baseName, bitIndex)

方法说明

obj.getDef()

绑定状态: 已绑定

Python 调用: obj.getDef()

This function returns the busNetDef associated with this busNetBit。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetBit
obj.getDef()

obj.getBitIndex()

绑定状态: 已绑定

Python 调用: obj.getBitIndex()

This function returns the index for this busNetBit。 Returns can include non-consecutive numbers。

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetBit
obj.getBitIndex()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the name of this modBusNetBit。

参数

  • name: The name of the modBusNetBit to return。

Python 示例

from oapy._oa import _design

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

obj.setName(baseName, bitIndex)

绑定状态: 已绑定

Python 调用: obj.setName(baseName, bitIndex)

This function changes the name of this busNetBit to that implied by the given baseName and bitIndex。

参数

  • baseName: The new base name for this net。
  • bitIndex: The new bit index for this net。

异常

  • oacCannotSetNameOfImplicitNet
  • oacCannotSetNameOfNetInBundleNet
  • oacCannotSetNameOfNetInBusNet
  • oacBusNetBaseNameMatchesScalarName
  • oacNetExists

Python 示例

from oapy._oa import _design

# assume obj is a oaModBusNetBit
obj.setName(baseName, bitIndex)

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

Python 示例

from oapy._oa import _design

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

obj.getName(ns, name)

绑定状态: 已绑定

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

Python 示例

from oapy._oa import _design

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

_design.oaModBusNetBit.create(module, baseName, bitIndex, type=oacSignalSigType, isGlobal=false)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetBit.create(module, baseName, bitIndex, type=oacSignalSigType, isGlobal=false)

This function creates a busNetBit with the baseName and bitIndex as specified in the given bitName in the given module。

参数

  • module: The module to create the net in。
  • bitName: The name specifying the baseName and bit index to give the net。
  • sigType: The signal type of the busNetBit。
  • isGlobal: Specifies if this is a global net。

异常

  • oacBusNetNameMatchesAutoName
  • oacBusNetBaseNameMatchesScalarName
  • oacNetExists
  • oacImplicitModuleNetExists
  • oacImplicitBlockNetExists
  • oacInvalidHierNetName

Python 示例

from oapy._oa import _design

_design.oaModBusNetBit.create(module, baseName, bitIndex, type=oacSignalSigType, isGlobal=false)

_design.oaModBusNetBit.create(module, bitName, type=oacSignalSigType, isGlobal=false)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetBit.create(module, bitName, type=oacSignalSigType, isGlobal=false)

This function creates a busNetBit with the specified baseName and bitIndex in the given module。

参数

  • module: The module to create the net in。
  • baseName: The base name to give the net。
  • bitIndex: The bit index to give the net。
  • sigType: The signal type of the busNetBit。
  • isGlobal: Specifies if this is a global net。

异常

  • oacBusNetNameMatchesAutoName
  • oacBusNetBaseNameMatchesScalarName
  • oacNetExists
  • oacImplicitModuleNetExists
  • oacImplicitBlockNetExists
  • oacInvalidHierNetName

Python 示例

from oapy._oa import _design

_design.oaModBusNetBit.create(module, bitName, type=oacSignalSigType, isGlobal=false)

_design.oaModBusNetBit.find(module, baseName, bitIndex)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetBit.find(module, baseName, bitIndex)

This function searches the specified module for a busNetBit with the specified baseName and bitIndex。 The busNetBit is returned if found。 Otherwise, NULL is returned。

参数

  • module: The module to search。
  • baseName: The base name to find。
  • bitIndex: The bit index to find。

Python 示例

from oapy._oa import _design

_design.oaModBusNetBit.find(module, baseName, bitIndex)

_design.oaModBusNetBit.isValidName(module, baseName, bitIndex)

绑定状态: 已绑定

Python 调用: _design.oaModBusNetBit.isValidName(module, baseName, bitIndex)

This function returns a boolean value indicating whether the specified name is valid for a new oaModBusNetBit in the specified module。

参数

  • module: The module to search。
  • baseName: The base name of the bus bit。
  • bitIndex: The bit index of the bus bit。

Python 示例

from oapy._oa import _design

_design.oaModBusNetBit.isValidName(module, baseName, bitIndex)