/*
 * Signals.h
 *
 *  Created on: 07.06.2017
 *      Author: abt674
 *
 *
 */

#ifndef SIGNALS_H_
#define SIGNALS_H_

 //Lightbarriers and Sensor
#define INLET_IN_VAL              0b0000000000000001
#define INLET_OUT_VAL             0b0000000000000011

#define HEIGHTMEASUREMENT_IN_VAL  0b0000000000000010
#define HEIGHTMEASUREMENT_OUT_VAL 0b0000000000000110

//#define SENSOR_HEIGHT             0b0000000000000100

#define SWITCH_IN_VAL             0b0000000000001000
#define SWITCH_OUT_VAL            0b0000000000011000

#define METAL_DETECT_VAL          0b0000000000010000

#define SWITCH_OPEN_VAL           0b0000000000100000
#define SWITCH_CLOSED_VAL         0b0000000001100000

#define SLIDE_IN_VAL              0b0000000001000000
#define SLIDE_OUT_VAL             0b0000000011000000

#define OUTLET_IN_VAL             0b0000000010000000
#define OUTLET_OUT_VAL            0b0000000110000000

//Buttons
#define BUTTON_START_VAL          0b0001000000000000
#define BUTTON_STOP_VAL           0b0010000000000000
#define BUTTON_RESET_VAL          0b0100000000000000
#define BUTTON_ESTOP_IN_VAL       0b1000000000000000
#define BUTTON_ESTOP_OUT_VAL      0b1100000000000000

namespace interrupts {

enum  interruptSignals : int32_t {
    INLET_IN = INLET_IN_VAL,
    INLET_OUT = INLET_OUT_VAL,
    HEIGHTMEASUREMENT_IN = HEIGHTMEASUREMENT_IN_VAL,
    HEIGHTMEASUREMENT_OUT = HEIGHTMEASUREMENT_OUT_VAL,
    SWITCH_IN = SWITCH_IN_VAL,
    SWITCH_OUT = SWITCH_OUT_VAL,
    METAL_DETECT = METAL_DETECT_VAL,
    SWITCH_OPEN = SWITCH_OPEN_VAL,
    SWITCH_CLOSED = SWITCH_CLOSED_VAL,
    SLIDE_IN = SLIDE_IN_VAL,
    SLIDE_OUT = SLIDE_OUT_VAL,
    OUTLET_IN = OUTLET_IN_VAL,
    OUTLET_OUT = OUTLET_OUT_VAL,
    BUTTON_START = BUTTON_START_VAL,
    BUTTON_STOP = BUTTON_STOP_VAL,
    BUTTON_RESET = BUTTON_RESET_VAL,
    BUTTON_ESTOP_IN = BUTTON_ESTOP_IN_VAL,
	BUTTON_ESTOP_OUT = BUTTON_ESTOP_OUT_VAL
};

}

#endif /* SIGNALS_H_ */
