openHAB 术语

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

  • 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 Provider :

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 describes the methods that need to be implemented by a provider that wants to define the appearance of an item in the UI. 

Item
UI Registry
 :

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.

Item
Provider
 :

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

Item
Registry
 :

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; /**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Widget</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.openhab.model.sitemap.Widget#getItem <em>Item</em>}</li>
* <li>{@link org.openhab.model.sitemap.Widget#getLabel <em>Label</em>}</li>
* <li>{@link org.openhab.model.sitemap.Widget#getIcon <em>Icon</em>}</li>
* </ul>
* </p>
*
* @see org.openhab.model.sitemap.SitemapPackage#getWidget()
* @model
* @generated
*/
public interface Widget extends EObject
{
/**
* Returns the value of the '<em><b>Item</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Item</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Item</em>' 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 <em>Item</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Item</em>' attribute.
* @see #getItem()
* @generated
*/
void setItem(String value); /**
* Returns the value of the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Label</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Label</em>' 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 <em>Label</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Label</em>' attribute.
* @see #getLabel()
* @generated
*/
void setLabel(String value); /**
* Returns the value of the '<em><b>Icon</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Icon</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Icon</em>' 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 <em>Icon</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Icon</em>' attribute.
* @see #getIcon()
* @generated
*/
void setIcon(String value); } // Widget

Sitemap :用户界面定义(树形结构,同样也是描述内容而非展现),由该 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.),  (demo.items 
  demo.sitemap)

[置顶] openHAB 体系结构与编程模型 (1) --- 术语的更多相关文章

  1. [置顶] openHAB 体系结构与编程模型 (2) --- Web Application Servlet 源码结构

    || || || || || || demo.items Group All Group gGF (All) Group gFF (All) Group gC (All) Group Outdoor ...

  2. ARMV8 datasheet学习笔记4:AArch64系统级体系结构之编程模型(4)- 其它

    1. 前言 2.可配置的指令使能/禁用控制和trap控制 指令使能/禁用 当指令被禁用,则这条指令就会变成未定义 指令Trap控制 控制某条或某些指令在运行时进入陷阱,进入陷阱的指令会产生trap异常 ...

  3. ARMV8 datasheet学习笔记4:AArch64系统级体系结构之编程模型(1)-EL/ET/ST

    1.前言 ARMV8系统级编程模型主要包括异常级别.运行状态.安全状态.同步异常.异步异常.DEBUG 本文主要对系统级编程模型做一个概要介绍 2. 异常级别 2.1 Exception level概 ...

  4. ARMV8 datasheet学习笔记4:AArch64系统级体系结构之编程模型(3)- 异常

    1.前言 本文介绍异常相关内容,包括异常类型,异常进入,异常返回,异常层次结构,异常的路由等 2.  RESET ARMV8体系结构支持两种类型的RESET Cold reset:Reset PE所有 ...

  5. ARMV8 datasheet学习笔记4:AArch64系统级体系结构之编程模型(2)- 寄存器

    1. 前言 2. 指令运行与异常处理寄存器 ARM体系结构的寄存器分为两类: (1)系统控制和状态报告寄存器 (2)指令处理寄存器,如累加.异常处理 本部分将主要介绍如上第(2)部分的寄存器,分为AA ...

  6. [置顶] Android之服务器编程

    这个教程主要是讲解服务器编程的,如果你的应用需要和服务器通信,那就必须了解服务器编程(当然,也许你不需要了解,因为你只开发客户端),Android应用和服务器的通信可以使用Http + JSON来通信 ...

  7. [置顶] openHAB 部分代码结构 UML 图

    openHAB 部分代码结构 UML 图 ModelRepository: ItemRegistry: ItemUIProvider: WebAppServlet:

  8. [置顶] 学习VB.NET编程最基本的三个问题

    1.什么是对象和属性,他们之间的联系是? 对象:将对象看做一个实物或者事物的一种概念.比如说窗体和控件都是对象. 属性:属性阐明了与对象相关的或是控制对象行为的信息,例如,对象的名字.颜色.尺寸或者位 ...

  9. MapReduce 编程模型

    一.简单介绍 1.MapReduce 应用广泛的原因之中的一个在于它的易用性.它提供了一个因高度抽象化而变得异常简单的编程模型. 2.从MapReduce 自身的命名特点能够看出,MapReduce ...

随机推荐

  1. 序列模型(2)-----循环神经网络RNN

    一.RNN的作用和粗略介绍: RNN可解决的问题: 训练样本输入是连续的序列,且序列的长短不一,比如基于时间的序列:一段段连续的语音,一段段连续的手写文字.这些序列比较长,且长度不一,比较难直接的拆分 ...

  2. 更新时间戳.txt

    UPDATE bbs2 INNER JOIN time1 ON bbs2.AnnounceID = time1.AnnounceID SET bbs2.asptime = time1.asptime

  3. 把SQLAlchemy查询对象转换成字典/json使用(分开)

    注:针对的是查询出来的是单条对象 多个对象的话可以使用for循环遍历查询出来的对象列表,也可以使用下面的方法 1.config.py文件 #!/usr/bin/env python #-*- codi ...

  4. 4.1、Ansible模块

    ansible-doc -l    列出所有模块 ansible-doc 模块名    查看模块的help说明 ansible-doc -s  module_name:获取指定模块的使用信息 ***文 ...

  5. 第n个质数

    //注:for循环之后第三个式子总会操作一遍. #include <iostream> using namespace std; int main() { int n; while (ci ...

  6. phpunit使用

    phpunit使用 标签(空格分隔): php 现在是凌晨 3 点.我们怎样才能知道自己的代码依然在工作呢? Web 应用程序是 24x7 不间断运行的,因此我的程序是否还在运行这个问题会在晚上一直困 ...

  7. 菜鸟学习ios

    object-c中@interface和@property声明变量的区别   Objective-C语言关键词,与@synthesize配对使用.xcode4.5以及以后的版本,@synthesize ...

  8. ARP(地址解析协议)

    目录 1. ARP 概述 2. ARP 协议工作原理 3. ARP 缓存 4. ARP 报文格式 5. 抓包分析 5.1. ARP 请求报文 5.2. ARP 应答报文 6. 免费 ARP 7. AR ...

  9. 关于struts值栈的总结,前端页面如何使用标签取得值栈中的数据

    用户提交一次请求的执行过程 总结: struts值栈中 两个内容 一个是栈 一个是map 值栈(数据中心)的范围是一个请求 它代替了request作用域 struts自定义标签有一个特点 比如遍历集合 ...

  10. (3)Spring Boot热部署【从零开始学Spring Boot】

    在编写代码的时候,你会发现我们只是简单把打印信息改变了下,就需要重新部署,如果是这样的编码方式,那么我们估计一天下来之后就真的是打几个Hello World之后就下班了.那么如何解决热部署的问题呢?那 ...