Record.rtype

This commit is contained in:
Michael Davidsaver
2013-03-30 20:28:01 -04:00
parent 6b7ba0d062
commit 61057e7c81
2 changed files with 11 additions and 0 deletions

View File

@ -73,6 +73,12 @@ static PyObject* pyRecord_name(pyRecord *self)
return PyString_FromString(prec->name);
}
static PyObject* pyRecord_rtype(pyRecord *self)
{
dbCommon *prec=self->entry.precnode->precord;
return PyString_FromString(prec->rdes->name);
}
static PyObject* pyRecord_info(pyRecord *self, PyObject *args)
{
const char *name;
@ -233,6 +239,8 @@ static PyObject *pyRecord_asyncFinish(pyRecord *self, PyObject *args, PyObject *
static PyMethodDef pyRecord_methods[] = {
{"name", (PyCFunction)pyRecord_name, METH_NOARGS,
"Return record name string"},
{"rtype", (PyCFunction)pyRecord_rtype, METH_NOARGS,
"Return record type name string"},
{"isPyRecord", (PyCFunction)pyRecord_ispyrec, METH_NOARGS,
"Is this record using Python Device."},
{"info", (PyCFunction)pyRecord_info, METH_VARARGS,

View File

@ -17,6 +17,9 @@ class Record(object):
def name(self):
"""Record name
"""
def rtype(self):
"""Record type
"""
def isPyRecord(self):
"""Is this record using Python Device.
"""