python api
This commit is contained in:
@ -17,6 +17,9 @@ class Record(object):
|
|||||||
def name(self):
|
def name(self):
|
||||||
"""Record name
|
"""Record name
|
||||||
"""
|
"""
|
||||||
|
def isPyRecord(self):
|
||||||
|
"""Is this record using Python Device.
|
||||||
|
"""
|
||||||
def info(self, key):
|
def info(self, key):
|
||||||
"""info(key)
|
"""info(key)
|
||||||
info(key, default)
|
info(key, default)
|
||||||
@ -30,7 +33,7 @@ class Record(object):
|
|||||||
for this record
|
for this record
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def scan(self, sync=False):
|
def scan(self, sync=False, reason=None, force=0):
|
||||||
"""scan(sync=False)
|
"""scan(sync=False)
|
||||||
|
|
||||||
Scan this record. If sync is False then a
|
Scan this record. If sync is False then a
|
||||||
@ -38,10 +41,17 @@ class Record(object):
|
|||||||
is scannined immidately on the current thread.
|
is scannined immidately on the current thread.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def asyncStart(self):
|
||||||
|
pass
|
||||||
|
def asyncFinish(self, reason=None):
|
||||||
|
pass
|
||||||
|
|
||||||
def Field(object):
|
def Field(object):
|
||||||
"""Handle for field operations
|
"""Handle for field operations
|
||||||
|
|
||||||
f = Field("rec:name.HOPR")
|
f = Field("rec:name.HOPR")
|
||||||
|
|
||||||
|
Field objects implement the buffer protocol.
|
||||||
"""
|
"""
|
||||||
def __init__(self, fld):
|
def __init__(self, fld):
|
||||||
pass
|
pass
|
||||||
@ -67,3 +77,7 @@ def Field(object):
|
|||||||
|
|
||||||
Must be an Int, Float or str
|
Must be an Int, Float or str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def getarray(self):
|
||||||
|
"""Return a numpy ndarray refering to this field for in-place operations.
|
||||||
|
"""
|
||||||
|
18
python/devsup/interfaces.py
Normal file
18
python/devsup/interfaces.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
from zope.interface import Interface
|
||||||
|
|
||||||
|
class DeviceSupport(Interface):
|
||||||
|
def detach(record):
|
||||||
|
"""Disconnect from the record.
|
||||||
|
|
||||||
|
This is the last method called.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def allowScan(record):
|
||||||
|
"""Return True to allow SCAN='I/O Intr'
|
||||||
|
or False to prevent this.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def process(record, reason):
|
||||||
|
"""Callback for record processing action.
|
||||||
|
"""
|
Reference in New Issue
Block a user