A net list device. More...
| string | cellname |
| int | connectionsCount() |
| string | devicename |
| stringList | getConnectionNames() |
| int | getNode(string pin) |
A netListDevice is one instance in a netList: a placed transistor, resistor or subcircuit with its pin connections. You get it from netList->getDevice(num); you do not construct it. devicename is the instance name on the schematic or in the extracted list. cellname is the master cell or device type. connectionsCount is how many pins are wired. getConnectionNames lists those pin names, and getNode maps a pin to the node id used in the parent netlist, or -1 if the pin is missing. Typical code loops from 0 to devicesCount()-1 on the parent list and then reads the pins of each device.
Example:
netList *nl = layout->netlistTool->getExtractedNetList(layout->drawing->currentCell->cellName);
if (nl == NULL)
return 1;
netListDevice *d = nl->getDevice(0);
if (d == NULL)
return 1;
string inst = d->devicename;
string master = d->cellname;
stringList pins = d->getConnectionNames();
int id = d->getNode("D");
Name of the cell or device type used for this instance.
Returns: the number of pins connected on this device.
Instance name of the device.
Returns: a stringList of all connected pin names.
Returns: the node id connected to pin, or -1 if pin does not exist.