get link field time and alarms
This commit is contained in:
@@ -170,4 +170,10 @@ class _Field(object):
|
||||
lock is held (ie withing :meth:`process <DeviceSupport.process>`).
|
||||
"""
|
||||
|
||||
def getAlarm(self):
|
||||
"""Returns a tuple (severity, status) with the condtion of the linked field.
|
||||
|
||||
Only works for fields of type DBF_INLINK.
|
||||
"""
|
||||
|
||||
_hooks = {}
|
||||
|
||||
@@ -288,6 +288,15 @@ class Field(_dbapi._Field):
|
||||
self._record = getRecord(rec)
|
||||
return self._record
|
||||
|
||||
def getTime(self):
|
||||
"""Get timestamp of link target.
|
||||
|
||||
Only works for DBF_INLINK fields.
|
||||
Returns the time in seconds since the posix epoch.
|
||||
|
||||
:rtype: float
|
||||
"""
|
||||
|
||||
def __cmp__(self, B):
|
||||
if isinstance(B, Field):
|
||||
B=B.getval()
|
||||
|
||||
Reference in New Issue
Block a user