當前位置: 首頁>>代碼示例>>Java>>正文


Java ZoneProperties類代碼示例

本文整理匯總了Java中com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties的典型用法代碼示例。如果您正苦於以下問題:Java ZoneProperties類的具體用法?Java ZoneProperties怎麽用?Java ZoneProperties使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ZoneProperties類屬於com.digitaldan.jomnilinkII.MessageTypes.properties包,在下文中一共展示了ZoneProperties類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readZoneProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
/**
 * Read the properties of a zone
 * @param number of zone
 * @return ZoneProperties of zone, or null if not found
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private ZoneProperties readZoneProperties(int number)
		throws IOException, OmniNotConnectedException,
		OmniInvalidResponseException, OmniUnknownMessageTypeException {

	Message m = c.reqObjectProperties(Message.OBJ_TYPE_ZONE, number, 0,
			ObjectProperties.FILTER_1_NAMED,
			ObjectProperties.FILTER_2_AREA_ALL,
			ObjectProperties.FILTER_3_ANY_LOAD);
	if (m.getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
		return ((ZoneProperties) m);
	}
	return null;
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:23,代碼來源:OmniLinkBinding.java

示例2: generateZones

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
/**
 * Generates zone items
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private void generateZones() 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 = "Zones";
	groups.append(String.format(groupString,groupName,"Zones","All"));

	int objnum = 0;
	Message m;

	while ((m =  c.reqObjectProperties(Message.OBJ_TYPE_ZONE, objnum, 1, ObjectProperties.FILTER_1_NAMED,
			ObjectProperties.FILTER_2_AREA_ALL, ObjectProperties.FILTER_3_ANY_LOAD)).getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
		ZoneProperties o = ((ZoneProperties) 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());

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

		items.append(String.format(itemString,"Contact", group + "_Current","Current: [%s]",group,"zone_status_current",objnum));
		items.append(String.format(itemString,"String", group + "_Latched","Latched [%s]",group,"zone_status_latched",objnum));
		items.append(String.format(itemString,"String", group + "_Arming","Arming [%s]",group,"zone_status_arming",objnum));
		items.append(String.format(itemString,"String", group + "_All","Status  [%s]",group,"zone_status_all",objnum));
	}
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:36,代碼來源:OmnilinkItemGenerator.java

示例3: readZoneProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
/**
 * Read the properties of a zone
 *
 * @param number of zone
 * @return ZoneProperties of zone, or null if not found
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private ZoneProperties readZoneProperties(int number) throws IOException, OmniNotConnectedException,
        OmniInvalidResponseException, OmniUnknownMessageTypeException {

    Message m = c.reqObjectProperties(Message.OBJ_TYPE_ZONE, number, 0, ObjectProperties.FILTER_1_NAMED,
            ObjectProperties.FILTER_2_AREA_ALL, ObjectProperties.FILTER_3_ANY_LOAD);
    if (m.getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
        return ((ZoneProperties) m);
    }
    return null;
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:21,代碼來源:OmniLinkBinding.java

示例4: generateZones

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
/**
 * Generates zone items
 * 
 * @throws IOException
 * @throws OmniNotConnectedException
 * @throws OmniInvalidResponseException
 * @throws OmniUnknownMessageTypeException
 */
private void generateZones() 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 = "Zones";
    groups.append(String.format(groupString, groupName, "Zones", "All"));

    int objnum = 0;
    Message m;

    while ((m = c.reqObjectProperties(Message.OBJ_TYPE_ZONE, objnum, 1, ObjectProperties.FILTER_1_NAMED,
            ObjectProperties.FILTER_2_AREA_ALL, ObjectProperties.FILTER_3_ANY_LOAD))
                    .getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
        ZoneProperties o = ((ZoneProperties) 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());

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

        items.append(String.format(itemString, "Contact", group + "_Current", "Current: [%s]", group,
                "zone_status_current", objnum));
        items.append(String.format(itemString, "String", group + "_Latched", "Latched [%s]", group,
                "zone_status_latched", objnum));
        items.append(String.format(itemString, "String", group + "_Arming", "Arming [%s]", group,
                "zone_status_arming", objnum));
        items.append(String.format(itemString, "String", group + "_All", "Status  [%s]", group, "zone_status_all",
                objnum));
    }
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:43,代碼來源:OmnilinkItemGenerator.java

示例5: Zone

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public Zone(ZoneProperties properties) {
	this.properties = properties;
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:4,代碼來源:Zone.java

示例6: getProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
@Override
public ZoneProperties getProperties() {
	return properties;
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:5,代碼來源:Zone.java

示例7: setProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public void setProperties(ZoneProperties properties) {
	this.properties = properties;
}
 
開發者ID:andrey-desman,項目名稱:openhab-hdl,代碼行數:4,代碼來源:Zone.java

示例8: Zone

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public Zone(ZoneProperties properties) {
    this.properties = properties;
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:4,代碼來源:Zone.java

示例9: getProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
@Override
public ZoneProperties getProperties() {
    return properties;
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:5,代碼來源:Zone.java

示例10: setProperties

import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public void setProperties(ZoneProperties properties) {
    this.properties = properties;
}
 
開發者ID:openhab,項目名稱:openhab1-addons,代碼行數:4,代碼來源:Zone.java


注:本文中的com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。