diff --git a/src/include/Makefile b/src/include/Makefile deleted file mode 100644 index d2fe03020..000000000 --- a/src/include/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -TOP=../.. - -include $(TOP)/configure/CONFIG - -INC += dbDefs.h -INC += epicsTypes.h -INC += epicsVersion.h -INC += gsd_sync_defs.h -INC += shareLib.h -#INC += createSoftLinks.sh -#INC += osiMutexNOOP.h -INC += unixFileName.h - -INC += devSup.h -INC += drvSup.h -INC += caeventmask.h -INC += asLib.h -INC += registryDeviceSupport.h -INC += registryDriverSupport.h -INC += registryRecordType.h -INC += cadef.h -INC += caerr.h -INC += asDbLib.h - - -INC += osiFileName.h -INC += osiSock.h - -include $(TOP)/configure/RULES - -# This seems to be handled wrong by gnumake: -# epicsVersion.h is rebuild in any case, -# no matter what date ...CONFIG_BASE_VERSION has -epicsVersion.h: $(TOP)/configure/CONFIG_BASE_VERSION - $(PERL) ../makeEpicsVersion.pl $(TOP)/configure/CONFIG_BASE_VERSION diff --git a/src/include/asDbLib.h b/src/include/asDbLib.h deleted file mode 100644 index 11699d864..000000000 --- a/src/include/asDbLib.h +++ /dev/null @@ -1,44 +0,0 @@ -/* share/epicsH/dbAsLib.h */ -/* $Id$ */ -/* Author: Marty Kraimer Date: 02-23-94*/ -/***************************************************************** - 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. -**********************************************************************/ - -/* - * Modification Log: - * ----------------- - * .01 02-23-94 mrk Initial Implementation - */ - -#ifndef INCdbAsLibh -#define INCdbAsLibh -#include -#include - -typedef struct { - CALLBACK callback; - long status; -} ASDBCALLBACK; - -int asSetFilename(char *acf); -int asSetSubstitutions(char *substitutions); -int asInitAsyn(ASDBCALLBACK *pcallback); -int asDbGetAsl( void *paddr); -ASMEMBERPVT asDbGetMemberPvt( void *paddr); -int asdbdump( void); -int aspuag(char *uagname); -int asphag(char *hagname); -int asprules(char *asgname); -int aspmem(char *asgname,int clients); -void asCaStart(void); -void asCaStop(void); - -#endif /*INCdbAsLibh*/ diff --git a/src/include/asLib.h b/src/include/asLib.h deleted file mode 100644 index e9f53ebc4..000000000 --- a/src/include/asLib.h +++ /dev/null @@ -1,195 +0,0 @@ -/* $Id$ */ -/* Author: Marty Kraimer Date: 09-27-93*/ -/***************************************************************** - 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. -**********************************************************************/ - -/* - * Modification Log: - * ----------------- - * .01 09-27-93 mrk Initial Implementation - */ -#ifndef INCasLibh -#define INCasLibh - -#include -#include -#include -#include -#include - -typedef struct asgMember *ASMEMBERPVT; -typedef struct asgClient *ASCLIENTPVT; -typedef int (*ASINPUTFUNCPTR)(char *buf,int max_size); -typedef enum{ - asClientCOAR /*Change of access rights*/ - /*For now this is all*/ -} asClientStatus; - -typedef void (*ASCLIENTCALLBACK) (ASCLIENTPVT,asClientStatus); -/* The following routines are macros with the following syntax -long asCheckGet(ASCLIENTPVT asClientPvt); -long asCheckPut(ASCLIENTPVT asClientPvt); -*/ -#define asCheckGet(asClientPvt)\ - (asActive ?\ - ((asClientPvt)->access>=asREAD ? TRUE : FALSE)\ - : TRUE) -#define asCheckPut(asClientPvt)\ - (asActive ?\ - ((asClientPvt)->access>=asWRITE ? TRUE : FALSE)\ - : TRUE) - -epicsShareFunc int epicsShareAPI asInit(void); -epicsShareFunc long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction); -epicsShareFunc long epicsShareAPI asInitFile(const char *filename,const char *substitutions); -epicsShareFunc long epicsShareAPI asInitFP(FILE *fp,const char *substitutions); -/*caller must provide permanent storage for asgName*/ -epicsShareFunc long epicsShareAPI asAddMember(ASMEMBERPVT *asMemberPvt,char *asgName); -epicsShareFunc long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt); -/*caller must provide permanent storage for newAsgName*/ -epicsShareFunc long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,char *newAsgName); -epicsShareFunc void * epicsShareAPI asGetMemberPvt(ASMEMBERPVT asMemberPvt); -epicsShareFunc void epicsShareAPI asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt); -/*client must provide permanent storage for user and host*/ -epicsShareFunc long epicsShareAPI asAddClient(ASCLIENTPVT *asClientPvt,ASMEMBERPVT asMemberPvt, - int asl,char *user,char *host); -/*client must provide permanent storage for user and host*/ -epicsShareFunc long epicsShareAPI asChangeClient(ASCLIENTPVT asClientPvt,int asl,char *user,char *host); -epicsShareFunc long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt); -epicsShareFunc void * epicsShareAPI asGetClientPvt(ASCLIENTPVT asClientPvt); -epicsShareFunc void epicsShareAPI asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt); -epicsShareFunc long epicsShareAPI asRegisterClientCallback(ASCLIENTPVT asClientPvt, - ASCLIENTCALLBACK pcallback); -epicsShareFunc long epicsShareAPI asComputeAllAsg(void); -/* following declared below after ASG is declared -epicsShareFunc long epicsShareAPI asComputeAsg(ASG *pasg); -*/ -epicsShareFunc long epicsShareAPI asCompute(ASCLIENTPVT asClientPvt); -epicsShareFunc int epicsShareAPI asDump(void (*memcallback)(ASMEMBERPVT), - void (*clientcallback)(ASCLIENTPVT),int verbose); -epicsShareFunc int epicsShareAPI asDumpUag(char *uagname); -epicsShareFunc int epicsShareAPI asDumpHag(char *hagname); -epicsShareFunc int epicsShareAPI asDumpRules(char *asgname); -epicsShareFunc int epicsShareAPI asDumpMem(char *asgname,void (*memcallback)(ASMEMBERPVT),int clients); -epicsShareFunc int epicsShareAPI asDumpHash(void); - -#define S_asLib_clientsExist (M_asLib| 1) /*Client Exists*/ -#define S_asLib_noUag (M_asLib| 2) /*User Access Group does not exist*/ -#define S_asLib_noHag (M_asLib| 3) /*Host Access Group does not exist*/ -#define S_asLib_noAccess (M_asLib| 4) /*access security: no access allowed*/ -#define S_asLib_noModify (M_asLib| 5) /*access security: no modification allowed*/ -#define S_asLib_badConfig (M_asLib| 6) /*access security: bad configuration file*/ -#define S_asLib_badCalc (M_asLib| 7) /*access security: bad calculation espression*/ -#define S_asLib_dupAsg (M_asLib| 8) /*Duplicate Access Security Group */ -#define S_asLib_InitFailed (M_asLib| 9) /*access security: Init failed*/ -#define S_asLib_asNotActive (M_asLib|10) /*access security is not active*/ -#define S_asLib_badMember (M_asLib|11) /*access security: bad ASMEMBERPVT*/ -#define S_asLib_badClient (M_asLib|12) /*access security: bad ASCLIENTPVT*/ -#define S_asLib_badAsg (M_asLib|13) /*access security: bad ASG*/ -#define S_asLib_noMemory (M_asLib|14) /*access security: no Memory */ - -/*Private declarations */ -#define ASMAXINP 12 -epicsShareExtern int asActive; - -/* definition of access rights*/ -typedef enum{asNOACCESS,asREAD,asWRITE} asAccessRights; - -/*Base pointers for access security*/ -typedef struct asBase{ - ELLLIST uagList; - ELLLIST hagList; - ELLLIST asgList; - void *phash; -} ASBASE; -epicsShareExtern volatile ASBASE *pasbase; - -/*Defs for User Access Groups*/ -typedef struct{ - ELLNODE node; - char *user; -} UAGNAME; -typedef struct uag{ - ELLNODE node; - char *name; - ELLLIST list; /*list of UAGNAME*/ -} UAG; -/*Defs for Host Access Groups*/ -typedef struct{ - ELLNODE node; - char *host; -} HAGNAME; -typedef struct hag{ - ELLNODE node; - char *name; - ELLLIST list; /*list of HAGNAME*/ -} HAG; -/*Defs for Access SecurityGroups*/ -typedef struct { - ELLNODE node; - UAG *puag; -}ASGUAG; -typedef struct { - ELLNODE node; - HAG *phag; -}ASGHAG; -typedef struct{ - ELLNODE node; - asAccessRights access; - int level; - int inpUsed; /*mask for which inputs are used*/ - int result; /*Result of calc converted to TRUE/FALSE*/ - char *calc; - void *rpcl; - ELLLIST uagList; /*List of ASGUAG*/ - ELLLIST hagList; /*List of ASGHAG*/ -} ASGRULE; -typedef struct{ - ELLNODE node; - char *inp; - void *capvt; - struct asg *pasg; - int inpIndex; -}ASGINP; - -typedef struct asg{ - ELLNODE node; - char *name; - ELLLIST inpList; - ELLLIST ruleList; - ELLLIST memberList; - double *pavalue; /*pointer to array of input values*/ - int inpBad; /*mask for which inputs are bad*/ - int inpChanged; /*mask showing inputs that have changed*/ -} ASG; -typedef struct asgMember { - ELLNODE node; - ASG *pasg; - ELLLIST clientList; - char *asgName; - void *userPvt; -} ASGMEMBER; -typedef struct asgClient { - ELLNODE node; - ASGMEMBER *pasgMember; - char *user; - char *host; - void *userPvt; - ASCLIENTCALLBACK pcallback; - int level; - asAccessRights access; -} ASGCLIENT; - -epicsShareFunc long epicsShareAPI asComputeAsg(ASG *pasg); -/*following is "friend" function*/ -epicsShareFunc void * epicsShareAPI asCalloc(size_t nobj,size_t size); - -#endif /*INCasLibh*/ diff --git a/src/include/cadef.h b/src/include/cadef.h deleted file mode 100644 index 08960b946..000000000 --- a/src/include/cadef.h +++ /dev/null @@ -1,1164 +0,0 @@ -/************************************************************************/ -/* */ -/* L O S A L A M O S */ -/* Los Alamos National Laboratory */ -/* Los Alamos, New Mexico 87545 */ -/* */ -/* Copyright, 1986, The Regents of the University of California. */ -/* Author Jeffrey O. Hill */ -/* hill@atdiv.lanl.gov */ -/* 505 665 1831 */ -/* */ -/* */ -/* History */ -/* ------- */ -/* */ -/* Date Person Comments */ -/* ---- ------ -------- */ -/* 08xx87 joh Init Release */ -/* 031290 joh Added db_access auto include */ -/* 031991 joh fixed SEVCHK dbl function call when status */ -/* returned indicates unsuccessful completion */ -/* 060591 joh delinting */ -/* 091691 joh exported channel state */ -/* 060392 joh added ca host name MACRO */ -/* 072792 joh added ca_test_io() decl */ -/* 072792 joh changed compile time flag from VAXC to STDC */ -/* so the function prototypes can be used by */ -/* other compilers */ -/* 072892 joh added function prototype for host name function */ -/* 101692 joh use unique name for var in SEVCHK to avoid */ -/* clashing with application */ -/* 120492 joh turn off VAXC ca_real reduction from double to */ -/* float. This was originally provided to ease */ -/* integration of the VAX FORTRAN based pt_shell */ -/* code which will in all likelyhood no longer */ -/* be used. */ -/* 120992 joh converted to dll list routines */ -/* 061193 joh added missing prototype for ca_clear_channel() */ -/* and others */ -/* 080593 rcz converted to ell list routines */ -/* 090893 joh added client id to channel in use block */ -/* 010694 joh added put callback rtn and synch group rtns */ -/* 090194 joh support C++ */ -/* 101194 joh merged NT changes */ -/* */ -/*_begin */ -/************************************************************************/ -/* */ -/* Title: GTA high level channel access routines C */ -/* function prototypes */ -/* File: cadef.h */ -/* Environment: Architecture independent */ -/* ( Current ports ) */ -/* VAXC, VMS V4.6 */ -/* SUNC, BSD UNIX V4.3 */ -/* SUNC, vxWorks */ -/* */ -/* */ -/* Purpose */ -/* ------- */ -/* */ -/* GTACS universal remote access library function prototypes. */ -/* ( C default argument passing mechanisms ) */ -/* */ -/* Special comments */ -/* ------- -------- */ -/* "ca_" is the standard prefix for the "channel access" library */ -/* function names. */ -/* */ -/* */ -/************************************************************************/ -/*_end */ - -#ifndef INCLcadefh -#define INCLcadefh - -/* - * done in two ifdef steps so that we will remain compatible with - * traditional C - */ -#ifdef __cplusplus -extern "C" { -#define CAC_ANSI_FUNC_PROTO -#endif -#ifdef __STDC__ -#define CAC_ANSI_FUNC_PROTO -#endif - -#include "shareLib.h" - - -#ifndef HDRVERSIONID -# define HDRVERSIONID(NAME,VERS) -#endif /*HDRVERSIONID*/ - -HDRVERSIONID(cadefh, "@(#) $Id$") - -/* - * auto include of all stuff that cadef.h uses - */ - -/* - * use two ifdef's for trad C compatibility - */ -#ifndef CA_DONT_INCLUDE_STDARGH -#ifdef CAC_ANSI_FUNC_PROTO -#include -#endif -#endif - -#ifndef INCLdb_accessh -#include "db_access.h" -#endif /* INCLdb_accessh */ - -#ifndef INCLcaerrh -#include "caerr.h" -#endif /* INCLcaerrh */ - -#ifndef INCLcaeventmaskh -#include "caeventmask.h" -#endif /* INCLcaeventmaskh */ - -#ifndef INCLellLibh -#include "ellLib.h" -#endif /* INCLellLibh */ - -/* - * - * NOTE: the channel in use fields type, count, name, and - * host name are available to applications. However it is - * recommended that the following MACROS be used to access them. - * - */ -#define ca_field_type(CHID) (ca_get_field_type(CHID)) -#define ca_element_count(CHID) (ca_get_element_count(CHID)) -#define ca_name(CHID) ((READONLY char *)((CHID)+1)) -/* - * the odd cast here removes const (and allows past practice - * of using ca_puser(CHID) as an lvalue). - */ -#define ca_puser(CHID) (*(void **)&((CHID)->puser)) -/* - * here is the preferred way to load the puser ptr associated with - * channel (the cast removes const) - */ -#define ca_set_puser(CHID,PUSER) ((CHID)->puser=(READONLY void *)(PUSER)) -#define ca_host_name(CHID) ca_host_name_function(CHID) -#define ca_read_access(CHID) ((CHID)->ar.read_access) -#define ca_write_access(CHID) ((CHID)->ar.write_access) - -/* - * cs_ - `channel state' - * - * cs_never_conn valid chid, IOC not found - * cs_prev_conn valid chid, IOC was found, but unavailable - * cs_conn valid chid, IOC was found, still available - * cs_closed invalid chid - */ -enum channel_state{cs_never_conn, cs_prev_conn, cs_conn, cs_closed}; -#define ca_state(CHID) ((CHID)->state) - -typedef struct ca_access_rights{ - unsigned read_access:1; - unsigned write_access:1; -}caar; - - -/* Format for the arguments to user connection handlers */ -struct channel_in_use; -struct connection_handler_args{ - struct channel_in_use *chid; /* Channel id */ - long op; /* External codes for CA op */ -}; - -#ifdef CAC_ANSI_FUNC_PROTO -typedef void caCh(struct connection_handler_args args); -#else /*CAC_ANSI_FUNC_PROTO*/ -typedef void caCh(); -#endif /*CAC_ANSI_FUNC_PROTO*/ - -/* Format for the arguments to user access rights handlers */ -struct access_rights_handler_args{ - struct channel_in_use *chid; /* Channel id */ - caar ar; /* New access rights state */ -}; - -#ifdef CAC_ANSI_FUNC_PROTO -typedef void caArh(struct access_rights_handler_args args); -#else /*CAC_ANSI_FUNC_PROTO*/ -typedef void caArh(); -#endif /*CAC_ANSI_FUNC_PROTO*/ - -/* - * The fields in this structure may change or even vanish in the future. - * Please use the macros above to access the information in this structure. - */ -struct channel_in_use{ - ELLNODE node; /* list ptrs */ - short privType; /* database field type */ -#define TYPENOTCONN (-1) /* the type when disconnected */ - unsigned short privCount; /* array element count */ - union{ - unsigned sid; /* server id */ - struct dbAddr *paddr; /* database address */ - } id; - READONLY void *puser; /* user available area */ - short state; /* connected/ disconnected etc */ - unsigned short retrySeqNo; /* search retry seq number */ - caar ar; /* access rights */ - - - caCh *pConnFunc; - caArh *pAccessRightsFunc; - ELLLIST eventq; - unsigned cid; /* client id */ - unsigned retry; /* search retry number */ - void *piiu; /* private ioc in use block */ -#ifdef iocCore - void *ppn; /* ptr to optional put notify blk */ -#endif /* iocCore */ - unsigned claimPending:1; /* claim msg was sent if T */ - /* - * channel name stored directly after this structure in a - * null terminated string. - */ -}; - -typedef struct channel_in_use *chid; -typedef long chtype; -typedef struct pending_event *evid; -typedef double ca_real; - -/* The conversion routine to call for each type */ -#define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE) - - -/* - * Arguments passed to event handlers and get/put call back handlers. - * - * The status field below is the CA ECA_XXX status of the requested - * operation which is saved from when the operation was attempted in the - * server and copied back to the clients call back routine. - * If the status is not ECA_NORMAL then the dbr pointer will be NULL - * and the requested operation can not be assumed to be successful. - */ -typedef struct event_handler_args{ - void *usr; /* User argument supplied when event added */ - struct channel_in_use - *chid; /* Channel id */ - long type; /* the type of the value returned */ - long count; /* the element count of the item returned */ - READONLY void *dbr; /* Pointer to the value returned */ - int status; /* ECA_XXX Status of the requested op from server */ -}evargs; - -struct pending_event{ - ELLNODE node; /* list ptrs */ -#ifdef CAC_ANSI_FUNC_PROTO - void (*usr_func)(struct event_handler_args args); -#else /*CAC_ANSI_FUNC_PROTO*/ - void (*usr_func)(); -#endif /*CAC_ANSI_FUNC_PROTO*/ - READONLY void *usr_arg; - chid chan; - chtype type; /* requested type for local CA */ - unsigned long count; /* requested count for local CA */ - /* - * the following provide for reissuing a - * disconnected monitor - */ - ca_real p_delta; - ca_real n_delta; - ca_real timeout; - unsigned id; - unsigned short mask; -}; - -epicsShareFunc void epicsShareAPI ca_test_event - ( -#ifdef CAC_ANSI_FUNC_PROTO - struct event_handler_args -#endif /*CAC_ANSI_FUNC_PROTO*/ - ); - -/* Format for the arguments to user exception handlers */ -struct exception_handler_args{ - void *usr; /* User argument supplied when event added */ - struct channel_in_use - *chid; /* Channel id (may be NULL) */ - long type; /* Requested type for the operation */ - long count; /* Requested count for the operation */ - void *addr; /* User's address to write results of CA_OP_GET */ - long stat; /* Channel access std status code */ - long op; /* External codes for channel access operations */ - READONLY char *ctx; /* A character string containing context info */ - READONLY char *pFile; /* source file name (may be NULL) */ - unsigned lineNo; /* source file line number */ -}; - -typedef unsigned CA_SYNC_GID; - -/* - * - * External OP codes for CA operations - * - */ -#define CA_OP_GET 0 -#define CA_OP_PUT 1 -#define CA_OP_SEARCH 2 -#define CA_OP_ADD_EVENT 3 -#define CA_OP_CLEAR_EVENT 4 -#define CA_OP_OTHER 5 -#define CA_OP_CONN_UP 6 -#define CA_OP_CONN_DOWN 7 - -/* - * provides efficient test and display of channel access errors - */ -#define SEVCHK(CA_ERROR_CODE, MESSAGE_STRING) \ -{ \ - int ca_unique_status_name = (CA_ERROR_CODE); \ - if(!(ca_unique_status_name & CA_M_SUCCESS)) \ - ca_signal_with_file_and_lineno( \ - ca_unique_status_name, \ - (MESSAGE_STRING), \ - __FILE__, \ - __LINE__); \ -} - -#ifdef CAC_ANSI_FUNC_PROTO - -epicsShareFunc short epicsShareAPI ca_get_field_type (chid chan); -epicsShareFunc unsigned short epicsShareAPI ca_get_element_count (chid chan); - -/************************************************************************/ -/* Perform Library Initialization */ -/* */ -/* Must be called once before calling any of the other routines */ -/************************************************************************/ -epicsShareFunc int epicsShareAPI ca_task_initialize (void); - - -/************************************************************************/ -/* Remove CA facility from your task */ -/* */ -/* Normally called automatically at task exit */ -/************************************************************************/ -epicsShareFunc int epicsShareAPI ca_task_exit (void); - -/************************************************************************ - * anachronistic entry points * - * **** Fetching a value while searching no longer supported**** * - ************************************************************************/ -#define ca_build_channel(NAME,XXXXX,CHIDPTR,YYYYY)\ -ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) - -#define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ -ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) - - -/************************************************************************/ -/* Return a channel identification for the supplied channel name */ -/* (and attempt to create a virtual circuit) */ -/************************************************************************/ - -/* - * ca_search() - * - * a preferred search request API - * - * pChanName R channel name string - * pChanID RW channel id written here - */ -#define ca_search(pChanName, pChanID)\ -ca_search_and_connect(pChanName, pChanID, 0, 0) - - -/* - * ca_search_and_connect() - * - * a preferred search request API - * - * pChanName R channel name string - * pChanID RW channel id written here - * pFunc R address of connection call-back function - * pArg R placed in the channel's puser field - * (fetched later by ca_puser(CHID)) - * (passed as void * arg to (*pFunc)() above) - */ -epicsShareFunc int epicsShareAPI ca_search_and_connect -( - READONLY char *pChanName, - chid *pChanID, - void (*pFunc)(struct connection_handler_args), - READONLY void *pArg -); - -/* - * anachronistic entry point - * **** Fetching a value while searching no longer supported **** - * - * pChanName R channel name string - * pChanID RW channel id written here - * pFunc R address of connection call-back function - * pArg R placed in the channel's puser field - * (fetched later by ca_puser(CHID)) - * (passed as void * arg to (*pFunc)() above) - */ -epicsShareFunc int epicsShareAPI ca_build_and_connect -( - READONLY char *pChanName, - chtype, /* pass TYPENOTCONN */ - unsigned long, /* pass 0 */ - chid *pChanID, - void *, /* pass NULL */ - void (*pFunc)(struct connection_handler_args), - void *pArg -); - -/* - * ca_change_connection_event() - * - * chan R channel identifier - * pfunc R address of connection call-back function - */ -epicsShareFunc int epicsShareAPI ca_change_connection_event -( - chid chan, - void (*pfunc)(struct connection_handler_args) -); - -/* - * ca_replace_access_rights_event () - * - * chan R channel identifier - * pfunc R address of access rights call-back function - */ -epicsShareFunc int epicsShareAPI ca_replace_access_rights_event( - chid chan, - void (*pfunc)(struct access_rights_handler_args) -); - -/* - * ca_add_exception_event () - * - * replace the default exception handler - * - * pfunc R address of exception call-back function - * pArg R copy of this pointer passed to exception - * call-back function - */ -epicsShareFunc int epicsShareAPI ca_add_exception_event -( - void (*pfunc) (struct exception_handler_args), - READONLY void *pArg -); - -/* - * ca_clear_channel() - * - deallocate resources reserved for a channel - * - * chanId R channel ID - */ -epicsShareFunc int epicsShareAPI ca_clear_channel -( - chid chanId -); - -/************************************************************************/ -/* Write a value to a channel */ -/************************************************************************/ -/* - * ca_bput() - * - * WARNING: this copies the new value from a string (dbr_string_t) - * (and not as an integer) - * - * chan R channel identifier - * pValue R new channel value string copied from this location - */ -#define ca_bput(chan, pValue) \ -ca_array_put(DBR_STRING, 1u, chan, (READONLY dbr_string_t *) (pValue)) - -/* - * ca_rput() - * - * WARNING: this copies the new value from a dbr_float_t - * - * chan R channel identifier - * pValue R new channel value copied from this location - */ -#define ca_rput(chan,pValue) \ -ca_array_put(DBR_FLOAT, 1u, chan, (READONLY dbr_float_t *) pValue) - -/* - * ca_put() - * - * type R data type from db_access.h - * chan R channel identifier - * pValue R new channel value copied from this location - */ -#define ca_put(type, chan, pValue) ca_array_put(type, 1u, chan, pValue) - -/* - * ca_array_put() - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pValue R new channel value copied from this location - */ -epicsShareFunc int epicsShareAPI ca_array_put -( - chtype type, - unsigned long count, - chid chanId, - READONLY void *pValue -); - -/* - * ca_array_put_callback() - * - * This routine functions identically to the original ca put request - * with the addition of a callback to the user supplied function - * after recod processing completes in the IOC. The arguments - * to the user supplied callback function are declared in - * the structure event_handler_args and include the pointer - * sized user argument supplied when ca_array_put_callback() is called. - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pValue R new channel value copied from this location - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - */ -epicsShareFunc int epicsShareAPI ca_array_put_callback -( - chtype type, - unsigned long count, - chid chanId, - READONLY void *pValue, - void (*pFunc)(struct event_handler_args), - READONLY void *pArg -); - -#define ca_put_callback(type, chan, pValue, pFunc, pArg) \ - ca_array_put_callback(type, 1u, chan, pValue, pFunc, pArg) - -/************************************************************************/ -/* Read a value from a channel */ -/************************************************************************/ - -/* - * ca_bget() - * - * WARNING: this copies the new value into a string (dbr_string_t) - * (and not into an integer) - * - * chan R channel identifier - * pValue W channel value copied to this location - */ -#define ca_bget(chan, pValue) \ -ca_array_get(DBR_STRING, 1u, chan, (dbr_string_t *)(pValue)) - -/* - * ca_rget() - * - * WARNING: this copies the new value into a 32 bit float (dbr_float_t) - * - * chan R channel identifier - * pValue W channel value copied to this location - */ -#define ca_rget(chan, pValue) \ -ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) - -/* - * ca_rget() - * - * type R data type from db_access.h - * chan R channel identifier - * pValue W channel value copied to this location - */ -#define ca_get(type, chan, pValue) ca_array_get(type, 1u, chan, pValue) - -/* - * ca_array_get() - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pValue W channel value copied to this location - */ -epicsShareFunc int epicsShareAPI ca_array_get -( - chtype type, - unsigned long count, - chid chanId, - void *pValue -); - -/************************************************************************/ -/* Read a value from a channel and run a callback when the value */ -/* returns */ -/* */ -/* */ -/************************************************************************/ -/* - * ca_bget_callback() - * - * WARNING: this returns the new value as a string (dbr_string_t) - * (and not as an integer) - * - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - */ -#define ca_bget_callback(chan, pFunc, pArg)\ -ca_array_get_callback(DBR_STRING, 1u, chan, pFunc, pArg) - -/* - * ca_rget_callback() - * - * WARNING: this returns the new value as a float (dbr_float_t) - * - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - */ -#define ca_rget_callback(chan, pFunc, pArg)\ -ca_array_get_callback(DBR_FLOAT, 1u, chan, pFunc, pArg) - -/* - * ca_get_callback() - * - * type R data type from db_access.h - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - */ -#define ca_get_callback(type, chan, pFunc, pArg)\ -ca_array_get_callback(type, 1u, chan, pFunc, pArg) - -/* - * ca_array_get_callback() - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - */ -epicsShareFunc int epicsShareAPI ca_array_get_callback -( - chtype type, - unsigned long count, - chid chanId, - void (*pFunc)(struct event_handler_args), - READONLY void *pArg -); - -/************************************************************************/ -/* Specify a function to be executed whenever significant changes */ -/* occur to a channel. */ -/* NOTES: */ -/* 1) Evid may be omited by passing a NULL pointer */ -/* */ -/* 2) An array count of zero specifies the native db count */ -/* */ -/************************************************************************/ - -/* - * ca_add_event () - * - * assumes "delta" info comes from the database or defaults - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - * pEventID W event id written at specified address - */ -#define ca_add_event(type,chan,pFunc,pArg,pEventID)\ -ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) - - -/* Sets both P_DELTA and M_DELTA below to argument DELTA */ -#define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\ - ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,DELTA,DELTA,0.0,EVID) - -#define ca_add_general_event(TYPE,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ -ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID) - -#define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ -ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM) - -/* - * ca_add_masked_array_event () - * - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pFunc R pointer to call-back function - * pArg R copy of this pointer passed to pFunc - * p_delta R not currently used (set to 0.0) - * n_delta R not currently used (set to 0.0) - * timeout R not currently used (set to 0.0) - * pEventID W event id written at specified address - * mask R event mask - one of {DBE_VALUE, DBE_ALARM, DBE_LOG} - */ -epicsShareFunc int epicsShareAPI ca_add_masked_array_event -( - chtype type, - unsigned long count, - chid chanId, - void (*pFunc)(struct event_handler_args), - READONLY void *pArg, - ca_real p_delta, - ca_real n_delta, - ca_real timeout, - evid *pEventID, - long mask -); - -/************************************************************************/ -/* Remove a function from a list of those specified to run */ -/* whenever significant changes occur to a channel */ -/* */ -/************************************************************************/ -/* - * ca_clear_event() - * - * eventID R event id - */ -epicsShareFunc int epicsShareAPI ca_clear_event -( - evid eventID -); - - -/************************************************************************/ -/* */ -/* Requested data is not necessarily stable prior to */ -/* return from called subroutine. Call ca_pend_io() */ -/* to guarantee that requested data is stable. Call the routine */ -/* ca_flush_io() to force all outstanding subroutine calls to be */ -/* sent out over the network. Significant increases in */ -/* performance have been measured when batching several remote */ -/* subroutine calls together into one message. Additional */ -/* improvements can be obtained by performing local processing */ -/* in parallel with outstanding remote processing. */ -/* */ -/* FLOW OF TYPICAL APPLICATION */ -/* */ -/* search() ! Obtain Channel ids */ -/* . ! " */ -/* */ -/* get() ! several requests for remote info */ -/* get() ! " */ -/* add_event() ! " */ -/* get() ! " */ -/* . */ -/* . */ -/* . */ -/* flush_io() ! send get requests */ -/* ! optional parallel processing */ -/* . ! " */ -/* . ! " */ -/* pend_io() ! wait for replies from get requests */ -/* . ! access to requested data */ -/* . ! " */ -/* pend_event() ! wait for requested events */ -/* */ -/************************************************************************/ - -/************************************************************************/ -/* This routine pends waiting for channel events and calls the */ -/* functions specified with add_event when events occur. If the */ -/* timeout is specified as 0 an infinite timeout is assumed. */ -/* if the argument early is specified TRUE then CA_NORMAL is */ -/* returned when outstanding queries complete. Otherwise if the */ -/* argument early is FALSE the routine does not return until the */ -/* entire delay specified by the timeout argument has expired. */ -/* ca_flush_io() is called by this routine. If the argument */ -/* early is TRUE then ca_pend() will return immediately without */ -/* processing outstanding CA labor if no queries are outstanding */ -/************************************************************************/ -#define ca_poll() ca_pend((1e-12), 0/*FALSE*/) -#define ca_pend_event(TIMEOUT) ca_pend((TIMEOUT), 0/*FALSE*/) -#define ca_pend_io(TIMEOUT) ca_pend((TIMEOUT), 1/*TRUE*/) - -/* - * ca_pend() - * - * timeOut R delay in seconds - * early R T: return early if all get requests (or search - * requests with null connection handler pointer - * have completed) - * F: wait for the entire delay to expire - */ -epicsShareFunc int epicsShareAPI ca_pend -( - ca_real timeOut, - int early -); - -/* - * ca_test_io() - * - * returns TRUE when get requests (or search requests with null - * connection handler pointer) are outstanding - */ -epicsShareFunc int epicsShareAPI ca_test_io (void); - -/************************************************************************/ -/* Send out all outstanding messages in the send queue */ -/************************************************************************/ -/* - * ca_flush_io() - */ -epicsShareFunc int epicsShareAPI ca_flush_io (void); - - -/* - * ca_signal() - * - * errorCode R status returned from channel access function - * pCtxStr R context string included with error print out - */ -epicsShareFunc void epicsShareAPI ca_signal -( - long errorCode, - READONLY char *pCtxStr -); - -/* - * ca_signal_with_file_and_lineno() - * errorCode R status returned from channel access function - * pCtxStr R context string included with error print out - * pFileStr R file name string included with error print out - * lineNo R line number included with error print out - * - */ -epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno -( - long errorCode, - READONLY char *pCtxStr, - READONLY char *pFileStr, - int lineNo -); - -/* - * ca_signal_formated() - * errorCode R status returned from channel access function - * pFileStr R file name string included with error print out - * lineNo R line number included with error print out - * pFormat R printf dtyle format string (and optional arguments) - * - */ -epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, - int lineno, const char *pFormat, ...); - -/* - * ca_host_name_function() - * - * channel R channel identifier - */ -epicsShareFunc READONLY char * epicsShareAPI ca_host_name_function ( chid channel); - -/* - * CA_ADD_FD_REGISTRATION - * - * call their function with their argument whenever - * a new fd is added or removed - * (for use with a manager of the select system call under UNIX) - * - * if (opened) then fd was created - * if (!opened) then fd was deleted - * - */ -typedef void CAFDHANDLER(void *parg, int fd, int opened); - -/* - * ca_add_fd_registration() - * - * pHandler R pointer to function which is to be called - * when an fd is created or deleted - * pArg R argument passed to above function - */ -epicsShareFunc int epicsShareAPI ca_add_fd_registration -( - CAFDHANDLER *pHandler, - READONLY void *pArg -); - - -/* - * CA synch groups - * - * This facility will allow the programmer to create - * any number of synchronization groups. The programmer might then - * interleave IO requests within any of the groups. Once The - * IO operations are initiated then the programmer is free to - * block for IO completion within any one of the groups as needed. - */ - -/* - * ca_sg_create() - * - * create a sync group - * - * pgid W pointer to sync group id that will be written - */ -epicsShareFunc int epicsShareAPI ca_sg_create( CA_SYNC_GID * pgid); - -/* - * ca_sg_delete() - * - * delete a sync group - * - * gid R sync group id - */ -epicsShareFunc int epicsShareAPI ca_sg_delete(READONLY CA_SYNC_GID gid); - -/* - * ca_sg_block() - * - * block for IO performed within a sync group to complete - * - * gid R sync group id - * timeout R wait for this duration prior to timing out - * and returning ECA_TIMEOUT - */ -epicsShareFunc int epicsShareAPI ca_sg_block(READONLY CA_SYNC_GID gid, ca_real timeout); - -/* - * ca_sg_test() - * - * test for sync group IO operations in progress - * - * gid R sync group id - * - * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE - */ -epicsShareFunc int epicsShareAPI ca_sg_test(READONLY CA_SYNC_GID gid); - -/* - * ca_sg_reset - * - * gid R sync group id - */ -epicsShareFunc int epicsShareAPI ca_sg_reset(READONLY CA_SYNC_GID gid); - -/* - * ca_sg_array_get() - * - * initiate a get within a sync group - * (essentially a ca_array_get() with a sync group specified) - * - * gid R sync group id - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pValue W channel value copied to this location - */ -epicsShareFunc int epicsShareAPI ca_sg_array_get -( - READONLY CA_SYNC_GID gid, - chtype type, /* TYPE R channel type */ - unsigned long count, - chid chan, - void *pValue -); - -#define ca_sg_get(gid, type, chan, pValue) \ -ca_sg_array_get(gid, type, 1u, chan, pValue) - -/* - * ca_sg_array_put() - * - * initiate a put within a sync group - * (essentially a ca_array_put() with a sync group specified) - * - * gid R sync group id - * type R data type from db_access.h - * count R array element count - * chan R channel identifier - * pValue R new channel value copied from this location - */ -epicsShareFunc int epicsShareAPI ca_sg_array_put -( - READONLY CA_SYNC_GID gid, - chtype type, - unsigned long count, - chid chan, - READONLY void *pValue -); - -#define ca_sg_put(gid, type, chan, pValue) \ -ca_sg_array_put(gid, type, 1u, chan, pValue) - -/* - * ca_sg_stat() - * - * print status of a sync group - * - * gid R sync group id - */ -epicsShareFunc int epicsShareAPI ca_sg_stat(READONLY CA_SYNC_GID gid); - -/* - * ca_modify_user_name() - * - * Modify or override the default - * client user name. - * - * pUserName R new user name string copied from this location - */ -epicsShareFunc int epicsShareAPI ca_modify_user_name(READONLY char *pUserName); - -/* - * CA_MODIFY_HOST_NAME() - * - * Modify or override the default - * client host name. - * - * pHostName R new host name string copied from this location - */ -epicsShareFunc int epicsShareAPI ca_modify_host_name(READONLY char *pHostName); - -/* - * ca_v42_ok() - * - * Put call back is available if the CA server is on version is 4.2 - * or higher. - * - * chan R channel identifier - * - * (returns true or false) - */ -epicsShareFunc int epicsShareAPI ca_v42_ok(chid chan); - -/* - * ca_version() - * - * returns the CA version string - */ -epicsShareFunc READONLY char * epicsShareAPI ca_version(void); - -/* - * ca_replace_printf_handler () - * - * for apps that want to change where ca formatted - * text output goes - * - * use two ifdef's for trad C compatibility - * - * ca_printf_func R pointer to new function called when - * CA prints an error message - */ -#ifndef CA_DONT_INCLUDE_STDARGH -epicsShareFunc int epicsShareAPI ca_replace_printf_handler ( - int (*ca_printf_func)(READONLY char *pformat, va_list args) -); -#endif /*CA_DONT_INCLUDE_STDARGH*/ - -/* - * ca_get_ioc_connection_count() - * - * returns the number of IOC's that CA is connected to - * (for testing purposes only) - */ -epicsShareFunc unsigned epicsShareAPI ca_get_ioc_connection_count (void); - -#else /* CAC_ANSI_FUNC_PROTO */ -epicsShareFunc short epicsShareAPI ca_get_field_type (); -epicsShareFunc unsigned short epicsShareAPI ca_get_element_count (); -epicsShareFunc int epicsShareAPI ca_task_initialize (); -epicsShareFunc int epicsShareAPI ca_task_exit (); -epicsShareFunc int epicsShareAPI ca_search_and_connect (); -epicsShareFunc int epicsShareAPI ca_build_and_connect (); -epicsShareFunc int epicsShareAPI ca_change_connection_event (); -epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (); -epicsShareFunc int epicsShareAPI ca_add_exception_event (); -epicsShareFunc int epicsShareAPI ca_clear_channel (); -epicsShareFunc int epicsShareAPI ca_array_put (); -epicsShareFunc int epicsShareAPI ca_array_put_callback (); -epicsShareFunc int epicsShareAPI ca_array_get (); -epicsShareFunc int epicsShareAPI ca_array_get_callback (); -epicsShareFunc int epicsShareAPI ca_add_masked_array_event (); -epicsShareFunc int epicsShareAPI ca_clear_event (); -epicsShareFunc int epicsShareAPI ca_pend (); -epicsShareFunc int epicsShareAPI ca_test_io (); -epicsShareFunc int epicsShareAPI ca_flush_io (); -epicsShareFunc void epicsShareAPI ca_signal (); -epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno (); -epicsShareFunc void epicsShareAPI ca_signal_formated (); -epicsShareFunc char * epicsShareAPI ca_host_name_function (); -typedef void CAFDHANDLER(); -epicsShareFunc int epicsShareAPI ca_add_fd_registration(); -epicsShareFunc int epicsShareAPI ca_replace_printf_handler (); -epicsShareFunc int epicsShareAPI ca_sg_create(); -epicsShareFunc int epicsShareAPI ca_sg_delete(); -epicsShareFunc int epicsShareAPI ca_sg_block(); -epicsShareFunc int epicsShareAPI ca_sg_test(); -epicsShareFunc int epicsShareAPI ca_sg_reset(); -epicsShareFunc int epicsShareAPI ca_sg_array_get(); -epicsShareFunc int epicsShareAPI ca_sg_array_put(); -epicsShareFunc int epicsShareAPI ca_sg_stat(); -epicsShareFunc int epicsShareAPI ca_modify_user_name(); -epicsShareFunc int epicsShareAPI ca_modify_host_name(); -epicsShareFunc int epicsShareAPI ca_v42_ok(); -epicsShareFunc char * epicsShareAPI ca_version(); -#define ca_build_channel(NAME,XXXXX,CHIDPTR,YYYYY)\ - ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) -#define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ - ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) -#define ca_search(pChanName, pChanID)\ - ca_search_and_connect(pChanName, pChanID, 0, 0) -#define ca_bput(chan, pValue) \ - ca_array_put(DBR_STRING, 1, chan, (READONLY dbr_string_t *) (pValue)) -#define ca_rput(chan,pValue) \ - ca_array_put(DBR_FLOAT, 1, chan, (READONLY dbr_float_t *) pValue) -#define ca_put(type, chan, pValue) ca_array_put(type, 1, chan, pValue) -#define ca_bget(chan, pValue) \ - ca_array_get(DBR_STRING, 1, chan, (dbr_string_t *)(pValue)) -#define ca_rget(chan, pValue) \ - ca_array_get(DBR_FLOAT, 1, chan, (dbr_float_t *)(pValue)) -#define ca_get(type, chan, pValue) ca_array_get(type, 1, chan, pValue) -#define ca_bget_callback(chan, pFunc, pArg)\ - ca_array_get_callback(DBR_STRING, 1, chan, pFunc, pArg) -#define ca_rget_callback(chan, pFunc, pArg)\ - ca_array_get_callback(DBR_FLOAT, 1, chan, pFunc, pArg) -#define ca_get_callback(type, chan, pFunc, pArg)\ - ca_array_get_callback(type, 1, chan, pFunc, pArg) -#define ca_put_callback(type, chan, pValue, pFunc, pArg) \ - ca_array_put_callback(type, 1u, chan, pValue, pFunc, pArg) -#define ca_add_event(type,chan,pFunc,pArg,pEventID)\ - ca_add_array_event(type,1,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) -#define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\ - ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,DELTA,DELTA,0.0,EVID) -#define ca_add_general_event(TYPE,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ - ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID) -#define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ -ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM) -#define ca_poll() ca_pend((1e-12), 0/*FALSE*/) -#define ca_pend_event(TIMEOUT) ca_pend((TIMEOUT), 0/*FALSE*/) -#define ca_pend_io(TIMEOUT) ca_pend((TIMEOUT), 1/*TRUE*/) -#define ca_sg_get(gid, type, chan, pValue) \ -ca_sg_array_get(gid, type, 1u, chan, pValue) -#define ca_sg_put(gid, type, chan, pValue) \ -ca_sg_array_put(gid, type, 1u, chan, pValue) - -#endif /* CAC_ANSI_FUNC_PROTO */ - -#ifdef __cplusplus -} -#endif - -/* - * no additions below this endif - */ -#endif /* INCLcadefh */ diff --git a/src/include/caerr.h b/src/include/caerr.h deleted file mode 100644 index 4adc7cd1b..000000000 --- a/src/include/caerr.h +++ /dev/null @@ -1,235 +0,0 @@ -/************************************************************************/ -/* */ -/* L O S A L A M O S */ -/* Los Alamos National Laboratory */ -/* Los Alamos, New Mexico 87545 */ -/* */ -/* Copyright, 1986, The Regents of the University of California. */ -/* */ -/* Author: Jeffrey O. Hill */ -/* */ -/* History */ -/* ------- */ -/* */ -/* Date Programmer Comments */ -/* ---- ---------- -------- */ -/* 08--87 joh Init Release */ -/* 031290 joh Changed __CAERR__ to INCLcaerrh */ -/* 102990 joh added readonly for VAXC share image */ -/* 032092 joh added ECA_BADMASK */ -/* 072792 joh added ECA_IODONE & ECA_IOINPROGESS */ -/* 102992 joh changed wording on the no vx fp message */ -/* 011494 joh Added ECA_BADSYNCGRP */ -/* 021194 joh Added ECA_PUTCBINPROG */ -/* */ -/*_begin */ -/************************************************************************/ -/* */ -/* Name: */ -/* Title: */ -/* File: */ -/* Environment: VMS, UNIX, VRTX */ -/* Equipment: VAX, SUN, VME */ -/* */ -/* */ -/* Purpose */ -/* ------- */ -/* */ -/* CA error message declaration include file */ -/* */ -/* */ -/* Special comments */ -/* ------- -------- */ -/* */ -/************************************************************************/ -/*_end */ - -#ifndef INCLcaerrh -#define INCLcaerrh - -#include "shareLib.h" -#include "epicsTypes.h" - -#ifndef HDRVERSIONID -# define HDRVERSIONID(NAME,VERS) -#endif /*HDRVERSIONID*/ - -HDRVERSIONID(caerrh, "@(#) $Id$") - -/* CA Status Code Definitions */ - -#define CA_K_INFO 3 /* successful */ -#define CA_K_ERROR 2 /* failed- continue */ -#define CA_K_SUCCESS 1 /* successful */ -#define CA_K_WARNING 0 /* unsuccessful */ -#define CA_K_SEVERE 4 /* failed- quit */ -#define CA_K_FATAL CA_K_ERROR | CA_K_SEVERE - -#define CA_M_MSG_NO 0x0000FFF8 -#define CA_M_SEVERITY 0x00000007 -#define CA_M_LEVEL 0x00000003 -#define CA_M_SUCCESS 0x00000001 -#define CA_M_ERROR 0x00000002 -#define CA_M_SEVERE 0x00000004 - -#define CA_S_MSG_NO 0x0D -#define CA_S_SEVERITY 0x03 - -#define CA_V_MSG_NO 0x03 -#define CA_V_SEVERITY 0x00 -#define CA_V_SUCCESS 0x00 - -/* Define MACROS to extract/insert individual fields from a status value */ - -#define CA_EXTRACT_MSG_NO(code)\ -( ( (code) & CA_M_MSG_NO ) >> CA_V_MSG_NO ) -#define CA_EXTRACT_SEVERITY(code)\ -( ( (code) & CA_M_SEVERITY ) >> CA_V_SEVERITY ) -#define CA_EXTRACT_SUCCESS(code)\ -( ( (code) & CA_M_SUCCESS ) >> CA_V_SUCCESS ) - -#define CA_INSERT_MSG_NO(code)\ -( ((code)<< CA_V_MSG_NO) & CA_M_MSG_NO ) -#define CA_INSERT_SEVERITY(code)\ -( ((code)<< CA_V_SEVERITY)& CA_M_SEVERITY ) -#define CA_INSERT_SUCCESS(code)\ -( ((code)<< CA_V_SUCCESS) & CA_M_SUCCESS ) - - -#define DEFMSG(SEVERITY,NUMBER)\ -(CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY)) - - -#define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) -#define ECA_MAXIOC DEFMSG(CA_K_ERROR, 1) -#define ECA_UKNHOST DEFMSG(CA_K_ERROR, 2) -#define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) -#define ECA_SOCK DEFMSG(CA_K_ERROR, 4) -#define ECA_CONN DEFMSG(CA_K_WARNING, 5) -#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6) -#define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) -#define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) -#define ECA_TOLARGE DEFMSG(CA_K_ERROR, 9) -#define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10) -#define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) -#define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) -#define ECA_DISCONNCHID DEFMSG(CA_K_ERROR, 13) -#define ECA_BADTYPE DEFMSG(CA_K_ERROR, 14) -#define ECA_CHIDNOTFND DEFMSG(CA_K_INFO, 15) -#define ECA_CHIDRETRY DEFMSG(CA_K_INFO, 16) -#define ECA_INTERNAL DEFMSG(CA_K_FATAL, 17) -#define ECA_DBLCLFAIL DEFMSG(CA_K_WARNING, 18) -#define ECA_GETFAIL DEFMSG(CA_K_WARNING, 19) -#define ECA_PUTFAIL DEFMSG(CA_K_WARNING, 20) -#define ECA_ADDFAIL DEFMSG(CA_K_WARNING, 21) -#define ECA_BADCOUNT DEFMSG(CA_K_WARNING, 22) -#define ECA_BADSTR DEFMSG(CA_K_ERROR, 23) -#define ECA_DISCONN DEFMSG(CA_K_WARNING, 24) -#define ECA_DBLCHNL DEFMSG(CA_K_WARNING, 25) -#define ECA_EVDISALLOW DEFMSG(CA_K_ERROR, 26) -#define ECA_BUILDGET DEFMSG(CA_K_WARNING, 27) -#define ECA_NEEDSFP DEFMSG(CA_K_WARNING, 28) -#define ECA_OVEVFAIL DEFMSG(CA_K_WARNING, 29) -#define ECA_BADMONID DEFMSG(CA_K_ERROR, 30) -#define ECA_NEWADDR DEFMSG(CA_K_WARNING, 31) -#define ECA_NEWCONN DEFMSG(CA_K_INFO, 32) -#define ECA_NOCACTX DEFMSG(CA_K_WARNING, 33) -#define ECA_DEFUNCT DEFMSG(CA_K_FATAL, 34) -#define ECA_EMPTYSTR DEFMSG(CA_K_WARNING, 35) -#define ECA_NOREPEATER DEFMSG(CA_K_WARNING, 36) -#define ECA_NOCHANMSG DEFMSG(CA_K_WARNING, 37) -#define ECA_DLCKREST DEFMSG(CA_K_WARNING, 38) -#define ECA_SERVBEHIND DEFMSG(CA_K_WARNING, 39) -#define ECA_NOCAST DEFMSG(CA_K_WARNING, 40) -#define ECA_BADMASK DEFMSG(CA_K_ERROR, 41) -#define ECA_IODONE DEFMSG(CA_K_INFO, 42) -#define ECA_IOINPROGRESS DEFMSG(CA_K_INFO, 43) -#define ECA_BADSYNCGRP DEFMSG(CA_K_ERROR, 44) -#define ECA_PUTCBINPROG DEFMSG(CA_K_ERROR, 45) -#define ECA_NORDACCESS DEFMSG(CA_K_WARNING, 46) -#define ECA_NOWTACCESS DEFMSG(CA_K_WARNING, 47) -#define ECA_ANACHRONISM DEFMSG(CA_K_ERROR, 48) -#define ECA_NOSEARCHADDR DEFMSG(CA_K_WARNING, 49) -#define ECA_NOCONVERT DEFMSG(CA_K_WARNING, 50) -#define ECA_BADCHID DEFMSG(CA_K_ERROR, 51) -#define ECA_BADFUNCPTR DEFMSG(CA_K_ERROR, 52) - -#ifndef CA_ERROR_GLBLSOURCE -epicsShareExtern READONLY char *ca_message_text[]; -#else -READONLY char *ca_message_text[] -= -{ -"Normal successful completion", -"Maximum simultaneous IOC connections exceeded", -"Unknown internet host", -"Unknown internet service", -"Unable to allocate a new socket", -"Unable to connect to internet host or service", -"Unable to allocate additional dynamic memory", -"Unknown IO channel", -"Record field specified inappropriate for channel specified", -"The array or data structure specified will not fit in CA message buffer", -"User specified timeout on IO operation expired", -"Sorry, that feature is planned but not supported at this time", -"The supplied string is unusually large", -"The request was ignored because the specified channel is disconnected", -"The type you have requested from this channel is unknown", -"Remote Channel not found", -"Unable to locate all user specified channels", -"Channel Access Internal Failure", -"The requested local DB operation failed", -"Could not perform a database value get for that channel", -"Could not perform a database value put for that channel", -"Could not perform a database event add for that channel", -"Count requested inappropriate for that channel", -"The supplied string has improper format", -"Network connection lost", -"Ambiguous channel host (multiple IOC's have a channel by that name)", -"The CA routine called is inappropriate for use within an event handler", -"Database value get for that channel failed during channel search", -"Unable to initialize without the vxWorks VX_FP_TASK task option set", -"Event queue overflow has prevented first pass event after event add", -"A monitor by that id cant be found", -"Remote channel has new network address", -"New or resumed network connection", -"Specified task isnt a member of a CA context", -"Attempt to use defunct CA feature failed", -"The supplied string is empty", -"Unable to spawn the CA repeater thread- auto reconnect will fail", -"No channel id match for search reply- search reply ignored", -"Reseting dead connection- will try to reconnect", -"Server (IOC) has fallen behind or is not responding- still waiting", -"No internet interface with broadcast available", -"The event selection mask supplied is empty or inappropriate", -"IO operations have completed", -"IO operations are in progress", -"Invalid synchronous group identifier", -"Put call back operation collision with put call back operation in progress", -"Read access denied", -"Write access denied", -"Sorry, that anachronistic feature of CA is no longer supported", -"The search request/beacon address list was empty after initialization", -"Data conversion between client's type and the server's type failed", -"Invalid channel identifier", -"Invalid function pointer" -}; -#endif - -#ifdef __STDC__ -#define CAERR_USE_FUNC_PROTO -#endif - -#ifdef __cplusplus -#ifndef CAERR_USE_FUNC_PROTO -#define CAERR_USE_FUNC_PROTO -#endif -#endif - -#ifdef CAERR_USE_FUNC_PROTO -epicsShareFunc READONLY char * epicsShareAPI ca_message(long ca_status); -#else /* CAERR_USE_FUNC_PROTO */ -READONLY char *ca_message(); -#endif - -#endif diff --git a/src/include/caeventmask.h b/src/include/caeventmask.h deleted file mode 100644 index e146e0001..000000000 --- a/src/include/caeventmask.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - $Id$ - caeventmask.h - - Modification History - joh 04-16-90 Created - -*/ - -#ifndef INCLcaeventmaskh -#define INCLcaeventmaskh - -/* - event selections - (If any more than 8 of these are needed then update the - select field in the event_block struct in db_event.c from - unsigned char to unsigned short) - - - DBE_VALUE - Trigger an event when a significant change in the channel's value - occurs. Relies on the monitor deadband field under DCT. - - DBE_LOG - Trigger an event when an archive significant change in the channel's - valuue occurs. Relies on the archiver monitor deadband field under DCT. - - DBE_ALARM - Trigger an event when the alarm state changes - -*/ -#define DBE_VALUE (1<<0) -#define DBE_LOG (1<<1) -#define DBE_ALARM (1<<2) - -#endif diff --git a/src/include/createSoftLinks.sh b/src/include/createSoftLinks.sh deleted file mode 100644 index 4693bacd6..000000000 --- a/src/include/createSoftLinks.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -# createSoftLinks.sh -# $Id$ - -# Tailored script to create local softlinks releative to this directory -# the name createSoftLinks.sh is a key and must not be changed. If the -# release tool sccsGet finds a file by the name of (createSoftLinks.sh), -# after it has retrieved any out-of-date SCCS files, it invokes the -# script to create the defined softlinks - -/bin/rm -f epicsVersion.h -ln -s ../version/epicsVersion.h epicsVersion.h diff --git a/src/include/dbDefs.h b/src/include/dbDefs.h deleted file mode 100644 index de49e688c..000000000 --- a/src/include/dbDefs.h +++ /dev/null @@ -1,124 +0,0 @@ -/* $Id$ - * - * Author: Marty Kraimer - * Date: 6-1-90 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 mm-dd-yy iii Comment - * .02 12-03-91 rcz defines from vxWorks.h for Unix - * .03 12-03-91 rcz added define PVNAME_STRINGSZ - * .04 05-22-92 mrk cleanup - * .05 07-22-93 mrk Cleanup defs for NO and YES - * .06 08-11-93 joh included errMdef.h - */ - -#ifndef INCdbDefsh -#define INCdbDefsh 1 - -#if defined(NULL) -#undef NULL -#endif -#define NULL 0 - -#if defined(NO) -#undef NO -#endif -#define NO 0 - -#if defined(YES) -#undef YES -#endif -#define YES 1 - -#if defined(TRUE) -#undef TRUE -#endif -#define TRUE 1 - -#if defined(FALSE) -#undef FALSE -#endif -#define FALSE 0 - -#ifndef OK -#define OK 0 -#endif -#ifndef ERROR -#define ERROR (-1) -#endif -#ifndef NONE -#define NONE (-1) /* for times when NULL won't do */ -#endif - -#ifndef LOCAL -#define LOCAL static -#endif - -#ifndef NELEMENTS -#define NELEMENTS(array) /* number of elements in an array */ \ - (sizeof (array) / sizeof ((array) [0])) -#endif - -#ifndef max -#define max(x, y) (((x) < (y)) ? (y) : (x)) -#endif -#ifndef min -#define min(x, y) (((x) < (y)) ? (x) : (y)) -#endif - -#ifndef OFFSET -#define OFFSET(structure, member) /* byte offset of member in structure*/\ - ((int) &(((structure *) 0) -> member)) -#endif - -/* FLDNAME_SZ must be 4 */ -#define PVNAME_STRINGSZ 29 /* includes NULL terminator for PVNAME_SZ */ -#define PVNAME_SZ (PVNAME_STRINGSZ - 1) /*Process Variable Name Size */ -#define FLDNAME_SZ 4 /*Field Name Size */ - -#define DB_MAX_CHOICES 30 - -#define SUPERVISORY 0 -#define CLOSED_LOOP 1 - -#define NTO1FIRST 0 -#define NTO1LOW 1 -#define NTO1HIGH 2 -#define NTO1AVE 3 - -#include "errMdef.h" -#include "epicsTypes.h" - -#ifdef __STDC__ -int coreRelease(void); -int iocLogInit(void); -int rsrv_init(void); -#else -int coreRelease(); -int iocLogInit(); -int rsrv_init(); -#endif /*__STDC__*/ - -#endif /* INCdbDefsh */ diff --git a/src/include/devSup.h b/src/include/devSup.h deleted file mode 100644 index b68f96b87..000000000 --- a/src/include/devSup.h +++ /dev/null @@ -1,66 +0,0 @@ -/* devSup.h Device Support */ -/* share/epicsH $Id$ */ -/* - * Author: Marty Kraimer - * Date: 6-1-90 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 10-04-91 jba Added error message - * .02 05-18-92 rcz Changed macro "GET_DEVSUP(" to "GET_PDEVSUP(precDevSup," - * .03 05-18-92 rcz Structure devSup changed element name from dsetName to papDsetName - * .04 05-18-92 rcz New database access - */ - -#ifndef INCdevSuph -#define INCdevSuph 1 - -#ifdef __cplusplus -typedef long (*DEVSUPFUN)(void*); /* ptr to device support function*/ -#else -typedef long (*DEVSUPFUN)(); /* ptr to device support function*/ -#endif - -struct dset { /* device support entry table */ - long number; /*number of support routines*/ - DEVSUPFUN report; /*print report*/ - DEVSUPFUN init; /*init support*/ - DEVSUPFUN init_record; /*init support for particular record*/ - DEVSUPFUN get_ioint_info; /* get io interrupt information*/ - /*other functions are record dependent*/ - }; - -#define S_dev_noDevSup (M_devSup| 1) /*SDR_DEVSUP: Device support missing*/ -#define S_dev_noDSET (M_devSup| 3) /*Missing device support entry table*/ -#define S_dev_missingSup (M_devSup| 5) /*Missing device support routine*/ -#define S_dev_badInpType (M_devSup| 7) /*Bad INP link type*/ -#define S_dev_badOutType (M_devSup| 9) /*Bad OUT link type*/ -#define S_dev_badInitRet (M_devSup|11) /*Bad init_rec return value */ -#define S_dev_badBus (M_devSup|13) /*Illegal bus type*/ -#define S_dev_badCard (M_devSup|15) /*Illegal or nonexistant module*/ -#define S_dev_badSignal (M_devSup|17) /*Illegal signal*/ -#define S_dev_NoInit (M_devSup|19) /*No init*/ -#define S_dev_Conflict (M_devSup|21) /*Multiple records accessing same signal*/ - -#endif diff --git a/src/include/drvSup.h b/src/include/drvSup.h deleted file mode 100644 index 6c344ea32..000000000 --- a/src/include/drvSup.h +++ /dev/null @@ -1,51 +0,0 @@ -/* drvSup.h Driver Support */ -/* share/epicsH $Id$ */ - -/* - * Author: Marty Kraimer - * Date: 6-1-90 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 05-21-92 rcz changed drvetName to papDrvName - * .02 05-18-92 rcz New database access (removed extern) - */ - -#ifndef INCdrvSuph -#define INCdrvSuph 1 - -typedef long (*DRVSUPFUN) (); /* ptr to driver support function*/ - -struct drvet { /* driver entry table */ - long number; /*number of support routines*/ - DRVSUPFUN report; /*print report*/ - DRVSUPFUN init; /*init support*/ - /*other functions are device dependent*/ - }; -#define DRVETNUMBER ( (sizeof(struct drvet) -sizeof(long))/sizeof(DRVSUPFUN) ) - -#define S_drv_noDrvSup (M_drvSup| 1) /*SDR_DRVSUP: Driver support missing*/ -#define S_drv_noDrvet (M_drvSup| 3) /*Missing driver support entry table*/ - -#endif diff --git a/src/include/epicsTypes.h b/src/include/epicsTypes.h deleted file mode 100644 index 345234ae6..000000000 --- a/src/include/epicsTypes.h +++ /dev/null @@ -1,255 +0,0 @@ -/* $Id */ - -/* - * Author: Jeff Hill - * Date: 5-95 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * $Log$ - * Revision 1.3 1997/04/10 20:00:40 jhill - * VMS changes - * - * Revision 1.2 1996/06/20 16:27:33 jhill - * eliminated sbufs - * - * Revision 1.1 1996/01/25 21:38:48 mrk - * moved files from /base/include - * - * Revision 1.7 1995/12/19 19:46:44 jhill - * added epicsStatus typedef - * - * Revision 1.6 1995/09/29 21:41:41 jhill - * added use of sbufs - * - */ - -#ifndef INCepicsTypesh -#define INCepicsTypesh 1 - -#include - -#ifndef stringOf -# ifdef __STDC__ -# define stringOf(TOKEN) #TOKEN -# else -# define stringOf(TOKEN) "TOKEN" -# endif -#endif - -typedef enum { - epicsFalse=0, - epicsTrue=1 } epicsBoolean; - -/* - * Architecture Independent Data Types - * (so far this is sufficient for all archs we have ported to) - */ -typedef char epicsInt8; -typedef unsigned char epicsUInt8; -typedef short epicsInt16; -typedef unsigned short epicsUInt16; -typedef epicsUInt16 epicsEnum16; -typedef int epicsInt32; -typedef unsigned epicsUInt32; -typedef float epicsFloat32; -typedef double epicsFloat64; -typedef unsigned long epicsIndex; -typedef epicsInt32 epicsStatus; - -typedef struct { - unsigned length; - char *pString; -}epicsString; - -/* - * !! Dont use this - it may vanish in the future !! - * - * Provided only for backwards compatibility with - * db_access.h - * - */ -#define MAX_STRING_SIZE 40 -typedef char epicsOldString[MAX_STRING_SIZE]; - -/* - * union of all types - * - * Strings included here as pointers only so that we support - * large string types. - * - * Arrays included here as pointers because large arrays will - * not fit in this union. - */ -typedef union epics_any{ - epicsInt8 int8; - epicsUInt8 uInt8; - epicsInt16 int16; - epicsUInt16 uInt16; - epicsEnum16 enum16; - epicsInt32 int32; - epicsUInt32 uInt32; - epicsFloat32 float32; - epicsFloat64 float64; - epicsString string; -}epicsAny; - -/* - * Corresponding Type Codes - * (this enum must start at zero) - * - * !! Update epicsTypeToDBR_XXXX[] and DBR_XXXXToEpicsType - * in db_access.h if you edit this enum !! - */ -typedef enum { - epicsInt8T, - epicsUInt8T, - epicsInt16T, - epicsUInt16T, - epicsEnum16T, - epicsInt32T, - epicsUInt32T, - epicsFloat32T, - epicsFloat64T, - epicsStringT, - epicsOldStringT -}epicsType; -#define firstEpicsType epicsInt8T -#define lastEpicsType epicsOldStringT -#define validEpicsType(x) ((x>=firstEpicsType) && (x<=lastEpicsType)) -#define invalidEpicsType(x) ((xlastEpicsType)) - - -/* - * The enumeration "epicsType" is an index to this array - * of type name strings. - */ -#ifdef epicsTypesGLOBAL -epicsShareDef READONLY char *epicsTypeNames [lastEpicsType+1] = { - "epicsInt8", - "epicsUInt8", - "epicsInt16", - "epicsUInt16", - "epicsEnum16", - "epicsInt32", - "epicsUInt32", - "epicsFloat32", - "epicsFloat64", - "epicsString", - "epicsOldString", -}; -#else /* epicsTypesGLOBAL */ -epicsShareExtern READONLY char *epicsTypeNames [lastEpicsType+1]; -#endif /* epicsTypesGLOBAL */ - -/* - * The enumeration "epicsType" is an index to this array - * of type code name strings. - */ -#ifdef epicsTypesGLOBAL -epicsShareDef READONLY char *epicsTypeCodeNames [lastEpicsType+1] = { - "epicsInt8T", - "epicsUInt8T", - "epicsInt16T", - "epicsUInt16T", - "epicsEnum16T", - "epicsInt32T", - "epicsUInt32T", - "epicsFloat32T", - "epicsFloat64T", - "epicsStringT", - "epicsOldStringT", -}; -#else /* epicsTypesGLOBAL */ -epicsShareExtern READONLY char *epicsTypeCodeNames [lastEpicsType+1]; -#endif /* epicsTypesGLOBAL */ - -#ifdef epicsTypesGLOBAL -epicsShareDef READONLY unsigned epicsTypeSizes [lastEpicsType+1] = { - sizeof (epicsInt8), - sizeof (epicsUInt8), - sizeof (epicsInt16), - sizeof (epicsUInt16), - sizeof (epicsEnum16), - sizeof (epicsInt32), - sizeof (epicsUInt32), - sizeof (epicsFloat32), - sizeof (epicsFloat64), - sizeof (epicsString), - sizeof (epicsOldString), -}; -#else /* epicsTypesGLOBAL */ -epicsShareExtern READONLY unsigned epicsTypeSizes [lastEpicsType+1]; -#endif /* epicsTypesGLOBAL */ - -/* - * The enumeration "epicsType" is an index to this array - * of type class identifiers. - */ -typedef enum { - epicsIntC, - epicsUIntC, - epicsEnumC, - epicsFloatC, - epicsStringC, - epicsOldStringC} epicsTypeClass; -#ifdef epicsTypesGLOBAL -epicsShareDef READONLY epicsTypeClass epicsTypeClasses [lastEpicsType+1] = { - epicsIntC, - epicsUIntC, - epicsIntC, - epicsUIntC, - epicsEnumC, - epicsIntC, - epicsUIntC, - epicsFloatC, - epicsFloatC, - epicsStringC, - epicsOldStringC - }; -#else /* epicsTypesGLOBAL */ -epicsShareExtern READONLY epicsTypeClass epicsTypeClasses [lastEpicsType+1]; -#endif /* epicsTypesGLOBAL */ - - -#ifdef epicsTypesGLOBAL -epicsShareDef READONLY char *epicsTypeAnyFieldName [lastEpicsType+1] = { - "int8", - "uInt8", - "int16", - "uInt16", - "enum16", - "int32", - "uInt32", - "float32", - "float64", - "string", - "", /* Old Style Strings will not be in epicsAny type */ - }; -#else /* epicsTypesGLOBAL */ -epicsShareExtern READONLY char *epicsTypeAnyFieldName [lastEpicsType+1]; -#endif /* epicsTypesGLOBAL */ - -#endif /* INCepicsTypesh */ - diff --git a/src/include/gsd_sync_defs.h b/src/include/gsd_sync_defs.h deleted file mode 100644 index 7f66c4233..000000000 --- a/src/include/gsd_sync_defs.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef INCgsd_sync_defsh -#define INCgsd_sync_defsh -/* $Id$ - * Author: Gale Slentz - * Date: 09-18-90 - * - * Experimental Physics and Industrial Control System (EPICS) - * - * Copyright 1991, the Regents of the University of California, - * and the University of Chicago Board of Governors. - * - * This software was produced under U.S. Government contracts: - * (W-7405-ENG-36) at the Los Alamos National Laboratory, - * and (W-31-109-ENG-38) at Argonne National Laboratory. - * - * Initial development by: - * The Controls and Automation Group (AT-8) - * Ground Test Accelerator - * Accelerator Technology Division - * Los Alamos National Laboratory - * - * Co-developed with - * The Controls and Computing Group - * Accelerator Systems Division - * Advanced Photon Source - * Argonne National Laboratory - * - * Modification Log: - * ----------------- - * .01 09-18-90 ges initial version - * - */ -/*+/mod*********************************************************************** -* TITLE gsd_sync_defs.h - defines for gsd_sync.c -* -* DESCRIPTION -* Contains the definitions that a user of gsd_sync.c -* (for silo of synchronous data) would need to use. -* -*-***************************************************************************/ -#define PREVIOUS_SYNC_DATA 0 -#define NEXTSET_SYNC_DATA 1 -#define USEC_TIME_OUT 100 /* struct timeval's timeout 100usecs */ -#define VOID void - -struct gsd_sync_data { - char *pName; /* ptr to channel name string */ - chid pChid; /* Channel Access id */ - chtype time_type; /* DBR_TIME_xxxx type specifier for data */ - int count; /* element count */ - int svalid; /* valid data flag */ - VOID *pSdata; /* ptr to DBR_TIME_XXXX structure */ -}; - -#endif /* INCgsd_sync_defsh */ diff --git a/src/include/makeEpicsVersion.pl b/src/include/makeEpicsVersion.pl deleted file mode 100644 index f7eac99fa..000000000 --- a/src/include/makeEpicsVersion.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/perl -# - -print "Building epicsVersion.h from CONFIG_BASE_VERSION\n"; - -die unless $#ARGV==0; - -open VARS, $ARGV[0] or die "Cannot get variables from $ARGV[0]"; - -while () -{ - if (/EPICS_VERSION=(.*)/) { $ver = $1; } - if (/EPICS_REVISION=(.*)/) { $rev = $1; } - if (/EPICS_MODIFICATION=(.*)/) { $mod = $1; } - if (/EPICS_UPDATE_NAME=(.*)/) { $upd_name = $1; } - if (/EPICS_UPDATE_LEVEL=(.*)/) { $upd_level = $1; } - if (/CVS_DATE="\\(.*)"/) { $cvs_date = $1; } -} - -$ver_str = "$ver.$rev.$mod"; -$ver_str = "$ver_str.$upd_name" if $upd_name; -$ver_str = "$ver_str.$upd_level" if $upd_level; - -print "Found EPICS Version $ver_str\n"; - -open OUT, ">epicsVersion.h"; - -print OUT "#define BASE_VERSION $ver\n"; -print OUT "#define BASE_REVISION $rev\n"; -print OUT "#define BASE_MODIFICATION $mod\n"; -print OUT "#define BASE_UPDATE_NAME $upd_name\n"; -print OUT "#define BASE_UPDATE_LEVEL $upd_level\n"; -print OUT "#define BASE_VERSION_STRING \"EPICS Version $ver_str\"\n"; -print OUT "#define epicsReleaseVersion \"@(#)Version R$ver_str $cvs_date\"\n"; - -# EPICS_* defs are only for backward compatibility. -# They will be removed at some future date. -print OUT "#define EPICS_VERSION $ver\n"; -print OUT "#define EPICS_REVISION $rev\n"; -print OUT "#define EPICS_MODIFICATION $mod\n"; -print OUT "#define EPICS_UPDATE_NAME $upd_name\n"; -print OUT "#define EPICS_UPDATE_LEVEL $upd_level\n"; -print OUT "#define EPICS_VERSION_STRING \"EPICS Version $ver_str\"\n"; - -close OUT; - - diff --git a/src/include/os/Linux/osiFileName.h b/src/include/os/Linux/osiFileName.h deleted file mode 100644 index 55bb589a2..000000000 --- a/src/include/os/Linux/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/Linux/osiSock.h b/src/include/os/Linux/osiSock.h deleted file mode 100644 index 55b25d804..000000000 --- a/src/include/os/Linux/osiSock.h +++ /dev/null @@ -1,72 +0,0 @@ - -/* - * Linux specific socket include - * - * Under Linux if we dont define _POSIX_C_SOURCE or _XOPEN_SOURCE - * then none of the POSIX stuff (such as signals) can be used - * with cc -v. However if one of _POSIX_C_SOURCE or _XOPEN_SOURCE - * are defined then we cant use the socket library. Therefore I - * have been adding the following in order to use POSIX signals - * and also sockets on Linux with cc -v. What a pain.... - * - * #ifdef linux - * #define __EXTENSIONS__ - * #endif - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -/*#include -#include */ -#include -#include -#include -#include -#include -#include /* close() and others */ - - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD) -#include -#include - -#ifdef __cplusplus -} -#endif - -#define SOCKERRNO WSAGetLastError() -#define SOCKERRSTR(ERRNO_IN) convertSocketErrorToString(ERRNO_IN) - -#define socket_close(S) closesocket(S) -#define socket_ioctl(A,B,C) ioctlsocket(A,B,C) -typedef u_long FAR osiSockIoctl_t; - -#define MAXHOSTNAMELEN 75 -#define IPPORT_USERRESERVED 5000U - -#define SOCK_EWOULDBLOCK WSAEWOULDBLOCK -#define SOCK_ENOBUFS WSAENOBUFS -#define SOCK_ECONNRESET WSAECONNRESET -#define SOCK_ETIMEDOUT WSAETIMEDOUT -#define SOCK_EADDRINUSE WSAEADDRINUSE -#define SOCK_ECONNREFUSED WSAECONNREFUSED -#define SOCK_ECONNABORTED WSAECONNABORTED -#define SOCK_EINPROGRESS WSAEINPROGRESS -#define SOCK_EISCONN WSAEISCONN -#define SOCK_EALREADY WSAEALREADY -#define SOCK_EINVAL WSAEINVAL -#define SOCK_EINTR WSAEINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE WSAEMFILE - -/* - * Under WIN32, FD_SETSIZE is the max. number of sockets, - * not the max. fd value that you use in select(). - * - * Therefore, it is difficult to detemine if any given - * fd can be used with FD_SET(), FD_CLR(), and FD_ISSET(). - */ -#define FD_IN_FDSET(FD) (1) diff --git a/src/include/os/alpha/osiFileName.h b/src/include/os/alpha/osiFileName.h deleted file mode 100644 index 55bb589a2..000000000 --- a/src/include/os/alpha/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/alpha/osiSock.h b/src/include/os/alpha/osiSock.h deleted file mode 100644 index ed0c16b35..000000000 --- a/src/include/os/alpha/osiSock.h +++ /dev/null @@ -1,66 +0,0 @@ - -/* - * alpha specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -struct ifafilt; -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -/* #include */ -/* #include */ -#include -#include -#include -#include -#include -#include /* close() and others */ - -/* - * as far as I can tell there is no header file for these - */ -int gethostname(char *name, int namelen); -int sethostname(char *name, int namelen); - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/cygwin32/osiFileName.h b/src/include/os/cygwin32/osiFileName.h deleted file mode 100644 index 0268e0f40..000000000 --- a/src/include/os/cygwin32/osiFileName.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#define OSI_PATH_LIST_SEPARATOR ";" -#define OSI_PATH_SEPARATOR "\\" - -#endif /* osiFileNameH */ diff --git a/src/include/os/cygwin32/osiSock.h b/src/include/os/cygwin32/osiSock.h deleted file mode 100644 index 7f8957e47..000000000 --- a/src/include/os/cygwin32/osiSock.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * cygwin32 specific include - */ - - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -#include -#include -#include -#include /* close() and others */ - - -/* - * as far as I can tell there is no header file for these - */ -int gethostname(char *name, int namelen); -int sethostname(char *name, int namelen); - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) - -#define _IOWR(x, y, t) \ - (IOC_INOUT|((((int)sizeof (t))&IOCPARM_MASK)<<16)|(x<<8)|y) - -/* Used by ca/if_depends.c */ -#define SIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ -#define SIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ - -/* Used by ca/if_depends.c db/drvTS.c dbtools/BSlib.c */ -#define SIOCGIFBRDADDR _IOWR('i', 23, struct ifreq) /* get broadcast addr */ - - -/* Used by ca/if_depends.c ca/ucx.h */ -#define IFF_POINTOPOINT 0x10 - -/* Used by ca/iocinf.c */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/hp700/osiFileName.h b/src/include/os/hp700/osiFileName.h deleted file mode 100644 index 55bb589a2..000000000 --- a/src/include/os/hp700/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/hp700/osiSock.h b/src/include/os/hp700/osiSock.h deleted file mode 100644 index a9b971d80..000000000 --- a/src/include/os/hp700/osiSock.h +++ /dev/null @@ -1,68 +0,0 @@ - -/* - * Solaris specifif socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -/* -#include -#include -*/ -#include -#include -#include -#include -#include -#include /* close() and others */ - -/* - * as far as I can tell there is no header file for these - */ -/* -int gethostname(char *name, int namelen); -int sethostname(char *name, int namelen); -*/ -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/sgi/osiFileName.h b/src/include/os/sgi/osiFileName.h deleted file mode 100644 index 55bb589a2..000000000 --- a/src/include/os/sgi/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/sgi/osiSock.h b/src/include/os/sgi/osiSock.h deleted file mode 100644 index 815a58410..000000000 --- a/src/include/os/sgi/osiSock.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* - * SGI specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -/* #include */ -/* #include */ -#include -#include -#include -#include -#include -#include /* close() and others */ - -/* - * as far as I can tell there is no header file for these - */ -/* int gethostname(char *name, int namelen); */ -/* int sethostname(char *name, int namelen); */ - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#ifndef IPPORT_USERRESERVED -#define IPPORT_USERRESERVED 5000 -#endif - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/solaris/osiFileName.h b/src/include/os/solaris/osiFileName.h deleted file mode 100644 index 60e0a20da..000000000 --- a/src/include/os/solaris/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ diff --git a/src/include/os/solaris/osiSock.h b/src/include/os/solaris/osiSock.h deleted file mode 100644 index 23e3c6252..000000000 --- a/src/include/os/solaris/osiSock.h +++ /dev/null @@ -1,65 +0,0 @@ - -/* - * Solaris specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include /* for MAXHOSTNAMELEN */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* close() and others */ - -/* - * as far as I can tell there is no header file for these - */ -int gethostname(char *name, int namelen); -int sethostname(char *name, int namelen); - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/sun4/osiFileName.h b/src/include/os/sun4/osiFileName.h deleted file mode 100644 index 60e0a20da..000000000 --- a/src/include/os/sun4/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ diff --git a/src/include/os/sun4/osiSock.h b/src/include/os/sun4/osiSock.h deleted file mode 100644 index 27572c1cb..000000000 --- a/src/include/os/sun4/osiSock.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * sunos 4 specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -/* - * done in two ifdef steps so that we will remain compatible with - * traditional C - */ - -#ifdef __cplusplus -extern "C" { -#define OSISOCK_ANSI_FUNC_PROTO -#endif - -#ifdef __STDC__ -#define OSISOCK_ANSI_FUNC_PROTO -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include - -#ifdef OSISOCK_ANSI_FUNC_PROTO -int ioctl (int fd, int req, ...); -int close (int fd); -int gettimeofday (struct timeval *tp, struct timezone *tzp); -int gethostname (char *name, int namelen); -#endif - -/* - * sun's CC defines at least a few of these under sunos4 - * ( but acc does not !? ) - */ -#if defined(__SUNPRO_CC) -# include -# include -#else -# ifdef OSISOCK_ANSI_FUNC_PROTO - int listen (int socket, int backlog); - int accept (int socket, struct sockaddr *addr, int *addrlen); - int shutdown (int socket, int how); - int getpeername (int socket, struct sockaddr *name, int *namelen); - int connect (int socket, struct sockaddr *name, int namelen); - int setsockopt (int socket, int level, int optname, - char *optval, int optlen); - void bzero (char *b, int length); - int sendto (int socket, const char *buf, int len, - int flags, struct sockaddr *to, int tolen); - int select (int width, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout); - - int bind (int socket, struct sockaddr *name, int namelen); - int send (int socket, const char *buf, int len, int flags); - int recv (int socket, char *buf, int len, int flags); - int getsockopt (int socket, int level, int optname, - char *optval, int *optlen); - int socket (int domain, int type, int protocol); - int recvfrom (int socket, char *buf, int len, - int flags, struct sockaddr *from, int *fromlen); - int getsockname (int socket, struct sockaddr *name, int *namelen); - - /* - * from /usr/include/arpa/inet.h - * (which under sunos4 does not include arguments for C++) - * (__SUNPRO_CC supplies this file but g++ does not supply - * an ansi protottype) - */ - unsigned long inet_addr (const char *); - char * inet_ntoa (struct in_addr in); - - /* - * from /usr/include/netdb.h - * (which under sunos4 does not include arguments for C++) - * (__SUNPRO_CC supplies an updated version of this file but g++ does not) - */ - struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ - # define h_addr h_addr_list[0] /* address, for backward compatiblity */ - }; - struct hostent *gethostbyaddr(char *addr, int len, int type); - struct hostent *gethostnyname(const char *name); -# endif /* ifdef OSISOCK_ANSI_FUNC_PROTO */ -#endif /* !defined(__SUNPRO_CC) */ - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -#define socket_ioctl(A,B,C) ioctl(A,B,C) -typedef int osiSockIoctl_t; - -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#endif /*osiSockH*/ - diff --git a/src/include/os/vms/osiFileName.h b/src/include/os/vms/osiFileName.h deleted file mode 100644 index 470dd5a26..000000000 --- a/src/include/os/vms/osiFileName.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#define OSI_PATH_LIST_SEPARATOR "," -#define OSI_PATH_SEPARATOR "." - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/vms/osiSock.h b/src/include/os/vms/osiSock.h deleted file mode 100644 index 2811690ca..000000000 --- a/src/include/os/vms/osiSock.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * vms specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#if defined(MULTINET) && defined(__cplusplus) - struct iovec; -#endif - -#include -#include -#include -#if defined(UCX) /* GeG 09-DEC-1992 */ -# include -# include -# include -# include -#elif defined(MULTINET) -# if defined(__DECCXX) -# define __DECC 1 -# define __DECC_VER 999999999 -# include -# include -# undef __DECC -# undef __DECC_VER -# else -# include -# include -# endif -# if defined(__cplusplus) - struct ifaddr; - struct mbuf; -# endif -# include -# include -# include -# include -# include -#endif - -/* - * MULTINET defines none of these (if not using C++) - */ -#if defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) -int gettimeofday (struct timeval *tp, struct timezone *tzp); -int gethostname (char *name, int namelen); -int accept (int socket, struct sockaddr *addr, int *addrlen); -int getpeername (int socket, struct sockaddr *name, int *namelen); -int connect (int socket, struct sockaddr *name, int namelen); -int setsockopt (int socket, int level, int optname, - char *optval, int optlen); -int sendto (int socket, const char *buf, int len, - int flags, struct sockaddr *to, int tolen); -int select (int width, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds, struct timeval *timeout); - -int bind (int socket, struct sockaddr *name, int namelen); -int send (int socket, const char *buf, int len, int flags); -int recv (int socket, char *buf, int len, int flags); -int getsockopt (int socket, int level, int optname, - char *optval, int *optlen); -int recvfrom (int socket, char *buf, int len, - int flags, struct sockaddr *from, int *fromlen); -int getsockname (int socket, struct sockaddr *name, int *namelen); -int listen (int socket, int backlog); -int shutdown (int socket, int how); -int socket (int domain, int type, int protocol); - -#endif /* defined(MULTINET) && defined(MULTINET_NO_PROTOTYPES) */ - -#ifdef MULTINET -# include -#else - char * inet_ntoa (struct in_addr in); - unsigned long inet_addr (const char *); -#endif - -#if 0 -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#define h_addr h_addr_list[0] /* address, for backward compatiblity */ -}; -struct hostent *gethostbyaddr(char *addr, int len, int type); -#endif - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define INADDR_LOOPBACK ((u_long)0x7f000001) - - -/* - * (the VAXC runtime lib has its own close - */ -#if defined(WINTCP) /* Wallangong */ -# define socket_close(S) netclose(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -#if defined(UCX) /* GeG 09-DEC-1992 */ -# define socket_close(S) close(S) -# define socket_ioctl(A,B,C) ioctl(A,B,C) -#endif -typedef int osiSockIoctl_t; - -#if defined(WINTCP) /* Wallangong */ - extern int uerrno; -# define SOCKERRNO uerrno -#elif defined(MULTINET) -# define SOCKERRNO socket_errno -#else -# define SOCKERRNO errno /* UCX and others? */ -#endif - -/* - * This appears to work even on Multinet - */ -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) - -#define MAXHOSTNAMELEN 75 - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -/* - * Under MULTINET FD_SETSIZE does not apply - * (can only guess about the others) - */ -#ifdef MULTINET -# define FD_IN_FDSET(FD) (1) -#else -# define FD_IN_FDSET(FD) ((FD)=0) -#endif - -#endif /*osiSockH*/ - diff --git a/src/include/os/vms/ucx.h b/src/include/os/vms/ucx.h deleted file mode 100644 index f28ab6ac9..000000000 --- a/src/include/os/vms/ucx.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * - * U C X . H - * UNIX ioctl structures and defines used for VAX/UCX - * Author: Gerhard Grygiel (GeG) - * - * GeG 09-DEC-1992 initial edit - * CJM 13-Jul-1994 add fd_set etc for R3.12 - * CJM 09-Dec-1994 define fd_set etc. so it will compile for - * both DEC C and Vax C - * CJM 19-Nov-1995 use memset instead of bzero following advice - * from Jeff Hill and add a definition of struct - * timezone to support gettimeofday - * - */ -#ifndef _UCX_H_ -#define _UCX_H_ -#ifdef UCX - -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast address valid */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* interface is point to point */ -/* - * Interface request structure used for socket - * ioctl's. All interface ioctl's must have parameter - * definitions which begin with ifr_name. The - * remainder may be interface specific. - */ -struct ifreq { -#define IFNAMSIZ 16 - char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - short ifru_flags; - int ifru_metric; - caddr_t ifru_data; - } ifr_ifru; -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ -}; - -/* Structure used in SIOCGIFCONF request. - * Used to retrieve interface configuration - * for machine (useful for programs which - * must know all networks accessible). - */ -struct ifconf { - int ifc_len; /* size of associated buffer */ - union { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ -}; - -#ifndef NBBY -#define NBBY 8 -#endif - -#ifndef FD_SETSIZE -#define FD_SETSIZE 256 -#endif - -typedef long fd_mask ; -#define NFDBITS (sizeof (fd_mask) * NBBY ) /* bits per mask */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -/* - * Both DEC C and VAX C only allow 32 fd's at once - */ -typedef int fd_set ; - -#define FD_SET(n, p) (*(p) |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) (*(p) &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) (*(p) & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) memset((char *)(p), 0, sizeof (*(p))) - -#include -#define IO$_RECEIVE (IO$_WRITEVBLK) - -struct timezone { - int tz_minuteswest ; /* minutes west of Greenwich */ - int tz_dsttime ; /* type of dst correction */ -}; - -#define TWOPOWER32 4294967296.0 -#define TWOPOWER31 2147483648.0 -#define UNIX_EPOCH_AS_MJD 40587.0 -#endif -#endif - diff --git a/src/include/os/vxWorks/osiFileName.h b/src/include/os/vxWorks/osiFileName.h deleted file mode 100644 index 55bb589a2..000000000 --- a/src/include/os/vxWorks/osiFileName.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - * osiFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef osiFileNameH -#define osiFileNameH - -#include "unixFileName.h" - -#endif /* osiFileNameH */ \ No newline at end of file diff --git a/src/include/os/vxWorks/osiMutex.h b/src/include/os/vxWorks/osiMutex.h deleted file mode 100644 index 3077d867d..000000000 --- a/src/include/os/vxWorks/osiMutex.h +++ /dev/null @@ -1,51 +0,0 @@ - -// -// osiMutex - OS independent mutex -// (vxWorks version) -// - -#include -#include - -class osiMutex { -public: - class osiMutexNoMemory {} - - osiMutex() - { - this->mutex = semMCreate(SEM_Q_PRIORITY|SEM_INVERSION_SAFE|SEM_DELETE_SAFE); - if (this->mutex==NULL) - { - throw osiMutexNoMemory(); - } - } - - ~osiMutex() - { - STATUS s; - s = semDelete (this->mutex); - assert (s==OK); - } - - void lock () const - { - STATUS s; - s = semTake (this->mutex, WAIT_FOREVER); - assert (s==OK); - } - - void unlock() const - { - STATUS s; - s = semGive (this->mutex); - assert (s==OK); - } - - void show (unsigned level) const - { - semShow (this->mutex, (int) level); - } -private: - mutable SEM_ID mutex; -}; - diff --git a/src/include/os/vxWorks/osiSock.h b/src/include/os/vxWorks/osiSock.h deleted file mode 100644 index ce8700231..000000000 --- a/src/include/os/vxWorks/osiSock.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * vxWorks specific socket include - */ - -#ifndef osiSockH -#define osiSockH - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -} -#endif - -typedef int SOCKET; -#define INVALID_SOCKET (-1) -#define SOCKERRNO errno -#define SOCKERRSTR(ERRNO_IN) (strerror(ERRNO_IN)) -#define socket_close(S) close(S) -/* - * it is quite lame on WRS's part to assume that - * a ptr is always the same as an int - */ -#define socket_ioctl(A,B,C) ioctl(A,B,(int)C) -typedef int osiSockIoctl_t; - -#define FD_IN_FDSET(FD) ((FD)=0) - -#define SOCK_EWOULDBLOCK EWOULDBLOCK -#define SOCK_ENOBUFS ENOBUFS -#define SOCK_ECONNRESET ECONNRESET -#define SOCK_ETIMEDOUT ETIMEDOUT -#define SOCK_EADDRINUSE EADDRINUSE -#define SOCK_ECONNREFUSED ECONNREFUSED -#define SOCK_ECONNABORTED ECONNABORTED -#define SOCK_EINPROGRESS EINPROGRESS -#define SOCK_EISCONN EISCONN -#define SOCK_EALREADY EALREADY -#define SOCK_EINVAL EINVAL -#define SOCK_EINTR EINTR -#define SOCK_EPIPE EPIPE -#define SOCK_EMFILE EMFILE - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7F000001 -#endif - -#endif /*osiSockH*/ - - diff --git a/src/include/osiMutexNOOP.h b/src/include/osiMutexNOOP.h deleted file mode 100644 index 3c87e03a0..000000000 --- a/src/include/osiMutexNOOP.h +++ /dev/null @@ -1,22 +0,0 @@ - -// -// osiMutex - OS independent mutex -// (NOOP on single threaded OS) -// -// NOTE: -// I have made lock/unlock const because this allows -// a list to be run in a const member function on a -// multi-threaded os (since paired lock/unlock -// requests really do not modify the internal -// state of the object and neither does -// running the list if we dont modify the list). -// -class osiMutex { -public: - class osiMutexNoMemory {}; - void lock () const {} - void unlock () const {} - void show (unsigned) const {} -private: -}; - diff --git a/src/include/registryDeviceSupport.h b/src/include/registryDeviceSupport.h deleted file mode 100644 index 6dbf29c4c..000000000 --- a/src/include/registryDeviceSupport.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef INCregistryDeviceSupporth -#define INCregistryDeviceSupporth - - -#ifdef __cplusplus -extern "C" { -#endif - -int registryDeviceSupportAdd(const char *name,struct dset *pdset); -struct dset *registryDeviceSupportFind(const char *name); - -#ifdef __cplusplus -} -#endif - - -#endif /* INCregistryDeviceSupporth */ diff --git a/src/include/registryDriverSupport.h b/src/include/registryDriverSupport.h deleted file mode 100644 index e0efafd12..000000000 --- a/src/include/registryDriverSupport.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef INCregistryDriverSupporth -#define INCregistryDriverSupporth - - -#ifdef __cplusplus -extern "C" { -#endif - -/* c interface definitions */ -int registryDriverSupportAdd(const char *name,struct drvet *pdrvet); -struct drvet *registryDriverSupportFind(const char *name); - -#ifdef __cplusplus -} -#endif - - -#endif /* INCregistryDriverSupporth */ diff --git a/src/include/registryRecordType.h b/src/include/registryRecordType.h deleted file mode 100644 index 27ec5b383..000000000 --- a/src/include/registryRecordType.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef INCregistryRecordTypeh -#define INCregistryRecordTypeh - -#include "dbStaticLib.h" - -typedef int (*computeSizeOffset)(dbRecordType *pdbRecordType); - -typedef struct recordTypeLocation { - struct rset *prset; - computeSizeOffset sizeOffset; -}recordTypeLocation; - - -#ifdef __cplusplus -extern "C" { -#endif - -int registryRecordTypeAdd(const char *name,recordTypeLocation *prtl); -recordTypeLocation *registryRecordTypeFind(const char *name); - -/* The following function is generated by registerRecordDeviceDriver/pl */ -int registerRecordDeviceDriver(DBBASE *pdbbase); -#ifdef __cplusplus -} -#endif - - -#endif /* INCregistryRecordTypeh */ diff --git a/src/include/shareLib.h b/src/include/shareLib.h deleted file mode 100644 index a81594632..000000000 --- a/src/include/shareLib.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Use compiler specific key words to set up shareable library - * external symbols and entry points - * - * Right now this is only necessary for WIN32 DLL, and to a lesser extent VAXC. - * The approach should be general enough for future systems, however. - * - * - * USAGE: - * - * In header files, declare variables, classes and functions - * to be __exported__ like this: - * - * epicsShareFunc int epicsShareAPI - * a_func (int arg); function prototype - * or - * epicsShareFunc int epicsShareAPIV - * a_func (int arg, ...); variable args function prototype - * (using either ... or va_list) - * epicsShareExtern int a_var; reference variable - * (reference declaration) - * epicsShareDef int a_var= 4; create variable instance - * (definition declaration) - * class epicsShareClass a_class; reference a class - * - * Usually the epicsShare... macros expand to - * "import this from a DLL" (on WIN32, on Unix it's a NOOP) - * - * In the implementation file, however, you write: - * - * #include - * #include - * #define epicsExportSharedSymbols - * ! no more includes specifying routines outside this DLLs from here on ! - * #include - * #include - * #include - * - * The point is: define epicsExportSharedSymbols exactly and only - * right before you include the prototypes for what you implement! - * Then include shareLib.h again because this is where they get changed. - * This time the epicsShare... macros expand to - * "export this from the DLL that we are building". (again only on WIN32) - * - * NOTE: - * If what_I_implement_in_this_file.h includes header files for routines that - * are not implemented in the DLL, then you will need to force these - * header files to be included before setting epicsExportSharedSymbols, - * including shareLib.h, and including what_I_implement_in_this_file.h. Since - * all well written header files have "ifdef" guards against multiple inclusion - * this is only a matter of "preincluding" the headers for these DLL - * imports before epicsExportSharedSymbols is defined. This - * is admittedly a bit of a mess, but is fortunately only the concern of - * persons who are adding routines to a library, and will have no impact - * on persons using routines out of a library. - * - * 8-22-96 -kuk- - */ - -#undef epicsShareExtern -#undef epicsShareDef -#undef epicsShareClass -#undef epicsShareFunc -#undef epicsShareAPI -#undef epicsShareAPIV -#undef READONLY - -/* - * if its WIN32 and it isnt the Cygnus GNU environment - * (I am assuming Borlund and other MS Vis C++ competitors - * support these MS VisC++ defacto standard keywords???? If not - * then we should just switch on defined(_MSC_VER) here) - * - * Also check for "EPICS_DLL_NO" not defined so that we will not use these - * keywords if it is an object library build of base under WIN32. - */ -#if defined(_WIN32) && !defined(__GNUC__) - -# if defined(epicsExportSharedSymbols) -# if defined(EPICS_DLL_NO) /* this indicates that we are not building a DLL */ -# define epicsShareExtern extern -# define epicsShareClass -# define epicsShareFunc -# else -# define epicsShareExtern __declspec(dllexport) extern -# define epicsShareClass __declspec(dllexport) -# define epicsShareFunc __declspec(dllexport) -# endif -# else -# if defined(_DLL) /* this indicates that we are being compiled to call a DLL */ -# define epicsShareExtern __declspec(dllimport) extern -# define epicsShareClass __declspec(dllimport) -# define epicsShareFunc __declspec(dllimport) -# else -# define epicsShareExtern extern -# define epicsShareClass -# define epicsShareFunc -# endif -# endif - /* - * Subroutine removes arguments - * (Bill does not allow __stdcall to be next to - * __declspec(xxxx)) - */ -# define epicsShareAPI __stdcall - /* - * Variable args functions cannot be __stdcall - * Use this for variable args functions - * (Those using either ... or va_list arguments) - */ -# define epicsShareAPIV __cdecl -# if defined(EPICS_DLL_NO) /* this indicates that we are not building a DLL */ -# define epicsShareDef -# else -# define epicsShareDef __declspec(dllexport) extern -# endif -# define READONLY const -/* - * if its the old VAX C Compiler (not DEC C) - */ -#elif defined(VAXC) - - /* - * VAXC creates FORTRAN common blocks when - * we use "extern int fred"/"int fred=4". Therefore, - * the initialization is not loaded unless we - * call a function in that object module. - * - * DEC CXX does not have this problem. - * We suspect (but do not know) that DEC C - * also does not have this problem. - */ -# define epicsShareExtern globalref -# define epicsShareDef globaldef -# define READONLY const -# define epicsShareClass -# define epicsShareFunc -# define epicsShareAPI -# define epicsShareAPIV - -#else - -/* else => no import/export specifiers */ - -# define epicsShareExtern extern -# define epicsShareAPI -# define epicsShareAPIV -# define epicsShareClass -# define epicsShareDef - -# define epicsShareFunc -# if defined(__STDC__) -# define READONLY const -# else -# define READONLY -# endif - -#endif - diff --git a/src/include/unixFileName.h b/src/include/unixFileName.h deleted file mode 100644 index 876d29700..000000000 --- a/src/include/unixFileName.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * unixFileName.h - * Author: Jeff Hill - * - * - */ -#ifndef unixFileNameH -#define unixFileNameH - -#define OSI_PATH_LIST_SEPARATOR ":" -#define OSI_PATH_SEPARATOR "/" - -#endif /* unixFileNameH */