added classes for PV/Image
This commit is contained in:
@ -6,12 +6,23 @@ from numpy.random import normal
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from morioc import MorIOC
|
from morioc import MorIOC
|
||||||
|
from channels import PV, Image
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
with MorIOC("mtest") as mor:
|
with MorIOC("mtest") as mor:
|
||||||
|
|
||||||
|
ch_pv = PV(mor, "chan-PV")
|
||||||
|
ch_img = Image(mor, "chan-Image")
|
||||||
|
|
||||||
for i in range(1000):
|
for i in range(1000):
|
||||||
|
|
||||||
|
ch_pv.put(random())
|
||||||
|
|
||||||
|
img = np.random.random(200).reshape(10, 20)
|
||||||
|
ch_img.put(img)
|
||||||
|
|
||||||
|
|
||||||
img = np.random.random(200).reshape(10, 20)
|
img = np.random.random(200).reshape(10, 20)
|
||||||
width, height = img.shape
|
width, height = img.shape
|
||||||
mor.serve(**{
|
mor.serve(**{
|
||||||
|
Reference in New Issue
Block a user