00001 #ifndef __protocol_h
00002 #define __protocol_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #define PL_SET_ADDR 1
00026
00027
00028 #define PL_REQ_ADDR 2
00029 #define PL_REQ_CAPS 3
00030 #define PL_CAPS_RESPONSE 4
00031
00032
00033
00034
00035
00036
00037
00038 #define PL_ADDR_RESPONSE 5
00039
00040
00041 #define PL_REQ_SENSOR 6
00042
00043
00044 #define PL_SENSOR_RESPONSE 7
00045
00046
00047
00048
00049 #define PL_REQ_INFORM_ON_CHANGE 8
00050
00051
00052
00053 #define PL_CHANGE_RESPONSE 9
00054
00055
00056
00057
00058 #define PL_SET_OUTPUT 9
00059
00060
00061
00062
00063 #define PL_REQ_INFO1 10
00064
00065
00066 #define PL_OTHER_RESPONSE 11
00067
00068
00069
00070
00071
00072
00073 #define EE_MY_ADDR_H 0x00
00074 #define EE_MY_ADDR_L 0x01
00075
00076 #define EE_MY_LAST_PKT_ID_H 0x02
00077 #define EE_MY_LAST_PKT_ID_L 0x03
00078
00079 #define EE_MY_SENSORS 0x04
00080 #define EE_MY_INPUTS 0x05
00081 #define EE_MY_OUTPUTS 0x06
00082 #define EE_MY_INFO1 0x07
00083
00084
00085
00086
00087 #define CAPS_SENSOR_TEMP 0
00088 #define CAPS_SENSOR_HUMIDITY 1
00089 #define CAPS_SENSOR_AIR_PRESSURE 2
00090 #define CAPS_SENSOR_LIGHT 3
00091 #define CAPS_SENSOR_PRESENCE 4
00092
00093
00094 #define CAPS_INPUTS_SWITCH1 0
00095 #define CAPS_INPUTS_SWITCH2 1
00096 #define CAPS_INPUTS_SWITCH3 2
00097 #define CAPS_INPUTS_SWITCH4 3
00098 #define CAPS_INPUTS_SWITCH5 4
00099 #define CAPS_INPUTS_SWITCH6 5
00100 #define CAPS_INPUTS_SWITCH7 6
00101 #define CAPS_INPUTS_SWITCH8 7
00102
00103
00104 #define CAPS_OUTPUTS_RELAY1 0
00105 #define CAPS_OUTPUTS_RELAY2 1
00106 #define CAPS_OUTPUTS_RELAY3 2
00107 #define CAPS_OUTPUTS_RELAY4 3
00108 #define CAPS_OUTPUTS_DIMMER1 4
00109 #define CAPS_OUTPUTS_DIMMER2 5
00110 #define CAPS_OUTPUTS_DIMMER3 6
00111 #define CAPS_OUTPUTS_DIMMER4 7
00112
00113 #define CAPS_INFO1_TIME 0
00114 #define CAPS_INFO1_DATE 1
00115
00116 #endif