本文整理匯總了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;
}
示例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));
}
}
示例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;
}
示例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));
}
}
示例5: Zone
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public Zone(ZoneProperties properties) {
this.properties = properties;
}
示例6: getProperties
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
@Override
public ZoneProperties getProperties() {
return properties;
}
示例7: setProperties
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public void setProperties(ZoneProperties properties) {
this.properties = properties;
}
示例8: Zone
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public Zone(ZoneProperties properties) {
this.properties = properties;
}
示例9: getProperties
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
@Override
public ZoneProperties getProperties() {
return properties;
}
示例10: setProperties
import com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties; //導入依賴的package包/類
public void setProperties(ZoneProperties properties) {
this.properties = properties;
}