Skip to content

Commit

Permalink
Adding a manual test for cov that will eventually be added to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTremblay committed Sep 14, 2020
1 parent 4edde83 commit e499973
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/manualtest_cov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import BAC0
from BAC0.core.devices.local.models import analog_value
from bacpypes.primitivedata import Real
import time

device = BAC0.lite('192.168.211.55/24', deviceId=123)
client = BAC0.lite('192.168.212.12/24')

new_obj = analog_value()
new_obj.add_objects_to_application(device)

# From Server
dev_av = device.this_application.get_object_name('AV')
print(dev_av.covIncrement)

# From client
dev = dev = BAC0.device('192.168.211.55', 123, client, poll=0)
av = dev['AV']
dev['AV'].subscribe_cov(lifetime=0)

print()
while True:
print(dev['AV'])
time.sleep(1)
dev['AV'] += 1
time.sleep(1)

0 comments on commit e499973

Please sign in to comment.