create proper defs for dbcar
This commit is contained in:
@@ -16,6 +16,7 @@ INC += dbLock.h
|
||||
INC += dbNotify.h
|
||||
INC += dbScan.h
|
||||
INC += dbTest.h
|
||||
INC += dbCaTest.h
|
||||
INC += db_test.h
|
||||
INC += db_field_log.h
|
||||
INC += initHooks.h
|
||||
@@ -55,8 +56,8 @@ LIBSRCS += db_test.c
|
||||
LIBSRCS += recGbl.c
|
||||
LIBSRCS += callback.c
|
||||
LIBSRCS += dbCa.c
|
||||
LIBSRCS += dbCaTest.c
|
||||
LIBSRCS += initHooks.c
|
||||
LIBSRCS += dbcar.c
|
||||
LIBSRCS += cvtBpt.c
|
||||
LIBSRCS += dbServiceIO.cpp
|
||||
LIBSRCS += dbChannelIO.cpp
|
||||
|
||||
@@ -94,6 +94,7 @@ void epicsShareAPI dbCaAddLink( struct link *plink)
|
||||
{
|
||||
caLink *pca;
|
||||
|
||||
printf("dbCaAddLink called\n");
|
||||
pca = (caLink*)dbCalloc(1,sizeof(caLink));
|
||||
pca->plink = plink;
|
||||
plink->type = CA_LINK;
|
||||
@@ -616,12 +617,14 @@ void dbCaTask()
|
||||
semBinaryMustTake(caWakeupSem);
|
||||
while(TRUE) { /* process all requests in caList*/
|
||||
semMutexMustTake(caListSem);
|
||||
printf("dbCaTask semMutexMustTake returned\n");
|
||||
if((pca = (caLink *)ellFirst(&caList))){/*Take off list head*/
|
||||
ellDelete(&caList,&pca->node);
|
||||
link_action = pca->link_action;
|
||||
pca->link_action = 0;
|
||||
semMutexGive(caListSem); /*Give it back immediately*/
|
||||
if(link_action&CA_DELETE) {/*This must be first*/
|
||||
printf("dbCaTask CA_DELETE\n");
|
||||
if(pca->chid) ca_clear_channel(pca->chid);
|
||||
free(pca->pgetNative);
|
||||
free(pca->pputNative);
|
||||
@@ -633,6 +636,8 @@ void dbCaTask()
|
||||
continue; /*No other link_action makes sense*/
|
||||
}
|
||||
if(link_action&CA_CONNECT) {
|
||||
printf("dbCaTask CA_CONNECT\n");
|
||||
printf("dbCaTask calling ca_search_and_connect\n");
|
||||
status = ca_search_and_connect(
|
||||
pca->plink->value.pv_link.pvname,
|
||||
&(pca->chid),
|
||||
@@ -642,6 +647,7 @@ void dbCaTask()
|
||||
ca_message(status));
|
||||
continue;
|
||||
}
|
||||
printf("dbCaTask calling ca_replace_access_rights_event\n");
|
||||
status = ca_replace_access_rights_event(pca->chid,
|
||||
accessRightsCallback);
|
||||
if(status!=ECA_NORMAL)
|
||||
@@ -651,12 +657,14 @@ void dbCaTask()
|
||||
}
|
||||
if(ca_state(pca->chid) != cs_conn) continue;
|
||||
if(link_action&CA_WRITE_NATIVE) {
|
||||
printf("dbCaTask calling ca_array_put\n");
|
||||
status = ca_array_put(
|
||||
pca->dbrType,pca->nelements,
|
||||
pca->chid,pca->pputNative);
|
||||
if(status==ECA_NORMAL) pca->newOutNative = FALSE;
|
||||
}
|
||||
if(link_action&CA_WRITE_STRING) {
|
||||
printf("dbCaTask calling ca_array_put\n");
|
||||
status = ca_array_put(
|
||||
DBR_STRING,1,
|
||||
pca->chid,pca->pputString);
|
||||
@@ -667,17 +675,20 @@ void dbCaTask()
|
||||
|
||||
element_size = dbr_value_size[ca_field_type(pca->chid)];
|
||||
pca->pgetNative = dbCalloc(pca->nelements,element_size);
|
||||
printf("dbCaTask CA_MONITOR_NATIVE calling ca_add_array_event\n");
|
||||
status = ca_add_array_event(
|
||||
ca_field_type(pca->chid)+DBR_TIME_STRING,
|
||||
ca_element_count(pca->chid),
|
||||
pca->chid, eventCallback,pca,0.0,0.0,0.0,
|
||||
0);
|
||||
printf("dbCaTask returned from ca_add_array_event\n");
|
||||
if(status!=ECA_NORMAL)
|
||||
epicsPrintf("dbCaTask ca_add_array_event %s\n",
|
||||
ca_message(status));
|
||||
}
|
||||
if(link_action&CA_MONITOR_STRING) {
|
||||
pca->pgetString = dbCalloc(MAX_STRING_SIZE,sizeof(char));
|
||||
printf("dbCaTask calling ca_add_array_event\n");
|
||||
status = ca_add_array_event(DBR_TIME_STRING,1,
|
||||
pca->chid, eventCallback,pca,0.0,0.0,0.0,
|
||||
0);
|
||||
@@ -686,6 +697,7 @@ void dbCaTask()
|
||||
ca_message(status));
|
||||
}
|
||||
if(link_action&CA_GET_ATTRIBUTES) {
|
||||
printf("dbCaTask calling ca_get_callback\n");
|
||||
status = ca_get_callback(DBR_CTRL_DOUBLE,
|
||||
pca->chid,getAttribEventCallback,pca);
|
||||
if(status!=ECA_NORMAL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* dbcar.c */
|
||||
/* dbCaTest.c */
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
@@ -41,7 +41,6 @@ of this distribution.
|
||||
#include "dbDefs.h"
|
||||
#include "epicsPrint.h"
|
||||
#include "dbCommon.h"
|
||||
#define epicsExportSharedSymbols
|
||||
|
||||
/*define DB_CONVERT_GBLSOURCE because db_access.c does not include db_access.h*/
|
||||
#define DB_CONVERT_GBLSOURCE
|
||||
@@ -49,8 +48,10 @@ of this distribution.
|
||||
#include "db_convert.h"
|
||||
#include "dbCaPvt.h"
|
||||
#include "dbCa.h"
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbCaTest.h"
|
||||
|
||||
long dbcar(char *precordname,int level)
|
||||
long epicsShareAPI dbcar(char *precordname,int level)
|
||||
{
|
||||
DBENTRY dbentry;
|
||||
DBENTRY *pdbentry=&dbentry;
|
||||
29
src/db/dbCaTest.h
Normal file
29
src/db/dbCaTest.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/* dbCaTest.h */
|
||||
|
||||
/* Author: Marty Kraimer Date: 25FEB2000 */
|
||||
/*****************************************************************
|
||||
COPYRIGHT NOTIFICATION
|
||||
*****************************************************************
|
||||
|
||||
(C) COPYRIGHT 1993 UNIVERSITY OF CHICAGO
|
||||
|
||||
This software was developed under a United States Government license
|
||||
described on the COPYRIGHT_UniversityOfChicago file included as part
|
||||
of this distribution.
|
||||
**********************************************************************/
|
||||
#ifndef INCdbTesth
|
||||
#define INCdbTesth 1
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc long epicsShareAPI dbcar(char *recordname,int level);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*INCdbTesth */
|
||||
Reference in New Issue
Block a user