Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.squid.Squid Class Reference

Collaboration diagram for ikayaki.squid.Squid:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Degausser getDegausser ()
Handler getHandler ()
Magnetometer getMagnetometer ()
synchronized void updateSettings ()
synchronized boolean isOK ()
synchronized boolean setOwner (Project owner)
synchronized Project getOwner ()

Static Public Member Functions

static synchronized Squid instance () throws IOException

Private Member Functions

 Squid () throws IOException

Private Attributes

Project owner
Degausser degausser
Handler handler
Magnetometer magnetometer

Static Private Attributes

static Squid instance

Detailed Description

Offers an interface for controlling the SQUID system. Reads settings from the Settings class. Creates instances of the degausser, handler and magnetometer classes and offers handles for them.

Author:
Aki Korpua

Definition at line 35 of file Squid.java.


Constructor & Destructor Documentation

ikayaki.squid.Squid.Squid  )  throws IOException [private]
 

Initializes the Squid interface. Creates instances of Degausser, Handler and Magnetometer.

Definition at line 73 of file Squid.java.

References ikayaki.squid.Squid.degausser, ikayaki.squid.Squid.handler, ikayaki.squid.Squid.magnetometer, ikayaki.squid.Squid.owner, and ikayaki.squid.Handler.setUp().

Referenced by ikayaki.squid.Squid.instance().

Here is the call graph for this function:


Member Function Documentation

Degausser ikayaki.squid.Squid.getDegausser  ) 
 

Returns an interface for controlling the degausser.

Returns:
Handler for Degausser if available

Definition at line 101 of file Squid.java.

Referenced by ikayaki.gui.MagnetometerStatusPanel.updateStatus().

Handler ikayaki.squid.Squid.getHandler  ) 
 

Returns an interface for controlling the handler.

Returns:
Handler for Handler if available

Definition at line 110 of file Squid.java.

Referenced by ikayaki.squid.SquidFront.initRawActions(), and ikayaki.gui.MagnetometerStatusPanel.updateStatus().

Magnetometer ikayaki.squid.Squid.getMagnetometer  ) 
 

Returns an interface for controlling the magnetometer.

Returns:
Handler for Magnetometer if available

Definition at line 119 of file Squid.java.

Referenced by ikayaki.gui.MagnetometerStatusPanel.updateStatus().

synchronized Project ikayaki.squid.Squid.getOwner  ) 
 

Returns project that is currently using the Squid.

Returns:
the project, or null if none is using the Squid.

Definition at line 170 of file Squid.java.

Referenced by ikayaki.Project.setSquid().

static synchronized Squid ikayaki.squid.Squid.instance  )  throws IOException [static]
 

Returns a reference to the Squid. If it has not yet been created, will create one.

Definition at line 65 of file Squid.java.

References ikayaki.squid.Squid.instance, and ikayaki.squid.Squid.Squid().

Here is the call graph for this function:

synchronized boolean ikayaki.squid.Squid.isOK  ) 
 

Checks whether all devices are working correctly.

Returns:
true if everything is correct, otherwise false.

Definition at line 140 of file Squid.java.

References ikayaki.squid.Squid.degausser, ikayaki.squid.Squid.handler, ikayaki.squid.Degausser.isOK(), and ikayaki.squid.Squid.magnetometer.

Referenced by ikayaki.gui.MainViewPanel.MainViewPanel(), and ikayaki.squid.SquidFront.SquidFront().

Here is the call graph for this function:

synchronized boolean ikayaki.squid.Squid.setOwner Project  owner  ) 
 

Sets the owner of the Squid. Only one project may have access to the Squid at a time. This method may be called only from the Project class.

Parameters:
owner the project that will have exclusive access to the Squid. May be null.
Returns:
true if successful, false if the existing owner had a running measurement.

Definition at line 156 of file Squid.java.

References ikayaki.Project.getState(), and ikayaki.Project.IDLE.

Referenced by ikayaki.Project.setSquid().

Here is the call graph for this function:

synchronized void ikayaki.squid.Squid.updateSettings  ) 
 

Checks which settings have changed and updates all the device interfaces. This method should be called when changes are made to the device parameters. <p/> This method starts a worker thread that will update the settings. If the current project has a measurement running, the thread will keep on retrying until the measurement is finished. Multiple calls to this method within a short period of time will update the settings only once.

Definition at line 131 of file Squid.java.


Member Data Documentation

Degausser ikayaki.squid.Squid.degausser [private]
 

Instance of the degausser interface.

Definition at line 50 of file Squid.java.

Referenced by ikayaki.squid.Squid.isOK(), and ikayaki.squid.Squid.Squid().

Handler ikayaki.squid.Squid.handler [private]
 

Instance of the handler interface.

Definition at line 55 of file Squid.java.

Referenced by ikayaki.squid.Squid.isOK(), and ikayaki.squid.Squid.Squid().

Squid ikayaki.squid.Squid.instance [static, private]
 

Instance of the Squid interface.

Definition at line 40 of file Squid.java.

Referenced by ikayaki.squid.Squid.instance(), ikayaki.gui.MainViewPanel.MainViewPanel(), and ikayaki.squid.SquidFront.SquidFront().

Magnetometer ikayaki.squid.Squid.magnetometer [private]
 

Instance of the magnetometer interface.

Definition at line 60 of file Squid.java.

Referenced by ikayaki.squid.Squid.isOK(), and ikayaki.squid.Squid.Squid().

Project ikayaki.squid.Squid.owner [private]
 

The project that is currently using the Squid, or null if no project is using it.

Definition at line 45 of file Squid.java.

Referenced by ikayaki.squid.Squid.Squid().


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:01:22 2005 for Squid by  doxygen 1.4.1