下面是Z-Stack Home 1.2.0开发资料中的Z-Stack Home Developer’s Guide—8. Additional Information for HA Applications的中文翻译。

8.HA应用程序的其他信息

样例应用程序实现了一组最小的功能。可选的特性,在ZigBee Home Automation Specification文档中做了详细的描述,在一个更加功能全面的应用程序中能够被添加进来。

除了支持适当的族和属性,应用程序一定要选择一个zigbee设备类型并且支持非易失性内存(NVM)。

8.1 ZigBee 设备类型

zigbee遵循以下3种设备类型:zigbee协调器,zigbee路由,zigbee终端设备。每个应用程序必须决定这个应用程序将支持哪种设备类型。以下是最基本的原则。查看更详细的介绍,请看Texas Instruments document SWRA176, Z-Stack Developer’s Guide文档。

  • 使用zigbee协调器开始组建一个网络,通常作为一个基站。
  • 使用zigbee路由作为一个促进作用,比如作为一个网络的出口,在一个给定的设施(12个或者更少的设备) 只有在这种设备不是很多的时候才使用。除此之外,将用作zigbee终端设备。
  • 使用一个zigbee终端设备来保持正常的休眠以节约能源(通常是电池供电设备),或者 这里有靠的很近的很多这样的设备 用于一个主电源来控制这些设备。

8.2在NVM中存储变量

通常,一个设备必须要有非易失性内存来保证,因为设备必须记住它的网络配置。

为了保存一个变量到NVM中,必须为这个变量创建一个item ID。这些ID在应用程序中预留的范围是0x0401~0x0FFF。这些ID的完整列表,请参阅ZComDef.h文件。

一旦item ID被定义了,一定要使用osal_nv_item_init()进行初始化。这个函数将使用item ID,存储变量的长度,和一个变量(如果用户想使用这个初始值的话)。

往NVM写一个item,使用osal_nv_write()。这个函数将使用itemID,item的偏移索引,写数据的长度,写数据的变量。

往NVM读一个item,使用osal_nv_read()。这个函数使用itemID,item的偏移索引,读数据的长度,将数据读到哪个变量。这些函数可以在OSAL_Nv.c文件中找到。

8.3用户接口

以下的用户接口应该在每个应用程序:
- 在每个端点上调用EZ-Mode的方法
- 将整个设备重置为出厂设置的方法(不在一个网络,等等)
- 在引起应用程序的操作(比如 一个开关打开一个灯)
- 将供电设备设置为休眠状态

英文原文

8. Additional Information for HA Applications

The sample applications implement a minimal set of features to operate. Optional features, as described in the
ZigBee Home Automation Specification [1], can be added for a more full-featured application.
In addition to enabling the appropriate clusters and attributes, application must also select a ZigBee device type and
enable non-volatile memory (NVM).

8.1 ZigBee Device Type

ZigBee allows for 3 device types: a ZigBee Coordinator, ZigBee Router, and ZigBee End Device. It must be decided
for each application which ZigBee device type the application will be. The following are basic guidelines. For
complete details, please see [4].
Use a ZC for device that will start the network, typically a base-station
Use a ZR for devices that will be mains powered, such as an outlet. Only use this type if there won’t be very many
of these devices at a given facility (12 or less in radio range of each other). Otherwise, use ZED.
Use a ZED for devices that will normally sleep in order to conserve power (usually battery operated devices), or for
mains-power operated devices, if there are many such devices in close proximity (see above).

8.2 Storing Variables to Non-Volatile Memory

In general, a device must have non-volatile memory enabled to be certified, because it must remember its network
configuration.
To save a variable to NVM, an item ID must be created for that variable. IDs reserved for applications range from
0x0401 to 0x0FFF. For a complete list of these IDs, refer to the ZComDef.h file.
Once the item ID is defined, it must be initialized using osal_nv_item_init(). This function passes the item
ID, length of the variable to be stored, and the variable (if the user wants to use the initial value).
To write an item to NVM, use osal_nv_write(). This function passes the item ID, the index offset into an item,
the length of data to write, and the variable to write.
To read the item from NVM, use osal_nv_read(). This function passes the item ID, the index offset into an
item, length of data to read, and the variable to read the data to. These functions can be found in the OSAL_Nv.c file.

8.3 User Interface

The following user interface elements should be in each application:
 Some way to invoke EZ-Mode on each endpoint
 Some way to reset the entire device to factory new settings (not on a network, etc…)
 Some way to cause the application action (e.g. a switch turning on a light)
 Set up battery powered devices as sleepy devices

