Experimental Physics and
| |||||||||||||||||
|
I appreciate your kind reply. Currently, I am working with the KSTAR team at NFRI, Daejeon, Korea and developing a distributed control and data acquisition module for the ECEI diagnostics to be installed at KSTAR. The version of EPICS base in the current KSTAR integrated control system is 3.14.8.2 and that's why I am using EPICS base 3.14.8.2. The error seems to be so strange as you can see. I had used EPICS before but I haven' seen any error like this before. As far as I have learned about the error, it happens because the compiler can not find appropriate definitions of defined type (typedef types) in the definition of fields of the structure in dbCommon.h. I attach the dbCommon.h and epicsTime.h to this e-mail, but they are the files included in the published distribution. The version of gcc is 4.1.2 (which is the default version of gcc included in CentOS 5.4). The version of the kernel is [jincheol@********** ~]$ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [jincheol@********** ~]$ uname -a Linux ********** 2.6.18-164.15.1.el5PAE #1 SMP Wed Mar 17 12:14:29 EDT 2010 i686 i686 i386 GNU/Linux [jincheol@********** ~]$ Thank you again. Best regards, Jincheol. J. Lewis Muir ì ê: On 5/6/10 9:52 PM, Jincheol B. Kim wrote: -- *-----------------------------------------------------------------------* "Advancement of Science with Innovation of Advanced Computing Technology" Jincheol B. Kim, Ph. D. Research Professor Center for Fusion Plasma Diagnostics and Steady State Operation Research, Department of Physics, POSTECH San 31, Hyoja-dong, Nam-gu Pohang, Kyungbuk 790-784 Republic of Korea Tel: +82 54 279 5849 FAX: +82 54 279 3099 Mobile: +82 10 2713 7593 E-Mail: [email protected] [email protected] *-----------------------------------------------------------------------* #ifndef INCdbCommonH #define INCdbCommonH typedef struct dbCommon { char name[61]; /* Record Name */ char desc[29]; /* Descriptor */ char asg[29]; /* Access Security Group */ epicsEnum16 scan; /* Scan Mechanism */ epicsEnum16 pini; /* Process at iocInit */ epicsInt16 phas; /* Scan Phase */ epicsInt16 evnt; /* Event Number */ epicsInt16 tse; /* Time Stamp Event */ DBLINK tsel; /* Time Stamp Link */ epicsEnum16 dtyp; /* Device Type */ epicsInt16 disv; /* Disable Value */ epicsInt16 disa; /* Disable */ DBLINK sdis; /* Scanning Disable */ epicsMutexId mlok; /* Monitor lock */ ELLLIST mlis; /* Monitor List */ epicsUInt8 disp; /* Disable putField */ epicsUInt8 proc; /* Force Processing */ epicsEnum16 stat; /* Alarm Status */ epicsEnum16 sevr; /* Alarm Severity */ epicsEnum16 nsta; /* New Alarm Status */ epicsEnum16 nsev; /* New Alarm Severity */ epicsEnum16 acks; /* Alarm Ack Severity */ epicsEnum16 ackt; /* Alarm Ack Transient */ epicsEnum16 diss; /* Disable Alarm Sevrty */ epicsUInt8 lcnt; /* Lock Count */ epicsUInt8 pact; /* Record active */ epicsUInt8 putf; /* dbPutField process */ epicsUInt8 rpro; /* Reprocess */ void *asp; /* Access Security Pvt */ struct putNotify *ppn; /* addr of PUTNOTIFY */ struct putNotifyRecord *ppnr; /* pputNotifyRecord */ struct scan_element *spvt; /* Scan Private */ struct rset *rset; /* Address of RSET */ struct dset *dset; /* DSET address */ void *dpvt; /* Device Private */ struct dbRecordType *rdes; /* Address of dbRecordType */ struct lockRecord *lset; /* Lock Set */ epicsEnum16 prio; /* Scheduling Priority */ epicsUInt8 tpro; /* Trace Processing */ char bkpt; /* Break Point */ epicsUInt8 udf; /* Undefined */ epicsTimeStamp time; /* Time */ DBLINK flnk; /* Forward Process Link */ } dbCommon; #endif /*INCdbCommonH*/ /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE Versions 3.13.7 * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* epicsTime.h */ /* Author Jeffrey O. Hill */ #ifndef epicsTimehInclude #define epicsTimehInclude #include <time.h> #include "shareLib.h" #include "epicsTypes.h" #include "osdTime.h" /* epics time stamp for C interface*/ typedef struct epicsTimeStamp { epicsUInt32 secPastEpoch; /* seconds since 0000 Jan 1, 1990 */ epicsUInt32 nsec; /* nanoseconds within second */ } epicsTimeStamp; /*TS_STAMP is deprecated */ #define TS_STAMP epicsTimeStamp struct timespec; /* POSIX real time */ struct timeval; /* BSD */ struct l_fp; /* NTP timestamp */ #ifdef __cplusplus class aitTimeStamp; /* GDD*/ /* * extend ANSI C RTL "struct tm" to include nano seconds within a second * and a struct tm that is adjusted for the local timezone */ struct local_tm_nano_sec { struct tm ansi_tm; /* ANSI C time details */ unsigned long nSec; /* nano seconds extension */ }; /* * extend ANSI C RTL "struct tm" to includes nano seconds within a second * and a struct tm that is adjusted for GMT (UTC) */ struct gm_tm_nano_sec { struct tm ansi_tm; /* ANSI C time details */ unsigned long nSec; /* nano seconds extension */ }; /* * wrapping this in a struct allows conversion to and * from ANSI time_t but does not allow unexpected * conversions to occur */ struct time_t_wrapper { time_t ts; }; class epicsTime; class epicsShareClass epicsTimeEvent { friend class epicsTime; public: epicsTimeEvent (const int &eventName); private: int eventNumber; }; class epicsShareClass epicsTime { public: /* exceptions */ class unableToFetchCurrentTime {}; class formatProblemWithStructTM {}; epicsTime (); epicsTime ( const epicsTime & t ); static epicsTime getEvent ( const epicsTimeEvent & ); static epicsTime getCurrent (); /* convert to and from EPICS epicsTimeStamp format */ operator epicsTimeStamp () const; epicsTime ( const epicsTimeStamp & ts ); epicsTime & operator = ( const epicsTimeStamp & ); /* convert to and from ANSI time_t */ operator time_t_wrapper () const; epicsTime ( const time_t_wrapper & ); epicsTime & operator = ( const time_t_wrapper & ); /* * convert to and from ANSI Cs "struct tm" (with nano seconds) * adjusted for the local time zone */ operator local_tm_nano_sec () const; epicsTime ( const local_tm_nano_sec & ); epicsTime & operator = ( const local_tm_nano_sec & ); /* * convert to ANSI Cs "struct tm" (with nano seconds) * adjusted for GM time (UTC) */ operator gm_tm_nano_sec () const; /* convert to and from POSIX RTs "struct timespec" */ operator struct timespec () const; epicsTime ( const struct timespec & ); epicsTime & operator = ( const struct timespec & ); /* convert to and from BSDs "struct timeval" */ operator struct timeval () const; epicsTime ( const struct timeval & ); epicsTime & operator = ( const struct timeval & ); /* convert to and from NTP timestamp format */ operator l_fp () const; epicsTime ( const l_fp & ); epicsTime & operator = ( const l_fp & ); /* convert to and from GDDs aitTimeStamp format */ operator aitTimeStamp () const; epicsTime ( const aitTimeStamp & ); epicsTime & operator = ( const aitTimeStamp & ); /* convert to and from WIN32s FILETIME (implemented only on WIN32) */ operator struct _FILETIME () const; epicsTime ( const struct _FILETIME & ); epicsTime & operator = ( const struct _FILETIME & ); /* arithmetic operators */ double operator- ( const epicsTime & ) const; /* returns seconds */ epicsTime operator+ ( const double & ) const; /* add rhs seconds */ epicsTime operator- ( const double & ) const; /* subtract rhs seconds */ epicsTime operator+= ( const double & ); /* add rhs seconds */ epicsTime operator-= ( const double & ); /* subtract rhs seconds */ /* comparison operators */ bool operator == ( const epicsTime & ) const; bool operator != ( const epicsTime & ) const; bool operator <= ( const epicsTime & ) const; bool operator < ( const epicsTime & ) const; bool operator >= ( const epicsTime & ) const; bool operator > ( const epicsTime & ) const; /* convert current state to user-specified string */ size_t strftime ( char * pBuff, size_t bufLength, const char * pFormat ) const; /* dump current state to standard out */ void show ( unsigned interestLevel ) const; private: /* * private because: * a) application does not break when EPICS epoch is changed * b) no assumptions about internal storage or internal precision * in the application * c) it would be easy to forget which argument is nanoseconds * and which argument is seconds (no help from compiler) */ epicsTime ( const unsigned long secPastEpoch, const unsigned long nSec ); void addNanoSec ( long nanoSecAdjust ); unsigned long secPastEpoch; /* seconds since O000 Jan 1, 1990 */ unsigned long nSec; /* nanoseconds within second */ public: static void synchronize (); /* depricated */ }; extern "C" { #endif /* __cplusplus */ /* All epicsTime routines return (-1,0) for (failure,success) */ #define epicsTimeOK 0 #define epicsTimeERROR (-1) /*Some special values for eventNumber*/ #define epicsTimeEventCurrentTime 0 #define epicsTimeEventBestTime -1 #define epicsTimeEventDeviceTime -2 epicsShareFunc int epicsShareAPI epicsTimeGetCurrent ( epicsTimeStamp * pDest ); epicsShareFunc int epicsShareAPI epicsTimeGetEvent ( epicsTimeStamp *pDest, int eventNumber); /* convert to and from ANSI C's "time_t" */ epicsShareFunc int epicsShareAPI epicsTimeToTime_t ( time_t * pDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeFromTime_t ( epicsTimeStamp * pDest, time_t src ); /*convert to and from ANSI C's "struct tm" with nano seconds */ epicsShareFunc int epicsShareAPI epicsTimeToTM ( struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeToGMTM ( struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeFromTM ( epicsTimeStamp * pDest, const struct tm * pSrc, unsigned long nSecSrc ); /* convert to and from POSIX RT's "struct timespec" */ epicsShareFunc int epicsShareAPI epicsTimeToTimespec ( struct timespec * pDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeFromTimespec ( epicsTimeStamp * pDest, const struct timespec * pSrc ); /* convert to and from BSD's "struct timeval" */ epicsShareFunc int epicsShareAPI epicsTimeToTimeval ( struct timeval * pDest, const epicsTimeStamp * pSrc ); epicsShareFunc int epicsShareAPI epicsTimeFromTimeval ( epicsTimeStamp * pDest, const struct timeval * pSrc ); /*arithmetic operations */ epicsShareFunc double epicsShareAPI epicsTimeDiffInSeconds ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight );/* left - right */ epicsShareFunc void epicsShareAPI epicsTimeAddSeconds ( epicsTimeStamp * pDest, double secondsToAdd ); /* adds seconds to *pDest */ /*comparison operations: returns (0,1) if (false,true) */ epicsShareFunc int epicsShareAPI epicsTimeEqual ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); epicsShareFunc int epicsShareAPI epicsTimeNotEqual ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); epicsShareFunc int epicsShareAPI epicsTimeLessThan ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); /*true if left < right */ epicsShareFunc int epicsShareAPI epicsTimeLessThanEqual ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); /*true if left <= right) */ epicsShareFunc int epicsShareAPI epicsTimeGreaterThan ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); /*true if left > right */ epicsShareFunc int epicsShareAPI epicsTimeGreaterThanEqual ( const epicsTimeStamp * pLeft, const epicsTimeStamp * pRight); /*true if left >= right */ /*convert to ASCII string */ epicsShareFunc size_t epicsShareAPI epicsTimeToStrftime ( char * pBuff, size_t bufLength, const char * pFormat, const epicsTimeStamp * pTS ); /* dump current state to standard out */ epicsShareFunc void epicsShareAPI epicsTimeShow ( const epicsTimeStamp *, unsigned interestLevel ); /* OS dependent reentrant versions of the ANSI C interface because */ /* vxWorks gmtime_r interface does not match POSIX standards */ epicsShareFunc int epicsShareAPI epicsTime_localtime ( const time_t * clock, struct tm * result ); epicsShareFunc int epicsShareAPI epicsTime_gmtime ( const time_t * clock, struct tm * result ); #ifdef __cplusplus } #endif /* __cplusplus */ /* epicsTime inline member functions ,*/ #ifdef __cplusplus inline epicsTime epicsTime::operator - ( const double & rhs ) const { return epicsTime::operator + ( -rhs ); } inline epicsTime epicsTime::operator += ( const double & rhs ) { *this = epicsTime::operator + ( rhs ); return *this; } inline epicsTime epicsTime::operator -= ( const double & rhs ) { *this = epicsTime::operator + ( -rhs ); return *this; } inline bool epicsTime::operator == ( const epicsTime & rhs ) const { if ( this->secPastEpoch == rhs.secPastEpoch && this->nSec == rhs.nSec ) { return true; } return false; } inline bool epicsTime::operator != ( const epicsTime & rhs ) const { return !epicsTime::operator == ( rhs ); } inline bool epicsTime::operator >= ( const epicsTime & rhs ) const { return ! ( *this < rhs ); } inline bool epicsTime::operator > ( const epicsTime & rhs ) const { return ! ( *this <= rhs ); } inline epicsTime & epicsTime::operator = ( const local_tm_nano_sec & rhs ) { return *this = epicsTime ( rhs ); } inline epicsTime & epicsTime::operator = ( const struct timespec & rhs ) { *this = epicsTime ( rhs ); return *this; } inline epicsTime & epicsTime::operator = ( const aitTimeStamp & rhs ) { *this = epicsTime ( rhs ); return *this; } inline epicsTime & epicsTime::operator = ( const epicsTimeStamp & rhs ) { *this = epicsTime ( rhs ); return *this; } inline epicsTime & epicsTime::operator = ( const l_fp & rhs ) { *this = epicsTime ( rhs ); return *this; } inline epicsTime & epicsTime::operator = ( const time_t_wrapper & rhs ) { *this = epicsTime ( rhs ); return *this; } #endif /* __cplusplus */ #endif /* epicsTimehInclude */
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |