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 |
Definition at line 36 of file Magnetometer.java.
|
Creates a new magnetometer interface. Opens connection to Magnetometer COM port (if its not open already) and reads settings from the Setting class.
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:
|
Clears flux counter for axis. Need to be done measuring.
Definition at line 248 of file Magnetometer.java. References ikayaki.squid.Magnetometer.resetCounter(). |
Here is the call graph for this function:
|
Used for configuring Magnetometer parameters. See subcommand for usages.
Definition at line 149 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.Magnetometer(), and ikayaki.squid.Magnetometer.pulseReset(). |
|
Generic send message sender, use with caution and knowledge. Checks if commands are good.
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(). |
|
Returns filter configurations for all axis.
Definition at line 304 of file Magnetometer.java. References ikayaki.squid.Magnetometer.getData(). |
Here is the call graph for this function:
|
Returns if Loops have been opened on axes.
Definition at line 366 of file Magnetometer.java. |
|
Returns range configurations for all axis.
Definition at line 325 of file Magnetometer.java. References ikayaki.squid.Magnetometer.getData(). |
Here is the call graph for this function:
|
Returns Fast Slew options value.
Definition at line 346 of file Magnetometer.java. |
|
Definition at line 294 of file Magnetometer.java. References ikayaki.squid.Magnetometer.measuring. |
|
Checks if connection is ok.
Definition at line 386 of file Magnetometer.java. References ikayaki.squid.Magnetometer.serialIO. |
|
Definition at line 163 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.readData(). |
|
Definition at line 177 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.readData(). |
|
Pulse reset (open then close) feedback loop for axis. Need to be done before measuring.
Definition at line 238 of file Magnetometer.java. References ikayaki.squid.Magnetometer.configure(). |
Here is the call graph for this function:
|
Latches axes, reads counters and analog. Calculates data from them and returns them.
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:
|
Reset settings for axis.
Definition at line 105 of file Magnetometer.java. |
|
Reset counter for axis.
Definition at line 121 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.clearFlux(), and ikayaki.squid.Magnetometer.Magnetometer(). |
|
Propagates serial port message event.
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:
|
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. |
|
Definition at line 56 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.isMeasuring(), and ikayaki.squid.Magnetometer.readData(). |
|
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(). |
|
Definition at line 47 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.getData(). |
|
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(). |
|
COM port for communication. Definition at line 52 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.isOK(), and ikayaki.squid.Magnetometer.Magnetometer(). |
|
Definition at line 54 of file Magnetometer.java. Referenced by ikayaki.squid.Magnetometer.getData(), and ikayaki.squid.Magnetometer.serialIOEvent(). |