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

ikayaki.squid.Magnetometer Class Reference

Inheritance diagram for ikayaki.squid.Magnetometer:

Inheritance graph
[legend]
Collaboration diagram for ikayaki.squid.Magnetometer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Magnetometer () throws SerialIOException
void updateSettings ()
void pulseReset (char axis)
void clearFlux (char axis)
double[] readData ()
boolean isMeasuring ()
char[] getFilters ()
char[] getRange ()
boolean[] getSlew ()
boolean[] getLoop ()
boolean isOK ()
void serialIOEvent (SerialIOEvent event)

Protected Member Functions

void reset (char axis)
void resetCounter (char axis)
void configure (char axis, char subcommand, char option)
void latchAnalog (char axis)
void latchCounter (char axis)
String getData (char axis, char command, String datavalues)

Protected Attributes

SerialIO serialIO

Private Attributes

Stack< String > messageBuffer
SynchronousQueue< String > queue
int pollTimeout = 60
boolean waitingForMessage = false
boolean measuring = false

Detailed Description

Offers an interface for controlling the magnetometer."

Author:
Aki Korpua

Definition at line 36 of file Magnetometer.java.


Constructor & Destructor Documentation

ikayaki.squid.Magnetometer.Magnetometer  )  throws SerialIOException
 

Creates a new magnetometer interface. Opens connection to Magnetometer COM port (if its not open already) and reads settings from the Setting class.

Exceptions:
SerialIOException 

Definition at line 65 of file Magnetometer.java.

References ikayaki.squid.SerialIO.addSerialIOListener(), ikayaki.squid.Magnetometer.configure(), ikayaki.squid.Magnetometer.messageBuffer, ikayaki.squid.Magnetometer.queue, ikayaki.squid.Magnetometer.resetCounter(), ikayaki.squid.Magnetometer.serialIO, and ikayaki.squid.SerialIO.writeMessage().

Here is the call graph for this function:


Member Function Documentation

void ikayaki.squid.Magnetometer.clearFlux char  axis  ) 
 

Clears flux counter for axis. Need to be done measuring.

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 248 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.resetCounter().

Here is the call graph for this function:

void ikayaki.squid.Magnetometer.configure char  axis,
char  subcommand,
char  option
[protected]
 

Used for configuring Magnetometer parameters. See subcommand for usages.

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.
subcommand The CONFIGURE subcommands follow: <br/>"F" Set filter configuration. The data subfield sets the filter to the indicated range. The four possible data values are: "1" One Hertz Filter; 1 Hz "T" Ten Hertz Filter; 10 Hz "H" One hundred Hertz Filter; 100 Hz "W" Wide band filter; WB <br/>"R" Set DC SQUID electronic range. The data subfield selects the range desired. The four possible data values are: "1" One time range; 1x "T" Ten times range; 10x "H" One hundred times range; 100x "E" Extended range; 1000x <br/>"S" Set the fast-slew option. Two data values are possible: "E" Enable the fast-slew; turn it on. "D" Disable the fast-slew; turn it off. <br/>"L" This subcommand opens or closes the SQUID feedback loop or resets the analog signal to +/- 1/2 flux quantum about zero. The three possible data values are: "O" Open the feedback loop. (This command also zeros the flux counter) "C" Close the feedback loop. "P" Pulse-reset (open then close) the feedback loop. (This command also zeros the flux counter)
option see data values from subcommands.

Definition at line 149 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.Magnetometer(), and ikayaki.squid.Magnetometer.pulseReset().

String ikayaki.squid.Magnetometer.getData char  axis,
char  command,
String  datavalues
[protected]
 

Generic send message sender, use with caution and knowledge. Checks if commands are good.

Parameters:
axis 'X', 'Y' or 'Z'. All characters are in upper case.
command "D" Send back the analog data last captured with the LATCH command. The data field is not required. <br/>"C" Send back the counter value last captured with the LATCH command. The data field is not required. <br/>"S" Send back status. Various pieces of status can be sent by the magnetometer electronics.
datavalues Datavalues one or more: <br/>"A" Send back all status. <br/>"F" Send back all filter status. <br/>"R" Send back all range status. <br/>"S" Send back slew status. <br/>"L" Send back SQUID feedback loop status. Return feedback, waiting time?
Returns:
Returns data wanted, see command and datavalue

Definition at line 201 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.pollTimeout, ikayaki.squid.Magnetometer.queue, and ikayaki.squid.Magnetometer.waitingForMessage.

Referenced by ikayaki.squid.Magnetometer.getFilters(), ikayaki.squid.Magnetometer.getRange(), and ikayaki.squid.Magnetometer.readData().

char [] ikayaki.squid.Magnetometer.getFilters  ) 
 

Returns filter configurations for all axis.

