久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 4249|回復: 0
打印 上一主題 下一主題
收起左側

ZigBee開源協議棧MpZBee源碼

[復制鏈接]
跳轉到指定樓層
樓主
歡迎做ZIGBEE開發交流


單片機源程序如下:
  1. /*********************************************************************

  2.                     Device Description File

  3. This file contains descriptor information needed to describe and
  4. implement a ZigBee application.  This file is application-specific -
  5. each application should have its own file.

  6. In the future, this file should be automatically generated by a ZigBee
  7. configuration tool.

  8. *********************************************************************
  9. * FileName:        MyZigBee.c
  10. * Dependencies:
  11. * Processor:       PIC18
  12. * Complier:        MCC18 v1.00.50 or higher
  13. *                  HITECH PICC-18 V8.10PL1 or higher
  14. * Company:         Microchip Technology, Inc.
  15. *
  16. * Software License Agreement
  17. *
  18. * The software supplied herewith by Microchip Technology Incorporated
  19. * (the 揅ompany? for its PICmicro?Microcontroller is intended and
  20. * supplied to you, the Company抯 customer, for use solely and
  21. * exclusively on Microchip PICmicro Microcontroller products. The
  22. * software is owned by the Company and/or its supplier, and is
  23. * protected under applicable copyright laws. All rights are reserved.
  24. * Any use in violation of the foregoing restrictions may subject the
  25. * user to criminal sanctions under applicable laws, as well as to
  26. * civil liability for the breach of the terms and conditions of this
  27. * license.
  28. *
  29. * THIS SOFTWARE IS PROVIDED IN AN 揂S IS?CONDITION. NO WARRANTIES,
  30. * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED
  31. * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  32. * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT,
  33. * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR
  34. * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
  35. *
  36. *
  37. * Author               Date    Comment
  38. *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. * DF/KO                04/29/05 Microchip ZigBee Stack v1.0-2.0
  40. * DF/KO                07/27/05 Microchip ZigBee Stack v1.0-3.1
  41. * DF/KO                09/08/05 Microchip ZigBee Stack v1.0-3.3
  42. ********************************************************************/

  43. #include "zigbee.h"
  44. #include "zdo.h"

  45. //******************************************************************************
  46. // Node Descriptor
  47. //
  48. // This structure describes the node type and its capabilities
  49. //******************************************************************************

  50. ROM NODE_DESCRIPTOR Config_Node_Descriptor =
  51. {
  52.     NODE_LOGICAL_TYPE,
  53.     NODE_FREQ_BAND,
  54.     ALT_PAN_COORD | DEVICE_TYPE | POWER_SOURCE | RECEIVER_ON_IDLE | SECURITY_CAPABILITY,
  55.     NODE_MAX_BUFFER_SIZE,
  56.     NODE_MAX_TRANSFER_SIZE
  57. };

  58. //******************************************************************************
  59. // Node Power Descriptor
  60. //
  61. // This structure describes the node's power characteristics.
  62. //******************************************************************************

  63. // Current version does not support variable charge level advertisement.
  64. ROM NODE_POWER_DESCRIPTOR Config_Power_Descriptor =
  65. {
  66.     NODE_CURRENT_POWER_MODE | (NODE_AVAILABLE_POWER_SOURCES << 4),
  67.     NODE_AVAILABLE_POWER_SOURCES | (0x0f << 4)
  68. };

  69. //******************************************************************************
  70. // Simple Descriptors
  71. //
  72. // This structure defines all endpoints that are implemented in the application.
  73. // The first endpoint is the ZigBee Device Object endpoint - DO NOT MODIFY.
  74. // The following endpoints describe the application endpoints.
  75. //******************************************************************************

  76. ROM NODE_SIMPLE_DESCRIPTOR Config_Simple_Descriptors[NUM_DEFINED_ENDPOINTS] =
  77. {
  78. //------------------------------------------------------------------------------
  79. // ZigBee Device Object Endpoint
  80. // DO NOT MODIFY THIS DESCRIPTOR!!!
  81. //------------------------------------------------------------------------------
  82.     {
  83.         EP_ZDO,                         // ZDO Endpoint is endpoint 0
  84.         {MY_PROFILE_ID_LSB,MY_PROFILE_ID_MSB},                  // Application Profile ID, from the ZigBee Alliance
  85.         {0x00,0x00},                         // ZDO Device ID
  86.         0x00,                           // ZDO Device Version
  87.         NO_OTHER_DESCRIPTOR_AVAILABLE,  // Application Flags
  88.         ZDO_INPUT_CLUSTERS,             // Application Input Cluster Count
  89.         { NWK_ADDR_REQ, IEEE_ADDR_REQ, NODE_DESC_REQ, POWER_DESC_REQ,
  90.           SIMPLE_DESC_REQ, ACTIVE_EP_REQ, MATCH_DESC_REQ
  91.             #ifdef INCLUDE_OPTIONAL_NODE_MANAGEMENT_SERVICES
  92.                 , MGMT_NWK_DISC_REQ, MGMT_LQI_REQ, MGMT_RTG_REQ,
  93.                 MGMT_BIND_REQ, MGMT_LEAVE_REQ, MGMT_DIRECT_JOIN_REQ
  94.             #endif
  95.             #ifdef INCLUDE_OPTIONAL_SERVICE_DISCOVERY_RESPONSES
  96.                 , COMPLEX_DESC_REQ, USER_DESC_REQ, DISCOVERY_REGISTER_REQ,
  97.                 END_DEVICE_ANNCE, USER_DESC_SET
  98.             #endif
  99.             #if defined(I_AM_COORDINATOR) && defined(SUPPORT_END_DEVICE_BINDING)
  100.                 , END_DEVICE_BIND_REQ
  101.             #endif
  102.             #if defined(I_AM_COORDINATOR) || defined(I_SUPPORT_BINDINGS)
  103.                 , BIND_REQ, UNBIND_REQ
  104.             #endif
  105.             #ifdef I_AM_COORDINATOR
  106.                 , CUSTOM_DEMO_BIND            // Demo only!
  107.             #endif
  108.         },                              // Application Input Cluster List
  109.         ZDO_OUTPUT_CLUSTERS,            // Application Output Cluster Count
  110.         { NWK_ADDR_RSP, IEEE_ADDR_RSP, NODE_DESC_RSP, POWER_DESC_RSP,
  111.           SIMPLE_DESC_RSP, ACTIVE_EP_RSP, MATCH_DESC_RSP
  112.             #ifdef INCLUDE_OPTIONAL_NODE_MANAGEMENT_SERVICES
  113.                 , MGMT_NWK_DISC_RSP, MGMT_LQI_RSP, MGMT_RTG_RSP,
  114.                 MGMT_BIND_RSP, MGMT_LEAVE_RSP, MGMT_DIRECT_JOIN_RSP
  115.             #endif
  116.             #ifdef INCLUDE_OPTIONAL_SERVICE_DISCOVERY_RESPONSES
  117.                 , COMPLEX_DESC_RSP, USER_DESC_RSP, DISCOVERY_REGISTER_RSP,
  118.                 USER_DESC_CONF
  119.             #endif
  120.             #if defined(I_AM_COORDINATOR) && defined(SUPPORT_END_DEVICE_BINDING)
  121.                 , END_DEVICE_BIND_REQ
  122.             #endif
  123.             #if defined(I_AM_COORDINATOR) || defined(I_SUPPORT_BINDINGS)
  124.                 , BIND_REQ, UNBIND_REQ
  125.             #endif
  126.         }                               // Application Output Cluster List
  127.     },

  128. //------------------------------------------------------------------------------
  129. // User Descriptors
  130. //
  131. // Enter application endpoint descriptors here.
  132. //------------------------------------------------------------------------------
  133. //------------------------------------------------------------------------------
  134. // Switch endpoint information
  135. //------------------------------------------------------------------------------
  136.     {
  137.         EP_SWITCH,                      // Endpoint number
  138.         {MY_PROFILE_ID_LSB,MY_PROFILE_ID_MSB},                  // Application Profile ID, from the ZigBee Alliance
  139.         {SW_REMOTE_CONTROL_DEV_ID_LSB,SW_REMOTE_CONTROL_DEV_ID_MSB},   // Application Device ID, from the ZigBee Alliance
  140.         SW_REMOTE_CONTROL_DEV_VER,  // Application Device Version, from the ZigBee Alliance
  141.         NO_OTHER_DESCRIPTOR_AVAILABLE,  // Application Flags
  142.         0x00,                           // Application Input Cluster Count
  143.         { NO_CLUSTER },                 // Application Input Cluster List
  144.         0x01,                           // Application Output Cluster Count
  145.         { OnOffSRC_CLUSTER }            // Application Output Cluster List
  146.     }
  147. };

  148. //******************************************************************************
  149. // Complex Descriptor
  150. //
  151. // This structure is optional  It contains more information about the device.
  152. //******************************************************************************

  153. //******************************************************************************
  154. // User Descriptor
  155. //
  156. // This structure is option.  It can be one character string up to 16 characters
  157. // long.
  158. //******************************************************************************

  159. //******************************************************************************
  160. // Network Mode and Parameters
  161. //******************************************************************************

  162. ROM _Config_NWK_Mode_and_Params Config_NWK_Mode_and_Params =
  163. {
  164.      PROFILE_nwkcProtocolVersion,   // BYTE ProtocolVersion;
  165.      MY_STACK_PROFILE_ID,           // BYTE StackProfile;
  166.      15,                            // BYTE BeaconOrder; (non-slotted)
  167.      15,                            // BYTE SuperframeOrder; (non-slotted)
  168.      FALSE,                         // BYTE BatteryLifeExtension;
  169.      PROFILE_nwkSecurityLevel,      // BYTE SecuritySetting;
  170.      {0xFFFF}                       // WORD Channels (scan all channels)
  171. };
