eyeDrops  v2.3
A new approach to detecting eye blinks.
Typedefs | Enumerations
Protocol.h File Reference

Header file containing the communication protocol. More...

#import <Foundation/Foundation.h>

Go to the source code of this file.

Typedefs

typedef enum BLE_OUT_MESSAGE BLE_OUT_MESSAGE
 
typedef enum BLE_IN_MESSAGE BLE_IN_MESSAGE
 

Enumerations

enum  BLE_OUT_MESSAGE : unsigned char {
  BLE_OUT_MESSAGE_NORMAL_MODE = 0x00,
  BLE_OUT_MESSAGE_START_CALIBRATION = 0x01,
  BLE_OUT_MESSAGE_STOP_CALIBRATION = 0x02,
  BLE_OUT_MESSAGE_SET_PARAMETERS = 0x03,
  BLE_OUT_MESSAGE_CAL_PARAM_THRESH_NEG = 0x10,
  BLE_OUT_MESSAGE_CAL_PARAM_THRESH_POS,
  BLE_OUT_MESSAGE_CAL_PARAM_HYSTERESIS,
  BLE_OUT_MESSAGE_CAL_PARAM_MIN_MIN,
  BLE_OUT_MESSAGE_CAL_PARAM_MAX_MAX,
  BLE_OUT_MESSAGE_CAL_PARAM_T_FALL_MIN,
  BLE_OUT_MESSAGE_CAL_PARAM_T_FALL_MAX,
  BLE_OUT_MESSAGE_CAL_PARAM_T_RISE_MIN,
  BLE_OUT_MESSAGE_CAL_PARAM_T_RISE_MAX,
  BLE_OUT_MESSAGE_CAL_PARAM_T_TOTAL_MIN,
  BLE_OUT_MESSAGE_CAL_PARAM_T_TOTAL_MAX,
  BLE_OUT_MESSAGE_CAL_PARAM_ALLOWED_ZEROS,
  BLE_OUT_MESSAGE_REQUEST_BATTERY_LEVEL = 0x10,
  BLE_OUT_MESSAGE_START_DEBUG = 0x0E,
  BLE_OUT_MESSAGE_STOP_DEBUG = 0x0F,
  BLE_OUT_MESSAGE_RESET = 0xFF
}
 This enumeration contains the byte decoded message values for outgoing BLE mesages. More...
 
enum  BLE_IN_MESSAGE : unsigned char {
  BLE_IN_MESSAGE_ALIVE = 0x00,
  BLE_IN_MESSAGE_BLINK_DETECTED = 0x01,
  BLE_IN_MESSAGE_CAL_DATA = 0x02,
  BLE_IN_MESSAGE_PARAMETERS_SET = 0x03,
  BLE_IN_MESSAGE_BATTERY_LEVEL = 0x10,
  BLE_IN_MESSAGE_DEBUG = 0x0F,
  BLE_IN_MESSAGE_ERROR_EXCEPTION = 0xEE,
  BLE_IN_MESSAGE_RESET = 0xFF
}
 This enumeration contains the byte decoded messages values for incoming BLE messages. More...
 

Detailed Description

Header file containing the communication protocol.

Author
Benjamin Thiemann
Date
2017/01/21

Enumeration Type Documentation

◆ BLE_IN_MESSAGE

enum BLE_IN_MESSAGE : unsigned char

This enumeration contains the byte decoded messages values for incoming BLE messages.

Enumerator
BLE_IN_MESSAGE_ALIVE 

ACK for BLE_OUT_MESSAGE_NORMAL_OPERATION.

BLE_IN_MESSAGE_BLINK_DETECTED 

Blink detected.

BLE_IN_MESSAGE_CAL_DATA 

Package identifier for incoming sensor data.

BLE_IN_MESSAGE_PARAMETERS_SET 

ACK for all paramerters received.

BLE_IN_MESSAGE_BATTERY_LEVEL 

The current battery level.

BLE_IN_MESSAGE_DEBUG 

Sending debug data (0x0F <data length max 255> <data>).

BLE_IN_MESSAGE_ERROR_EXCEPTION 

Error / exeption occurred.

BLE_IN_MESSAGE_RESET 

Reset happend / always on connect –> send calibration data to RFDuino.

◆ BLE_OUT_MESSAGE

enum BLE_OUT_MESSAGE : unsigned char

This enumeration contains the byte decoded message values for outgoing BLE mesages.

Enumerator
BLE_OUT_MESSAGE_NORMAL_MODE 

Normal operation. Blink detection!

BLE_OUT_MESSAGE_START_CALIBRATION 

PC wants to start a calibration (due to creating new profile).

BLE_OUT_MESSAGE_STOP_CALIBRATION 

Data acquisition completed. Tell RFDuino to stop sending calibration data.

BLE_OUT_MESSAGE_SET_PARAMETERS 

Package identifier for calibration parameters.

BLE_OUT_MESSAGE_CAL_PARAM_THRESH_NEG 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_THRESH_POS 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_HYSTERESIS 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_MIN_MIN 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_MAX_MAX 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_FALL_MIN 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_FALL_MAX 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_RISE_MIN 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_RISE_MAX 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_TOTAL_MIN 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_T_TOTAL_MAX 

Calibration parameter.

BLE_OUT_MESSAGE_CAL_PARAM_ALLOWED_ZEROS 

Calibration parameter.

BLE_OUT_MESSAGE_REQUEST_BATTERY_LEVEL 

Tell RFDuino to send battery level.

BLE_OUT_MESSAGE_START_DEBUG 

Tell RFDUino to enter debug mode.

BLE_OUT_MESSAGE_STOP_DEBUG 

Tell RFDuino to leave debug mode.

BLE_OUT_MESSAGE_RESET 

ACK for BLE_IN_MESSAGE_NEED_RESET.