ca_task_initialize
ca_add_exception_event
{ Other Code } ca_task_exit
ca_search_and_connect(name,pchid,connectionCallback,userarg)
ca_replace_access_rights_event(chid,accessRightsCallback)
ca_array_put(type,count,chid,pvalues) . . . ca_flush_io()
ca_put_callback(type,count,chid,pvalue,putCallback,userarg)
ca_array_get(type,count,chid,pvalues) . . . ca_pend_io(timeout)OR
ca_array_get_callback(type,count,chid,getCallback,userarg) . . . ca_pend_event(timeout)
ca_add_masked_array_event(type,count,chid,eventCallback,user arg,pevid,mask)
ca_pend_event(timeout)
ca_flush_io
ca_pend_io(timeout)
ca_pend_event(timeout)
timeout
int ezcaGet(pvname, type, nelem, buff) int ezcaPut(pvname, type, nelem, buff) int ezcaGetWithStatus(pvname,type,nelem,buff,time,stat,sevr)
int ezcaStartGroup(void) [... any combination of get and put ...] int ezcaEndGroup(void);
ezcaPerror(message) ezcaGetErrorString(message,errorstring) ezcaFreeErrorString(errorstring)
int ezcaGetControlLimits(pvname,type,low,high) int ezcaGetGraphicLimits(pvname,type,low,high) int ezcaGetNelem(pvname,nelem) int ezcaGetPrecision(pvname,precision) int ezcaGetStatus(pvname,time,stat,sevr) int ezcaGetUnits(pvname,units)
int ezcaSetMonitor(pvname,type) int ezcaClearMonitor(pvname,type) int ezcaNewMonitor(pvname,type)
void ezcaAutoErrorMessageOff() void ezcaAutoErrorMessageOn() int ezcaDelay(seconds) int ezcaGetRetryCount() int ezcaSetRetryCount() float ezcaGetTimeout() int ezcaSetTimeout(seconds)
ezcaPvTochid(pvname,chid)
/*example.c*/ /*From stdin read a list of pvnames. Get each as a double*/ #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <cadef.h> #include <tsDefs.h> #include <ezca.h> #define MAX_PV 1000 #define MAX_PV_NAME_LEN 40 main() { int npv=0; double *pdata; char *pname[MAX_PV]; int status; int i; char tempStr[MAX_PV_NAME_LEN]; char *pstr; while(1) { if(npv >= MAX_PV ) break; pstr = fgets(tempStr,MAX_PV_NAME_LEN,stdin); if(!pstr) break; if(strlen(pstr) <=1) continue; pstr[strlen(pstr)-1] = `\0'; /*strip off newline*/ pname[npv] = calloc(1,strlen(pstr) + 1); strcpy(pname[npv],pstr); npv++; } pdata = (double *)calloc(npv,sizeof(double)); ezcaStartGroup(); for(i=0; i<npv; i++) { status = ezcaGet(pname[i],ezcaDouble,1,(void *) &pdata[i]); if(status) { ezcaPerror("ezcaGet"); break; } } status = ezcaEndGroup(); if(status) ezcaPerror("ezcaEndGroup"); for(i=0; i<npv; i++) { printf("%s %f\n",pname[i],pdata[i]); } return(0); }