Notation used in Ruby API documentation
Module: db
Description: A single net.
Class hierarchy: Net » NetlistObject
A net connects multiple pins or terminals together. Pins are either pin or subcircuits of outgoing pins of the circuit the net lives in. Terminals are connections made to specific terminals of devices.
Net objects are created inside a circuit with Circuit#create_net.
To connect a net to an outgoing pin of a circuit, use Circuit#connect_pin, to disconnect a net from an outgoing pin use Circuit#disconnect_pin. To connect a net to a pin of a subcircuit, use SubCircuit#connect_pin, to disconnect a net from a pin of a subcircuit, use SubCircuit#disconnect_pin. To connect a net to a terminal of a device, use Device#connect_terminal, to disconnect a net from a terminal of a device, use Device#disconnect_terminal.
This class has been added in version 0.26.
void | _assign | (const Net other) | Assigns another object to self | |
[const] | Net ptr | _const_cast | Returns a non-const reference to self. | |
void | _create | Ensures the C++ object is created | ||
void | _destroy | Explicitly destroys the object | ||
[const] | bool | _destroyed? | Returns a value indicating whether the object was already destroyed | |
[const] | new Net ptr | _dup | Creates a copy of self | |
[const] | bool | _is_const_object? | Returns a value indicating whether the reference is a const reference | |
void | _manage | Marks the object as managed by the script side. | ||
void | _unmanage | Marks the object as no longer owned by the script side. | ||
Circuit ptr | circuit | Gets the circuit the net lives in. | ||
void | clear | Clears the net. | ||
[const] | unsigned long | cluster_id | Gets the cluster ID of the net. | |
void | cluster_id= | (unsigned long id) | Sets the cluster ID of the net. | |
[const,iter] | NetPinRef | each_pin | Iterates over all outgoing pins the net connects. | |
[iter] | NetPinRef | each_pin | Iterates over all outgoing pins the net connects (non-const version). | |
[const,iter] | NetSubcircuitPinRef | each_subcircuit_pin | Iterates over all subcircuit pins the net connects. | |
[iter] | NetSubcircuitPinRef | each_subcircuit_pin | Iterates over all subcircuit pins the net connects (non-const version). | |
[const,iter] | NetTerminalRef | each_terminal | Iterates over all terminals the net connects. | |
[iter] | NetTerminalRef | each_terminal | Iterates over all terminals the net connects (non-const version). | |
[const] | string | expanded_name | Gets the expanded name of the net. | |
[const] | bool | is_floating? | Returns true, if the net is floating. | |
[const] | bool | is_internal? | Returns true, if the net is an internal net. | |
[const] | bool | is_passive? | Returns true, if the net is passive. | |
[const] | string | name | Gets the name of the net. | |
void | name= | (string name) | Sets the name of the net. | |
[const] | unsigned long | pin_count | Returns the number of outgoing pins connected by this net. | |
[const] | string | qname | Gets the qualified name. | |
[const] | unsigned long | subcircuit_pin_count | Returns the number of subcircuit pins connected by this net. | |
[const] | unsigned long | terminal_count | Returns the number of terminals connected by this net. | |
[const] | string | to_s | Gets the qualified name. |
_assign | Signature: void _assign (const Net other) Description: Assigns another object to self |
_const_cast | Signature: [const] Net ptr _const_cast Description: Returns a non-const reference to self. Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects. This method has been introduced in version 0.29.6. |
_create | Signature: void _create Description: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. |
_destroy | Signature: void _destroy Description: Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. |
_destroyed? | Signature: [const] bool _destroyed? Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. |
_dup | Signature: [const] new Net ptr _dup Description: Creates a copy of self |
_is_const_object? | Signature: [const] bool _is_const_object? Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. |
_manage | Signature: void _manage Description: Marks the object as managed by the script side. After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. |
_unmanage | Signature: void _unmanage Description: Marks the object as no longer owned by the script side. Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. |
circuit | Signature: Circuit ptr circuit Description: Gets the circuit the net lives in. |
clear | Signature: void clear Description: Clears the net. |
cluster_id | Signature: [const] unsigned long cluster_id Description: Gets the cluster ID of the net. See cluster_id= for details about the cluster ID. Python specific notes: |
cluster_id= | Signature: void cluster_id= (unsigned long id) Description: Sets the cluster ID of the net. The cluster ID connects the net with a layout cluster. It is set when the net is extracted from a layout. Python specific notes: |
each_pin | (1) Signature: [const,iter] NetPinRef each_pin Description: Iterates over all outgoing pins the net connects. Pin connections are described by NetPinRef objects. Pin connections are connections to outgoing pins of the circuit the net lives in. |
(2) Signature: [iter] NetPinRef each_pin Description: Iterates over all outgoing pins the net connects (non-const version). Pin connections are described by NetPinRef objects. Pin connections are connections to outgoing pins of the circuit the net lives in. This constness variant has been introduced in version 0.26.8 | |
each_subcircuit_pin | (1) Signature: [const,iter] NetSubcircuitPinRef each_subcircuit_pin Description: Iterates over all subcircuit pins the net connects. Subcircuit pin connections are described by NetSubcircuitPinRef objects. These are connections to specific pins of subcircuits. |
(2) Signature: [iter] NetSubcircuitPinRef each_subcircuit_pin Description: Iterates over all subcircuit pins the net connects (non-const version). Subcircuit pin connections are described by NetSubcircuitPinRef objects. These are connections to specific pins of subcircuits. This constness variant has been introduced in version 0.26.8 | |
each_terminal | (1) Signature: [const,iter] NetTerminalRef each_terminal Description: Iterates over all terminals the net connects. Terminals connect devices. Terminal connections are described by NetTerminalRef objects. |
(2) Signature: [iter] NetTerminalRef each_terminal Description: Iterates over all terminals the net connects (non-const version). Terminals connect devices. Terminal connections are described by NetTerminalRef objects. This constness variant has been introduced in version 0.26.8 | |
expanded_name | Signature: [const] string expanded_name Description: Gets the expanded name of the net. The expanded name takes the name of the net. If the name is empty, the cluster ID will be used to build a name. |
is_floating? | Signature: [const] bool is_floating? Description: Returns true, if the net is floating. Floating nets are those which don't have any device or subcircuit on it and are not connected through a pin. |
is_internal? | Signature: [const] bool is_internal? Description: Returns true, if the net is an internal net. Internal nets are those which connect exactly two terminals and nothing else (pin_count = 0 and terminal_count == 2). |
is_passive? | Signature: [const] bool is_passive? Description: Returns true, if the net is passive. Passive nets don't have devices or subcircuits on it. They can be exposed through a pin. is_floating? implies is_passive?. This method has been introduced in version 0.26.1. |
name | Signature: [const] string name Description: Gets the name of the net. See name= for details about the name. Python specific notes: |
name= | Signature: void name= (string name) Description: Sets the name of the net. The name of the net is used for naming the net in schematic files for example. The name of the net has to be unique. Python specific notes: |
pin_count | Signature: [const] unsigned long pin_count Description: Returns the number of outgoing pins connected by this net. |
qname | Signature: [const] string qname Description: Gets the qualified name. The qualified name is like the expanded name, but the circuit's name is preceded (i.e. 'CIRCUIT:NET') if available. Python specific notes: |
subcircuit_pin_count | Signature: [const] unsigned long subcircuit_pin_count Description: Returns the number of subcircuit pins connected by this net. |
terminal_count | Signature: [const] unsigned long terminal_count Description: Returns the number of terminals connected by this net. |
to_s | Signature: [const] string to_s Description: Gets the qualified name. The qualified name is like the expanded name, but the circuit's name is preceded (i.e. 'CIRCUIT:NET') if available. Python specific notes: |