From b5a9c5defccff690929fe46f06e6a3feda68b717 Mon Sep 17 00:00:00 2001 From: Joel Bender Date: Mon, 25 Mar 2019 21:36:12 -0400 Subject: [PATCH] missing imports and ordering --- py34/bacpypes/basetypes.py | 19 ++++++++++--------- py34/bacpypes/object.py | 16 +++++++++------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/py34/bacpypes/basetypes.py b/py34/bacpypes/basetypes.py index c00ca63..eaaf05e 100755 --- a/py34/bacpypes/basetypes.py +++ b/py34/bacpypes/basetypes.py @@ -8,7 +8,7 @@ from .debugging import ModuleLogger from .primitivedata import BitString, Boolean, CharacterString, Date, Double, \ Enumerated, Integer, Null, ObjectIdentifier, OctetString, Real, Time, \ - Unsigned + Unsigned, Unsigned16 from .constructeddata import Any, AnyAtomic, ArrayOf, Choice, Element, \ Sequence, SequenceOf @@ -1615,6 +1615,7 @@ class WriteStatus(Enumerated): , 'successful':2 , 'failed':3 } + class NetworkType(Enumerated): enumerations = \ { 'ethernet':0 @@ -1678,6 +1679,13 @@ class RouterEntryStatus(Enumerated): # Forward Sequences # +class HostAddress(Choice): + choiceElements = \ + [ Element('none', Null) + , Element('ipAddress', OctetString) # 4 octets for B/IP or 16 octets for B/IPv6 + , Element('name', CharacterString) # Internet host name (see RFC 1123) + ] + class HostNPort(Sequence): sequenceElements = \ [ Element('host', HostAddress) @@ -1713,7 +1721,7 @@ class RouterEntry(Sequence): class NameValue(Sequence): sequenceElements = \ [ Element('name', CharacterString) - , Element('value', Atomic) # IS ATOMIC CORRECT HERE? value is limited to primitive datatypes and BACnetDateTime + , Element('value', AnyAtomic) # IS ATOMIC CORRECT HERE? value is limited to primitive datatypes and BACnetDateTime ] class DeviceAddress(Sequence): @@ -1771,13 +1779,6 @@ class ObjectPropertyReference(Sequence): , Element('propertyArrayIndex', Unsigned, 2, True) ] -class HostAddress(Choice): - choiceElements = \ - [ Element('none', Null) - , Element('ipAddress', OctetString) # 4 octets for B/IP or 16 octets for B/IPv6 - , Element('name', CharacterString) # Internet host name (see RFC 1123) - ] - class ProcessIdSelection(Choice): choiceElements = \ [ Element('processIdentifier', Unsigned) diff --git a/py34/bacpypes/object.py b/py34/bacpypes/object.py index 809e28f..c7e7ee5 100644 --- a/py34/bacpypes/object.py +++ b/py34/bacpypes/object.py @@ -22,24 +22,26 @@ from .basetypes import AccessCredentialDisable, AccessCredentialDisableReason, \ AccessUserType, AccessZoneOccupancyState, AccumulatorRecord, Action, \ ActionList, AddressBinding, AssignedAccessRights, AuthenticationFactor, \ AuthenticationFactorFormat, AuthenticationPolicy, AuthenticationStatus, \ - AuthorizationException, AuthorizationMode, BackupState, BinaryPV, \ + AuthorizationException, AuthorizationMode, BackupState, BDTEntry, BinaryPV, \ COVSubscription, CalendarEntry, ChannelValue, ClientCOV, \ CredentialAuthenticationFactor, DailySchedule, DateRange, DateTime, \ Destination, DeviceObjectPropertyReference, DeviceObjectReference, \ DeviceStatus, DoorAlarmState, DoorSecuredStatus, DoorStatus, DoorValue, \ EngineeringUnits, EventNotificationSubscription, EventParameter, \ EventState, EventTransitionBits, EventType, FaultParameter, FaultType, \ - FileAccessMethod, LifeSafetyMode, LifeSafetyOperation, LifeSafetyState, \ + FileAccessMethod, FDTEntry, IPMode, HostNPort, LifeSafetyMode, LifeSafetyOperation, LifeSafetyState, \ LightingCommand, LightingInProgress, LightingTransition, LimitEnable, \ LockStatus, LogMultipleRecord, LogRecord, LogStatus, LoggingType, \ - Maintenance, NetworkSecurityPolicy, NodeType, NotifyType, \ + Maintenance, NameValue, NetworkNumberQuality, NetworkPortCommand, \ + NetworkSecurityPolicy, NetworkType, NodeType, NotifyType, \ ObjectPropertyReference, ObjectTypesSupported, OptionalCharacterString, \ Polarity, PortPermission, Prescale, PriorityArray, ProcessIdSelection, \ ProgramError, ProgramRequest, ProgramState, PropertyAccessResult, \ - PropertyIdentifier, Recipient, Reliability, RestartReason, Scale, \ - SecurityKeySet, SecurityLevel, Segmentation, ServicesSupported, \ - SetpointReference, ShedLevel, ShedState, SilencedState, SpecialEvent, \ - StatusFlags, TimeStamp, VTClass, VTSession, WriteStatus + PropertyIdentifier, ProtocolLevel, Recipient, Reliability, RestartReason, \ + RouterEntry, Scale, SecurityKeySet, SecurityLevel, Segmentation, \ + ServicesSupported, SetpointReference, ShedLevel, ShedState, SilencedState, \ + SpecialEvent, StatusFlags, TimeStamp, VTClass, VTSession, VMACEntry, \ + WriteStatus from .apdu import EventNotificationParameters, ReadAccessSpecification, \ ReadAccessResult