Switch to non-deprecated routines.

This commit is contained in:
W. Eric Norum
2002-04-15 19:37:27 +00:00
parent d1f0435eb8
commit 348c8916d2
2 changed files with 5 additions and 6 deletions

View File

@@ -15,8 +15,8 @@ main(int argc,char **argv)
fprintf(stderr,"usage: caExample pvname\n");
exit(1);
}
SEVCHK(ca_task_initialize(),"ca_task_initialize");
SEVCHK(ca_search(argv[1],&mychid),"ca_search failure");
SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create");
SEVCHK(ca_create_channel(argv[1],NULL,NULL,10,&mychid),"ca_create_channel failure");
SEVCHK(ca_pend_io(5.0),"ca_pend_io failure");
SEVCHK(ca_get(DBR_DOUBLE,mychid,(void *)&data),"ca_get failure");
SEVCHK(ca_pend_io(5.0),"ca_pend_io failure");

View File

@@ -102,12 +102,12 @@ int main(int argc,char **argv)
pmynode[npv] = (MYNODE *)calloc(1,sizeof(MYNODE));
npv++;
}
SEVCHK(ca_task_initialize(),"ca_task_initialize");
SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create");
SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
"ca_add_exception_event");
for(i=0; i<npv; i++) {
SEVCHK(ca_search_and_connect(pname[i],&pmynode[i]->mychid,
connectionCallback,&pmynode[i]),
SEVCHK(ca_create_channel(pname[i],connectionCallback,
&pmynode[i],20,&pmynode[i]->mychid),
"ca_search_and_connect");
SEVCHK(ca_replace_access_rights_event(pmynode[i]->mychid,
accessRightsCallback),
@@ -118,6 +118,5 @@ int main(int argc,char **argv)
}
/*Should never return from following call*/
SEVCHK(ca_pend_event(0.0),"ca_pend_event");
ca_task_exit();
return(0);
}