11 #include <longinRecord.h> 12 #include <longoutRecord.h> 21 static long read_li_from_integer(longinRecord* prec)
23 if (!prec->dpvt) {(void)recGblSetSevr(prec, COMM_ALARM, INVALID_ALARM);
return -1; }
29 scopedLock<mrf::Object> g(*priv->
O);
30 prec->val = priv->
P->get();
34 }
CATCH(S_dev_badArgument)
40 (&add_record_inp<longinRecord,epicsUInt32>),
43 &read_li_from_integer<epicsUInt32>,
49 (&add_record_inp<longinRecord,epicsUInt16>),
52 &read_li_from_integer<epicsUInt16>,
58 (&add_record_inp<longinRecord,bool>),
61 &read_li_from_integer<bool>,
68 static long write_lo_from_integer(longoutRecord* prec)
70 if (!prec->dpvt) {(void)recGblSetSevr(prec, COMM_ALARM, INVALID_ALARM);
return -1; }
76 scopedLock<mrf::Object> g(*priv->
O);
77 priv->
P->set(prec->val);
80 prec->val = priv->
P->get();
84 }
CATCH(S_dev_badArgument)
89 (&add_record_out<longoutRecord,epicsUInt32>),
92 &write_lo_from_integer<epicsUInt32>,
99 (&add_record_out<longoutRecord,epicsUInt16>),
100 &del_record_property,
102 &write_lo_from_integer<epicsUInt16>,
109 (&add_record_out<longoutRecord,bool>),
110 &del_record_property,
112 &write_lo_from_integer<bool>,
115 #include <epicsExport.h> OBJECT_DSET(LIFromUINT32,(&add_record_inp< longinRecord, epicsUInt32 >), &del_record_property, &init_record_empty, &read_li_from_integer< epicsUInt32 >, NULL)
mrf::auto_ptr< mrf::property< T > > P
OBJECT_DSET_EXPORT(LIFromUINT32)