oaModBusTerm Class Reference

Inheritance diagram for oaModBusTerm:

oaModTerm oaModObject oaDesignObject oaObject


Public Methods

oaModBusTermDefgetDef () const
oaUInt4 getStart () const
oaUInt4 getStop () const
oaUInt4 getStep () const
void getName (oaVectorName &name) const
void setBaseName (const oaScalarName &name)
void setRange (oaUInt4 start, oaUInt4 stop)
void getName (oaName &name) const
void getName (const oaNameSpace &ns, oaString &name) const

Static Public Methods

oaModBusTerm * create (oaModNet *modNet, const oaScalarName &name, oaUInt4 start, oaUInt4 stop, oaUInt4 step, oaTermType termType=oacInputOutputTermType)
oaModBusTerm * create (oaModNet *modNet, const oaVectorName &name, oaTermType termType=oacInputOutputTermType)
oaModBusTerm * create (oaModNet *modNet, const oaVectorBitName &name, oaTermType termType=oacInputOutputTermType)
oaModBusTerm * find (const oaModule *module, const oaScalarName &name, oaUInt4 start, oaUInt4 stop, oaUInt4 step)
oaBoolean isValidName (const oaModule *module, const oaModNet *net, const oaScalarName &name, oaUInt4 start, oaUInt4 stop, oaUInt4 step)

Detailed Description

The oaModBusTerm class implements a terminal in the module domain that represents one or more bits that are associated by a common baseName and vector-range specification. An oaModBusTerm object has a corresponding oaModBusTermDef object that manages all oaModBusTerm objects that share the same baseName.

oaModBusTerm, oaOccBusTerm, and oaBusTerm each represent bus terminals in a different hierarchy domain, where in each case the terminal's master represents a level of hierarchy in the design.

For oaModBusTerm, the master is an oaModule, and each module in a design will have a set of zero or more modBusTerms. For oaOccBusTerm, the master is an oaOccurrence.

For oaBusTerm, the master is an oaBlock, and the top block for the design will have a set of zero or more busTerms. Typically, all of the oaModBusTerms on the top oaModule have a corresponding oaBusTerm on the top oaBlock. All of the oaModBusTerms have a corresponding oaOccBusTerm in the occurrence domain.

When oaBusTerm objects are created in the block domain, the corresponding oaModBusTerm objects are automatically created on the top oaModule unless this visibility is suppressed by the create call.


Member Function Documentation

oaModBusTerm * oaModBusTerm::create oaModNet *    modNet,
const oaVectorBitName &    name,
oaTermType    termType = oacInputOutputTermType
[static]
 

This function creates a one-bit wide oaModBusTerm with a vectorBitName. If the module is visible in the block domain this will create an oaBusTerm in the block domain as well.

Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist.

Parameters:
modNet The net to use to create the oaModBusTerm
name The name to use to create the oaModBusTerm
termType The type of terminal to create
Exceptions:
oacTermExists 
oacInvalidHierTermName 
oacTermMemberExists 
oacInvalidVectorValue 
oacNetTermWidthMismatch 
oacBusTermBaseNameMatchesScalarName 
oacBusDefIsBlockDomainSpecific 
oacCannotCreateTermWithImplicitNet 

oaModBusTerm * oaModBusTerm::create oaModNet *    modNet,
const oaVectorName &    name,
oaTermType    termType = oacInputOutputTermType
[static]
 

This function creates a bus terminal on the specified module net using the specified oaVectorName that incorporates the base name and indexes. If the module is visible in the block domain this will create an oaBusTerm in the block domain as well.

Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist.

Parameters:
modNet The net to use to create the oaModBusTerm
name The name to use to create the oaModBusTerm
termType The type of terminal to create
Exceptions:
oacTermExists 
oacInvalidHierTermName 
oacTermMemberExists 
oacInvalidVectorValue 
oacNetTermWidthMismatch 
oacBusTermBaseNameMatchesScalarName 
oacBusDefIsBlockDomainSpecific 
oacCannotCreateTermWithImplicitNet 

oaModBusTerm * oaModBusTerm::create oaModNet *    modNet,
const oaScalarName &    name,
oaUInt4    start,
oaUInt4    stop,
oaUInt4    step,
oaTermType    termType = oacInputOutputTermType
[static]
 

This function creates a bus terminal on the specified module net by separately specifying the base name and the index values. If the module is visible in the block domain this will create an oaBusTerm in the block domain as well.

