defines.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef DEFINES_H
00008 #define DEFINES_H
00009 
00010 #include <cadef.h>
00011 #include <iostream>
00012 
00013 
00014 #define EV      EPICSVERSION(HAVE_EPICS)
00015 
00016 #if (EPICS_VERSION==3) && (EPICS_MAJOR==14) && (EPICS_MINOR>=11)
00017 #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
00018 #elif (EPICS_VERSION==3) && (EPICS_MAJOR>14) 
00019 #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM | DBE_PROPERTY
00020 #else
00021 #define MASK_CTRL DBE_VALUE | DBE_LOG | DBE_ALARM
00022 #endif
00023 
00024 //To match alarmString.h in EPICS
00025 const unsigned short ALARM_SEVERITY_STRING_LENGTH =  4; // "NO_ALARM","MINOR","MAJOR", "INVALID"
00026 const unsigned short ALARM_STATUS_STRING_LENGTH= 22; // "NO_ALARM","READ","WRITE",
00027 //"HIHI","HIGH","LOLO","LOW","STATE","COS","COMM","TIMEOUT","HWLIMIT","CALC","SCAN","LINK",
00028 //"SOFT","BAD_SUB","UDF","DISABLE","SIMM","READ_ACCESS","WRITE_ACCESS"
00029 
00030 
00034 typedef void (*pCallback) (struct event_handler_args ARGS);
00035 typedef void (*pCallbackConnection) (struct connection_handler_args ARGS);
00036 
00037 
00038 const bool ADD_EXCEPTION_EVENT=false; //set to false for use with MATLAB
00039 // Standard exception event is good enough
00043 const short PVNAME_SIZE=MAX_STRING_SIZE +20; //from epicsTypes.h 40;
00044 const short PVGROUP_PSEUDO_SIZE=1024; //determines max size of groupNameEntry for Pseudo groups
00045 
00046 //List all possible deliminators; code will separate dev/attriby when first of this list is found;
00047 const std::string DEFAULT_DEVICE_ATTRIBUTE_DELIMINATOR=":";  //Only one deliminator
00048 
00049 typedef char pv_string_t[PVNAME_SIZE]; 
00050 
00055 const bool              DEFAULT_SELF_GOVERNING_TIMEOUT    = true;
00056 
00057 const double            DEFAULT_TIMEOUT_PEND_IO_WF        =  5.0;
00058 const double                    TIMEOUT_PEND_IO_MIN       =  0.00001;
00059 const double                    TIMEOUT_PEND_IO_MAX       = 20.0; //max timeout for first attempt (ntries=1)
00060 const unsigned short    DEFAULT_PEND_IO_NO_TRIES          =  2;
00061 const unsigned short            PEND_IO_MAX_TRIES         =  10; //safety net
00062 const double            DEFAULT_PEND_IO_INCREMENT_TIME    =  2.0;
00063 const double                    PEND_IO_INCREMENT_TIME_MIN=  0.05;
00064 const double                    PEND_IO_INCREMENT_TIME_MAX= 10.0;
00065 const double            DEFAULT_TIMEOUT_PEND_EVENT        =  0.4;
00066 const double            DEFAULT_TIMEOUT_PEND_IO           =  3.0;
00067 const double            DEFAULT_TIMEOUT_SG_PEND_EVENT     =  0.5; // plus nMember/NMEMBER_PER_SEC_SG_PEND_EVENT
00068 const double            NMEMBER_PER_SEC_SG_PEND_EVENT     =  400; // 
00069 const double            DEFAULT_TIMEOUT_SG_PEND_IO        =  5.0;
00070 
00071 // Otherwise too many large databuffers are created
00072 const unsigned int          MAX_NELEM_FOR_CTRL_BUFFER   = 8192;
00073 //Keep at 1, else becomes problematic when wf is made a syn. group member (ch disconnect occurs for STSACK cb)
00074 const unsigned int          MAX_NELEM_FOR_STSACK_BUFFER = 1;  
00075 const unsigned int      DEFAULT_NELEM_FOR_CTRL_BUFFER   = 256; //if nelem exceeds above
00076 const unsigned int      DEFAULT_NELEM_FOR_STSACK_BUFFER = 1; //if nelem exceeds above
00077 
00078 const unsigned short        MAX_NO_MONITORS_PER_CHANNEL = 4; //cant start more than 4; 1 is more usual.
00079 
00080 #endif // DEFINES_H

Generated on 3 May 2017 for CAFE by  doxygen 1.6.1