当前位置: 首页>>代码示例>>Java>>正文


Java AreaProperties类代码示例

本文整理汇总了Java中com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties的典型用法代码示例。如果您正苦于以下问题:Java AreaProperties类的具体用法?Java AreaProperties怎么用?Java AreaProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AreaProperties类属于com.digitaldan.jomnilinkII.MessageTypes.properties包,在下文中一共展示了AreaProperties类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readAreaProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
/**
 * Read the properties of a area
 * @param number of area
 * @return AreaProperties of area or null if not found
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private AreaProperties readAreaProperties(int number)
		throws IOException, OmniNotConnectedException,
		OmniInvalidResponseException, OmniUnknownMessageTypeException {

	Message m = c.reqObjectProperties(Message.OBJ_TYPE_AREA, number, 0,
			ObjectProperties.FILTER_1_NAMED_UNAMED,
			ObjectProperties.FILTER_2_NONE,
			ObjectProperties.FILTER_3_NONE);
	if (m.getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
		return ((AreaProperties) m);
	}
	return null;
}
 
开发者ID:andrey-desman,项目名称:openhab-hdl,代码行数:23,代码来源:OmniLinkBinding.java

示例2: generateAreas

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
/**
 * Generates are items
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private void generateAreas() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{

	String groupString = "Group\t%s\t\"%s\"\t(%s)\n";
	String itemString = "%s\t%s\t\"%s\"\t(%s)\t{omnilink=\"%s:%d\"}\n";
	String groupName = "Areas";
	groups.append(String.format(groupString,groupName,"Areas","All"));

	int objnum = 0;
	Message m;

	while ((m = c.reqObjectProperties(Message.OBJ_TYPE_AREA, objnum, 1, ObjectProperties.FILTER_1_NAMED,
			ObjectProperties.FILTER_2_NONE, ObjectProperties.FILTER_3_NONE)).getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
		AreaProperties o = ((AreaProperties) m);
		objnum = o.getNumber();

		String group = addUniqueGroup(groupName + "_" + cleanString(o.getName()));

		groups.append(String.format(groupString,group,o.getName(),groupName));
		//String name = group + "_" + cleanString(o.getName());

		areas.add(new SiteItem(group, o.getName(), o.getName()));

		items.append(String.format(itemString,"Number", group + "_ExitDelay", "Exit Delay: [%d]",group,"area_status_exit_delay",objnum));
		items.append(String.format(itemString,"Number", group + "_EntryDelay", "Entry Delay: [%d]",group,"area_status_entry_delay",objnum));
		items.append(String.format(itemString,"Number", group + "_ExitTimer", "Exit Timer: [%d]",group,"area_status_exit_timer",objnum));
		items.append(String.format(itemString,"Number", group + "_EntryTimer", "Entry Timer: [%d]",group,"area_status_entry_timer",objnum));
		items.append(String.format(itemString,"String", group + "_Mode", "Mode: [%s]",group,"area_status_mode",objnum));
		items.append(String.format(itemString,"String", group + "_Alarm", "Alarm: [%s]",group,"area_status_alarm",objnum));

	}
}
 
开发者ID:andrey-desman,项目名称:openhab-hdl,代码行数:39,代码来源:OmnilinkItemGenerator.java

示例3: readAreaProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
/**
 * Read the properties of a area
 *
 * @param number of area
 * @return AreaProperties of area or null if not found
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private AreaProperties readAreaProperties(int number) throws IOException, OmniNotConnectedException,
        OmniInvalidResponseException, OmniUnknownMessageTypeException {

    Message m = c.reqObjectProperties(Message.OBJ_TYPE_AREA, number, 0, ObjectProperties.FILTER_1_NAMED_UNAMED,
            ObjectProperties.FILTER_2_NONE, ObjectProperties.FILTER_3_NONE);
    if (m.getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
        return ((AreaProperties) m);
    }
    return null;
}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:21,代码来源:OmniLinkBinding.java

示例4: generateAreas

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
/**
 * Generates are items
 * 
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private void generateAreas() throws IOException, OmniNotConnectedException, OmniInvalidResponseException,
        OmniUnknownMessageTypeException {

    String groupString = "Group\t%s\t\"%s\"\t(%s)\n";
    String itemString = "%s\t%s\t\"%s\"\t(%s)\t{omnilink=\"%s:%d\"}\n";
    String groupName = "Areas";
    groups.append(String.format(groupString, groupName, "Areas", "All"));

    int objnum = 0;
    Message m;

    while ((m = c.reqObjectProperties(Message.OBJ_TYPE_AREA, objnum, 1, ObjectProperties.FILTER_1_NAMED,
            ObjectProperties.FILTER_2_NONE, ObjectProperties.FILTER_3_NONE))
                    .getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
        AreaProperties o = ((AreaProperties) m);
        objnum = o.getNumber();

        String group = addUniqueGroup(groupName + "_" + cleanString(o.getName()));

        groups.append(String.format(groupString, group, o.getName(), groupName));
        // String name = group + "_" + cleanString(o.getName());

        areas.add(new SiteItem(group, o.getName(), o.getName()));

        items.append(String.format(itemString, "Number", group + "_ExitDelay", "Exit Delay: [%d]", group,
                "area_status_exit_delay", objnum));
        items.append(String.format(itemString, "Number", group + "_EntryDelay", "Entry Delay: [%d]", group,
                "area_status_entry_delay", objnum));
        items.append(String.format(itemString, "Number", group + "_ExitTimer", "Exit Timer: [%d]", group,
                "area_status_exit_timer", objnum));
        items.append(String.format(itemString, "Number", group + "_EntryTimer", "Entry Timer: [%d]", group,
                "area_status_entry_timer", objnum));
        items.append(String.format(itemString, "String", group + "_Mode", "Mode: [%s]", group, "area_status_mode",
                objnum));
        items.append(String.format(itemString, "String", group + "_Alarm", "Alarm: [%s]", group,
                "area_status_alarm", objnum));

    }
}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:48,代码来源:OmnilinkItemGenerator.java

示例5: Area

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
public Area(AreaProperties properties, boolean omni) {
	this.properties = properties;
	this.omni = omni;
}
 
开发者ID:andrey-desman,项目名称:openhab-hdl,代码行数:5,代码来源:Area.java

示例6: getProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
@Override
public AreaProperties getProperties() {
	return properties;
}
 
开发者ID:andrey-desman,项目名称:openhab-hdl,代码行数:5,代码来源:Area.java

示例7: setProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
public void setProperties(AreaProperties properties) {
	this.properties = properties;
}
 
开发者ID:andrey-desman,项目名称:openhab-hdl,代码行数:4,代码来源:Area.java

示例8: Area

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
public Area(AreaProperties properties, boolean omni) {
    this.properties = properties;
    this.omni = omni;
}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:5,代码来源:Area.java

示例9: getProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
@Override
public AreaProperties getProperties() {
    return properties;
}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:5,代码来源:Area.java

示例10: setProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties; //导入依赖的package包/类
public void setProperties(AreaProperties properties) {
    this.properties = properties;
}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:4,代码来源:Area.java


注:本文中的com.digitaldan.jomnilinkII.MessageTypes.properties.AreaProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。