Exceptions are thrown if the number of bits in the net doesn't match the number of bits implied by the terminal name, if the baseName matches the name of an existing scalarTerm (in any domain), or if the member busTermBits already exist. In this form of the create function, an exception is thrown if the start value is equal to the stop value but the step is greater than 0.

Parameters:
modNet The net to use to create the oaModBusTerm
name The baseName for the oaModBusTerm
start The starting index of the oaModBusTerm
stop The stopping index of the oaModBusTerm
step The step value of the oaModBusTerm
termType The type of terminal to create
Exceptions:
oacTermExists 
oacInvalidHierTermName 
oacTermMemberExists 
oacInvalidVectorValue 
oacNetTermWidthMismatch 
oacBusTermBaseNameMatchesScalarName 
oacBusDefIsBlockDomainSpecific 
oacCannotCreateTermWithImplicitNet 

oaModBusTerm * oaModBusTerm::find const oaModule *    module,
const oaScalarName &    baseName,
oaUInt4    start,
oaUInt4    stop,
oaUInt4    step
[static]
 

This function searches the specified module for an oaModBusTerm object with the specified baseName and start, stop, and step indices. The oaModBusTerm object is returned if found. Otherwise, NULL is returned.

Parameters:
module The module to search for the oaModBusTerm
baseName The baseName for the oaModBusTerm
start The starting index of the oaModBusTerm
stop The stopping index of the oaModBusTerm
step The step value of the oaModBusTerm
Returns:
A pointer to an oaModBusTerm

oaModBusTermDef * oaModBusTerm::getDef   const
 

This function returns the oaModBusTermDef for this oaModBusTerm object.

Returns:
A pointer to an oaModBusTermDef

void oaModTerm::getName const oaNameSpace &    ns,
oaString &    name
const
 

This function fills in name with the name of this terminal mapped to the specified nameSpace.

void oaModTerm::getName oaName &    name const
 

This function fills out name with the name of this terminal.

void oaModBusTerm::getName oaVectorName &    name const
 

This function returns the name of this modBusTerm.

Parameters:
name The name of the modBusTerm to return

oaUInt4 oaModBusTerm::getStart   const
 

This function returns the starting index for this oaModBusTerm object.

Returns:
The starting index for this oaModBusTerm

oaUInt4 oaModBusTerm::getStep   const
 

This function returns the stepping index for this oaModBusTerm object.

Returns:
The step value for this oaModBusTerm

oaUInt4 oaModBusTerm::getStop   const
 

This function returns the ending index for this oaModBusTerm object.

Returns:
The ending index for this oaModBusTerm

oaBoolean oaModBusTerm::isValidName const oaModule *    module,
const oaModNet *    net,
const oaScalarName &    name,
oaUInt4    start,
oaUInt4    stop,
oaUInt4    step
[static]
 

This function returns a boolean value indicating whether the specified name is valid for a new oaModBusTerm object that is associated with the specified net.

Parameters:
module The module to search for the oaModBusTerm
net The net to use to create the oaModBusTerm
name The name for the new oaModBusTerm
start The starting index of the oaModBusTerm
stop The stopping index of the oaModBusTerm
step The step value of the oaModBusTerm

void oaModBusTerm::setBaseName const oaScalarName &    name
 

This function changes the name of this oaModBusTerm object. The name is also updated for each occurrence that the term appears in.

An exception is thrown if the new name is the name of an existing oaScalarNet, if another oaModBusTerm with the same name and indices already exist, or if the new name contains invalid hierarchical delimiters.

Parameters:
name The new name to be set for the term.
Exceptions:
oacCannotSetNameOfImplicitTerm 
oacCannotSetNameOfTermInBundleTerm 
oacBusTermBaseNameMatchesScalarName 
oacNetTermWidthMismatch 
oacInvalidVectorValue 
oacTermExists 
oacTermMemberExists 
oacInvalidHierTermName 
oacCannotSetNameOfOverriddenTerm 
oacCannotRenameToImplicitBusTerm 

void oaModBusTerm::setRange oaUInt4    start,
oaUInt4    stop
 

This function changes the vector range for this modBusTerm. The new number of bits implied by the specified start and stop bits must match the current number of bits. This restriction is necessary so that any terminals or instance terminals that are associated with this busTerm are not affected.

Parameters:
start The starting index of the net
stop The stopping index of the net
Exceptions:
oacCannotSetNameOfImplicitTerm 
oacCannotEditOverriddenTerm 
oacInvalidBusStartStopRange 
oacTermExists 


The documentation for this class was generated from the following files:

Return to top of page