spis.Circ.Circ
Class ElecComponent

java.lang.Object
  extended byspis.Circ.Circ.ElecComponent

public class ElecComponent
extends java.lang.Object

Class Name : ElecComponent
Project ref : SPIS project
File name : ElecComponent.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : 27/09/2004
Modification :

Description : a component of an electric curcuit.
In practice, such components are used between sub-groups of elementary surfaces, called electrical nodes.
The following types are supported for now:
- C: capacitance,
- R: resistor,
- V: voltage supply
- L: inductance,
NB: the various components are very straightforwardly coded through a ID (componentType), but an extension to a wider rnge of types may require a better OO coding (derived classess...)

Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel

Field Summary
private  java.lang.String componentType
          Type of component (R, L, C, V)
private  int node1
          Id of the first electric node the component is connected to
private  int node2
          Id of the second electric node the component is connected to
private  float value
          Value of the component (R, L, C or V)
 
Constructor Summary
ElecComponent(java.lang.String componentType, int node1, int node2, float value)
          Default constructor
 
Method Summary
 java.lang.String getComponentType()
           
 int getNode1()
           
 int getNode2()
           
 float getValue()
           
 void println(int verbosityLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node1

private int node1
Id of the first electric node the component is connected to


node2

private int node2
Id of the second electric node the component is connected to


componentType

private java.lang.String componentType
Type of component (R, L, C, V)


value

private float value
Value of the component (R, L, C or V)

Constructor Detail

ElecComponent

public ElecComponent(java.lang.String componentType,
                     int node1,
                     int node2,
                     float value)
Default constructor

Parameters:
node1 -
node2 -
componentType -
value -
Method Detail

println

public void println(int verbosityLevel)
Returns:

getComponentType

public java.lang.String getComponentType()
Returns:
Returns the componentType.

getNode1

public int getNode1()
Returns:
Returns the node1.

getNode2

public int getNode2()
Returns:
Returns the node2.

getValue

public float getValue()
Returns:
Returns the value.