27 lines
624 B
C
27 lines
624 B
C
#include "epicsPV.h"
|
|
#include <stdio.h>
|
|
|
|
void printPV(epicsPV pv)
|
|
{
|
|
char timebuf[32];
|
|
|
|
epicsTimeToStrftime (timebuf, sizeof(timebuf),
|
|
"%d.%m.%Y %H:%M:%S.%03f", PVtimestamp(pv));
|
|
printf("%s %s = %s %s %s [%s]\n",
|
|
timebuf,
|
|
PVname(pv), PVtoStringWithUnits(pv),
|
|
PValarmSeverityString(pv),
|
|
PValarmStatusString(pv),
|
|
PVerrorStatusString(pv));
|
|
}
|
|
|
|
int main (int argc, const char** argv)
|
|
{
|
|
epicsPV current = PVcreate("ARIDI-PCT:CURRENT");
|
|
epicsPV gap = PVcreate("X10SA-ID-GAP:SET");
|
|
caget(current, gap);
|
|
printPV(current);
|
|
printPV(gap);
|
|
return 0;
|
|
}
|