DRCL JavaSim API

drcl.comp
Class Wire

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.Wire
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class Wire
extends DrclObj

See Also:
Serialized Form

Field Summary
static java.lang.String IN
           
static java.lang.String INOUT
           
static java.lang.String OUT
           
 
Constructor Summary
Wire()
           
 
Method Summary
 boolean anyPortExcept(Port excluded_)
          Returns true if there exists a port, other than excluded_, which is connected to this wire.
 void attach(Port p_)
          Attaches the port to this wire as an "IN" port.
 void attach(Port[] pp_)
          Attaches the ports to this wire as "IN" ports.
 void detach(Port p_)
          Detaches the port from "IN" ports.
 void detach(Port[] pp_)
          Detaches the ports from "IN" ports.
 void disconnect()
          Disconnects all the connected ports from this wire.
 void disconnect(Port p_)
          Disconnects the port from this wire.
 void disconnect(Port[] pp_)
          Disconnects the ports from this wire.
 void duplicate(java.lang.Object source_)
          opies the content of the source_ object to this object.
 Port[] getInPorts()
          Returns all the "IN" ports that are attached to this wire.
 Port[] getOutPorts()
          Returns all the "OUT" ports that are attached to this wire.
 Port[] getPorts()
          Returns all the ports that are attached to this wire.
 Port[] getPortsExcept(Port excluded_)
          Returns all the ports, except excluded_, that are attached to this wire.
 Port[] getPortsIn(Component container_)
          Returns all the ports, inside the container, which are attached to this wire.
 java.lang.String getType(Port p_)
          Returns the type of connection by which the port is connected to this wire.
 java.lang.String info()
           
 boolean isAttachedToBy(Port p_)
          Returns true if the specified port is attached to this wire.
 boolean isAttachedToBy(Port p_, java.lang.String type_)
          Returns true if the specified port is attached to this wire as the type specified.
 Wire join(Port[] pp_, java.lang.String type_)
          Joins the ports with this wire.
 Wire join(Port p1_, Port p2_, java.lang.String type_)
          Joins the two ports with this wire.
 Wire join(Port p_, java.lang.String type_)
          Joins the port with this wire.
 Wire join(Port p1_, java.lang.String type1_, Port p2_, java.lang.String type2_)
          Joins the two ports with this wire.
 Wire join(Wire that_)
          Joins the wire that_ to this.
 void split(Port[] pp_)
          Splits the ports from this wire.
 java.lang.String toString()
           
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OUT

public static final java.lang.String OUT

IN

public static final java.lang.String IN

INOUT

public static final java.lang.String INOUT
Constructor Detail

Wire

public Wire()
Method Detail

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: DrclObj
opies the content of the source_ object to this object. he subclass must implement this method to realize DrclObj.clone().
Overrides:
duplicate in class DrclObj

join

public Wire join(Wire that_)
Joins the wire that_ to this.
Returns:
this wire object; null if something goes wrong.

join

public Wire join(Port p_,
                 java.lang.String type_)
Joins the port with this wire. If the port is wired to another, it will join that wire to this wire.
Returns:
this wire object; null if something goes wrong.

join

public Wire join(Port p1_,
                 Port p2_,
                 java.lang.String type_)
Joins the two ports with this wire. If a port of those is wired to another, it will join that wire to this wire.
Returns:
this wire object; null if something goes wrong.

join

public Wire join(Port p1_,
                 java.lang.String type1_,
                 Port p2_,
                 java.lang.String type2_)
Joins the two ports with this wire. If a port of those is wired to another, it will join that wire to this wire.
Returns:
this wire object; null if something goes wrong.

join

public Wire join(Port[] pp_,
                 java.lang.String type_)
Joins the ports with this wire. If a port of those is wired to another, it will join that wire to this wire.
Returns:
this wire object; null if something goes wrong.

attach

public void attach(Port p_)
Attaches the port to this wire as an "IN" port.

attach

public void attach(Port[] pp_)
Attaches the ports to this wire as "IN" ports.

detach

public void detach(Port p_)
Detaches the port from "IN" ports.

detach

public void detach(Port[] pp_)
Detaches the ports from "IN" ports.

disconnect

public void disconnect()
Disconnects all the connected ports from this wire.

disconnect

public void disconnect(Port p_)
Disconnects the port from this wire.

disconnect

public void disconnect(Port[] pp_)
Disconnects the ports from this wire.

split

public void split(Port[] pp_)
Splits the ports from this wire. Those ports are re-connected in the same manner to a new wire.

anyPortExcept

public boolean anyPortExcept(Port excluded_)
Returns true if there exists a port, other than excluded_, which is connected to this wire.

isAttachedToBy

public boolean isAttachedToBy(Port p_)
Returns true if the specified port is attached to this wire.

isAttachedToBy

public boolean isAttachedToBy(Port p_,
                              java.lang.String type_)
Returns true if the specified port is attached to this wire as the type specified.

getType

public java.lang.String getType(Port p_)
Returns the type of connection by which the port is connected to this wire. The result can be one of the three types: IN, OUT or INOUT.

getInPorts

public Port[] getInPorts()
Returns all the "IN" ports that are attached to this wire.

getOutPorts

public Port[] getOutPorts()
Returns all the "OUT" ports that are attached to this wire.

getPorts

public Port[] getPorts()
Returns all the ports that are attached to this wire.

getPortsExcept

public Port[] getPortsExcept(Port excluded_)
Returns all the ports, except excluded_, that are attached to this wire.

getPortsIn

public Port[] getPortsIn(Component container_)
Returns all the ports, inside the container, which are attached to this wire.

info

public java.lang.String info()

toString

public java.lang.String toString()
Overrides:
toString in class DrclObj

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~