mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
![]() depending on the properties or features required. # Usage ## bacnet_properties This decorator takes a dict as argument defining supplmental properties ## bacnet_property This decorator takes a simple property and its default value, adds it to object ## Commandable This decoratore will modify the base class and create a new class that inherit from _commando (see local.object.py) ## Add feature This decorator works the same than commandable. Could serve as a way to add behaviour like MinOnOff, events, limits, etc... ## Example:: properties = {"outOfService" : False, "relinquishDefault" : 0, "units": "degreesCelsius", "highLimit": 98} @bacnet_properties(properties) @commandable() def av(instance, objectName, presentValue, description): OBJECT_TYPE = AnalogValueObject return create(OBJECT_TYPE,instance, objectName, presentValue, description) @add_feature(MinOnOff) @commandable() def bv(instance, objectName, presentValue, description): OBJECT_TYPE = BinaryValueObject return create(OBJECT_TYPE,instance, objectName, presentValue, description) @commandable() def datepattern(instance, objectName, presentValue, description): OBJECT_TYPE = DatePatternValueObject return create(OBJECT_TYPE,instance, objectName, presentValue, description) ### The creation takes place when the functions are called a = av(1,'AnalogValueName',10,'AnalogValue Description') b = bv(1,'BV Name','inactive','BinaryValue Description') c = datepattern(1,'My Date Pattern',None,'DatePattern Description') Signed-off-by: Christian Tremblay, ing. <christian.tremblay@servisys.com> |
||
---|---|---|
doc | ||
pcap_tools | ||
py25/bacpypes | ||
py27/bacpypes | ||
py34/bacpypes | ||
samples | ||
sandbox | ||
tests | ||
.gitignore | ||
BACpypes~.ini | ||
BACpypes~.json | ||
check_install.sh | ||
LICENSE | ||
README.md | ||
README.txt | ||
release_to_pypi.sh | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test_script.sh | ||
tox.ini |