目录
1.概述..................................................................................................................................................................... 1
2.需求分析.............................................................................................................................................................1
2.1 功能需求分析..........................................................................................................................................1
2.2 性能需求分析..........................................................................................................................................2
2.3 课题任务目标..........................................................................................................................................3
2.4 系统运行环境..........................................................................................................................................3
3 开发环境准备......................................................................................................................................................3
3.1 安装 Linux 系统......................................................................................................................................4
3.2 安装交叉编译器......................................................................................................................................4
3.3 安装超级终端..........................................................................................................................................5
3.4 配置网络连接..........................................................................................................................................6
3.5 编译并运行 helloworld.........................................................................................................................7
3.6SQLite 的安装..........................................................................................................................................8
3.6.1SQLite for ARM...........................................................................................................................8
3.6.2SQLite for Ubuntu.....................................................................................................................9
4 系统设计............................................................................................................................................................10
4.1 概要设计................................................................................................................................................10
4.1.1 系统结构....................................................................................................................................10
4.1.2 系统功能组件............................................................................................................................10
4.2 详细设计................................................................................................................................................11
4.2.1 汇聚节点程序流程图................................................................................................................11
4.2.2 显示界面设计............................................................................................................................12
5 编码阶段............................................................................................................................................................13
5.1Serial 的主要功能函数........................................................................................................................13
5.1.1 打开串口....................................................................................................................................13
5.1.2 设置波特率................................................................................................................................14
5.1.3 设置校验位/停止位等..............................................................................................................15
5.2SQLite 的主要功能函数........................................................................................................................17
5.2.1 创建表........................................................................................................................................17
5.2.3 查询数据....................................................................................................................................18
5.2.4 回调函数....................................................................................................................................18
5.3socket 的主要功能函数........................................................................................................................19
5.3.1Client 端....................................................................................................................................19
5.3.2Server 端....................................................................................................................................19
5.4pthread 的主要功能函数......................................................................................................................20
5.4.1 创建线程....................................................................................................................................20
5.4.2 等待线程结束............................................................................................................................20
5.4.3 结束线程....................................................................................................................................20
5.4.4 互斥互锁信号量........................................................................................................................21
5.5LED/SEG/PWM/Matrixled 的调用..........................................................................................................21
5.6Qt 程序的核心代码................................................................................................................................22
5.7 程序截图................................................................................................................................................22