【正文】
uint16 flashTime。 buf[1]==39。 break。SampleApp_epDesc, //源 (答復或確認 )終端的描述(比如操作系統(tǒng)中任務 ID 等)源 EP SAMPLEAPP_PERIODIC_CLUSTERID, //被 Profile 指定的有效的集群號 2, // 發(fā)送數(shù)據(jù)長度 SendData,// 發(fā)送數(shù)據(jù)緩沖區(qū) amp。SampleApp_epDesc, 畢業(yè)設計 (論文 ) 18 SAMPLEAPP_PERIODIC_CLUSTERID, 2, SendData, amp。 endif } else { HalLedSet(HAL_LED_1, HAL_LED_MODE_ON)。 //復制數(shù)據(jù)到緩沖區(qū)中 if(buf[0]==39。 // Setup to send message again in normal period (+ a little jitter) osal_start_timerEx(SampleApp_TaskID,SAMPLEAPP_SEND_PERIODIC_MSG_EVT, (SAMPLEAPP_SEND_PERIODIC_MSG_TIMEOUT + (osal_rand() amp。 osal_start_timerEx( SampleApp_TaskID, SAMPLEAPP_SEND_PERIODIC_MSG_EVT, SAMPLEAPP_SEND_PERIODIC_MSG_TIMEOUT )。 SYS_EVENT_MSG ) //接收系統(tǒng)消息再進行判斷 { //接收屬于本應用任務 SampleApp 的消息,以 SampleApp_TaskID 標記 MSGpkt = (afIningMSGPacket_t *)osal_msg_receive( SampleApp_TaskID )。 // By default, all devices start out in Group 1 = 0x0001。 = amp。 endif //設置發(fā)送數(shù)據(jù)的方式和目的地址尋址模式 //發(fā)送模式 :廣播發(fā)送 = (afAddrMode_t)AddrBroadcast。但是當 NV_RESTORE 已經(jīng)被設置的時候( NV_RESTORE 是把信息保存在非易失存儲器中),那么當設備斷電或者意外重啟時,在非易失存儲器中已經(jīng)存儲了網(wǎng)絡狀態(tài),此時就不需要重新建立或加入網(wǎng)絡,只需恢復網(wǎng)絡狀態(tài)即可。而且 taskID 一一對應。 //清除本次任務的事件 HAL_EXIT_CRITICAL_SECTION(intState)。 //掃描哪個事件被觸發(fā)了,然后置相應的標志位 Hal_ProcessPoll()。 // SampleApp_Init _Init(5), } 函數(shù)對 taskID 進行初始化,每初始化一個, taskID++。 //macTaskInit(0) ,用戶不需考慮 nwk_init( taskID++ )。 endif osal_start_system()。t a task, call it39。 //初始化系統(tǒng)時鐘 zmain_vdd_check()。對于各模塊的方案分析,達到了切合最終目的的要求。 畢業(yè)設計 (論文 ) 3 系統(tǒng)的概述 智能電表電量采集管理系統(tǒng)是不需要人員到達現(xiàn)場親自抄讀電表數(shù)據(jù)的,是使用計算機相關技術、微電子技術、無線通信技術以及網(wǎng)絡相關技術的相互配合,通訊聯(lián)系的方式是通過網(wǎng)絡的相關設備建立起來的,做到整個系統(tǒng)實現(xiàn)硬件和軟件一體的良好運作,能夠實現(xiàn)自動對用戶的用電量信息和故障數(shù)據(jù)做出數(shù)據(jù)的相關操作。此外,對于現(xiàn)在社會化石能源的逐漸枯竭,環(huán)境問題的日益惡化,由智能電表為基礎的智能電網(wǎng),可以將各種分布式發(fā)電裝置,諸如風能發(fā)電、太陽能發(fā)電等自然資源連接起來,實現(xiàn)“即發(fā)即用”的設想。自動抄表系統(tǒng)所表現(xiàn)出的優(yōu)點是節(jié)約了人力資源的輸出成本,在抄表數(shù)據(jù) 的準確性和可靠性方面也有明顯的提高,同時用戶賬單的出錯率也減少了,而供電部門也能夠及時準確的獲得所需數(shù)據(jù)信息。 結論 ................................................................................................................................................. 5 致謝 ................................................................................................................................................. 6 參考文獻 ......................................................................................................................................... 7 附錄 ................................................................................................................................................. 8 附錄 1 ........................................................................................................................................... 8 畢業(yè)設計 (論文 ) 1 1 緒論 課題的研究背景 電能計量環(huán)節(jié)在現(xiàn)代電力中是重要的環(huán)節(jié),傳統(tǒng)的電量數(shù)據(jù)統(tǒng)計方式是抄表人員需要到用戶住處對電表進行數(shù)據(jù)抄讀,進行而統(tǒng)計,這種方法在實時性、準確性等的方面都存在不足,還會使供電部門產(chǎn)生不必要的損失,在用戶和供電部門之間可能會產(chǎn)生類似于電費拖欠這些糾紛。 畢業(yè)設計 (論文 ) II Oracle 的邏輯結構 ...................................................................... 錯誤 !未定義書簽。 Qt 平臺的介紹 ..................................................................................... 錯誤 !未定義書簽。 Zigbee 定義 ........................................................................................ 錯誤 !未定義書簽。 關鍵詞 電量采集; RS485 通信; Zigbee; CC2530 畢業(yè)設計 (論文 ) II Abstract With the vigorous development of our social economy, electric power plays an important role in every industry, Both industrial and mercial electricity and electricity, the demand for electricity in rising, it also makes us more and more is also high to the requirement of electric power, we hope our life, production bees more convenient, more efficient, so as to promote the development of power system. Power is the power of all industries, has an important significance. This topic research is from the traditional meter reading method to the implementation of intelligent management system now. The traditional meter reading method need personally on the scene a meter reading copy of data read from door to door, after a general statistical data, makes the data deviation, and copying errors, thereby causing loss to the unknown, and to produce needless issue between users, meter reading statistics these tedious process human cost, time, there will be any mistakes. This topic will pay attention to solve these problems, smart meters electricity charge collection management system, automatic data collection, and uploaded to the work side, and make a data transmission, statistics and accounting, can achieve realtime query electr