Closed Frozenlock closed 5 years ago
According to BACnet Standard 135-2016, it should be a BACnetARRAY [7] of BACnetDailySchedule.
I get the correct output with my (not up to date) fork:
ObjectPropertyTypeDefinition objectPropertyTypeDefinition = ObjectProperties.getObjectPropertyTypeDefinition(ObjectType.schedule, PropertyIdentifier.weeklySchedule);
System.out.println("clazz: " + objectPropertyTypeDefinition.getPropertyTypeDefinition().getClazz());
System.out.println("isCollection: " + objectPropertyTypeDefinition.getPropertyTypeDefinition().isCollection());
System.out.println("isArray: " + objectPropertyTypeDefinition.getPropertyTypeDefinition().isArray());
System.out.println("isList: " + objectPropertyTypeDefinition.getPropertyTypeDefinition().isList());
System.out.println("arrayLength: " + objectPropertyTypeDefinition.getPropertyTypeDefinition().getArrayLength());
// Output:
// clazz: class com.serotonin.bacnet4j.type.constructed.DailySchedule
// isCollection: true
// isArray: true
// isList: false
// arrayLength: 7
I have run the code with the master branch and get the same result.
Yes, you are correct. I tried again, from scratch, and It was caused by a mistake on my part when retrieving the property. My apologies.
The
PropertyTypeDefinition
for weeklySchedule appears to return inconsistent information (unless I misunderstood something):getArrayLength
-> 7isArray
-> falseEven the other sequence-like methods return false:
isCollection
-> falseisList
-> falseShouldn't
isArray
return true whenevergetArrayLength
is larger than zero?