博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[置顶] openHAB 体系结构与编程模型 (1) --- 术语
阅读量:6817 次
发布时间:2019-06-26

本文共 4579 字,大约阅读时间需要 15 分钟。

openHAB 术语

 : 对硬件设备属性的抽象 (

  • Items are objects that can be read from or written to in order to interact with them.
  • Items can be bound to bindings i.e. for reading the status from e.g. KNX or for updating them.)

 :

Item UI providers offer a dynamic way to configure the UI, so that not everything must be stored statically in the Sitemap. An item UI provider can for example define, what widget should be used for an item, if none is specified and can dynamically define icons and labels (which might depend on the current state of the item) for the widgets.

An important use case for this feature is the dynamic display of item groups - all that there is stored in the Sitemap is the information that a certain group should be displayed; the page is then dynamically assembled at runtime with whatever items are available at that time.

 


 :

This interface is used by a service which combines the core item registry with an aggregation of item ui providers; it can be therefore widely used for all UI related information requests regarding items.

 :

An item provider provides instances of . These items can be constructed from some static configuration files or they can be derived from some dynamic logic.

 :

The ItemRegistry is the central place, where items are kept in memory and their state is permanently tracked. So any code that requires the current state of items should use this service (instead of trying to keep their own local copy of the items). Items are registered by ItemProviders, which can provision them from any source they like and also dynamically remove or add items.

Widget :用户界面的基本元素 (描述的是内容而非展现 [Sitemaps can be composed by grouping various user interface elements into areas, which will be rendered by openHAB.]), org.openhab.model.sitemap 工程的 src-gen 目录的 org.openhab.model.sitemap.Widget.java 中仅保存 Item 的全局唯一的名称(或者说ID)

/** */package org.openhab.model.sitemap;import org.eclipse.emf.ecore.EObject;/** * 
* A representation of the model object 'Widget'. *
* *

* The following features are supported: *

    *
  • {@link org.openhab.model.sitemap.Widget#getItem Item}
  • *
  • {@link org.openhab.model.sitemap.Widget#getLabel Label}
  • *
  • {@link org.openhab.model.sitemap.Widget#getIcon Icon}
  • *
*

* * @see org.openhab.model.sitemap.SitemapPackage#getWidget() * @model * @generated */public interface Widget extends EObject{ /** * Returns the value of the 'Item' attribute. *
*

* If the meaning of the 'Item' attribute isn't clear, * there really should be more of a description here... *

*
* @return the value of the 'Item' attribute. * @see #setItem(String) * @see org.openhab.model.sitemap.SitemapPackage#getWidget_Item() * @model * @generated */ String getItem(); /** * Sets the value of the '{@link org.openhab.model.sitemap.Widget#getItem Item}' attribute. *
*
* @param value the new value of the 'Item' attribute. * @see #getItem() * @generated */ void setItem(String value); /** * Returns the value of the 'Label' attribute. *
*

* If the meaning of the 'Label' attribute isn't clear, * there really should be more of a description here... *

*
* @return the value of the 'Label' attribute. * @see #setLabel(String) * @see org.openhab.model.sitemap.SitemapPackage#getWidget_Label() * @model * @generated */ String getLabel(); /** * Sets the value of the '{@link org.openhab.model.sitemap.Widget#getLabel Label}' attribute. *
*
* @param value the new value of the 'Label' attribute. * @see #getLabel() * @generated */ void setLabel(String value); /** * Returns the value of the 'Icon' attribute. *
*

* If the meaning of the 'Icon' attribute isn't clear, * there really should be more of a description here... *

*
* @return the value of the 'Icon' attribute. * @see #setIcon(String) * @see org.openhab.model.sitemap.SitemapPackage#getWidget_Icon() * @model * @generated */ String getIcon(); /** * Sets the value of the '{@link org.openhab.model.sitemap.Widget#getIcon Icon}' attribute. *
*
* @param value the new value of the 'Icon' attribute. * @see #getIcon() * @generated */ void setIcon(String value);} // Widget

 :用户界面定义(树形结构,同样也是描述内容而非展现),由该 Sitemap 对应的全部 Widget 组成 (The sitemap is a tree structure of widgets, which define the different pages of a UI and their content. Widgets can be associated to items, for which they should show the status and/or control elements.),  (    )

转载于:https://www.cnblogs.com/leonxyzh/p/7289063.html

你可能感兴趣的文章
初识kafka对消息处理与可靠性做出的保证
查看>>
不美翻怎么开发!Ubuntu 16.04 LTS深度美化!(2017年度定稿版)
查看>>
成为一名更好的程序员:如何阅读源代码?
查看>>
EHPC通过断点续算和自动伸缩在抢占式实例上实现低成本HPC计算
查看>>
【前端大概一分钟】__webpack_public_path__动态配置路径
查看>>
[译]TensorFlow Tutorial #01 Simple Linear Model
查看>>
Netty系列文章之服务端启动分析
查看>>
vim精简版教程
查看>>
js判断DOM是否包含另一个DOM
查看>>
干货 | 用python3+dlib教你的程序察言观色
查看>>
《脚本》Python在线百度文库爬虫(免下载券)
查看>>
golang学习(1)---快速hello world
查看>>
Kafka的Consumer负载均衡算法
查看>>
事件冒泡、事件捕获、取消冒泡、事件委托
查看>>
阿里云梁楹:这样的青春,别样的精彩
查看>>
大快搜索城市运河大数据政务管理平台案例解读
查看>>
啥也不会学java,一直更新中
查看>>
调教属于你的“贾维斯”(给自己挖了一个很大的坑)
查看>>
insertAdjacentHTML的用法,我用的很少,不知道大家频繁不……
查看>>
javascript 正则表达式 (第一弹)
查看>>