【毕设_12】待完善~
一、修改通信协议
原先的通信协议作废,为了和其他人通信,改成结构体解析。
1 //发送包头
2 typedef struct {
3 u16 mac1,mac2,mac3;
4 u16 flag;
5 u16 length;
6 u16 checkSum;
7 }SendStructHead;
8 //发送包体
9 typedef struct {
10 u16 intensity;
11 u16 heat;
12 u16 light;
13 u16 state;
14 u16 open_TIME_THH;
15 u16 open_TIME_TMM;
16 u16 open_TIME_TSS;
17 u16 close_TIME_THH;
18 u16 close_TIME_TMM;
19 u16 close_TIME_TSS;
20 }SendStructBody;
21
22 //接收包头
23 typedef struct {
24
25 u16 flag;
26 u16 length;
27 u16 checkSum;
28 }ReceiveStructHead;
29 //接收包体
30 typedef struct {
31 u16 BilbOne;
32 u16 BilbOneLogMan;
33 u16 state;
34 u16 open_TIME_THH;
35 u16 open_TIME_TMM;
36 u16 open_TIME_TSS;
37 u16 close_TIME_THH;
38 u16 close_TIME_TMM;
39 u16 close_TIME_TSS;
40 u16 body_END;
41 }ReceiveStructBody;
42
修改通信协议如下:
二、javaWeb控制端
Web功能已实现,页面如下,有些难看 = =
而今更笃凌云志,
莫教冰鉴负初心!
——乾隆
莫教冰鉴负初心!
——乾隆
评论
0 评论