Copy of old lessons from afs webpage
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user