Singleton classes are a design pattern
that returns the same object for every call to create an instance. In the case
of BACpypes there can only be one instance of a
all of the tasks will be schedule through it. The design pattern “hides” all
of the implementation details of the task manager behind its interface.
There are occasions when the task manager needs to provide additional
functionality, or a derived class would like a change to intercept the methods.
In this case the developer can create a subclass of
create an instance of it. Every subsequent call to get a task manager will
return this special instance.
By inheriting from this class, all calls to build an object will return the same object.
This special class binds together the metaclasses from both this singleton module and from the
debugging.Logging. Python classes cannot inherit from two separate metaclasses at the same time, but this class takes advantage of Pythons ability to have multiple inheritance of metaclasses.