Application

This is a long line of text.

Device Information

The device information objects and associated cache are used to assist with the following:

  • Device-address-binding, the close associate between the device identifier for a device and its network address
  • Construction of confirmed services to determine if a device can accept segmented requests and/or responses and the maximum size of an APDU
  • The vendor of the device to know what additional vendor specific objects, properties, and other datatypes are available
class app.DeviceInfo

This is a long line of text.

deviceIdentifier

The device instance number associated with the device.

address

The pdu.LocalStation or pdu.RemoteStation associated with the device.

maxApduLengthAccepted

The maximum APDU length acccepted, which has the same value as the property of the object.DeviceObject of the device. This is typically initialized with the parameter with the same name from the apdu.IAmRequest.

segmentationSupported

The enumeration value basetypes.Segmentation that describes the segmentation supported by the device; sending, receiving, both, or no segmentation supported.

vendorID

The vendor identifier of the device.

maxNpduLength

The maximum length of an NPDU permitted by the links used by the local, remote, and intervening networks.

maxSegmentsAccepted

The maximum number of segments of an APDU that this device will accept.

__init__()

Initialize a DeviceInfo object using the default values that are typical for BACnet devices.

class app.DeviceInfoCache

An instance of this class is used to manage the cache of device information on behalf of the application. The information may come from interrogating the device as it presents itself on the network or from a database, or some combination of the two.

The default implementation is to only use information from the network and provide some reasonable defaults when information isn’t available. The Application is provided a reference to an instance of this class or a derived class, and multiple application instances may share a cache, if that’s appropriate.

cache

This is a private dictionary for use by the class or derived class methods. The default implementation uses a mix of device identifiers, addresses, or both to reference DeviceInfo objects.

has_device_info(key)
Parameters:key – a device object identifier, a pdu.LocalStation or a RemoteStation address.

Return true if there is a DeviceInfo instance in the cache.

add_device_info(apdu)
Parameters:apdu (IAmRequest) – an IAmRequest

This function is called by an application when it receives an apdu.IAmRequest and it wants to cache the information. For example the application had issued a apdu.WhoIsRequest for a device and this is the corresponding apdu.IAmRequest.

get_device_info(key)
Parameters:key – a device object identifier, a pdu.LocalStation or a RemoteStation address.

Return the DeviceInfo instance in the cache associated with the key, or None if it does not exist.

update_device_info(info)
Parameters:info (DeviceInfo) – the updated device information

This function is called by the application service layer when the device information has changed as a result of comparing it with incoming requests. This function is overriden when the application has additional work, such as updating a database.

release_device_info(info)
Parameters:info (DeviceInfo) – device information no longer being used

This function is called by the application service layer when there are no more confirmed requests associated with the device and the DeviceInfo can be removed from the cache. This function is overridden by a derived class to change the cache behaviour, for example perhaps the objects are removed from the cache until some timer expires.

Base Class

This is a long line of text.

class app.Application(ApplicationServiceElement)

This is a long line of text.

__init__(localDevice, localAddress)
Parameters:
  • localDevice (DeviceObject) – the local device object
  • localAddress (Address) – the local address
  • actorClass – the initial source value

This is a long line of text.

snork(address=None, segmentationSupported='no-segmentation', maxApduLengthAccepted=1024, maxSegmentsAccepted=None)
Parameters:
  • localAddress (Address) – the local address
  • segmentationSupported – enumeration basetypes.BACnetSegmentation
  • maxApduLengthAccepted – maximum APDU length
  • maxSegmentsAccepted – segmentation parameter

This is a long line of text.

add_object(obj)
Parameters:obj – the initial source value

This is a long line of text.

delete_object(obj)
Parameters:obj – the initial source value

This is a long line of text.

get_object_id(objid)
Parameters:obj – the initial source value

This is a long line of text.

get_object_name(objname)
Parameters:objname – address to establish a connection
iter_objects()
Parameters:address – address to disconnect
indication(apdu)
Parameters:apdu – application layer PDU

This is a long line of text.

do_WhoIsRequest(apdu)
Parameters:apdu – Who-Is request, apdu.WhoIsRequest

This is a long line of text.

do_IAmRequest(apdu)
Parameters:apdu – I-Am request, apdu.IAmRequest

This is a long line of text.

do_ReadPropertyRequest(apdu)
Parameters:apdu – Read-Property request, apdu.ReadPropertyRequest

This is a long line of text.

do_WritePropertyRequest(apdu)
Parameters:apdu – Write-Property request, apdu.WritePropertyRequest

This is a long line of text.

BACnet/IP Applications

This is a long line of text.

class app.BIPSimpleApplication(Application)
__init__(localDevice, localAddress)
Parameters:
  • localDevice – This is a long line of text.
  • localAddress – This is a long line of text.

This is a long line of text.

class app.BIPForeignApplication(Application)
__init__(localDevice, localAddress, bbmdAddress, bbmdTTL)
Parameters:
  • localDevice – This is a long line of text.
  • localAddress – This is a long line of text.
  • bbmdAddress – This is a long line of text.
  • bbmdTTL – This is a long line of text.

This is a long line of text.

BACnet/IP Network Application

This is a long line of text.

class app.BIPNetworkApplication(NetworkServiceElement)
__init__(localAddress)
Parameters:localAddress – This is a long line of text.

This is a long line of text.