嗨,我用 bacnet(BAC0 库)和 python 3 开发了一个项目,这是我的方法中的代码
// Connect in Lite Mode
self.bacnet = BAC0.connect(
ip='192.168.1.2'
)
self.bacnet.discover(networks='known')
tmp = self.bacnet.devices
my_controller = BAC0.device(address=tmp[0][2], device_id=tmp[0][3], network=self.bacnet)
points = my_controller.points
point = points[0]
numeric_point = self.GetNumericPoint(point)
// create a while for change value of point and trig COV notification
while True:
i = i + 1
numeric_point.write(i, prop="presentValue", priority="12")
value = numeric_point
time.sleep(1)
print('wait')
问题是如何在 python3 中使用 BAC0 触发函数,当通过 COV(值更改)通知时,谢谢。