|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.NeuroSky.ThinkGear.Util.HeadsetData
public class HeadsetData
This class is a convenience class to store data coming from a ThinkGear EM headset.
Field Summary | |
---|---|
float |
alpha1
The alpha wave component of an EEG. |
float |
alpha2
The alpha wave component of an EEG. |
int |
attention
The interpreted attention level (a value between 0 and 100, where 100 indicates high attention). |
int |
batteryLevel
The battery level (a value between 0 and 128, where 128 indicates a full battery). |
float |
beta1
The beta wave component of an EEG. |
float |
beta2
The beta wave component of an EEG. |
float |
delta
The delta wave component of an EEG (0 to 3 Hz). |
int |
errorRate
The signal error rate of the headset (a value between 0 and 128, where 128 indicates that the signal is completely bad). |
float |
gamma1
The gamma wave component of an EEG. |
float |
gamma2
The gamma wave component of an EEG. |
int |
meditation
The interpreted meditation level (a value between 0 and 100, where 100 indicates high meditation). |
float |
theta
The theta wave component of an EEG (4 to 7 Hz). |
Constructor Summary | |
---|---|
HeadsetData()
Class constructor taking no parameters and initializing all instance variables to invalid (negative) values. |
|
HeadsetData(int meditation,
int attention,
int errorRate,
int batteryLevel,
float delta,
float theta,
float alpha1,
float alpha2,
float beta1,
float beta2,
float gamma1,
float gamma2)
Class constructor specifying values for each of the instance variables. |
Method Summary | |
---|---|
boolean |
isOffHead()
Check whether the headset is off the head. |
java.lang.String |
toString()
Overridden toString() method to print out all of the
instance variables in a comprehensible manner. |
java.lang.String[] |
toStringArray()
Generate debug output where the different debug strings are tokenized into separate String[] elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int meditation
public int attention
public int errorRate
public int batteryLevel
public float delta
public float theta
public float alpha1
alpha1
represents waves from 8 to 10 Hz. The value is a floating point number
greater than 0.
public float alpha2
alpha2
represents waves from 10 to 12 Hz. The value is a floating point number
greater than 0.
public float beta1
beta1
represents waves from 12 to 20 Hz. The value is a floating point number
greater than 0.
public float beta2
beta2
represents waves from 20 to 30 Hz. The value is a floating point number
greater than 0.
public float gamma1
gamma1
represents waves from 30 to 40 Hz. The value is a floating point number
greater than 0.
public float gamma2
gamma2
represents waves from 40 to 50 Hz. The value is a floating point number
greater than 0.
Constructor Detail |
---|
public HeadsetData()
public HeadsetData(int meditation, int attention, int errorRate, int batteryLevel, float delta, float theta, float alpha1, float alpha2, float beta1, float beta2, float gamma1, float gamma2)
meditation
- the desired meditation levelattention
- the desired attention levelerrorRate
- the rate at which errors are seen (lower is better)batteryLevel
- the battery level (higher is better)Method Detail |
---|
public java.lang.String toString()
toString()
method to print out all of the
instance variables in a comprehensible manner. This is just a concatenated
version of the elements returned from toStringArray()
.
toString
in class java.lang.Object
public java.lang.String[] toStringArray()
String[]
elements. This is useful for displaying debug
output to a Graphics
context using Graphics.drawString()
public boolean isOffHead()
attention
and meditation
are 0
.
true
if the headset is detected to be off the head,
false
otherwise
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |