-
Notifications
You must be signed in to change notification settings - Fork 130
0.17.0 Release Notes
This release contains a number of new features that will break existing code.
Change
SequenceOf
toListOf
for property definitions and values
The object class definitions started out being generated from the ASN.1 descriptions of objects in Annex C which has since been deleted. That notation used forms like this:
active-vt-sessions [5] SEQUENCE OF BACnetVTSession OPTIONAL,
which were translated into BACpypes definitions like this:
OptionalProperty('activeVtSessions', SequenceOf(VTSession))
But the standard changed to definitions like this (and no longer in an Annex):
Active_VT_Sessions BACnetLIST of BACnetVTSession
So BACpypes now uses definitions like this:
OptionalProperty('activeVtSessions', ListOf(VTSession))
No change to BACpypes applications unless
NetworkServiceAccessPoint
has been subclassed
The network service layer consisting of NetworkAdapter
, NetworkServiceAccessPoint
,
and the NetworkServiceElement
had no mechanism for a BACpypes application to
provide the address of a router, all of the path information it gathered by
inspecting upstream packets. It also did not suspend application layer requests
to try and find a path, it simply broadcast the request, which is incorrect.
There is a new RouterInfoCache
class that can be subclassed and provided to
the network layer and it is similar to the DeviceInfoCache
at the application
layer. A well-known set of functions are called for finding out routing paths
for downstream packets and updating paths for upstream packets.
There is a queue of APDU's waiting path discovery in pending_nets
. There is
(currently) no signal back to the application when the discovery process times
out.
The LocalDeviceObject is used to create a DeviceObject
in an application that
automatically returns the system date and time when the localDate
and localTime
properties are read. This class was in the bacpypes.service.device
module
and it has been moved to the new bacpypes.local.device
module.
BACpypes applications must change from this:
from bacpypes.service.device import LocalDeviceObject
to this:
from bacpypes.local.device import LocalDeviceObject
Similarly, the CurrentPropertyList
class that was in the bacpypes.service.object
module is now in the bacpypes.local.object
module because it belongs with
local implementations of objects.
The LocalRecordAccessFileObject
and LocalStreamAccessFileObject
classes
have moved to the bacpypes.local.file
module.
There is an implementation of a LocalScheduleObject
in the bacpypes.local.sched
module. It includes a companion class, an "interpreter" that is a task that
keeps the present value current. It does not support writing to or overriding
objects outside of the local device context.
All of the sample applications that have a full stack had code that computed the protocol services supported and set that in the device object.
# 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
This functionality has been rolled into the LocalDeviceObject
so this code
must be removed.
There is a new traffic_log
attribute in the VLAN networking that can reference
a function to call to log each of the PDUs that the network will process. This
was added to make debugging tests easier.
All of the sample applications have been updated with the changes listed above.
There is a new LocalScheduleObject.py
sample application that tests for
specific dates and times in a variety of schedule objects. The sample schedules
could be used for additional, more detailed, and better coverage tests.
The ReadWriteProperty.py
sample application has a funky interpreter for making
sure values being written can be coerced into appropriate values.