Skip to content

Commit

Permalink
perf: process_event removed from devEvrEventUtag.cpp.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Dec 13, 2023
1 parent e638c0b commit 14a7f29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
48 changes: 1 addition & 47 deletions evrApp/src/devEvrEventUtag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <errlog.h>

#include <int64outRecord.h>
#include <eventRecord.h>
#include <epicsVersion.h>

#include "devObj.h"
Expand Down Expand Up @@ -115,8 +114,7 @@ static long del_record(struct dbCommon *prec)
return ret;
}

static long
get_ioint_info(int, dbCommon *prec, IOSCANPVT *io)
static long get_ioint_info(int, dbCommon *prec, IOSCANPVT *io)
{
if (!prec->dpvt)
return S_db_errArg;
Expand Down Expand Up @@ -180,45 +178,11 @@ static long process_int64out(int64outRecord *prec)
return ret;
}

static long process_event(eventRecord *prec)
{
priv *p = static_cast<priv *>(prec->dpvt);
long ret = 0;
try
{
if (prec->tse == epicsTimeEventDeviceTime)
{
p->evr->getTimeStamp(&prec->time, p->event);
#ifdef DBR_UTAG
prec->utag = p->evr->getUtag(p->event);
#endif
}

return 0;
}
catch (std::runtime_error &e)
{
recGblRecordError(S_dev_noDevice, (void *)prec, e.what());
ret = S_dev_noDevice;
}
catch (std::exception &e)
{
recGblRecordError(S_db_noMemory, (void *)prec, e.what());
ret = S_db_noMemory;
}
return ret;
}

static long add_int64out(struct dbCommon *precord)
{
return add_record(precord, &((struct int64outRecord *)precord)->out);
}

static long add_event(struct dbCommon *precord)
{
return add_record(precord, &((struct eventRecord *)precord)->inp);
}

dsxt dxtI64OEventUtagEVR = {add_int64out, del_record};
static common_dset devI64OEventUtagEVR = {
6, NULL,
Expand All @@ -228,17 +192,7 @@ static common_dset devI64OEventUtagEVR = {
dset_cast(&process_int64out),
NULL};

dsxt dxtEVEventUtagEVR = {add_event, del_record};
static common_dset devEVEventUtagEVR = {
6, NULL,
dset_cast(&init_dset<&dxtEVEventUtagEVR>),
(DEVSUPFUN)init_record_empty,
(DEVSUPFUN)&get_ioint_info,
dset_cast(&process_event),
NULL};

extern "C"
{
epicsExportAddress(dset, devI64OEventUtagEVR);
epicsExportAddress(dset, devEVEventUtagEVR);
}
2 changes: 0 additions & 2 deletions evrApp/src/evrSupportBase7.dbd
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
# '@C=..., Code=hweventnum'
# device(int64out, INST_IO, devINT64UTAGEVR, "UTAG Source")
device(int64out, INST_IO, devI64OEventUtagEVR, "EVR Event Utag")
device(event, INST_IO, devEVEventUtagEVR, "EVR Event Utag")

0 comments on commit 14a7f29

Please sign in to comment.