Returns:
return filter values for all axis in order (x,y,z). <br/>Values: <br/>"1" One Hertz Filter; 1 Hz <br/>"T" Ten Hertz Filter; 10 Hz <br/>"H" One hundred Hertz Filter; 100 Hz <br/>"W" Wide band filter; WB

Definition at line 304 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.getData().

Here is the call graph for this function:

boolean [] ikayaki.squid.Magnetometer.getLoop  ) 
 

Returns if Loops have been opened on axes.

Returns:
return Loop status for all axis in order (x,y,z). Values true = on, false = off.

Definition at line 366 of file Magnetometer.java.

char [] ikayaki.squid.Magnetometer.getRange  ) 
 

Returns range configurations for all axis.

Returns:
return filter values for all axis in order (x,y,z). <br/>Values: <br/>"1" One time range; 1x <br/>"T" Ten times range; 10x <br/>"H" One hundred times range; 100x <br/>"E" Extended range; 1000x

Definition at line 325 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.getData().

Here is the call graph for this function:

boolean [] ikayaki.squid.Magnetometer.getSlew  ) 
 

Returns Fast Slew options value.

Returns:
true if Fast Slew is on, false if not. In order (x,y,z).

Definition at line 346 of file Magnetometer.java.

boolean ikayaki.squid.Magnetometer.isMeasuring  ) 
 

Definition at line 294 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.measuring.

boolean ikayaki.squid.Magnetometer.isOK  ) 
 

Checks if connection is ok.

Returns:
true if ok.

Definition at line 386 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.serialIO.

void ikayaki.squid.Magnetometer.latchAnalog char  axis  )  [protected]
 

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 163 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.readData().

void ikayaki.squid.Magnetometer.latchCounter char  axis  )  [protected]
 

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 177 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.readData().

void ikayaki.squid.Magnetometer.pulseReset char  axis  ) 
 

Pulse reset (open then close) feedback loop for axis. Need to be done before measuring.

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 238 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.configure().

Here is the call graph for this function:

double [] ikayaki.squid.Magnetometer.readData  ) 
 

Latches axes, reads counters and analog. Calculates data from them and returns them.

Returns:
Returns 3 double values in following order: (x,y,z)

Definition at line 257 of file Magnetometer.java.

References ikayaki.squid.Magnetometer.getData(), ikayaki.squid.Magnetometer.latchAnalog(), ikayaki.squid.Magnetometer.latchCounter(), and ikayaki.squid.Magnetometer.measuring.

Here is the call graph for this function:

void ikayaki.squid.Magnetometer.reset char  axis  )  [protected]
 

Reset settings for axis.

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 105 of file Magnetometer.java.

void ikayaki.squid.Magnetometer.resetCounter char  axis  )  [protected]
 

Reset counter for axis.

Parameters:
axis 'X', 'Y', 'Z' or 'A' (all). All characters are in upper case.

Definition at line 121 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.clearFlux(), and ikayaki.squid.Magnetometer.Magnetometer().

void ikayaki.squid.Magnetometer.serialIOEvent SerialIOEvent  event  ) 
 

Propagates serial port message event.

Parameters:
event the event that happened.

Implements ikayaki.squid.SerialIOListener.

Definition at line 393 of file Magnetometer.java.

References ikayaki.squid.SerialIOEvent.getCleanMessage(), ikayaki.squid.Magnetometer.messageBuffer, ikayaki.squid.Magnetometer.queue, and ikayaki.squid.Magnetometer.waitingForMessage.

Here is the call graph for this function:

void ikayaki.squid.Magnetometer.updateSettings  ) 
 

Checks which settings have changed and updates the magnetometer interface. This method will be called by the Squid class.

Definition at line 96 of file Magnetometer.java.


Member Data Documentation

boolean ikayaki.squid.Magnetometer.measuring = false [private]
 

Definition at line 56 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.isMeasuring(), and ikayaki.squid.Magnetometer.readData().

Stack<String> ikayaki.squid.Magnetometer.messageBuffer [private]
 

Buffer for incoming messages, readed when needed.

Definition at line 41 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.Magnetometer(), and ikayaki.squid.Magnetometer.serialIOEvent().

int ikayaki.squid.Magnetometer.pollTimeout = 60 [private]
 

Definition at line 47 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.getData().

SynchronousQueue<String> ikayaki.squid.Magnetometer.queue [private]
 

Synchronous queue for waiting result message from magnetometer

Definition at line 46 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.getData(), ikayaki.squid.Magnetometer.Magnetometer(), and ikayaki.squid.Magnetometer.serialIOEvent().

SerialIO ikayaki.squid.Magnetometer.serialIO [protected]
 

COM port for communication.

Definition at line 52 of file Magnetometer.java.

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

boolean ikayaki.squid.Magnetometer.waitingForMessage = false [private]
 

Definition at line 54 of file Magnetometer.java.

Referenced by ikayaki.squid.Magnetometer.getData(), and ikayaki.squid.Magnetometer.serialIOEvent().


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