This shows you the differences between two versions of the page.
|
gnucap:manual:tech:plugins:devices:ports [2024/12/13 01:19] aldavis [Ports] |
gnucap:manual:tech:plugins:devices:ports [2024/12/13 04:47] (current) aldavis [Ports] |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| == void set_port_by_index(int index, std::string& value) == | == void set_port_by_index(int index, std::string& value) == | ||
| - | Make a connection between a port and the rest of the circuit, by position as in Spice. Usually (for node_t based ports, the usual voltage or logic ports) this is not needed because the inherited method will do the right thing. For ports that are not based on node_t, such as current ports in Spice, this function is needed. | + | Make a connection between a port and the rest of the circuit, by position as in Spice. Usually (for node_t based ports, the usual voltage or logic ports) this is not needed because the inherited method will do the right thing. For ports that are not based on node_t, such as current ports in Spice, this function may be needed. |
| == std::string port_name(int i)const == | == std::string port_name(int i)const == | ||
| Return the name of a port given its index. This is required, because all devices have unique port names. | Return the name of a port given its index. This is required, because all devices have unique port names. | ||
| - | |||
| - | === Current ports === | ||
| - | |||
| - | Most devices do not have current ports, so these methods are usually not needed. | ||
| - | |||
| - | == const std::string current_port_value(int)const == | ||
| - | Return the name of the element that a current port is connected to. This is required if the device has current ports. | ||
| - | |||
| - | == std::string current_port_name(int)const == | ||
| - | Return the name of a current port given its index. This is required if the device has current ports. | ||