Z-Stack Home Developer's Guide—8. Additional Information for HA Applications中文翻译相关推荐

  1. Z-Stack Home Developer's Guide—3. The Home Automation Profile and the Sample Applications中文翻译

    下面是Z-Stack Home 1.2.0开发资料中的Z-Stack Home Developer's Guide-3. The Home Automation Profile and the Sam ...

  2. Z-Stack Home Developer's Guide—4.Using the sample applications as base for new applications 中文翻译

    本章节是官方提供的文档说明 如何将样例程序改为我们自己需要开发的程序,下面是中文翻译 4.使用样例程序为基础开发一个新的应用程序 HA样例程序旨在用作用户开的应用程序的基础,修改他们需要遵循如下步骤: ...

  3. Z-Stack Home Developer's Guide—6. Clusters, Commands and Attributes中文翻译【Z-Stack Home 1.2.0的开发文档】

    这篇文章将翻译Z-Stack Home Developer's Guide开发文档中的6. Clusters, Commands and Attributes部分,在Z-Stack中Cluster.C ...

  4. Z-Stack Home Developer's Guide—2. Overview中文翻译【Z-Stack Home 1.2.0开发文档】

    下面是Z-Stack Home 1.2.0开发资料中的Z-Stack Home Developer's Guide-2. Overview的中文翻译 2.1 简介 这章节将介绍 Z-Stack协议栈的 ...

  5. Z-Stack Home Developer's Guide—7.EZ-Mode中文翻译【Z-Stack Home 1.2.0的开发文档】

    7. EZ-Mode EZ-Mode提供了两个设备正常交流的能力,无论这个2个设备是否在zigbee网络中.它包括网络控制.网络发现和网络绑定.EZ-Mode有如下特性: 网络控制 - 找到第一个开放 ...

  6. 终于知道为什么NVIDIA的linux驱动这么烂了,一波官方文档告诉你:Linux GPU Driver Developer’s Guide

    还记得Linus在记者会上那句话吗? so,NVIDIA, F**k you! https://www.kernel.org/doc/html/latest/gpu/index.html Linux ...

  7. Developer's Guide to Microsoft Enterprise Library, C# Edition

    Developer's Guide to Microsoft Enterprise Library, C# Edition 转载于:https://www.cnblogs.com/gavinhughh ...

  8. MAPI,SAPI,and TAPI Developer's Guide(NO.1)

    MAPI,        SAPI,  and                             TAPI    Developer's Guide by Michael C. Amundsen ...

  9. spring-security问题记录---Could not decode JSON for additional information: BaseClientDetails

    错误信息 2019-12-03 22:18:37.239 WARN 19120 --- [nio-8100-exec-4] o.s.s.o.p.c.JdbcClientDetailsService : ...

最新文章

  1. linux内核主要功能模块不包括,嵌入式linux(贺丹丹等编著)课后习题答案
  2. QT的QJSEngine类的使用
  3. 单片机c语言必背代码_【典藏】深度剖析单片机程序的运行(C程序版)
  4. linux系统利用wifi上网,【教程】Wii安装运行可用WIFI的Linux系统全攻略
  5. Jquery_JQuery之DataTables强大的表格解决方案
  6. Windows Server 2012 R2 里面如何安装Net Framework 3.5
  7. MapReduce源码刨析
  8. api接口怎么分批传递数据_新手上路:浅谈什么是API接口 API定义是什么
  9. echarts改变图例位置
  10. python linux教程_Linux for Python教程01
  11. ORB_SLAM2探秘 第二章
  12. Oracle 同音字查询,汉字的演变过程100字,汉字的演变图片
  13. 【面试题】Java三大特性封装继承多态总结
  14. 照片转3d模型_云从科技3D人体重建技术刷新3项纪录!仅凭照片即可生成精细模型...
  15. 适用于 Windows 10 的触摸板手势
  16. ANN to SNN
  17. qcom 音频相关的dsp driver笔记(基于msm8996平台)
  18. 使用手机访问电脑上开发的html页面
  19. LeetCode第一题:两数之和(Java)
  20. 计算机卡登录界面,win10电脑卡在登录界面怎么办

热门文章

  1. Ngs File Type Transfer
  2. 1.4编程基础之逻辑表达式与条件分支 17 判断闰年
  3. mui HTML5plus 批量上传文件
  4. vue 小地图放大缩小_实景3D卫星地图
  5. BootStrap笔记-信息提示框的使用
  6. Qt OpenGL 图像的平移(使用glTranslatef)
  7. Qt学习笔记-各种对话框基本使用
  8. Qt工作笔记-在ListWidget中单线程检索数据
  9. C++ STL list排序
  10. 专业课程设计之客户与服务器程序的同步与通信机制的设计(二)TCP通信