Table Of Contents

Previous topic

Core

Next topic

BACnet Protocol Data Units

This Page

Comm

All applications have to have some kind of outer blcok.

Globals

comm.client_map

This is ...

comm.server_map

This is ...

comm.service_map

This is ...

comm.element_map

This is ...

Functions

comm.bind(*args)
Parameters:args – a list of clients and servers to bind together in a stack

Protocol Data Units

A Protocol Data Unit (PDU) is the name for a collection of information that is passed between two entities. It is composed of Protcol Control Information (PCI), which usually has information about addressing and other types of processing instructions, and data. The set of classes in this module are not specific to BACnet.

class comm.PCI
pduSouce

The source of a PDU. The datatype and composition of the address is dependent on the client/server relationship and protocol context. The source may be None, in which case it has no source or the source is implicit.

pduDestination

The destination of a PDU. The datatype and composition of the address is dependent on the client/server relationship and protocol context. The destination may be None, in which case it has no destination or the destination is implicit.

__init__([source=addr][,destination=addr])
Parameters:
  • source (addr) – the initial source value
  • destination (addr) – the initial destination value

Protocol Control Information is generally the context information and/or other types of processing instructions.

class comm.PDUData
pduData

This attribute typically holds a simple octet string, but for higher layers of a protocol stack it may contain more abstract pieces or components.

get()

Extract a single octet from the front of the data. If the octet string is empty this will raise a DecodingError.

get_data(len)
Parameters:len (integer) – the number of octets to extract off the front

Extract a number of octets from the front of the data. If there are not at least len octets this will raise a DecodingError exception.

get_short()
get_long()
put(ch)
Parameters:ch (octet) – the octet to append to the end
put_data(data)
Parameters:data (string) – the octet string to append to the end
put_short(n)
put_long(n)

The PDUData class has functions for gathering information from the front of the octet string, or putting information on the end. These are helper functions but may not be applicable for higher layer protocols which may be passing significantly more complex data.

class comm.PDU(PCI, PDUData)

The PDU class combines the PCI and PDUData classes together into one object.

Protocol Stack Classes

class comm.Client
class comm.Server
class comm.Debug
class comm.Echo

Application Classes

class comm.ServiceAccessPoint
class comm.ApplicationServiceElement
class comm.NullServiceElement
class comm.DebugServiceElement