Files
x12sa/script/local.py
2016-08-09 14:43:21 +02:00

22 lines
875 B
Python

###################################################################################################
# Deployment specific global definitions - executed after startup.py
###################################################################################################
class PicoAmp(DeviceBase):
def __init__(self, name, prefix):
DeviceBase.__init__(self, name)
self.prefix = prefix
self.array_data = create_channel_device(prefix+"image1:ArrayData", type='[d', size=None, deviceName=name + " ArrayData")
self.ts_total = create_channel_device(prefix+"Current1:TSTotal", type='[d', size=None, deviceName=name + " Cur1 TSTotal")
self.setChildren([self.array_data, self.ts_total])
def do_something(self):
print "OK"
add_device(PicoAmp("pico_amp", "X12SA-PC-BPM5:AH501:"), force = True)