separate pvAdapter definitions from cadef
This commit is contained in:
@@ -13,6 +13,7 @@ INC += caerr.h
|
||||
INC += caeventmask.h
|
||||
INC += caProto.h
|
||||
INC += db_access.h
|
||||
INC += pvAdapter.h
|
||||
|
||||
#LIBSRCS += caOsDependent.c
|
||||
LIBSRCS += access.cpp
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "caerr.h"
|
||||
#include "db_access.h"
|
||||
#include "caeventmask.h"
|
||||
#include "pvAdapter.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -924,39 +925,6 @@ epicsShareFunc int epicsShareAPI ca_replace_printf_handler (
|
||||
epicsShareFunc unsigned epicsShareAPI ca_get_ioc_connection_count (void);
|
||||
epicsShareFunc unsigned epicsShareAPI ca_search_attempts (chid chan);
|
||||
|
||||
/*
|
||||
* Warning - this is an temporary CA client API
|
||||
* which will probably vanish in the future.
|
||||
*/
|
||||
typedef void * pvId;
|
||||
typedef void * putNotifyId;
|
||||
struct db_field_log;
|
||||
struct putNotify;
|
||||
typedef struct pvAdapter {
|
||||
pvId (*p_pvNameToId) (const char *pname);
|
||||
int (*p_pvPutField) (pvId, int src_type,
|
||||
const void *psrc, int no_elements);
|
||||
int (*p_pvGetField) (pvId, int dest_type,
|
||||
void *pdest, int no_elements, void *pfl);
|
||||
long (*p_pvPutNotifyInitiate) (pvId, unsigned type, unsigned long count,
|
||||
const void *pValue, void (*callback)(void *), void *usrPvt, putNotifyId * pID);
|
||||
void (*p_pvPutNotifyDestroy) (putNotifyId);
|
||||
const char * (*p_pvName) (pvId);
|
||||
unsigned long (*p_pvNoElements) (pvId);
|
||||
short (*p_pvType) (pvId);
|
||||
void * (*p_pvEventQueueInit) (void);
|
||||
int (*p_pvEventQueueStart) (void *, const char *taskname,
|
||||
void (*init_func)(void *), void *init_func_arg, int priority_offset);
|
||||
void (*p_pvEventQueueClose) (void *);
|
||||
int (*p_pvEventQueuePostSingleEvent) (void *es);
|
||||
void * (*p_pvEventQueueAddEvent) (void *ctx, pvId id,
|
||||
void (*user_sub)(void *usrArg, pvId id, int eventsRemaining, struct db_field_log *),
|
||||
void *user_arg, unsigned select);
|
||||
void (*p_pvEventQueueCancelEvent) (void *es);
|
||||
int (*p_pvEventQueueAddExtraLaborEvent) (void *, void (*func)(void *), void *arg);
|
||||
int (*p_pvEventQueuePostExtraLabor) (void *ctx);
|
||||
} pvAdapter;
|
||||
epicsShareFunc void * epicsShareAPI ca_create_context (pvAdapter *pAdapter);
|
||||
|
||||
/*
|
||||
* used when an auxillary thread needs to join a CA client context started
|
||||
|
||||
57
src/ca/pvAdapter.h
Normal file
57
src/ca/pvAdapter.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* pvAdapter.h */
|
||||
/* broken out of cadef.h so that new database access can include it*/
|
||||
#ifndef INCLpvAdapterh
|
||||
#define INCLpvAdapterh
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Warning - this is an temporary CA client API
|
||||
* which will probably vanish in the future.
|
||||
*/
|
||||
typedef void * pvId;
|
||||
typedef void * putNotifyId;
|
||||
struct db_field_log;
|
||||
struct putNotify;
|
||||
typedef void (*putNotifyCallback)(void *);
|
||||
typedef void (*eventQueueInit)(void *);
|
||||
typedef void (*eventQueueEventUser)
|
||||
(void *usrArg, pvId id, int eventsRemaining, struct db_field_log *);
|
||||
typedef void (*eventQueueExtraLaborUser)(void *);
|
||||
typedef struct pvAdapter {
|
||||
pvId (*p_pvNameToId) (const char *pname);
|
||||
int (*p_pvPutField) (pvId, int src_type,
|
||||
const void *psrc, int no_elements);
|
||||
int (*p_pvGetField) (pvId, int dest_type,
|
||||
void *pdest, int no_elements, void *pfl);
|
||||
long (*p_pvPutNotifyInitiate) (pvId, unsigned type, unsigned long count,
|
||||
const void *pValue, putNotifyCallback, void *usrPvt, putNotifyId * pID);
|
||||
void (*p_pvPutNotifyDestroy) (putNotifyId);
|
||||
const char * (*p_pvName) (pvId);
|
||||
unsigned long (*p_pvNoElements) (pvId);
|
||||
short (*p_pvType) (pvId);
|
||||
void * (*p_pvEventQueueInit) (void);
|
||||
int (*p_pvEventQueueStart) (void *, const char *taskname,
|
||||
eventQueueInit, void *init_func_arg, int priority_offset);
|
||||
void (*p_pvEventQueueClose) (void *);
|
||||
int (*p_pvEventQueuePostSingleEvent) (void *es);
|
||||
void * (*p_pvEventQueueAddEvent) (void *ctx, pvId id,
|
||||
eventQueueEventUser, void *user_arg, unsigned select);
|
||||
void (*p_pvEventQueueCancelEvent) (void *es);
|
||||
int (*p_pvEventQueueAddExtraLaborEvent) (void *,
|
||||
eventQueueExtraLaborUser, void *arg);
|
||||
int (*p_pvEventQueuePostExtraLabor) (void *ctx);
|
||||
} pvAdapter;
|
||||
|
||||
epicsShareFunc void * epicsShareAPI ca_create_context (pvAdapter *pAdapter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* no additions below this endif
|
||||
*/
|
||||
#endif /* INCLpvAdapterh */
|
||||
Reference in New Issue
Block a user