thuliangjz / wsn Goto Github PK
View Code? Open in Web Editor NEW计网大作业无线传感网项目
计网大作业无线传感网项目
将广播收到的消息通过串口传递给pc
接受pc段程序传入的设置信息,广播到其他节点
将采集到的数据以尽量低的丢包率发送到基站节点。在传感器收集到采集的数据之后,通知传输模块,模块向指定的节点(这个部分不用调用者传参应该通过节点的id直接确定)发送包含感知信息的包,如果失败则重发,直至成功(与传感器模块之间的接口应该是一个异步接口)。另外还应该为广播实现一个可靠传输的功能,在收到设置信息时应该能够反复向两个节点发送设置信号直至传递成功
向上提供接口:sendData, dataArrived
在这个模块的基础上构建要求中说到的0号(只负责发送采集到的数据)和1号节点(除了发送自己采集到的数据还要发送0号采集的数据)以及基站(将收到的信息发送给串口)
模块内部保留一个队列,当调用sendData时实际是将data放置在队列中,通过发送任务对数据进行发送
采集数据提供数据和采集时间,对外提供设置采集时间的接口
实现基站和节点的命令传输协议
当基站收到发送命令的调用时,向所有节点广播命令数据包,节点收到后返回ack,如果一定时间内有节点没有返回数据包,则基站节点重传命令。
需要一个0,1序列号来区分当前命令和上一个命令
接受串口传递过来的数据,将其展示给用户。用户通过该接口设定采集时间时,通知串口模块该设置消息
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.