úÎaê\2b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a Safe-Inferred?If the monad retuns a Just, runs the function on its contents. * Returns True if the action was executed. ?Runs the monadic action as long as the producer returns Justs. / Returns True if the action was ever executed. None7"Identifies an open Emotiv device.  Also contains the cumulative  of the EEG. )Where we get our data from, some form of  open handle. The EEG' s serial. 2Whether the EEG is a consumer or developer model. The EEG's cumulative state. An open! data source to read bytes from. A conventional b, e.g. an open file. The open hidapi device. Identifies an Emotiv device. The hidapi device info. Emotiv related errors. .We could not read the serial from the device. #Serial does not have right format. BWraps (unencrypted) Emotiv raw data. Ensures that it is 32 bytes.  Contains the  current state& of the EEG, cumulateively updated by  incoming s. !counts up from 0 to 127 (128 Hz) the current battery percentage turning left gives positive numbers turning down gives positive numbers EEG sensor values  EEG sensor-to-skin connectivity ;Contains the data of a single packet sent from the device. 6 Accumulated data (the current state) is available in . !!counts up from 0 to 127 (128 Hz) "the current battery percentage #turning left gives positive numbers $turning down gives positive numbers %EEG sensor values & EEG sensor-to-skin connectivity ':Describes the indices of bits to make up a certain value. )The sensors of an Emotiv EPOC. 5 Uses the names from the International 10-20 system. 8(A valid Emotiv serial number. 16 bytes. 93Whether the EPOC is a consumer or developer model. 2This affects how the EEG data is to be decrypted. IYou can check if you are using the correct model by seeing if the packet  3 increases from 0 until 128 on subsequent packets. <%Checks an Emotiv serial, returning a 8 if it' s valid. =Like < , using a c. >JTakes a 32 bytes encrypted EEG data, returns 32 bytes decrypted EEG data. ? Contains all )s. @DDescribes which bits in a raw data packet make up the given sensor. AJDescribes which bits in a raw data packat make up a sensor quality value. BEExtracts the sensor value for the given sensor from Emotiv raw data. de shortcut. C/Parses a battery percentage value from a byte. D Which sensor''s quality is transmitted in the packet . (depends on first byte, the packet counter). ETreat a f as Emotiv raw data. & Errors if the input is non 32 bytes. F Parses an  from raw bytes. G&The USB vendor ID of the Emotiv EPOC. H'The USB product ID of the Emotiv EPOC. I3Conveniently expose the serial number of a device. J5Lists all EPOC devices, ordered by interface number. M If you do not actively choose amongst them, the last one is usually the one 3 you want (especially if only 1 EEG is connected). KOpens a given Emotiv device.  Returns an  to read from with P. L Creates an ( device from a path, e.g. a device like  devhidraw11 or a normal file containing dumped binary data. M Creates an " device from an open file handle. NFReads one 32 byte packet from the device and decrypts it to raw data. 1Returns Nothing on end of input (or if there are < 32 bytes before it). @Note that if the EEG is (turned) off, this function block until  it is turned on again. OBGiven a device and a Emotiv raw data, parses the raw data into an   and updates the cumulative  that we maintain  for that device. JCare should be taken that raw data is fed into this function in the right  order (e.g. respecting the EEG'*s increasing sequence numbers and quality  updates). DThis function is only neededif you want to obtain both raw data and  parsed packages. , If you are not interested in raw data, use P instead. DReturns both the packet read from the device and the updated state. PGReads one 32 byte packet from the device, parses the raw bytes into an   and updates the cumulative  that we maintain  for that device. DReturns both the packet read from the device and the updated state. 1Returns Nothing on end of input (or if there are < 32 bytes before it). @Note that if the EEG is (turned) off, this function block until  it is turned on again. QHOpens and reads from the last available device, giving all data from it : to the given function. Stops if end of input is reached. Intended for use with ghci.  Examples: #withDataFromLastEEG Consumer print ;withDataFromLastEEG Consumer (print . packetQuality . snd) ZwithDataFromLastEEG Consumer (putStrLn . unwords . map show . V.toList . qualities . fst) Z  !"#$%&'()*+,-./012345678g9:;<=>?@ABdCDEFGHIJKLMNOPQhijklmnoP  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQPGH  JKLMP8<=I9;: !"#$%&)76543210/.-,+*?NEFO>'(@ABCDQ*  !"#$%&'()76543210/.-,+*8g9;:<=>?@ABdCDEFGHIJKLMNOPQhijklmnoNoneRSTUVWXRSTUVWXRSTUVWXRSTUVWXNoneY9Commonly used options for EEG command line applications. $ Mainly deals with input selection. ["What model to use for decryption. \#What serial to use for decryption. ) Also allows to pick a certain device. ]-Use the given device or dump file for input. ! If not given, HIDAPI is used. ^EEG model command line parser. _+Command line parser for EEG selection. See Y. `JRuns a command line parser. The given program description is used for the  --help message. aHDepending on some common EEG-choice-related user input, list devices or ! try to open the correct device. YZ[\]^_`a YZ[\]^_`a YZ[\]_^`aYZ[\]^_`ap       !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXXY Z[\]^_`a_bcd_efghi7jklmnopqr hemokit-0.6.0Hemokit.Internal.UtilsHemokitHemokit.Conduit Hemokit.Start withJustM untilNothing EmotivDevice rawDeviceserial emotivModelstateRefEmotivRawDevice HandleDevice handleDevice HidapiDevice hidapiDeviceEmotivDeviceInfohidapiDeviceInfoEmotivExceptionOtherEmotivExceptionCouldNotReadSerialInvalidSerialNumber EmotivRawDataemotivRawDataBytes EmotivStatecounterbatterygyroXgyroYsensors qualities EmotivPacket packetCounter packetBattery packetGyroX packetGyroY packetSensors packetQualityBitMaskSensorF4FC6AF4F8T8P8O2O1P7T7F7AF3FC5F3 SerialNumber EmotivModel DeveloperConsumermakeSerialNumbermakeSerialNumberFromStringdecrypt allSensors getSensorMask qualityMaskgetLevel batteryValuequalitySensorFromByte0makeEmotivRawData parsePacket_EMOTIV_VENDOR_ID_EMOTIV_PRODUCT_IDdeviceInfoSerialgetEmotivDevicesopenEmotivDeviceopenEmotivDeviceFileopenEmotivDeviceHandle readEmotivRawupdateEmotivState readEmotivwithDataFromLastEEG rawSource parsePackets emotivStates emotivPackets jsonConduittcpSink websocketSink EmotivArgsmodelfromFile parseModelemotivArgsParser parseArgsgetEmotivDeviceFromArgsbaseGHC.IO.Handle.TypesHandleGHC.BaseStringintGHC.Real fromIntegralbytestring-0.10.0.2Data.ByteString.Internal ByteString$fNFDataSensor$fNFDataEmotivState$fNFDataEmotivRawData$fNFDataEmotivPacket$fNFDataEmotivException$fNFDataEmotivDeviceInfo$fShowEmotivException$fExceptionEmotivException