00001 #ifndef __protocol_h
00002 #define __protocol_h
00003
00004
00005
00006 #define PL_SET_ADDR 1
00007
00008
00009 #define PL_REQ_ADDR 2
00010 #define PL_REQ_CAPS 3
00011 #define PL_THIS_MY_CAPS 4
00012
00013
00014
00015
00016 #define PL_THIS_MY_ADDR 5
00017
00018
00019 #define PL_REQ_SENSOR 6
00020
00021
00022 #define PL_THIS_MY_SENSOR 7
00023
00024
00025
00026
00027 #define PL_REQ_INFORM_ON_CHANGE 8
00028
00029
00030
00031 #define PL_CHANGE 9
00032
00033
00034
00035
00036 #define PL_SET_OUTPUT 9
00037
00038
00039
00040
00041 #define PL_GET_OTHER 10
00042
00043
00044 #define PL_THIS_MY_OTHER 11
00045
00046
00047
00048
00049
00050
00051 #define EE_MY_ADDR_H 0x00
00052 #define EE_MY_ADDR_L 0x01
00053
00054 #define EE_MY_LAST_PKT_ID_H 0x02
00055 #define EE_MY_LAST_PKT_ID_L 0x03
00056
00057 #define EE_MY_SENSORS 0x04
00058 #define EE_MY_INPUTS 0x05
00059 #define EE_MY_OUTPUTS 0x06
00060 #define EE_MY_OTHER 0x07
00061
00062
00063
00064
00065 #define CAPS_SENSOR_TEMP 0
00066 #define CAPS_SENSOR_HUMIDITY 1
00067 #define CAPS_SENSOR_AIR_PRESSURE 2
00068 #define CAPS_SENSOR_LIGHT 3
00069 #define CAPS_SENSOR_PRESENCE 4
00070
00071
00072 #define CAPS_INPUTS_SWITCH1 0
00073 #define CAPS_INPUTS_SWITCH2 1
00074 #define CAPS_INPUTS_SWITCH3 2
00075 #define CAPS_INPUTS_SWITCH4 3
00076 #define CAPS_INPUTS_SWITCH5 4
00077 #define CAPS_INPUTS_SWITCH6 5
00078 #define CAPS_INPUTS_SWITCH7 6
00079 #define CAPS_INPUTS_SWITCH8 7
00080
00081
00082 #define CAPS_OUTPUTS_RELAY1 0
00083 #define CAPS_OUTPUTS_RELAY2 1
00084 #define CAPS_OUTPUTS_RELAY3 2
00085 #define CAPS_OUTPUTS_RELAY4 3
00086 #define CAPS_OUTPUTS_DIMMER1 4
00087 #define CAPS_OUTPUTS_DIMMER2 5
00088 #define CAPS_OUTPUTS_DIMMER3 6
00089 #define CAPS_OUTPUTS_DIMMER4 7
00090
00091 #define CAPS_OTHER_TIME 0
00092 #define CAPS_OTHER_DATE 1
00093
00094 #endif