|
@@ -52,35 +52,178 @@ typedef enum{
|
52
|
52
|
BLUECELL_DL_PATH4,
|
53
|
53
|
BLUECELL_UL_PATH4,
|
54
|
54
|
};
|
55
|
|
-
|
|
55
|
+typedef enum{
|
|
56
|
+BLUECELL_HEADER,
|
|
57
|
+BLUECELL_TYPE,
|
|
58
|
+BLUECELL_LENGTH,
|
|
59
|
+BLUECELL_CRCINDEX,
|
|
60
|
+BLUECELL_DATA,
|
|
61
|
+};
|
56
|
62
|
bool Bluecell_Operate(uint8_t* data){
|
57
|
|
- uint8_t datatype = 0;
|
|
63
|
+ uint8_t datatype = data[BLUECELL_TYPE];
|
|
64
|
+ uint16_t tmp_h = 0,tmp_l = 0;
|
|
65
|
+ double ret = 0 ,tmp = 0.1;
|
58
|
66
|
|
59
|
67
|
switch(datatype){
|
60
|
|
- case BLUECELL_DL_PATH1:
|
61
|
|
-
|
62
|
|
- break;
|
63
|
|
- case BLUECELL_UL_PATH1:
|
64
|
|
-
|
65
|
|
- break;
|
66
|
|
- case BLUECELL_DL_PATH2:
|
67
|
|
-
|
68
|
|
- break;
|
69
|
|
- case BLUECELL_UL_PATH2:
|
70
|
|
-
|
71
|
|
- break;
|
72
|
|
- case BLUECELL_DL_PATH3:
|
73
|
|
-
|
74
|
|
- break;
|
75
|
|
- case BLUECELL_UL_PATH3:
|
76
|
|
-
|
77
|
|
- break;
|
78
|
|
- case BLUECELL_DL_PATH4:
|
79
|
|
-
|
80
|
|
- break;
|
81
|
|
- case BLUECELL_UL_PATH4:
|
82
|
|
-
|
83
|
|
- break;
|
|
68
|
+ case ATTDL1 :
|
|
69
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
70
|
+ tmp_h = data[BLUECELL_DATA];
|
|
71
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
72
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
73
|
+ ret += (tmp_l & 0x00FF);
|
|
74
|
+ ret /= 100;
|
|
75
|
+
|
|
76
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
77
|
+ break;
|
|
78
|
+ case ATT_DL1_PATH_OFF :
|
|
79
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
80
|
+ break;
|
|
81
|
+ case ATT_DL1_PATH_ON :
|
|
82
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
83
|
+ break;
|
|
84
|
+ case ATTUL1 :
|
|
85
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
86
|
+ tmp_h = data[BLUECELL_DATA];
|
|
87
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
88
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
89
|
+ ret += (tmp_l & 0x00FF);
|
|
90
|
+ ret /= 100;
|
|
91
|
+
|
|
92
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
93
|
+
|
|
94
|
+ break;
|
|
95
|
+ case ATT_UL1_PATH_OFF :
|
|
96
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
97
|
+ break;
|
|
98
|
+ case ATT_UL1_PATH_ON :
|
|
99
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
100
|
+ break;
|
|
101
|
+ case ATT_SelfTest1_OFF :
|
|
102
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
103
|
+ break;
|
|
104
|
+ case ATT_SelfTest1_ON :
|
|
105
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
106
|
+ break;
|
|
107
|
+ case ATTDL2 :
|
|
108
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
109
|
+ tmp_h = data[BLUECELL_DATA];
|
|
110
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
111
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
112
|
+ ret += (tmp_l & 0x00FF);
|
|
113
|
+ ret /= 100;
|
|
114
|
+
|
|
115
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
116
|
+
|
|
117
|
+ break;
|
|
118
|
+ case ATT_DL2_PATH_OFF :
|
|
119
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
120
|
+ break;
|
|
121
|
+ case ATT_DL2_PATH_ON :
|
|
122
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
123
|
+ break;
|
|
124
|
+ case ATTUL2 :
|
|
125
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
126
|
+ tmp_h = data[BLUECELL_DATA];
|
|
127
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
128
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
129
|
+ ret += (tmp_l & 0x00FF);
|
|
130
|
+ ret /= 100;
|
|
131
|
+
|
|
132
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
133
|
+
|
|
134
|
+ break;
|
|
135
|
+ case ATT_UL2_PATH_OFF :
|
|
136
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
137
|
+ break;
|
|
138
|
+ case ATT_UL2_PATH_ON :
|
|
139
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
140
|
+ break;
|
|
141
|
+ case ATT_SelfTest2_OFF :
|
|
142
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
143
|
+ break;
|
|
144
|
+ case ATT_SelfTest2_ON :
|
|
145
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
146
|
+ break;
|
|
147
|
+ case ATTDL3 :
|
|
148
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
149
|
+ tmp_h = data[BLUECELL_DATA];
|
|
150
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
151
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
152
|
+ ret += (tmp_l & 0x00FF);
|
|
153
|
+ ret /= 100;
|
|
154
|
+
|
|
155
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
156
|
+
|
|
157
|
+ break;
|
|
158
|
+ case ATT_DL3_PATH_OFF :
|
|
159
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
160
|
+ break;
|
|
161
|
+ case ATT_DL3_PATH_ON :
|
|
162
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
163
|
+ break;
|
|
164
|
+ case ATTUL3 :
|
|
165
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
166
|
+ tmp_h = data[BLUECELL_DATA];
|
|
167
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
168
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
169
|
+ ret += (tmp_l & 0x00FF);
|
|
170
|
+ ret /= 100;
|
|
171
|
+
|
|
172
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
173
|
+
|
|
174
|
+ break;
|
|
175
|
+ case ATT_UL3_PATH_OFF :
|
|
176
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
177
|
+ break;
|
|
178
|
+ case ATT_UL3_PATH_ON :
|
|
179
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
180
|
+ break;
|
|
181
|
+ case ATT_SelfTest3_OFF :
|
|
182
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
183
|
+ break;
|
|
184
|
+ case ATT_SelfTest3_ON :
|
|
185
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
186
|
+ break;
|
|
187
|
+ case ATTDL4 :
|
|
188
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
189
|
+ tmp_h = data[BLUECELL_DATA];
|
|
190
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
191
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
192
|
+ ret += (tmp_l & 0x00FF);
|
|
193
|
+ ret /= 100;
|
|
194
|
+
|
|
195
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
196
|
+
|
|
197
|
+ break;
|
|
198
|
+ case ATT_DL4_PATH_OFF :
|
|
199
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
200
|
+ break;
|
|
201
|
+ case ATT_DL4_PATH_ON :
|
|
202
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
203
|
+ break;
|
|
204
|
+ case ATTUL4 :
|
|
205
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
206
|
+ tmp_h = data[BLUECELL_DATA];
|
|
207
|
+ tmp_l = data[BLUECELL_DATA + 1];
|
|
208
|
+ ret += ((tmp_h << 8) & 0xFF00);
|
|
209
|
+ ret += (tmp_l & 0x00FF);
|
|
210
|
+ ret /= 100;
|
|
211
|
+
|
|
212
|
+ printf("tmp_h : %x tmp_l : %x , ret : %x ,%f ,tmp %f \r\n",tmp_h,tmp_l,ret,tmp );
|
|
213
|
+
|
|
214
|
+ break;
|
|
215
|
+ case ATT_UL4_PATH_OFF:
|
|
216
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
217
|
+ break;
|
|
218
|
+ case ATT_UL4_PATH_ON :
|
|
219
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
220
|
+ break;
|
|
221
|
+ case ATT_SelfTest4_OFF :
|
|
222
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
223
|
+ break;
|
|
224
|
+ case ATT_SelfTest4_ON :
|
|
225
|
+ printf("Function : %s Line %d \r\n",__func__,__LINE__);
|
|
226
|
+ break;
|
84
|
227
|
}
|
85
|
228
|
return true;
|
86
|
229
|
}
|
|
@@ -89,7 +232,7 @@ bool MBIC_Operate(uint8_t* data){
|
89
|
232
|
|
90
|
233
|
switch(datatype){
|
91
|
234
|
case Alarm_Bit_List:
|
92
|
|
- // 알림 비트
|
|
235
|
+ // �븣由� 鍮꾪듃
|
93
|
236
|
Uart1_Data_Send(&Alarm_Status[0],MAX_ALARM_Len);
|
94
|
237
|
break;
|
95
|
238
|
case Alarm_Mask:
|