Files
camserver_sf/configuration/user_scripts/test_stream.py
2023-01-23 15:34:04 +01:00

27 lines
573 B
Python

COUNT = 1
def process(data, pulse_id, timestamp, params):
global COUNT
"""
COUNT=COUNT+1
ret = {}
ret["count"] = COUNT
return ret
"""
#COUNT=1
#for k in list(data.keys()):
# data["key"+str(COUNT)]=k
# COUNT=COUNT+1
ret = {}
arr = data["SAR-CVME-TIFALL5:EvtSet"]
ret["val"] = str(arr)
ret["type"] = str(type(arr))
if arr is not None:
try:
ret["dtype"] = str(arr.dtype)
except Exception as ex:
reet["dtype"] = str(ex)
else:
ret["dtype"] = ""
return ret