00001 #ifndef __protocol_h
00002 #define __protocol_h
00003
00004
00005
00006 #define PL_SET_ADDR 1
00007
00008
00009 #define PL_GET_ADDR 2
00010 #define PL_GET_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_GET_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_L 0x00
00052 #define EE_MY_ADDR_H 0x01
00053
00054 #define EE_MY_LAST_PKT_ID_L 0x02
00055 #define EE_MY_LAST_PKT_ID_H 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 0x01
00066 #define CAPS_SENSOR_HUMIDITY 0x02
00067 #define CAPS_SENSOR_AIR_PRESSURE 0x04
00068 #define CAPS_SENSOR_LIGHT 0x08
00069 #define CAPS_SENSOR_PRESENCE 0x10
00070
00071
00072 #define CAPS_INPUTS_SWITCH1 0x01
00073 #define CAPS_INPUTS_SWITCH2 0x02
00074 #define CAPS_INPUTS_SWITCH3 0x04
00075 #define CAPS_INPUTS_SWITCH4 0x08
00076 #define CAPS_INPUTS_SWITCH5 0x10
00077 #define CAPS_INPUTS_SWITCH6 0x20
00078 #define CAPS_INPUTS_SWITCH7 0x40
00079 #define CAPS_INPUTS_SWITCH8 0x80
00080
00081
00082 #define CAPS_OUTPUTS_RELAY1 0x01
00083 #define CAPS_OUTPUTS_RELAY2 0x02
00084 #define CAPS_OUTPUTS_DIMMER1 0x04
00085 #define CAPS_OUTPUTS_DIMMER2 0x08
00086
00087 #define CAPS_OTHER_TIME 0x01
00088 #define CAPS_OTHER_DATE 0x02
00089
00090 #endif