create PV/Image from IOC object
This commit is contained in:
@ -3,6 +3,7 @@ from datetime import datetime
|
||||
from threading import Thread
|
||||
from pcaspy import SimpleServer, Driver
|
||||
|
||||
from channels import PV, Image
|
||||
from context import Context
|
||||
from pvinfoset import PVInfoSet
|
||||
from managed import delete_managed
|
||||
@ -103,4 +104,11 @@ class MorIOC(Context):
|
||||
return self.driver.getParam(name)
|
||||
|
||||
|
||||
def PV(self, *args, **kwargs):
|
||||
return PV(self, *args, **kwargs)
|
||||
|
||||
def Image(self, *args, **kwargs):
|
||||
return Image(self, *args, **kwargs)
|
||||
|
||||
|
||||
|
||||
|
@ -6,14 +6,13 @@ from numpy.random import normal
|
||||
import numpy as np
|
||||
|
||||
from morioc import MorIOC
|
||||
from channels import PV, Image
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with MorIOC("mtest") as mor:
|
||||
|
||||
ch_pv = PV(mor, "chan-PV")
|
||||
ch_img = Image(mor, "chan-Image")
|
||||
ch_pv = mor.PV("chan-PV")
|
||||
ch_img = mor.Image("chan-Image")
|
||||
|
||||
for i in range(1000):
|
||||
|
||||
|
Reference in New Issue
Block a user