Skip to content

0.17.1 Release Notes

Joel Bender edited this page Apr 22, 2020 · 1 revision

Simplified Configuration of Local Device Object

The number and types of optional parameters to the DeviceObject that could be defined in keyword arguments or in an INI file was driving me crazy. There is a new simple way that is reflected in the sample applications where you can go from this:

    # make a device object
    this_device = LocalDeviceObject(
        objectName=args.ini.objectname,
        objectIdentifier=int(args.ini.objectidentifier),
        maxApduLengthAccepted=int(args.ini.maxapdulengthaccepted),
        segmentationSupported=args.ini.segmentationsupported,
        vendorIdentifier=int(args.ini.vendoridentifier),
        )

to this:

    this_device = LocalDeviceObject(ini=args.ini)
    if _debug: _log.debug("    - this_device: %r", this_device)

Device Information Cache

The expectations of the DeviceInfoCache have changed to make it closer to what would be expected if it had a database backend.

  • the get_device_info() function no longer returns a mocked up DeviceInfo record if one doesn't exist

  • there are new acquire() and release() functions that signal when a DeviceInfo record is being used by a state machine.

  • a new device_info_class parameter is used when constructing new DeviceInfo objects so both the DeviceInfoCache and DeviceInfo can be subclassed.

Segmented APDUs

The segmentation state machine classes have been significantly worked over to respect the APCI header fields and is no longer as tightly dependant on the device information cache.

APDU Retry Count Fixed

The retry count is now correct, it was a vicious off-by-one error.

Foreign Device Communications

The restrictions on what can be sent and received by an unregistered foreign device have been relaxed.

Unrecognized Services

The recept of a request for an unrecognized service is now rejected.

Other Minor Changes

The functions for encoding and decoding the maximum segments accepted and the maximum APDU length accepted have changed to more accurately reflect unknown or unspecified values. To carry the correct sematics into the client and server segmentation state machines the apduMaxSegs and apduMaxResp fields in the APCI are now the values in the PDU rather than the encoded/decoded versions.

The task manager now executes tasks that were scheduled for the same time in the same order they were scheduled. When A and B are both scheduled at time t, it was the case that B could be executed before A and it made unit tests harder than necessary.

In the bacpypes.vlan module, IPNetworks can be given a name which can help with debugging test traffic through IPRouterNode objects.