<废弃> openHAB 体系结构与编程模型 (1) --- 术语

原创 2013年11月03日 00:39:08

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 体系结构与编程模型 (2) --- Web Application Servlet 源码结构

先将架构图贴上来,文字说明润饰以后补上。

【arm体系结构与编程】1.概述及其基本编程模型(一)

1.版本及其命名方法 ARMv+[版本号]+[变种的字符]+[字符x+排除某种功能的字符] 1.1 ARM体系的变种 ①Thumb指令集(T变种) 与ARM指令集的32位长度对应,Thumb指令集的长...

Windows Socket 网络编程(一) -- TCP/IP体系结构、特点及相关术语

一、TCP/IP 体系结构与特点 1、TCP/IP体系结构 TCP/IP协议实际上就是在物理网上的一组完整的网络协议。其中TCP是提供传输层服务,而IP则是提供网络层服务。TCP/IP包括以下协议...

ARM体系结构与编程模型

  • 2012年07月06日 15:44
  • 1.52MB
  • 下载

Java虚拟机学习(1):体系结构 内存模型

一:Java技术体系模块图 二:JVM内存区域模型 1.方法区 也称”永久代” 、“非堆”,  它用于存储虚拟机加载的类信息、常量、静态变量、是各个线程共享的内存区域。默认最小值为1...

Java虚拟机学习(1):体系结构 内存模型

一:Java技术体系模块图 二:JVM内存区域模型 1.方法区 也称”永久代” 、“非堆”,  它用于存储虚拟机加载的类信息、常量、静态变量、是各个线程共享的内存区域...

ARM:ARM体系结构与编程、ARM指令流水线、ARM编程模型基础

1、读取g-sensor重力传感器的重力加速度值     cmd.c // 结构体中添加指令与对应函数 mmaxyz, mma8653_get_xyz     mma8653.c // 补充函数:...

1_C# 高级编程(第六版)学习笔记——第1章 .Net 体系结构

声明: 本博客为原创博客,主要讲述学习C# 高级编程(第六版)中的jishu,转载请声明出处。如有技术问题或需交流可直接联系本人邮箱:chuiwenwei@163.com...

MIPS体系结构剖析,编程与实践[1]

http://blogold.chinaunix.net/u1/40363/showart_434186.html第一章 MIPS CPU 体系结构概述陈怀临1。序言本文介绍MIPS体系结构,着重于其...
  • ivan240
  • ivan240
  • 2011年04月12日 14:36
  • 1070
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:<废弃> openHAB 体系结构与编程模型 (1) --- 术语
举报原因:
原因补充:

(最多只允许输入30个字)