Public Member Functions | |
abstract boolean | open () |
abstract boolean | close () |
abstract Result | gotoNextMessage () |
abstract MessageType | getMessageType () |
abstract int | getMessageId () |
abstract long | getMessageTimestamp () |
abstract AnnotationData | getAnnotation () |
abstract MuseConfiguration | getConfiguration () |
abstract MuseVersion | getVersion () |
abstract ComputingDeviceConfiguration | getComputingDeviceConfiguration () |
abstract DspData | getDsp () |
abstract MuseDataPacket | getDataPacket () |
abstract MuseArtifactPacket | getArtifactPacket () |
Static Public Member Functions | |
static native MuseFileReader | getFileReader (MuseFile file) |
Reads a .muse file formatted according to the Muse protobuf schema. For information about the .muse file format see: http://developer.choosemuse.com/file-formats/muse
When the file reader is created it always starts reading from the beginning of the file to the end.
Threading: It is NOT thread safe, you have to provide your own synchronization mechanism if you plan to calls methods of this class from different threads.
|
abstract |
Closes the file. Calls MuseFile.close() . You don't have to call close explicitly unless you want to close file immediately. close is called automatically, when the file reader object is destroyed.
|
abstract |
Returns annotation data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.ANNOTATION |
|
abstract |
Returns the muse artifact packet data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.ARTIFACT , |
|
abstract |
Returns computing device configuration data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.COMPUTING_DEVICE |
|
abstract |
Returns muse configuration data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.CONFIGURATION |
|
abstract |
Returns the muse data packet data at the current position in the file. Use this method to get EEG, Accelerometer, Battery and Quantization packets.
IncorrectMessageType | If current message type is not one of: MessageType.ACCELEROMETER , MessageType.ACC_DROPPED , MessageType.BATTERY , MessageType.EEG , MessageType.EEG_DROPPED , MessageType.GYRO , MessageType.MUSE_ELEMENTS or MessageType.QUANTIZATION |
|
abstract |
Returns the dsp data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.DSP |
|
static |
Returns an instance of file reader. Automatically opens a file.
|
abstract |
Returns the id of the message at the current position in the file or -1
if the id isn't found in the protobuf specification.
-1
if the id isn't found in the protobuf specification.
|
abstract |
Returns the timestamp of the message at the current position in the file.
|
abstract |
Returns the type of message at the current position in the file.
|
abstract |
Returns muse version data at the current position in the file.
IncorrectMessageType | If current message type is not MessageType.VERSION |
|
abstract |
Reads the next message in the protobuf stream.
|
abstract |
Opens an existing file Use this method if you explicitly closed file and want to open it again. Calls MuseFile.open() .