template: write random val to pv
Deploy bin / deploy (push) Successful in 2s
Deploy agebd python package / deploy (push) Successful in 5s

This commit is contained in:
Benjamin Labrecque
2026-07-09 16:47:17 +02:00
parent f23d43e91c
commit 9f17564989
@@ -1,4 +1,4 @@
from time import sleep
import time
import typer
from agebd.enums import LogLevel
@@ -68,7 +68,7 @@ class Service(BaseService[PVs]):
#######################################################################################
# here goes all the code that your service
# is supposed to be running when the callback is fired
sleep(1)
time.sleep(1)
#######################################################################################
#######################################################################################
@@ -81,7 +81,8 @@ class Service(BaseService[PVs]):
# is supposed to be running in any case, e.g.,
# update some pvs/vals
# self.pvs.my_pv1.put("MY_PV1 value")
my_pv1_random_val = str(time.clock_gettime_ns(0))[-1]
self.pvs.my_pv1.put(my_pv1_random_val)
# self.pvs.my_pv2.put("MY_PV2 value")
# get some pvs/vals
@@ -89,7 +90,7 @@ class Service(BaseService[PVs]):
self.val2 = self.pvs.my_pv2.get()
# maybe sleep to limit the update loop execution rate
sleep(1)
time.sleep(1)
#######################################################################################
#######################################################################################