Public Member Functions | |
abstract MuseDataPacketType | packetType () |
abstract long | timestamp () |
abstract ArrayList< Double > | values () |
abstract long | valuesSize () |
abstract double | getEegChannelValue (Eeg channelNum) |
abstract double | getBatteryValue (Battery b) |
abstract double | getAccelerometerValue (Accelerometer a) |
abstract double | getGyroValue (Gyro g) |
abstract double | getDrlRefValue (DrlRef drl) |
Static Public Member Functions | |
static native MuseDataPacket | makeUninitializedPacket (long capacity) |
static native MuseDataPacket | makePacket (MuseDataPacketType type, long timestamp, ArrayList< Double > values) |
Contains information received from the headband. Each packet can represent different data: eeg, accelerometer, quantization, etc. Take a look at MuseDataPacketType enum for all possible types
|
abstract |
Get the Accelerometer value from the packet.
Calling this function does not perform additional allocations and is preferable to using values().
a | the Accelerometer value to retrieve (ie. Accelerometer.X ) |
SIGABRT | If this function is called on a packet type that is not type MuseDataPacketType.ACCELEROMETER , LibMuse will throw an exception. Use packetType() to check the type before calling this function. |
|
abstract |
Get the Battery value from the packet.
Calling this function does not perform additional allocations and is preferable to using values().
b | the Battery value to retrieve (ie. Battery.MILLIVOLTS ) |
SIGABRT | If this function is called on a packet type that is not type MuseDataPacketType.BATTERY , LibMuse will throw an exception. Use packetType() to check the type before calling this function. |
|
abstract |
Get the DrlRef value from the packet.
Calling this function does not perform additional allocations and is preferable to using values().
drl | the DrlRef value to retrieve (ie. DrlRef.DRL ) |
SIGABRT | If this function is called on a packet type that is not type MuseDataPacketType.DRL_REF , LibMuse will throw an exception. Use packetType() to check the type before calling this function. |
|
abstract |
Get the raw EEG or EEG derived value from the packet. EEG derived value are data that is calculated based on the raw EEG values. Take a look at enum in MuseDataPacketType for values derived from EEG channel. Please refer to http://developer.choosemuse.com/hardware-firmware/hardware-specifications to see what EEGx represents for head location. Calling this function does not perform additional allocations and is preferable to using values().
channelNum | the EEG channel to retrieve. (ie. Eeg.EEG1) |
SIGABRT | If this function is called on a packet type that is not type MuseDataPacketType.EEG , LibMuse will throw an exception. Use packetType() to check the type before calling this function. |
|
abstract |
Get the Gyro value from the packet.
Calling this function does not perform additional allocations and is preferable to using values().
SIGABRT | If this function is called on a packet type that is not type MuseDataPacketType.GYRO , LibMuse will throw an exception. Use packetType() to check the type before calling this function. |
|
static |
Create a new packet with the given contents.
type | the type of packet to create |
timestamp | the timestamp of the packet |
values | the data the packet contains. |
|
static |
Create a new packet with reserved capacity but unspecified contents.
capacity | the number of data entries to reserve. |
|
abstract |
Specifies what kind of values are stored in the packet.
|
abstract |
Microseconds since epoch (usually Jan 1, 1970).
|
abstract |
Raw packet data as an array. The size of this array and the meaning of its elements depend on the packet type. See the documentation for MuseDataPacketType for details.
Note that this method causes new memory to be allocated for an array of boxed double values. If this impacts your application's performance, you should use get_xxx_value() methods instead.
|
abstract |
Get the number of values in this packet.