diff --git a/py27/bacpypes/__init__.py b/py27/bacpypes/__init__.py index 90604514..70e98038 100755 --- a/py27/bacpypes/__init__.py +++ b/py27/bacpypes/__init__.py @@ -69,6 +69,8 @@ from . import app from . import appservice + +from . import local from . import service # diff --git a/py27/bacpypes/service/device.py b/py27/bacpypes/service/device.py index 25283a4d..11be52b0 100644 --- a/py27/bacpypes/service/device.py +++ b/py27/bacpypes/service/device.py @@ -4,136 +4,16 @@ from ..capability import Capability from ..pdu import GlobalBroadcast -from ..primitivedata import Date, Time, ObjectIdentifier -from ..constructeddata import ArrayOf -from ..apdu import WhoIsRequest, IAmRequest, IHaveRequest, SimpleAckPDU, Error +from ..apdu import WhoIsRequest, IAmRequest, IHaveRequest, SimpleAckPDU from ..errors import ExecutionError, InconsistentParameters, \ MissingRequiredParameter, ParameterOutOfRange -from ..object import register_object_type, registered_object_types, \ - Property, DeviceObject from ..task import FunctionTask -from .object import CurrentPropertyListMixIn - # some debugging _debug = 0 _log = ModuleLogger(globals()) -# -# CurrentDateProperty -# - -class CurrentDateProperty(Property): - - def __init__(self, identifier): - Property.__init__(self, identifier, Date, default=(), optional=True, mutable=False) - - def ReadProperty(self, obj, arrayIndex=None): - # access an array - if arrayIndex is not None: - raise TypeError("{0} is unsubscriptable".format(self.identifier)) - - # get the value - now = Date() - now.now() - return now.value - - def WriteProperty(self, obj, value, arrayIndex=None, priority=None, direct=False): - raise ExecutionError(errorClass='property', errorCode='writeAccessDenied') - -# -# CurrentTimeProperty -# - -class CurrentTimeProperty(Property): - - def __init__(self, identifier): - Property.__init__(self, identifier, Time, default=(), optional=True, mutable=False) - - def ReadProperty(self, obj, arrayIndex=None): - # access an array - if arrayIndex is not None: - raise TypeError("{0} is unsubscriptable".format(self.identifier)) - - # get the value - now = Time() - now.now() - return now.value - - def WriteProperty(self, obj, value, arrayIndex=None, priority=None, direct=False): - raise ExecutionError(errorClass='property', errorCode='writeAccessDenied') - -# -# LocalDeviceObject -# - -@bacpypes_debugging -class LocalDeviceObject(CurrentPropertyListMixIn, DeviceObject): - - properties = \ - [ CurrentTimeProperty('localTime') - , CurrentDateProperty('localDate') - ] - - defaultProperties = \ - { 'maxApduLengthAccepted': 1024 - , 'segmentationSupported': 'segmentedBoth' - , 'maxSegmentsAccepted': 16 - , 'apduSegmentTimeout': 5000 - , 'apduTimeout': 3000 - , 'numberOfApduRetries': 3 - } - - def __init__(self, **kwargs): - if _debug: LocalDeviceObject._debug("__init__ %r", kwargs) - - # fill in default property values not in kwargs - for attr, value in LocalDeviceObject.defaultProperties.items(): - if attr not in kwargs: - kwargs[attr] = value - - for key, value in kwargs.items(): - if key.startswith("_"): - setattr(self, key, value) - del kwargs[key] - - # check for registration - if self.__class__ not in registered_object_types.values(): - if 'vendorIdentifier' not in kwargs: - raise RuntimeError("vendorIdentifier required to auto-register the LocalDeviceObject class") - register_object_type(self.__class__, vendor_id=kwargs['vendorIdentifier']) - - # check for properties this class implements - if 'localDate' in kwargs: - raise RuntimeError("localDate is provided by LocalDeviceObject and cannot be overridden") - if 'localTime' in kwargs: - raise RuntimeError("localTime is provided by LocalDeviceObject and cannot be overridden") - - # the object identifier is required for the object list - if 'objectIdentifier' not in kwargs: - raise RuntimeError("objectIdentifier is required") - - # coerce the object identifier - object_identifier = kwargs['objectIdentifier'] - if isinstance(object_identifier, (int, long)): - object_identifier = ('device', object_identifier) - - # the object list is provided - if 'objectList' in kwargs: - raise RuntimeError("objectList is provided by LocalDeviceObject and cannot be overridden") - kwargs['objectList'] = ArrayOf(ObjectIdentifier)([object_identifier]) - - # check for a minimum value - if kwargs['maxApduLengthAccepted'] < 50: - raise ValueError("invalid max APDU length accepted") - - # dump the updated attributes - if _debug: LocalDeviceObject._debug(" - updated kwargs: %r", kwargs) - - # proceed as usual - super(LocalDeviceObject, self).__init__(**kwargs) - # # Who-Is I-Am Services # diff --git a/py27/bacpypes/service/object.py b/py27/bacpypes/service/object.py index ca8d3fe9..5c4c993f 100644 --- a/py27/bacpypes/service/object.py +++ b/py27/bacpypes/service/object.py @@ -7,11 +7,11 @@ from ..primitivedata import Atomic, Null, Unsigned from ..constructeddata import Any, Array, ArrayOf -from ..apdu import Error, \ +from ..apdu import \ SimpleAckPDU, ReadPropertyACK, ReadPropertyMultipleACK, \ ReadAccessResult, ReadAccessResultElement, ReadAccessResultElementChoice from ..errors import ExecutionError -from ..object import Property, Object, PropertyError +from ..object import PropertyError # some debugging _debug = 0 @@ -20,57 +20,6 @@ # handy reference ArrayOfPropertyIdentifier = ArrayOf(PropertyIdentifier) -# -# CurrentPropertyList -# - -@bacpypes_debugging -class CurrentPropertyList(Property): - - def __init__(self): - if _debug: CurrentPropertyList._debug("__init__") - Property.__init__(self, 'propertyList', ArrayOfPropertyIdentifier, default=None, optional=True, mutable=False) - - def ReadProperty(self, obj, arrayIndex=None): - if _debug: CurrentPropertyList._debug("ReadProperty %r %r", obj, arrayIndex) - - # make a list of the properties that have values - property_list = [k for k, v in obj._values.items() - if v is not None - and k not in ('objectName', 'objectType', 'objectIdentifier', 'propertyList') - ] - if _debug: CurrentPropertyList._debug(" - property_list: %r", property_list) - - # sort the list so it's stable - property_list.sort() - - # asking for the whole thing - if arrayIndex is None: - return ArrayOfPropertyIdentifier(property_list) - - # asking for the length - if arrayIndex == 0: - return len(property_list) - - # asking for an index - if arrayIndex > len(property_list): - raise ExecutionError(errorClass='property', errorCode='invalidArrayIndex') - return property_list[arrayIndex - 1] - - def WriteProperty(self, obj, value, arrayIndex=None, priority=None, direct=False): - raise ExecutionError(errorClass='property', errorCode='writeAccessDenied') - -# -# CurrentPropertyListMixIn -# - -@bacpypes_debugging -class CurrentPropertyListMixIn(Object): - - properties = [ - CurrentPropertyList(), - ] - # # ReadProperty and WriteProperty Services # diff --git a/samples/AccumulatorObject.py b/samples/AccumulatorObject.py index a03026ea..01130394 100755 --- a/samples/AccumulatorObject.py +++ b/samples/AccumulatorObject.py @@ -15,7 +15,7 @@ from bacpypes.object import AccumulatorObject from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject from bacpypes.service.object import ReadWritePropertyMultipleServices # some debugging @@ -84,13 +84,6 @@ def main(): # add the additional service this_application.add_capability(ReadWritePropertyMultipleServices) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a random input object accumulator = AccumulatorObject( objectIdentifier=('accumulator', 1), diff --git a/samples/BBMD2VLANRouter.py b/samples/BBMD2VLANRouter.py index e416cb00..b2e18d3f 100755 --- a/samples/BBMD2VLANRouter.py +++ b/samples/BBMD2VLANRouter.py @@ -24,7 +24,8 @@ from bacpypes.app import Application from bacpypes.appservice import StateMachineAccessPoint, ApplicationServiceAccessPoint -from bacpypes.service.device import LocalDeviceObject, WhoIsIAmServices +from bacpypes.local.device import LocalDeviceObject +from bacpypes.service.device import WhoIsIAmServices from bacpypes.service.object import ReadWritePropertyServices from bacpypes.primitivedata import Real diff --git a/samples/COVClient.py b/samples/COVClient.py index 29281fa4..e79ba964 100755 --- a/samples/COVClient.py +++ b/samples/COVClient.py @@ -20,7 +20,7 @@ SimpleAckPDU, RejectPDU, AbortPDU from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -228,13 +228,6 @@ def main(): # make a simple application this_application = SubscribeCOVApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = SubscribeCOVConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/COVServer.py b/samples/COVServer.py index c1c2de8e..ad2558a4 100755 --- a/samples/COVServer.py +++ b/samples/COVServer.py @@ -18,7 +18,7 @@ from bacpypes.app import BIPSimpleApplication from bacpypes.object import AnalogValueObject, BinaryValueObject -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject from bacpypes.service.cov import ChangeOfValueServices # some debugging diff --git a/samples/CommandableMixin.py b/samples/CommandableMixin.py index 16b13401..41b8998c 100644 --- a/samples/CommandableMixin.py +++ b/samples/CommandableMixin.py @@ -26,8 +26,8 @@ TimeValueObject, TimePatternValueObject, ChannelObject from bacpypes.app import BIPSimpleApplication -from bacpypes.service.object import CurrentPropertyListMixIn -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.object import CurrentPropertyListMixIn +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 diff --git a/samples/DeviceCommunicationControl.py b/samples/DeviceCommunicationControl.py index a5247559..e4ce6d63 100755 --- a/samples/DeviceCommunicationControl.py +++ b/samples/DeviceCommunicationControl.py @@ -18,7 +18,7 @@ from bacpypes.apdu import DeviceCommunicationControlRequest from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -134,13 +134,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = DCCConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/DeviceDiscovery.py b/samples/DeviceDiscovery.py index 7c6b1c82..e0f7276b 100755 --- a/samples/DeviceDiscovery.py +++ b/samples/DeviceDiscovery.py @@ -22,7 +22,7 @@ from bacpypes.errors import DecodingError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 1 @@ -211,13 +211,6 @@ def main(): # make a simple application this_application = DiscoveryApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = DiscoveryConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/DeviceDiscoveryForeign.py b/samples/DeviceDiscoveryForeign.py index fa315b9b..1e7b977e 100755 --- a/samples/DeviceDiscoveryForeign.py +++ b/samples/DeviceDiscoveryForeign.py @@ -22,7 +22,7 @@ from bacpypes.errors import DecodingError from bacpypes.app import BIPForeignApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 1 @@ -215,13 +215,6 @@ def main(): int(args.ini.foreignttl), ) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = DiscoveryConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/HTTPServer.py b/samples/HTTPServer.py index 9d99cb4b..61d1c21e 100755 --- a/samples/HTTPServer.py +++ b/samples/HTTPServer.py @@ -22,7 +22,7 @@ from bacpypes.app import BIPSimpleApplication from bacpypes.object import get_object_class, get_datatype -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -190,13 +190,6 @@ class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # local host, special port HOST, PORT = "", int(args.port) server = ThreadedTCPServer((HOST, PORT), ThreadedHTTPRequestHandler) diff --git a/samples/HandsOnLab/Sample1_SimpleApplication.py b/samples/HandsOnLab/Sample1_SimpleApplication.py index b96478b7..dd02bd3c 100644 --- a/samples/HandsOnLab/Sample1_SimpleApplication.py +++ b/samples/HandsOnLab/Sample1_SimpleApplication.py @@ -13,7 +13,7 @@ from bacpypes.core import run from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 1 @@ -72,13 +72,6 @@ def main(): this_application = SampleApplication(this_device, args.ini.address) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/HandsOnLab/Sample2_WhoIsIAmApplication.py b/samples/HandsOnLab/Sample2_WhoIsIAmApplication.py index 27d00499..2a185f96 100644 --- a/samples/HandsOnLab/Sample2_WhoIsIAmApplication.py +++ b/samples/HandsOnLab/Sample2_WhoIsIAmApplication.py @@ -15,7 +15,7 @@ from bacpypes.core import run from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -90,13 +90,6 @@ def main(): # make a sample application this_application = WhoIsIAmApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/HandsOnLab/Sample3_WhoHasIHaveApplication.py b/samples/HandsOnLab/Sample3_WhoHasIHaveApplication.py index 9c06c0b2..c44e8dd0 100644 --- a/samples/HandsOnLab/Sample3_WhoHasIHaveApplication.py +++ b/samples/HandsOnLab/Sample3_WhoHasIHaveApplication.py @@ -16,7 +16,7 @@ from bacpypes.core import run from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -92,13 +92,6 @@ def main(): # make a sample application this_application = WhoHasIHaveApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") # run until stopped, ^C works diff --git a/samples/HandsOnLab/Sample4_RandomAnalogValueObject.py b/samples/HandsOnLab/Sample4_RandomAnalogValueObject.py index 8aeb5a44..c5de7083 100644 --- a/samples/HandsOnLab/Sample4_RandomAnalogValueObject.py +++ b/samples/HandsOnLab/Sample4_RandomAnalogValueObject.py @@ -21,7 +21,7 @@ from bacpypes.errors import ExecutionError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -99,13 +99,6 @@ def main(): # make a sample application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make some random input objects for i in range(1, RANDOM_OBJECT_COUNT+1): ravo = RandomAnalogValueObject( diff --git a/samples/LocalScheduleObject.py b/samples/LocalScheduleObject.py index 7706e9c0..788285c7 100644 --- a/samples/LocalScheduleObject.py +++ b/samples/LocalScheduleObject.py @@ -22,8 +22,8 @@ from bacpypes.object import register_object_type, get_datatype, WritableProperty, ScheduleObject from bacpypes.app import BIPSimpleApplication -from bacpypes.service.object import CurrentPropertyListMixIn -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.object import CurrentPropertyListMixIn +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -573,13 +573,6 @@ def main(): # make a sample application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # # Simple daily schedule (actually a weekly schedule with every day # being identical. diff --git a/samples/MultiStateValueObject.py b/samples/MultiStateValueObject.py index 6465728c..b3c9b903 100755 --- a/samples/MultiStateValueObject.py +++ b/samples/MultiStateValueObject.py @@ -15,7 +15,7 @@ from bacpypes.object import MultiStateValueObject from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -44,13 +44,6 @@ def main(): # make a sample application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a multistate value object msvo = MultiStateValueObject( objectIdentifier=('multiStateValue', 1), diff --git a/samples/MultipleReadProperty.py b/samples/MultipleReadProperty.py index e7bce7f8..4bf2dde5 100755 --- a/samples/MultipleReadProperty.py +++ b/samples/MultipleReadProperty.py @@ -23,7 +23,7 @@ from bacpypes.constructeddata import Array from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -142,13 +142,6 @@ def main(): # make a simple application this_application = ReadPointListApplication(point_list, this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # fire off a request when the core has a chance deferred(this_application.next_request) diff --git a/samples/MultipleReadPropertyHammer.py b/samples/MultipleReadPropertyHammer.py index 7bfa4e8b..fbac9694 100755 --- a/samples/MultipleReadPropertyHammer.py +++ b/samples/MultipleReadPropertyHammer.py @@ -31,7 +31,8 @@ from bacpypes.apdu import ReadPropertyRequest -from bacpypes.service.device import LocalDeviceObject, WhoIsIAmServices +from bacpypes.local.device import LocalDeviceObject +from bacpypes.service.device import WhoIsIAmServices from bacpypes.service.object import ReadWritePropertyServices @@ -211,13 +212,6 @@ def main(): # make a simple application this_application = ReadPointListApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/MultipleReadPropertyThreaded.py b/samples/MultipleReadPropertyThreaded.py index 9620b8ed..652057ae 100755 --- a/samples/MultipleReadPropertyThreaded.py +++ b/samples/MultipleReadPropertyThreaded.py @@ -24,7 +24,7 @@ from bacpypes.constructeddata import Array from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -134,13 +134,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # create a thread and read_thread = ReadPointListThread(point_list) if _debug: _log.debug(" - read_thread: %r", read_thread) diff --git a/samples/RandomAnalogValueSleep.py b/samples/RandomAnalogValueSleep.py index ea71cdbc..ef944b25 100644 --- a/samples/RandomAnalogValueSleep.py +++ b/samples/RandomAnalogValueSleep.py @@ -22,7 +22,7 @@ from bacpypes.errors import ExecutionError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -119,13 +119,6 @@ def main(): # make a sample application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make some random input objects for i in range(1, RANDOM_OBJECT_COUNT+1): ravo = RandomAnalogValueObject( diff --git a/samples/ReadAllProperties.py b/samples/ReadAllProperties.py index b52d8721..8cd81627 100755 --- a/samples/ReadAllProperties.py +++ b/samples/ReadAllProperties.py @@ -23,7 +23,7 @@ from bacpypes.app import BIPSimpleApplication from bacpypes.object import get_object_class, get_datatype -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -168,13 +168,6 @@ def main(): # make a simple application this_application = ReadPropertyApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # fire off a request when the core has a chance deferred(this_application.next_request) diff --git a/samples/ReadProperty.py b/samples/ReadProperty.py index da42e7ee..f0f7dfe2 100755 --- a/samples/ReadProperty.py +++ b/samples/ReadProperty.py @@ -22,7 +22,7 @@ from bacpypes.app import BIPSimpleApplication from bacpypes.object import get_object_class, get_datatype -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -162,13 +162,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadPropertyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadProperty25.py b/samples/ReadProperty25.py index 7924adff..abfa136c 100755 --- a/samples/ReadProperty25.py +++ b/samples/ReadProperty25.py @@ -22,7 +22,7 @@ from bacpypes.app import BIPSimpleApplication from bacpypes.object import get_object_class, get_datatype -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -164,13 +164,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadPropertyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadPropertyAny.py b/samples/ReadPropertyAny.py index 44cac18b..6b9be041 100755 --- a/samples/ReadPropertyAny.py +++ b/samples/ReadPropertyAny.py @@ -23,7 +23,7 @@ from bacpypes.primitivedata import Tag from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging @@ -136,13 +136,6 @@ def main(): this_application = BIPSimpleApplication(this_device, args.ini.address) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadPropertyAnyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadPropertyMultiple.py b/samples/ReadPropertyMultiple.py index f355f8d8..ca1df025 100755 --- a/samples/ReadPropertyMultiple.py +++ b/samples/ReadPropertyMultiple.py @@ -25,7 +25,7 @@ from bacpypes.basetypes import PropertyIdentifier from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -214,13 +214,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadPropertyMultipleConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadPropertyMultiple25.py b/samples/ReadPropertyMultiple25.py index cd53c5db..41a857b7 100755 --- a/samples/ReadPropertyMultiple25.py +++ b/samples/ReadPropertyMultiple25.py @@ -25,7 +25,7 @@ from bacpypes.basetypes import PropertyIdentifier from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -220,13 +220,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadPropertyMultipleConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadPropertyMultipleServer.py b/samples/ReadPropertyMultipleServer.py index 961bd633..c186599b 100755 --- a/samples/ReadPropertyMultipleServer.py +++ b/samples/ReadPropertyMultipleServer.py @@ -18,7 +18,7 @@ from bacpypes.errors import ExecutionError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject, DeviceCommunicationControlServices +from bacpypes.service.device import DeviceCommunicationControlServices from bacpypes.service.object import ReadWritePropertyMultipleServices # some debugging @@ -124,13 +124,6 @@ def main(): this_application.add_object(ravo2) _log.debug(" - object list: %r", this_device.objectList) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/ReadPropertyMultipleServer25.py b/samples/ReadPropertyMultipleServer25.py index 4c97e13f..b483e2fc 100755 --- a/samples/ReadPropertyMultipleServer25.py +++ b/samples/ReadPropertyMultipleServer25.py @@ -18,8 +18,8 @@ from bacpypes.errors import ExecutionError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import ReadWritePropertyMultipleServices, \ - LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject +from bacpypes.service.device import ReadWritePropertyMultipleServices # some debugging _debug = 0 @@ -122,13 +122,6 @@ def main(): this_application.add_object(ravo2) _log.debug(" - object list: %r", this_device.objectList) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/ReadRange.py b/samples/ReadRange.py index b75e43a8..a328dd10 100755 --- a/samples/ReadRange.py +++ b/samples/ReadRange.py @@ -20,7 +20,7 @@ from bacpypes.apdu import ReadRangeRequest, ReadRangeACK from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -132,13 +132,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadRangeConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadWriteEventMessageTexts.py b/samples/ReadWriteEventMessageTexts.py index 124b0db0..67b24e5e 100644 --- a/samples/ReadWriteEventMessageTexts.py +++ b/samples/ReadWriteEventMessageTexts.py @@ -23,7 +23,7 @@ from bacpypes.constructeddata import Array, ArrayOf, Any from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -241,13 +241,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadWritePropertyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadWriteFile.py b/samples/ReadWriteFile.py index 7cc3a19a..16fd36fa 100755 --- a/samples/ReadWriteFile.py +++ b/samples/ReadWriteFile.py @@ -31,7 +31,7 @@ AtomicWriteFileACK from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -322,13 +322,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = TestConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/ReadWriteFileServer.py b/samples/ReadWriteFileServer.py index 89df3375..407aa093 100755 --- a/samples/ReadWriteFileServer.py +++ b/samples/ReadWriteFileServer.py @@ -15,9 +15,9 @@ from bacpypes.core import run from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject -from bacpypes.service.file import FileServices, \ - LocalRecordAccessFileObject, LocalStreamAccessFileObject +from bacpypes.local.device import LocalDeviceObject +from bacpypes.local.file import FileServices, LocalRecordAccessFileObject, LocalStreamAccessFileObject +from bacpypes.service.file import FileServices # some debugging _debug = 0 @@ -188,13 +188,6 @@ def main(): # add the capability to server file content this_application.add_capability(FileServices) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a record access file, add to the device f1 = TestRecordFile( objectIdentifier=('file', 1), diff --git a/samples/ReadWriteProperty.py b/samples/ReadWriteProperty.py index 25e334a7..70e85dea 100755 --- a/samples/ReadWriteProperty.py +++ b/samples/ReadWriteProperty.py @@ -27,7 +27,7 @@ from bacpypes.constructeddata import Array, Any, AnyAtomic from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -282,13 +282,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadWritePropertyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/RecurringMultipleReadProperty.py b/samples/RecurringMultipleReadProperty.py index 8d4406c2..bb1826ce 100755 --- a/samples/RecurringMultipleReadProperty.py +++ b/samples/RecurringMultipleReadProperty.py @@ -24,7 +24,7 @@ from bacpypes.constructeddata import Array from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -176,13 +176,6 @@ def main(): this_application = PrairieDog(args.interval, this_device, args.ini.address) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - _log.debug("running") run() diff --git a/samples/ThreadedReadProperty.py b/samples/ThreadedReadProperty.py index dfe3d9cd..34f34607 100755 --- a/samples/ThreadedReadProperty.py +++ b/samples/ThreadedReadProperty.py @@ -24,7 +24,7 @@ from bacpypes.constructeddata import Array from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -172,13 +172,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - thread_list = [] # loop through the address and point lists diff --git a/samples/Tutorial/SampleConsoleCmd-Answer.py b/samples/Tutorial/SampleConsoleCmd-Answer.py index 4198f548..795b3b14 100644 --- a/samples/Tutorial/SampleConsoleCmd-Answer.py +++ b/samples/Tutorial/SampleConsoleCmd-Answer.py @@ -15,7 +15,7 @@ from bacpypes.core import run, enable_sleeping from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -112,13 +112,6 @@ def main(): # make a sample application this_application = SampleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = SampleConsoleCmd() diff --git a/samples/Tutorial/SampleConsoleCmd.py b/samples/Tutorial/SampleConsoleCmd.py index 37e34c6f..360fad07 100644 --- a/samples/Tutorial/SampleConsoleCmd.py +++ b/samples/Tutorial/SampleConsoleCmd.py @@ -15,7 +15,7 @@ from bacpypes.core import run, enable_sleeping from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -84,13 +84,6 @@ def main(): # make a sample application this_application = SampleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = SampleConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/Tutorial/WhoIsIAm.py b/samples/Tutorial/WhoIsIAm.py index b65e9669..67fe1203 100644 --- a/samples/Tutorial/WhoIsIAm.py +++ b/samples/Tutorial/WhoIsIAm.py @@ -20,7 +20,7 @@ from bacpypes.errors import DecodingError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 1 @@ -167,26 +167,9 @@ def main(): vendorIdentifier=int(args.ini.vendoridentifier), ) - # build a bit string that knows about the bit names - pss = ServicesSupported() - pss['whoIs'] = 1 - pss['iAm'] = 1 - pss['readProperty'] = 1 - pss['writeProperty'] = 1 - - # set the property value to be just the bits - this_device.protocolServicesSupported = pss.value - # make a simple application this_application = WhoIsIAmApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = WhoIsIAmConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/VendorAVObject.py b/samples/VendorAVObject.py index edef1e76..b2fc5ae6 100755 --- a/samples/VendorAVObject.py +++ b/samples/VendorAVObject.py @@ -20,7 +20,7 @@ from bacpypes.errors import ExecutionError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -106,13 +106,6 @@ def main(): # make a sample application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make some objects ravo1 = VendorAVObject( objectIdentifier=(513, 1), objectName='Random1' diff --git a/samples/VendorReadWriteProperty.py b/samples/VendorReadWriteProperty.py index 42916b9d..9687f248 100755 --- a/samples/VendorReadWriteProperty.py +++ b/samples/VendorReadWriteProperty.py @@ -26,7 +26,7 @@ from bacpypes.constructeddata import Array, Any from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject import VendorAVObject @@ -254,13 +254,6 @@ def main(): # make a simple application this_application = BIPSimpleApplication(this_device, args.ini.address) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = ReadWritePropertyConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/WhoIsIAm.py b/samples/WhoIsIAm.py index 126a4052..1583446e 100755 --- a/samples/WhoIsIAm.py +++ b/samples/WhoIsIAm.py @@ -21,7 +21,7 @@ from bacpypes.errors import DecodingError from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -189,29 +189,12 @@ def main(): ) if _debug: _log.debug(" - this_device: %r", this_device) - # build a bit string that knows about the bit names - pss = ServicesSupported() - pss['whoIs'] = 1 - pss['iAm'] = 1 - pss['readProperty'] = 1 - pss['writeProperty'] = 1 - - # set the property value to be just the bits - this_device.protocolServicesSupported = pss.value - # make a simple application this_application = WhoIsIAmApplication( this_device, args.ini.address, ) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = WhoIsIAmConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/WhoIsIAmForeign.py b/samples/WhoIsIAmForeign.py index a2eb613d..9dd27eb7 100755 --- a/samples/WhoIsIAmForeign.py +++ b/samples/WhoIsIAmForeign.py @@ -31,7 +31,7 @@ from bacpypes.errors import DecodingError from bacpypes.app import BIPForeignApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject # some debugging _debug = 0 @@ -200,16 +200,6 @@ def main(): ) if _debug: _log.debug(" - this_device: %r", this_device) - # build a bit string that knows about the bit names - pss = ServicesSupported() - pss['whoIs'] = 1 - pss['iAm'] = 1 - pss['readProperty'] = 1 - pss['writeProperty'] = 1 - - # set the property value to be just the bits - this_device.protocolServicesSupported = pss.value - # make a simple application this_application = WhoIsIAmApplication( this_device, args.ini.address, @@ -218,13 +208,6 @@ def main(): ) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = WhoIsIAmConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/samples/WriteSomething.py b/samples/WriteSomething.py index 9f623aba..5aaa57bb 100755 --- a/samples/WriteSomething.py +++ b/samples/WriteSomething.py @@ -19,7 +19,7 @@ from bacpypes.pdu import Address from bacpypes.app import BIPSimpleApplication -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject from bacpypes.primitivedata import TagList, OpeningTag, ClosingTag, ContextTag from bacpypes.constructeddata import Any @@ -130,13 +130,6 @@ def main(): this_application = BIPSimpleApplication(this_device, args.ini.address) if _debug: _log.debug(" - this_application: %r", this_application) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # make a console this_console = WriteSomethingConsoleCmd() if _debug: _log.debug(" - this_console: %r", this_console) diff --git a/sandbox/local_schedule_object_t1.py b/sandbox/local_schedule_object_t1.py index b5f9d2f7..b6d8d048 100644 --- a/sandbox/local_schedule_object_t1.py +++ b/sandbox/local_schedule_object_t1.py @@ -22,8 +22,8 @@ from bacpypes.object import register_object_type, get_datatype, WritableProperty, ScheduleObject from bacpypes.app import BIPSimpleApplication -from bacpypes.service.object import CurrentPropertyListMixIn -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.object import CurrentPropertyListMixIn +from bacpypes.local.device import LocalDeviceObject ### testing import time diff --git a/sandbox/local_schedule_object_t2.py b/sandbox/local_schedule_object_t2.py index 6c5bc29f..0d55aca2 100644 --- a/sandbox/local_schedule_object_t2.py +++ b/sandbox/local_schedule_object_t2.py @@ -23,8 +23,8 @@ WritableProperty, ScheduleObject, AnalogValueObject from bacpypes.app import Application -from bacpypes.service.object import CurrentPropertyListMixIn -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.object import CurrentPropertyListMixIn +from bacpypes.local.device import LocalDeviceObject ### testing import time @@ -661,13 +661,6 @@ def main(): # make a floating application, no network interface this_application = Application(this_device) - # get the services supported - services_supported = this_application.get_services_supported() - if _debug: _log.debug(" - services_supported: %r", services_supported) - - # let the device object know - this_device.protocolServicesSupported = services_supported.value - # # Simple daily schedule (actually a weekly schedule with every day # being identical. diff --git a/setup.py b/setup.py index 9d732958..cc1a3bae 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ url="https://github.com/JoelBender/bacpypes", packages=[ 'bacpypes', + 'bacpypes.local', 'bacpypes.service', ], package_dir={ diff --git a/tests/test_service/helpers.py b/tests/test_service/helpers.py index e50cbc76..8ee06b8e 100644 --- a/tests/test_service/helpers.py +++ b/tests/test_service/helpers.py @@ -13,7 +13,7 @@ from bacpypes.app import Application from bacpypes.appservice import StateMachineAccessPoint, ApplicationServiceAccessPoint from bacpypes.netservice import NetworkServiceAccessPoint, NetworkServiceElement -from bacpypes.service.device import LocalDeviceObject +from bacpypes.local.device import LocalDeviceObject from ..state_machine import StateMachine, StateMachineGroup from ..time_machine import reset_time_machine, run_time_machine diff --git a/tests/test_service/test_object.py b/tests/test_service/test_object.py index 52040421..a1e2a8b5 100644 --- a/tests/test_service/test_object.py +++ b/tests/test_service/test_object.py @@ -16,7 +16,7 @@ from bacpypes.object import register_object_type, ReadableProperty, \ WritableProperty, Object -from bacpypes.service.object import CurrentPropertyListMixIn +from bacpypes.local.object import CurrentPropertyListMixIn # some debugging _debug = 0