復制代碼

所有資料51hei提供下載:
ZigBee開源協議棧MpZBee.rar (4.07 MB, 下載次數: 44)


分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏2 分享淘帖 頂 踩
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 综合色婷婷 | 亚州毛片 | 自拍视频网| 精品久久久久久久久久 | 久久亚洲欧美日韩精品专区 | 性xxxxx| 日韩欧美视频免费在线观看 | 国产日韩精品一区二区 | 一区二区不卡高清 | 久久久久亚洲av毛片大全 | 久久国产精品久久久久久 | 9191成人精品久久 | 亚洲视频在线一区 | 亚洲免费三级 | 亚洲国产精品久久久 | 一区二区日韩 | 99精品免费久久久久久久久日本 | 久久久久久国产精品 | 亚洲高清在线 | 成人在线视频网站 | 日韩在线小视频 | 91免费版在线观看 | 欧美精品片 | 亚洲一区二区中文字幕在线观看 | 二区在线视频 | 日日操夜夜操天天操 | 国产成人啪免费观看软件 | 久久剧场 | 一区二区三区在线播放 | 久草福利 | 超碰97免费 | 亚洲综合久久精品 | 美日韩免费视频 | 精品国产成人 | 青青激情网 | 婷婷久久一区 | 欧美日韩在线免费 | 久久久久久久久久毛片 | 久久久久国产精品免费免费搜索 | 亚洲精品9999久久久久 | 亚洲第一网站 |