Merge ~dirk.zimoch/epics-base:CleanupWhitespace into ~epics-core/epics-base/+git/epics-base:7.0
- Git
- lp:~dirk.zimoch/epics-base
- CleanupWhitespace
- Merge into 7.0
Status: | Merged |
---|---|
Merge reported by: | mdavidsaver |
Merged at revision: | 2b1ce8cb2440947392a3f97ffee998ec8b3258dd |
Proposed branch: | ~dirk.zimoch/epics-base:CleanupWhitespace |
Merge into: | ~epics-core/epics-base/+git/epics-base:7.0 |
Diff against target: |
74188 lines (+21141/-21141) 640 files modified
modules/ca/src/client/CASG.cpp (+6/-6) modules/ca/src/client/SearchDest.h (+2/-2) modules/ca/src/client/access.cpp (+235/-235) modules/ca/src/client/acctst.c (+239/-239) modules/ca/src/client/acctstMain.c (+11/-11) modules/ca/src/client/acctstRegister.cpp (+1/-1) modules/ca/src/client/addrList.h (+5/-5) modules/ca/src/client/autoPtrFreeList.h (+10/-10) modules/ca/src/client/autoPtrRecycle.h (+13/-13) modules/ca/src/client/baseNMIU.cpp (+2/-2) modules/ca/src/client/bhe.cpp (+36/-36) modules/ca/src/client/bhe.h (+17/-17) modules/ca/src/client/caConnTest.cpp (+19/-19) modules/ca/src/client/caConnTestMain.cpp (+1/-1) modules/ca/src/client/caDiagnostics.h (+3/-3) modules/ca/src/client/caEventRate.cpp (+15/-15) modules/ca/src/client/caEventRateMain.cpp (+1/-1) modules/ca/src/client/caProto.h (+14/-14) modules/ca/src/client/caRepeater.cpp (+1/-1) modules/ca/src/client/caServerID.h (+4/-4) modules/ca/src/client/ca_client_context.cpp (+3/-3) modules/ca/src/client/cac.cpp (+1/-1) modules/ca/src/client/cac.h (+4/-4) modules/ca/src/client/cacChannel.cpp (+18/-18) modules/ca/src/client/cacChannelNotify.cpp (+10/-10) modules/ca/src/client/cacContextNotify.cpp (+4/-4) modules/ca/src/client/cacIO.h (+5/-5) modules/ca/src/client/cacReadNotify.cpp (+2/-2) modules/ca/src/client/cacStateNotify.cpp (+2/-2) modules/ca/src/client/cacWriteNotify.cpp (+2/-2) modules/ca/src/client/cadef.h (+88/-88) modules/ca/src/client/caerr.h (+6/-6) modules/ca/src/client/caeventmask.h (+4/-4) modules/ca/src/client/casw.cpp (+20/-20) modules/ca/src/client/catime.c (+44/-44) modules/ca/src/client/catimeMain.c (+1/-1) modules/ca/src/client/comBuf.cpp (+11/-11) modules/ca/src/client/comBuf.h (+21/-21) modules/ca/src/client/comQueRecv.cpp (+6/-6) modules/ca/src/client/comQueRecv.h (+12/-12) modules/ca/src/client/comQueSend.cpp (+58/-58) modules/ca/src/client/comQueSend.h (+49/-49) modules/ca/src/client/convert.cpp (+92/-92) modules/ca/src/client/db_access.h (+426/-426) modules/ca/src/client/disconnectGovernorTimer.cpp (+10/-10) modules/ca/src/client/disconnectGovernorTimer.h (+16/-16) modules/ca/src/client/evtime.c (+39/-39) modules/ca/src/client/getCallback.cpp (+11/-11) modules/ca/src/client/getCopy.cpp (+21/-21) modules/ca/src/client/hostNameCache.cpp (+10/-10) modules/ca/src/client/hostNameCache.h (+10/-10) modules/ca/src/client/inetAddrID.h (+3/-3) modules/ca/src/client/iocinf.cpp (+23/-23) modules/ca/src/client/iocinf.h (+15/-15) modules/ca/src/client/localHostName.cpp (+4/-4) modules/ca/src/client/localHostName.h (+2/-2) modules/ca/src/client/msgForMultiplyDefinedPV.cpp (+14/-14) modules/ca/src/client/msgForMultiplyDefinedPV.h (+12/-12) modules/ca/src/client/nciu.cpp (+3/-3) modules/ca/src/client/nciu.h (+5/-5) modules/ca/src/client/netIO.h (+78/-78) modules/ca/src/client/netReadNotifyIO.cpp (+16/-16) modules/ca/src/client/netSubscription.cpp (+27/-27) modules/ca/src/client/netWriteNotifyIO.cpp (+16/-16) modules/ca/src/client/net_convert.h (+5/-5) modules/ca/src/client/netiiu.cpp (+22/-22) modules/ca/src/client/netiiu.h (+36/-36) modules/ca/src/client/noopiiu.cpp (+34/-34) modules/ca/src/client/noopiiu.h (+38/-38) modules/ca/src/client/oldAccess.h (+13/-13) modules/ca/src/client/oldChannelNotify.cpp (+3/-3) modules/ca/src/client/oldSubscription.cpp (+8/-8) modules/ca/src/client/putCallback.cpp (+13/-13) modules/ca/src/client/repeater.cpp (+28/-28) modules/ca/src/client/repeaterClient.h (+11/-11) modules/ca/src/client/repeaterSubscribeTimer.cpp (+7/-7) modules/ca/src/client/repeaterSubscribeTimer.h (+19/-19) modules/ca/src/client/searchTimer.cpp (+64/-64) modules/ca/src/client/searchTimer.h (+26/-26) modules/ca/src/client/sgAutoPtr.h (+13/-13) modules/ca/src/client/syncGroup.h (+10/-10) modules/ca/src/client/syncGroupNotify.cpp (+2/-2) modules/ca/src/client/syncGroupReadNotify.cpp (+1/-1) modules/ca/src/client/syncGroupWriteNotify.cpp (+1/-1) modules/ca/src/client/syncgrp.cpp (+3/-3) modules/ca/src/client/tcpRecvThread.cpp (+1/-1) modules/ca/src/client/tcpRecvWatchdog.cpp (+30/-30) modules/ca/src/client/tcpRecvWatchdog.h (+16/-16) modules/ca/src/client/tcpSendWatchdog.cpp (+6/-6) modules/ca/src/client/tcpSendWatchdog.h (+12/-12) modules/ca/src/client/tcpiiu.cpp (+230/-230) modules/ca/src/client/test/ca_test.c (+213/-213) modules/ca/src/client/test/ca_test.h (+3/-3) modules/ca/src/client/test/ca_test_main.c (+31/-31) modules/ca/src/client/test_event.cpp (+12/-12) modules/ca/src/client/ucx.h (+34/-34) modules/ca/src/client/udpiiu.cpp (+166/-166) modules/ca/src/client/udpiiu.h (+91/-91) modules/ca/src/client/virtualCircuit.h (+91/-91) modules/ca/src/perl/CA.pm (+2/-2) modules/ca/src/template/top/caClientApp/caExample.c (+4/-4) modules/ca/src/template/top/caClientApp/caMonitor.c (+31/-31) modules/ca/src/template/top/caPerlApp/camonitor.pl (+2/-2) modules/ca/src/tools/caget.c (+20/-20) modules/ca/src/tools/cainfo.c (+13/-13) modules/ca/src/tools/camonitor.c (+16/-16) modules/ca/src/tools/caput.c (+12/-12) modules/ca/src/tools/tool_lib.c (+27/-27) modules/ca/src/tools/tool_lib.h (+2/-2) modules/database/src/ioc/as/asCa.c (+18/-18) modules/database/src/ioc/as/asCa.h (+1/-1) modules/database/src/ioc/as/asDbLib.c (+62/-62) modules/database/src/ioc/as/asDbLib.h (+2/-2) modules/database/src/ioc/as/asIocRegister.c (+1/-1) modules/database/src/ioc/as/asIocRegister.h (+1/-1) modules/database/src/ioc/as/ascheck.c (+22/-22) modules/database/src/ioc/bpt/cvtTable.h (+2/-2) modules/database/src/ioc/bpt/makeBpt.c (+221/-221) modules/database/src/ioc/db/callback.c (+2/-2) modules/database/src/ioc/db/callback.h (+9/-9) modules/database/src/ioc/db/cvtBpt.c (+126/-126) modules/database/src/ioc/db/dbAccess.c (+195/-195) modules/database/src/ioc/db/dbAccess.h (+2/-2) modules/database/src/ioc/db/dbAccessDefs.h (+34/-34) modules/database/src/ioc/db/dbBkpt.c (+16/-16) modules/database/src/ioc/db/dbBkpt.h (+4/-4) modules/database/src/ioc/db/dbCAC.h (+3/-3) modules/database/src/ioc/db/dbCa.c (+7/-7) modules/database/src/ioc/db/dbCaPvt.h (+37/-37) modules/database/src/ioc/db/dbCaTest.c (+2/-2) modules/database/src/ioc/db/dbCaTest.h (+1/-1) modules/database/src/ioc/db/dbChannelIO.cpp (+5/-5) modules/database/src/ioc/db/dbChannelIO.h (+3/-3) modules/database/src/ioc/db/dbContext.cpp (+7/-7) modules/database/src/ioc/db/dbContextReadNotifyCache.cpp (+4/-4) modules/database/src/ioc/db/dbConvert.h (+1/-1) modules/database/src/ioc/db/dbConvertFast.h (+1/-1) modules/database/src/ioc/db/dbConvertJSON.c (+2/-2) modules/database/src/ioc/db/dbConvertJSON.h (+1/-1) modules/database/src/ioc/db/dbEvent.c (+13/-13) modules/database/src/ioc/db/dbEvent.h (+1/-1) modules/database/src/ioc/db/dbFastLinkConv.c (+20/-20) modules/database/src/ioc/db/dbIocRegister.c (+1/-1) modules/database/src/ioc/db/dbIocRegister.h (+1/-1) modules/database/src/ioc/db/dbLock.c (+14/-14) modules/database/src/ioc/db/dbLock.h (+2/-2) modules/database/src/ioc/db/dbLockPvt.h (+7/-7) modules/database/src/ioc/db/dbNotify.c (+11/-11) modules/database/src/ioc/db/dbNotify.h (+16/-16) modules/database/src/ioc/db/dbPutNotifyBlocker.cpp (+8/-8) modules/database/src/ioc/db/dbPutNotifyBlocker.h (+6/-6) modules/database/src/ioc/db/dbScan.h (+1/-1) modules/database/src/ioc/db/dbSubscriptionIO.cpp (+7/-7) modules/database/src/ioc/db/dbTest.h (+1/-1) modules/database/src/ioc/db/db_convert.h (+20/-20) modules/database/src/ioc/db/db_field_log.h (+9/-9) modules/database/src/ioc/db/db_test.c (+1/-1) modules/database/src/ioc/db/db_test.h (+1/-1) modules/database/src/ioc/db/recGbl.c (+26/-26) modules/database/src/ioc/db/recGbl.h (+1/-1) modules/database/src/ioc/dbStatic/dbBase.h (+97/-97) modules/database/src/ioc/dbStatic/dbFldTypes.h (+41/-41) modules/database/src/ioc/dbStatic/dbLex.l (+72/-72) modules/database/src/ioc/dbStatic/dbLexRoutines.c (+265/-265) modules/database/src/ioc/dbStatic/dbPvdLib.c (+2/-2) modules/database/src/ioc/dbStatic/dbStaticIocRegister.c (+1/-1) modules/database/src/ioc/dbStatic/dbStaticIocRegister.h (+1/-1) modules/database/src/ioc/dbStatic/dbStaticLib.c (+863/-863) modules/database/src/ioc/dbStatic/dbStaticLib.h (+1/-1) modules/database/src/ioc/dbStatic/dbStaticPvt.h (+7/-7) modules/database/src/ioc/dbStatic/dbStaticRun.c (+14/-14) modules/database/src/ioc/dbStatic/dbYacc.y (+171/-171) modules/database/src/ioc/dbStatic/devSup.h (+8/-8) modules/database/src/ioc/dbStatic/drvSup.h (+2/-2) modules/database/src/ioc/dbStatic/guigroup.h (+3/-3) modules/database/src/ioc/dbStatic/link.h (+92/-92) modules/database/src/ioc/dbStatic/recSup.h (+14/-14) modules/database/src/ioc/dbStatic/special.h (+23/-23) modules/database/src/ioc/dbtemplate/dbLoadTemplate.h (+1/-1) modules/database/src/ioc/dbtemplate/dbLoadTemplate.y (+3/-3) modules/database/src/ioc/dbtemplate/dbLoadTemplate_lex.l (+1/-1) modules/database/src/ioc/dbtemplate/dbtoolsIocRegister.c (+1/-1) modules/database/src/ioc/dbtemplate/dbtoolsIocRegister.h (+1/-1) modules/database/src/ioc/misc/dlload.c (+1/-1) modules/database/src/ioc/misc/epicsRelease.h (+1/-1) modules/database/src/ioc/misc/iocInit.c (+1/-1) modules/database/src/ioc/misc/iocInit.h (+2/-2) modules/database/src/ioc/misc/iocshRegisterCommon.h (+1/-1) modules/database/src/ioc/misc/miscIocRegister.c (+1/-1) modules/database/src/ioc/misc/miscIocRegister.h (+1/-1) modules/database/src/ioc/registry/registryCommon.c (+1/-1) modules/database/src/ioc/registry/registryCommon.h (+1/-1) modules/database/src/ioc/registry/registryDeviceSupport.h (+1/-1) modules/database/src/ioc/registry/registryDriverSupport.h (+1/-1) modules/database/src/ioc/registry/registryFunction.h (+1/-1) modules/database/src/ioc/registry/registryIocRegister.c (+1/-1) modules/database/src/ioc/registry/registryIocRegister.h (+1/-1) modules/database/src/ioc/registry/registryJLinks.h (+1/-1) modules/database/src/ioc/registry/registryRecordType.h (+1/-1) modules/database/src/ioc/rsrv/camessage.c (+14/-14) modules/database/src/ioc/rsrv/camsgtask.c (+7/-7) modules/database/src/ioc/rsrv/caserverio.c (+19/-19) modules/database/src/ioc/rsrv/cast_server.c (+14/-14) modules/database/src/ioc/rsrv/online_notify.c (+4/-4) modules/database/src/std/dev/asSubRecordFunctions.c (+11/-11) modules/database/src/std/dev/devAaoSoft.c (+2/-2) modules/database/src/std/dev/devAiSoft.c (+1/-1) modules/database/src/std/dev/devAiSoftRaw.c (+1/-1) modules/database/src/std/dev/devAoSoft.c (+15/-15) modules/database/src/std/dev/devAoSoftCallback.c (+15/-15) modules/database/src/std/dev/devAoSoftRaw.c (+15/-15) modules/database/src/std/dev/devBiDbState.c (+12/-12) modules/database/src/std/dev/devBiSoft.c (+1/-1) modules/database/src/std/dev/devBiSoftRaw.c (+1/-1) modules/database/src/std/dev/devBoDbState.c (+12/-12) modules/database/src/std/dev/devBoSoft.c (+16/-16) modules/database/src/std/dev/devBoSoftCallback.c (+12/-12) modules/database/src/std/dev/devBoSoftRaw.c (+17/-17) modules/database/src/std/dev/devCalcoutSoft.c (+7/-7) modules/database/src/std/dev/devCalcoutSoftCallback.c (+7/-7) modules/database/src/std/dev/devEnviron.c (+1/-1) modules/database/src/std/dev/devEventSoft.c (+1/-1) modules/database/src/std/dev/devGeneralTime.c (+2/-2) modules/database/src/std/dev/devHistogramSoft.c (+18/-18) modules/database/src/std/dev/devI64inSoft.c (+1/-1) modules/database/src/std/dev/devI64outSoft.c (+1/-1) modules/database/src/std/dev/devI64outSoftCallback.c (+6/-6) modules/database/src/std/dev/devLiSoft.c (+1/-1) modules/database/src/std/dev/devLoSoft.c (+16/-16) modules/database/src/std/dev/devLoSoftCallback.c (+13/-13) modules/database/src/std/dev/devLsoSoftCallback.c (+1/-1) modules/database/src/std/dev/devMbbiDirectSoft.c (+1/-1) modules/database/src/std/dev/devMbbiDirectSoftRaw.c (+1/-1) modules/database/src/std/dev/devMbbiSoft.c (+1/-1) modules/database/src/std/dev/devMbbiSoftCallback.c (+1/-1) modules/database/src/std/dev/devMbbiSoftRaw.c (+1/-1) modules/database/src/std/dev/devMbboDirectSoft.c (+1/-1) modules/database/src/std/dev/devMbboDirectSoftRaw.c (+1/-1) modules/database/src/std/dev/devMbboSoft.c (+14/-14) modules/database/src/std/dev/devMbboSoftCallback.c (+12/-12) modules/database/src/std/dev/devPrintfSoft.c (+1/-1) modules/database/src/std/dev/devPrintfSoftCallback.c (+1/-1) modules/database/src/std/dev/devSiSoft.c (+1/-1) modules/database/src/std/dev/devSoSoft.c (+1/-1) modules/database/src/std/dev/devStdio.c (+1/-1) modules/database/src/std/dev/devTimestamp.c (+1/-1) modules/database/src/std/link/lnkCalc.c (+1/-1) modules/database/src/std/rec/aSubRecord.c (+1/-1) modules/database/src/std/rec/aiRecord.c (+143/-143) modules/database/src/std/rec/aoRecord.c (+163/-163) modules/database/src/std/rec/biRecord.c (+102/-102) modules/database/src/std/rec/boRecord.c (+174/-174) modules/database/src/std/rec/calcRecord.c (+15/-15) modules/database/src/std/rec/calcoutRecord.c (+5/-5) modules/database/src/std/rec/dfanoutRecord.c (+24/-24) modules/database/src/std/rec/eventRecord.c (+38/-38) modules/database/src/std/rec/fanoutRecord.c (+1/-1) modules/database/src/std/rec/histogramRecord.c (+1/-1) modules/database/src/std/rec/int64inRecord.c (+58/-58) modules/database/src/std/rec/int64outRecord.c (+92/-92) modules/database/src/std/rec/longinRecord.c (+55/-55) modules/database/src/std/rec/longoutRecord.c (+86/-86) modules/database/src/std/rec/mbbiDirectRecord.c (+1/-1) modules/database/src/std/rec/mbbiRecord.c (+1/-1) modules/database/src/std/rec/mbboDirectRecord.c (+1/-1) modules/database/src/std/rec/mbboRecord.c (+1/-1) modules/database/src/std/rec/permissiveRecord.c (+22/-22) modules/database/src/std/rec/printfRecord.c (+5/-5) modules/database/src/std/rec/selRecord.c (+59/-59) modules/database/src/std/rec/seqRecord.c (+5/-5) modules/database/src/std/rec/stateRecord.c (+29/-29) modules/database/src/std/rec/stringinRecord.c (+43/-43) modules/database/src/std/rec/stringoutRecord.c (+71/-71) modules/database/src/std/rec/subRecord.c (+4/-4) modules/database/src/std/softIoc/makeInstallDir.pl (+1/-1) modules/database/src/std/softIoc/softMain.cpp (+2/-2) modules/database/src/template/top/exampleApp/src/_APPNAME_Hello.c (+2/-2) modules/database/src/template/top/exampleApp/src/_APPNAME_Main.cpp (+1/-1) modules/database/src/template/top/exampleApp/src/devXxxSoft.c (+14/-14) modules/database/src/template/top/exampleApp/src/sncExample.stt (+9/-9) modules/database/src/template/top/exampleApp/src/xxxRecord.c (+124/-124) modules/database/src/template/top/iocApp/src/_APPNAME_Main.cpp (+1/-1) modules/database/src/tools/DBD.pm (+1/-1) modules/database/src/tools/DBD/Parser.pm (+5/-5) modules/database/src/tools/makeIncludeDbd.pl (+1/-1) modules/database/test/ioc/db/callbackParallelTest.c (+1/-1) modules/database/test/ioc/db/callbackTest.c (+2/-2) modules/database/test/ioc/db/dbCaLinkTest.c (+1/-1) modules/database/test/ioc/db/dbPutLinkTest.c (+1/-1) modules/database/test/std/rec/mbbioDirectTest.c (+5/-5) modules/database/test/std/rec/seqTest.c (+1/-1) modules/database/test/tools/Device.plt (+11/-11) modules/libcom/RTEMS/rtems_config.c (+1/-1) modules/libcom/RTEMS/rtems_netconfig.c (+2/-2) modules/libcom/RTEMS/rtems_util.c (+2/-2) modules/libcom/src/as/asLib.h (+71/-71) modules/libcom/src/as/asLib.y (+164/-164) modules/libcom/src/as/asLibRoutines.c (+608/-608) modules/libcom/src/as/asLib_lex.l (+36/-36) modules/libcom/src/as/asTrapWrite.c (+3/-3) modules/libcom/src/bucketLib/bucketLib.c (+315/-315) modules/libcom/src/bucketLib/bucketLib.h (+25/-25) modules/libcom/src/calc/calcPerform.c (+383/-383) modules/libcom/src/calc/postfix.c (+415/-415) modules/libcom/src/calc/postfix.h (+1/-1) modules/libcom/src/calc/postfixPvt.h (+61/-61) modules/libcom/src/cppStd/epicsAlgorithm.h (+2/-2) modules/libcom/src/cvtFast/cvtFast.c (+141/-141) modules/libcom/src/cxxTemplates/epicsGuard.h (+15/-15) modules/libcom/src/cxxTemplates/epicsSingleton.h (+40/-40) modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp (+4/-4) modules/libcom/src/cxxTemplates/resourceLib.cpp (+2/-2) modules/libcom/src/cxxTemplates/resourceLib.h (+91/-91) modules/libcom/src/cxxTemplates/test/minmaxTest.cc (+22/-22) modules/libcom/src/cxxTemplates/test/resourceLibTest.cc (+194/-194) modules/libcom/src/cxxTemplates/test/tsDLListBench.cc (+36/-36) modules/libcom/src/cxxTemplates/test/tsDLListTest.cc (+5/-5) modules/libcom/src/cxxTemplates/test/tsSLListBench.cc (+42/-42) modules/libcom/src/cxxTemplates/test/tsSLListTest.cc (+65/-65) modules/libcom/src/cxxTemplates/tsDLList.h (+42/-42) modules/libcom/src/cxxTemplates/tsFreeList.h (+17/-17) modules/libcom/src/cxxTemplates/tsMinMax.h (+5/-5) modules/libcom/src/cxxTemplates/tsSLList.h (+9/-9) modules/libcom/src/dbmf/dbmf.c (+25/-25) modules/libcom/src/dbmf/dbmf.h (+2/-2) modules/libcom/src/ellLib/ellLib.c (+1/-1) modules/libcom/src/env/envDefs.h (+26/-26) modules/libcom/src/env/envSubr.c (+171/-171) modules/libcom/src/error/epicsPrint.h (+1/-1) modules/libcom/src/error/errSymTbl.h (+1/-1) modules/libcom/src/error/errlog.c (+1/-1) modules/libcom/src/error/errlog.h (+1/-1) modules/libcom/src/error/makeStatTbl.pl (+1/-1) modules/libcom/src/fdmgr/fdManager.cpp (+25/-25) modules/libcom/src/fdmgr/fdManager.h (+12/-12) modules/libcom/src/fdmgr/fdmgr.cpp (+27/-27) modules/libcom/src/fdmgr/fdmgr.h (+33/-33) modules/libcom/src/flex/ccl.c (+39/-39) modules/libcom/src/flex/dfa.c (+565/-565) modules/libcom/src/flex/ecs.c (+168/-168) modules/libcom/src/flex/flex.c (+375/-375) modules/libcom/src/flex/flex.skel (+277/-277) modules/libcom/src/flex/flex.skel.static (+280/-280) modules/libcom/src/flex/flexdef.h (+60/-60) modules/libcom/src/flex/gen.c (+669/-669) modules/libcom/src/flex/libmain.c (+1/-1) modules/libcom/src/flex/misc.c (+182/-182) modules/libcom/src/flex/nfa.c (+197/-197) modules/libcom/src/flex/parse.y (+498/-498) modules/libcom/src/flex/scan.c (+687/-687) modules/libcom/src/flex/sym.c (+42/-42) modules/libcom/src/flex/tblcmp.c (+387/-387) modules/libcom/src/flex/yylex.c (+150/-150) modules/libcom/src/freeList/freeList.h (+2/-2) modules/libcom/src/freeList/freeListLib.c (+20/-20) modules/libcom/src/gpHash/gpHash.h (+4/-4) modules/libcom/src/iocsh/initHooks.c (+1/-1) modules/libcom/src/iocsh/initHooks.h (+1/-1) modules/libcom/src/iocsh/iocsh.cpp (+15/-15) modules/libcom/src/iocsh/iocsh.h (+1/-1) modules/libcom/src/iocsh/libComRegister.c (+3/-3) modules/libcom/src/iocsh/libComRegister.h (+1/-1) modules/libcom/src/iocsh/registry.c (+3/-3) modules/libcom/src/iocsh/registry.h (+1/-1) modules/libcom/src/log/iocLog.c (+3/-3) modules/libcom/src/log/iocLog.h (+3/-3) modules/libcom/src/log/iocLogServer.c (+544/-544) modules/libcom/src/log/logClient.h (+3/-3) modules/libcom/src/macLib/macCore.c (+5/-5) modules/libcom/src/macLib/macEnv.c (+2/-2) modules/libcom/src/macLib/macLib.h (+1/-1) modules/libcom/src/macLib/macUtil.c (+127/-127) modules/libcom/src/misc/aToIPAddr.c (+18/-18) modules/libcom/src/misc/adjustment.c (+6/-6) modules/libcom/src/misc/adjustment.h (+1/-1) modules/libcom/src/misc/alarm.h (+1/-1) modules/libcom/src/misc/alarmString.c (+1/-1) modules/libcom/src/misc/alarmString.h (+1/-1) modules/libcom/src/misc/cantProceed.c (+3/-3) modules/libcom/src/misc/cantProceed.h (+1/-1) modules/libcom/src/misc/dbDefs.h (+1/-1) modules/libcom/src/misc/epicsConvert.c (+1/-1) modules/libcom/src/misc/epicsExit.c (+6/-6) modules/libcom/src/misc/epicsExport.h (+1/-1) modules/libcom/src/misc/epicsStdlib.c (+1/-1) modules/libcom/src/misc/epicsString.c (+1/-1) modules/libcom/src/misc/epicsString.h (+1/-1) modules/libcom/src/misc/epicsUnitTest.c (+32/-32) modules/libcom/src/misc/epicsUnitTest.h (+5/-5) modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp (+25/-25) modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h (+9/-9) modules/libcom/src/misc/locationException.h (+1/-1) modules/libcom/src/misc/makeEpicsVersion.pl (+1/-1) modules/libcom/src/misc/shareLib.h (+21/-21) modules/libcom/src/misc/testMain.h (+1/-1) modules/libcom/src/misc/truncateFile.c (+99/-99) modules/libcom/src/misc/unixFileName.h (+1/-1) modules/libcom/src/osi/compiler/clang/compilerSpecific.h (+3/-3) modules/libcom/src/osi/compiler/clang/epicsAtomicCD.h (+1/-1) modules/libcom/src/osi/compiler/default/compilerSpecific.h (+3/-3) modules/libcom/src/osi/compiler/default/epicsAtomicCD.h (+1/-1) modules/libcom/src/osi/compiler/gcc/compilerSpecific.h (+5/-5) modules/libcom/src/osi/compiler/gcc/epicsAtomicCD.h (+16/-16) modules/libcom/src/osi/compiler/msvc/compilerSpecific.h (+6/-6) modules/libcom/src/osi/compiler/msvc/epicsAtomicCD.h (+13/-13) modules/libcom/src/osi/compiler/solStudio/compilerSpecific.h (+2/-2) modules/libcom/src/osi/compiler/solStudio/epicsAtomicCD.h (+1/-1) modules/libcom/src/osi/compilerDependencies.h (+2/-2) modules/libcom/src/osi/devLib.h (+15/-15) modules/libcom/src/osi/devLibVME.c (+29/-29) modules/libcom/src/osi/devLibVME.h (+56/-56) modules/libcom/src/osi/devLibVMEImpl.h (+53/-53) modules/libcom/src/osi/epicsAssert.h (+1/-1) modules/libcom/src/osi/epicsAtomic.h (+16/-16) modules/libcom/src/osi/epicsAtomicDefault.h (+14/-14) modules/libcom/src/osi/epicsEndian.h (+1/-1) modules/libcom/src/osi/epicsEvent.cpp (+6/-6) modules/libcom/src/osi/epicsEvent.h (+1/-1) modules/libcom/src/osi/epicsFindSymbol.h (+1/-1) modules/libcom/src/osi/epicsGeneralTime.c (+3/-3) modules/libcom/src/osi/epicsInterrupt.h (+1/-1) modules/libcom/src/osi/epicsMath.cpp (+1/-1) modules/libcom/src/osi/epicsMessageQueue.cpp (+2/-2) modules/libcom/src/osi/epicsMessageQueue.h (+1/-1) modules/libcom/src/osi/epicsMutex.cpp (+17/-17) modules/libcom/src/osi/epicsMutex.h (+4/-4) modules/libcom/src/osi/epicsSignal.h (+6/-6) modules/libcom/src/osi/epicsStackTrace.c (+42/-42) modules/libcom/src/osi/epicsStackTrace.h (+3/-3) modules/libcom/src/osi/epicsStackTracePvt.h (+7/-7) modules/libcom/src/osi/epicsStdio.c (+1/-1) modules/libcom/src/osi/epicsStdio.h (+2/-2) modules/libcom/src/osi/epicsStdioRedirect.h (+1/-1) modules/libcom/src/osi/epicsTempFile.h (+1/-1) modules/libcom/src/osi/epicsThread.h (+4/-4) modules/libcom/src/osi/epicsTime.h (+2/-2) modules/libcom/src/osi/os/Darwin/epicsMath.h (+1/-1) modules/libcom/src/osi/os/Darwin/osdBackTrace.cpp (+3/-3) modules/libcom/src/osi/os/Darwin/osdEnv.c (+1/-1) modules/libcom/src/osi/os/Darwin/osdFindAddr.c (+3/-3) modules/libcom/src/osi/os/Darwin/osdTime.h (+1/-1) modules/libcom/src/osi/os/Darwin/osiFileName.h (+1/-1) modules/libcom/src/osi/os/Linux/osdBackTrace.cpp (+3/-3) modules/libcom/src/osi/os/Linux/osdFindAddr.c (+3/-3) modules/libcom/src/osi/os/Linux/osdTime.h (+1/-1) modules/libcom/src/osi/os/Linux/osiFileName.h (+1/-1) modules/libcom/src/osi/os/Linux/osiUnistd.h (+5/-5) modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c (+14/-14) modules/libcom/src/osi/os/RTEMS/epicsAtomicOSD.h (+1/-1) modules/libcom/src/osi/os/RTEMS/epicsMath.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdEnv.c (+1/-1) modules/libcom/src/osi/os/RTEMS/osdEvent.c (+11/-11) modules/libcom/src/osi/os/RTEMS/osdEvent.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdFindSymbol.c (+1/-1) modules/libcom/src/osi/os/RTEMS/osdInterrupt.c (+4/-4) modules/libcom/src/osi/os/RTEMS/osdInterrupt.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdMessageQueue.c (+8/-8) modules/libcom/src/osi/os/RTEMS/osdMessageQueue.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdMutex.c (+6/-6) modules/libcom/src/osi/os/RTEMS/osdMutex.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdPoolStatus.c (+1/-1) modules/libcom/src/osi/os/RTEMS/osdProcess.c (+2/-2) modules/libcom/src/osi/os/RTEMS/osdSignal.cpp (+1/-1) modules/libcom/src/osi/os/RTEMS/osdStrtod.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osdThread.c (+3/-3) modules/libcom/src/osi/os/RTEMS/osdVME.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osiFileName.h (+1/-1) modules/libcom/src/osi/os/RTEMS/osiUnistd.h (+5/-5) modules/libcom/src/osi/os/WIN32/epicsAtomicMS.h (+21/-21) modules/libcom/src/osi/os/WIN32/epicsAtomicOSD.h (+8/-8) modules/libcom/src/osi/os/WIN32/epicsGetopt.c (+70/-70) modules/libcom/src/osi/os/WIN32/epicsGetopt.h (+1/-1) modules/libcom/src/osi/os/WIN32/epicsMath.h (+2/-2) modules/libcom/src/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp (+2/-2) modules/libcom/src/osi/os/WIN32/forceBadAllocException.cpp (+5/-5) modules/libcom/src/osi/os/WIN32/osdBackTrace.cpp (+3/-3) modules/libcom/src/osi/os/WIN32/osdEnv.c (+9/-9) modules/libcom/src/osi/os/WIN32/osdEvent.c (+11/-11) modules/libcom/src/osi/os/WIN32/osdEvent.h (+1/-1) modules/libcom/src/osi/os/WIN32/osdFindSymbol.c (+1/-1) modules/libcom/src/osi/os/WIN32/osdMutex.c (+21/-21) modules/libcom/src/osi/os/WIN32/osdMutex.h (+1/-1) modules/libcom/src/osi/os/WIN32/osdPoolStatus.c (+1/-1) modules/libcom/src/osi/os/WIN32/osdPoolStatus.h (+1/-1) modules/libcom/src/osi/os/WIN32/osdProcess.c (+24/-24) modules/libcom/src/osi/os/WIN32/osdSignal.cpp (+1/-1) modules/libcom/src/osi/os/WIN32/osdSock.c (+90/-90) modules/libcom/src/osi/os/WIN32/osdSock.h (+7/-7) modules/libcom/src/osi/os/WIN32/osdStdio.c (+1/-1) modules/libcom/src/osi/os/WIN32/osdStrtod.h (+2/-2) modules/libcom/src/osi/os/WIN32/osdThread.c (+65/-65) modules/libcom/src/osi/os/WIN32/osdTime.cpp (+18/-18) modules/libcom/src/osi/os/WIN32/osiFileName.h (+1/-1) modules/libcom/src/osi/os/WIN32/osiUnistd.h (+5/-5) modules/libcom/src/osi/os/WIN32/setThreadName.cpp (+2/-2) modules/libcom/src/osi/os/WIN32/systemCallIntMech.cpp (+3/-3) modules/libcom/src/osi/os/cygwin32/osdStrtod.h (+2/-2) modules/libcom/src/osi/os/cygwin32/osiFileName.h (+1/-1) modules/libcom/src/osi/os/cygwin32/systemCallIntMech.cpp (+2/-2) modules/libcom/src/osi/os/default/epicsGetopt.h (+1/-1) modules/libcom/src/osi/os/default/epicsSocketConvertErrnoToString.cpp (+3/-3) modules/libcom/src/osi/os/default/gnuReadline.c (+1/-1) modules/libcom/src/osi/os/default/osdAssert.c (+1/-1) modules/libcom/src/osi/os/default/osdBackTrace.cpp (+4/-4) modules/libcom/src/osi/os/default/osdEnv.c (+9/-9) modules/libcom/src/osi/os/default/osdFindAddr.c (+3/-3) modules/libcom/src/osi/os/default/osdFindSymbol.c (+1/-1) modules/libcom/src/osi/os/default/osdInterrupt.c (+1/-1) modules/libcom/src/osi/os/default/osdInterrupt.h (+1/-1) modules/libcom/src/osi/os/default/osdMessageQueue.cpp (+2/-2) modules/libcom/src/osi/os/default/osdNetIntf.c (+18/-18) modules/libcom/src/osi/os/default/osdPoolStatus.c (+1/-1) modules/libcom/src/osi/os/default/osdPoolStatus.h (+1/-1) modules/libcom/src/osi/os/default/osdSignal.cpp (+1/-1) modules/libcom/src/osi/os/default/osdSockAddrReuse.cpp (+2/-2) modules/libcom/src/osi/os/default/osdSpin.c (+1/-1) modules/libcom/src/osi/os/default/osdVME.h (+1/-1) modules/libcom/src/osi/os/default/osdWireConfig.h (+3/-3) modules/libcom/src/osi/os/default/osdWireFormat.h (+23/-23) modules/libcom/src/osi/os/freebsd/osdTime.h (+1/-1) modules/libcom/src/osi/os/freebsd/osiFileName.h (+1/-1) modules/libcom/src/osi/os/freebsd/osiUnistd.h (+5/-5) modules/libcom/src/osi/os/iOS/epicsMath.h (+1/-1) modules/libcom/src/osi/os/iOS/osdEnv.c (+1/-1) modules/libcom/src/osi/os/posix/epicsAtomicOSD.cpp (+13/-13) modules/libcom/src/osi/os/posix/epicsAtomicOSD.h (+1/-1) modules/libcom/src/osi/os/posix/epicsMath.h (+1/-1) modules/libcom/src/osi/os/posix/epicsTempFile.c (+1/-1) modules/libcom/src/osi/os/posix/osdElfFindAddr.c (+14/-14) modules/libcom/src/osi/os/posix/osdEvent.c (+1/-1) modules/libcom/src/osi/os/posix/osdEvent.h (+1/-1) modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp (+5/-5) modules/libcom/src/osi/os/posix/osdFindSymbol.c (+1/-1) modules/libcom/src/osi/os/posix/osdMutex.c (+6/-6) modules/libcom/src/osi/os/posix/osdMutex.h (+1/-1) modules/libcom/src/osi/os/posix/osdProcess.c (+4/-4) modules/libcom/src/osi/os/posix/osdSignal.cpp (+2/-2) modules/libcom/src/osi/os/posix/osdSock.c (+40/-40) modules/libcom/src/osi/os/posix/osdStdio.c (+1/-1) modules/libcom/src/osi/os/posix/osdStrtod.h (+1/-1) modules/libcom/src/osi/os/posix/osdThread.c (+2/-2) modules/libcom/src/osi/os/posix/osdTime.h (+5/-5) modules/libcom/src/osi/os/posix/osiUnistd.h (+5/-5) modules/libcom/src/osi/os/posix/systemCallIntMech.cpp (+3/-3) modules/libcom/src/osi/os/solaris/epicsAtomicOSD.h (+5/-5) modules/libcom/src/osi/os/solaris/epicsMath.h (+1/-1) modules/libcom/src/osi/os/solaris/osdBackTrace.cpp (+16/-16) modules/libcom/src/osi/os/solaris/osdEnv.c (+1/-1) modules/libcom/src/osi/os/solaris/osdFindAddr.c (+3/-3) modules/libcom/src/osi/os/solaris/osdStrtod.h (+2/-2) modules/libcom/src/osi/os/solaris/osiFileName.h (+1/-1) modules/libcom/src/osi/os/vxWorks/atReboot.cpp (+1/-1) modules/libcom/src/osi/os/vxWorks/camacLib.h (+32/-32) modules/libcom/src/osi/os/vxWorks/devLibVMEOSD.c (+23/-23) modules/libcom/src/osi/os/vxWorks/epicsAtomicOSD.h (+21/-21) modules/libcom/src/osi/os/vxWorks/epicsMath.h (+1/-1) modules/libcom/src/osi/os/vxWorks/logMsgToErrlog.cpp (+12/-12) modules/libcom/src/osi/os/vxWorks/module_types.h (+134/-134) modules/libcom/src/osi/os/vxWorks/osdEnv.c (+2/-2) modules/libcom/src/osi/os/vxWorks/osdEvent.c (+1/-1) modules/libcom/src/osi/os/vxWorks/osdEvent.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdFindSymbol.c (+1/-1) modules/libcom/src/osi/os/vxWorks/osdInterrupt.c (+1/-1) modules/libcom/src/osi/os/vxWorks/osdInterrupt.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdMessageQueue.cpp (+1/-1) modules/libcom/src/osi/os/vxWorks/osdMessageQueue.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdMutex.c (+1/-1) modules/libcom/src/osi/os/vxWorks/osdMutex.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdPoolStatus.c (+4/-4) modules/libcom/src/osi/os/vxWorks/osdProcess.c (+4/-4) modules/libcom/src/osi/os/vxWorks/osdReadline.c (+1/-1) modules/libcom/src/osi/os/vxWorks/osdSignal.cpp (+1/-1) modules/libcom/src/osi/os/vxWorks/osdSock.c (+17/-17) modules/libcom/src/osi/os/vxWorks/osdSock.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdStdio.c (+2/-2) modules/libcom/src/osi/os/vxWorks/osdThread.c (+5/-5) modules/libcom/src/osi/os/vxWorks/osdTime.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osdVME.h (+1/-1) modules/libcom/src/osi/os/vxWorks/osiFileName.h (+1/-1) modules/libcom/src/osi/os/vxWorks/strtoll.c (+88/-88) modules/libcom/src/osi/os/vxWorks/strtoull.c (+66/-66) modules/libcom/src/osi/os/vxWorks/task_params.h (+117/-117) modules/libcom/src/osi/os/vxWorks/veclist.c (+134/-134) modules/libcom/src/osi/osiClockTime.h (+1/-1) modules/libcom/src/osi/osiNTPTime.c (+1/-1) modules/libcom/src/osi/osiNTPTime.h (+1/-1) modules/libcom/src/osi/osiPoolStatus.h (+1/-1) modules/libcom/src/osi/osiProcess.h (+5/-5) modules/libcom/src/osi/osiSock.c (+36/-36) modules/libcom/src/osi/osiSock.h (+39/-39) modules/libcom/src/osi/osiWireFormat.h (+24/-24) modules/libcom/src/taskwd/taskwd.c (+2/-2) modules/libcom/src/taskwd/taskwd.h (+2/-2) modules/libcom/src/timer/epicsTimer.cpp (+22/-22) modules/libcom/src/timer/epicsTimer.h (+21/-21) modules/libcom/src/timer/timer.cpp (+11/-11) modules/libcom/src/timer/timerPrivate.h (+26/-26) modules/libcom/src/timer/timerQueue.cpp (+25/-25) modules/libcom/src/timer/timerQueueActive.cpp (+10/-10) modules/libcom/src/timer/timerQueueActiveMgr.cpp (+5/-5) modules/libcom/src/timer/timerQueuePassive.cpp (+6/-6) modules/libcom/src/valgrind/valgrind.h (+27/-27) modules/libcom/src/yacc/antelope.c (+144/-144) modules/libcom/src/yacc/closure.c (+93/-93) modules/libcom/src/yacc/defs.h (+48/-48) modules/libcom/src/yacc/error.c (+22/-22) modules/libcom/src/yacc/lalr.c (+162/-162) modules/libcom/src/yacc/lr0.c (+186/-186) modules/libcom/src/yacc/mkpar.c (+124/-124) modules/libcom/src/yacc/output.c (+596/-596) modules/libcom/src/yacc/reader.c (+891/-891) modules/libcom/src/yacc/skeleton.c (+40/-40) modules/libcom/src/yacc/symtab.c (+10/-10) modules/libcom/src/yacc/verbose.c (+135/-135) modules/libcom/src/yacc/warshall.c (+31/-31) modules/libcom/src/yajl/yajl.c (+2/-2) modules/libcom/src/yajl/yajl_buf.c (+1/-1) modules/libcom/src/yajl/yajl_buf.h (+1/-1) modules/libcom/src/yajl/yajl_common.h (+1/-1) modules/libcom/src/yajl/yajl_encode.c (+10/-10) modules/libcom/src/yajl/yajl_gen.c (+8/-8) modules/libcom/src/yajl/yajl_gen.h (+2/-2) modules/libcom/src/yajl/yajl_lex.c (+52/-52) modules/libcom/src/yajl/yajl_lex.h (+8/-8) modules/libcom/src/yajl/yajl_parse.h (+1/-1) modules/libcom/test/blockingSockTest.cpp (+13/-13) modules/libcom/test/epicsAlgorithmTest.cpp (+12/-12) modules/libcom/test/epicsAtomicPerform.cpp (+79/-79) modules/libcom/test/epicsAtomicTest.cpp (+55/-55) modules/libcom/test/epicsCalcTest.cpp (+66/-66) modules/libcom/test/epicsEllTest.c (+1/-1) modules/libcom/test/epicsEventTest.cpp (+1/-1) modules/libcom/test/epicsMutexTest.cpp (+5/-5) modules/libcom/test/epicsStackTraceTest.c (+6/-6) modules/libcom/test/epicsStdioTest.c (+3/-3) modules/libcom/test/epicsThreadPrivateTest.cpp (+2/-2) modules/libcom/test/epicsTimerTest.cpp (+7/-7) modules/libcom/test/fdmgrTest.c (+3/-3) modules/libcom/test/macDefExpandTest.c (+5/-5) modules/libcom/test/ringBytesTest.c (+3/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
mdavidsaver | Approve | ||
Andrew Johnson | Approve | ||
Review via email: mp+382303@code.launchpad.net |
Commit message
Cleanup whitespace
Description of the change
This is purely cosmetic:
1. There was a mess with tab character usage. Indention with spaces and tabs was mixed inconsistently sometimes with obviously different assumptions on tab width, even in the same file. This results in irregular, hard to read indents. Please stop using tabs in source code.
2. Clean up of space at end of line.
Can we please have a coding style guide?
Andrew Johnson (anj) wrote : | # |
Andrew Johnson (anj) wrote : | # |
Sorry, I withdraw my concerns about this particular merge request. I had only looked at your commit messages and not at the actual diff when I wrote the previous commit – my bad. I see now that you are only proposing changes here to the modules/ca tree, which is unlikely to suffer from the problems I was concerned about. The libcom and database modules would be a different matter though.
Dirk Zimoch (dirk.zimoch) wrote : | # |
Hi Andrew,
I had already started on an .indent.pro file, but so far found no setting that matches the majority of EPICS base coding styles (or let's better say: habits). But I am still trying...
I can also do the same for the 3.15 branch, so that the two look the same. I hope git is ok with two changes that do the same thing and then merging them?
And I was hoping not to limit the fixes on the modules/ca tree only. Let me check if I forgot something... But I have to admid, the ca tree was the worst.
Dirk Zimoch (dirk.zimoch) wrote : | # |
Ok, it seems I have missed files, headers actually. I forgot to seach for them everywhere. Had happen in the PV modules as well, but I had updated those yesterday already.
Tabs are in database/
Dirk Zimoch (dirk.zimoch) wrote : | # |
In the list of changed files above, I see many changes in modules/database and modules/libcom as well. But in the diff below I only find modules/ca. How that? When downloading the diff, the changes are there. Is there something wrong with the diff view of launchpad?
Dirk Zimoch (dirk.zimoch) wrote : | # |
What is your favorite coding style, mine looks like this:
int function(int a, int b)
{
int i;
for (i=a; i<b; i++)
{
if (i<10)
else
{
switch (i)
{
{
}
}
}
}
return 0;
}
Ralph Lange (ralph-lange) wrote : | # |
I don't think it's a good idea to change practically all lines in base to achieve a common coding style. It pretty much renders SCM's blame functionality useless, and is a matter of personal preference anyway.
Here's a nice list of the most common styles for braces and indentation:
http://
I don't think agreement will be easy.
Ralph Lange (ralph-lange) wrote : | # |
To answer your question:
I prefer K&R style (attached braces), and would usually have spaces around binary operators like = and < in your example.
Dirk Zimoch (dirk.zimoch) wrote : | # |
'git blame -w' to ignore whitespace change?
Dirk Zimoch (dirk.zimoch) wrote : | # |
I just found that I used 'find' the wrong way and there are many more files. I will try again ...
Ben Franksen (bfrk) wrote : | # |
I propose to shortcut discussion about coding style by agreeing on the status quo. A long time ago I figured out the indent options needed to reproduce the style preferred in EPICS base over the last decade or so:
indent -bap -bl -bli0 -br -brs -c41 -ce -cd41 -ci0 -cli0 -di1 -i4 -ip4 -nbc -ncdb -ncs -nfc1 -nfca -nlp -npcs -npsl -npro -nv -sob -ss -st -ts0
mdavidsaver (mdavidsaver) wrote : | # |
> 'git blame -w' to ignore whitespace change?
To my mind this is the important point. I'm fairly open about accepting the occasional reformatting which 'git diff --ignore-all-space' renders as empty. And I would be fairly closed to reformatting which doesn't. So eg. no moving brackets between lines. Also, this isn't something to be done frequently. (once per decade is ok)
This change is almost empty. 'git diff --ignore-all-space' still shows the removal of blank lines at the end of files. I'm not so bother this time, although I don't see much point to doing this in future.
As far as style rules. I'm not so strict on aspects other than indentation. There my first rule is to be consistent. With indentation of 4 spaces being a very strong preference (where allowed).
Beyond that, I'm not so concerned beyond a small bias towards schemes which qtcreator can apply automatically. In short, this is not an area where I want to spend much time.
So this change is acceptable to me, provided it doesn't complicate upmerge by whatever version of Git Andrew has these days.
I'm marking this "Needs Fixing" since Dirk has indicated he has more work to do.
Dirk Zimoch (dirk.zimoch) wrote : | # |
I will push a new version which produces empty 'git diff --ignore-all-space' output and which is re-based to the laterst 7.0. I can continue resasing it until Andrew is done with the pending merges. I am also willing to do the same for the 3.15 branch, so that future merges can go smoothly.
My most important issue is with the indention mixing tabs and spaces. Clearing out space at the end of lines is secondary. Least important are empty lines at eof (even though they should not lead to git blame confusion).
I will leave .dbd and .dbd.pod untouched for the moment, even though they have the same indention issue. But here I would probably aim for a consistent use of tab.
- 2b1ce8c... by Dirk Zimoch
-
removed spaces at end of line
Conflicts:
modules/libcom/ test/epicsCalcT est.cpp
Dirk Zimoch (dirk.zimoch) wrote : | # |
I took out the deletion of empty lines at eof and rebased the remaining changes onto the current 7.0 commit 85d198. I did not clean up the files in boost as they are an external, unlikely to ever change package.
'git diff --ignore-all-space 7.0' gives no output.
mdavidsaver (mdavidsaver) wrote : | # |
Applied as 36a8b51d8e743c4
Preview Diff
1 | diff --git a/modules/ca/src/client/CASG.cpp b/modules/ca/src/client/CASG.cpp | |||
2 | index 4ffb414..9eb44e6 100644 | |||
3 | --- a/modules/ca/src/client/CASG.cpp | |||
4 | +++ b/modules/ca/src/client/CASG.cpp | |||
5 | @@ -209,23 +209,23 @@ bool CASG::ioComplete ( | |||
6 | 209 | return this->ioPendingList.count () == 0u; | 209 | return this->ioPendingList.count () == 0u; |
7 | 210 | } | 210 | } |
8 | 211 | 211 | ||
10 | 212 | void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan, | 212 | void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan, |
11 | 213 | unsigned type, arrayElementCount count, const void * pValue ) | 213 | unsigned type, arrayElementCount count, const void * pValue ) |
12 | 214 | { | 214 | { |
13 | 215 | guard.assertIdenticalMutex ( this->client.mutexRef() ); | 215 | guard.assertIdenticalMutex ( this->client.mutexRef() ); |
14 | 216 | sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this ); | 216 | sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this ); |
16 | 217 | pNotify = syncGroupWriteNotify::factory ( | 217 | pNotify = syncGroupWriteNotify::factory ( |
17 | 218 | this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan ); | 218 | this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan ); |
18 | 219 | pNotify->begin ( guard, type, count, pValue ); | 219 | pNotify->begin ( guard, type, count, pValue ); |
19 | 220 | pNotify.release (); | 220 | pNotify.release (); |
20 | 221 | } | 221 | } |
21 | 222 | 222 | ||
23 | 223 | void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan, | 223 | void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan, |
24 | 224 | unsigned type, arrayElementCount count, void *pValue ) | 224 | unsigned type, arrayElementCount count, void *pValue ) |
25 | 225 | { | 225 | { |
26 | 226 | guard.assertIdenticalMutex ( this->client.mutexRef() ); | 226 | guard.assertIdenticalMutex ( this->client.mutexRef() ); |
27 | 227 | sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this ); | 227 | sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this ); |
29 | 228 | pNotify = syncGroupReadNotify::factory ( | 228 | pNotify = syncGroupReadNotify::factory ( |
30 | 229 | this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue ); | 229 | this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue ); |
31 | 230 | pNotify->begin ( guard, type, count ); | 230 | pNotify->begin ( guard, type, count ); |
32 | 231 | pNotify.release (); | 231 | pNotify.release (); |
33 | @@ -242,14 +242,14 @@ void CASG::completionNotify ( | |||
34 | 242 | } | 242 | } |
35 | 243 | } | 243 | } |
36 | 244 | 244 | ||
38 | 245 | void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard, | 245 | void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard, |
39 | 246 | syncGroupReadNotify & io ) | 246 | syncGroupReadNotify & io ) |
40 | 247 | { | 247 | { |
41 | 248 | guard.assertIdenticalMutex ( this->client.mutexRef() ); | 248 | guard.assertIdenticalMutex ( this->client.mutexRef() ); |
42 | 249 | this->freeListReadOP.release ( & io ); | 249 | this->freeListReadOP.release ( & io ); |
43 | 250 | } | 250 | } |
44 | 251 | 251 | ||
46 | 252 | void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard, | 252 | void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard, |
47 | 253 | syncGroupWriteNotify & io ) | 253 | syncGroupWriteNotify & io ) |
48 | 254 | { | 254 | { |
49 | 255 | guard.assertIdenticalMutex ( this->client.mutexRef() ); | 255 | guard.assertIdenticalMutex ( this->client.mutexRef() ); |
50 | diff --git a/modules/ca/src/client/SearchDest.h b/modules/ca/src/client/SearchDest.h | |||
51 | index c22be7c..c31f688 100644 | |||
52 | --- a/modules/ca/src/client/SearchDest.h | |||
53 | +++ b/modules/ca/src/client/SearchDest.h | |||
54 | @@ -5,7 +5,7 @@ | |||
55 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
56 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
57 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
59 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
60 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
61 | 10 | 10 | ||
62 | 11 | #ifndef SearchDest_h | 11 | #ifndef SearchDest_h |
63 | @@ -28,7 +28,7 @@ struct SearchDest : | |||
64 | 28 | virtual void notify ( | 28 | virtual void notify ( |
65 | 29 | const caHdr & msg, const void * pPayload, | 29 | const caHdr & msg, const void * pPayload, |
66 | 30 | const osiSockAddr & addr, const epicsTime & ) = 0; | 30 | const osiSockAddr & addr, const epicsTime & ) = 0; |
68 | 31 | virtual void show ( | 31 | virtual void show ( |
69 | 32 | epicsGuard < epicsMutex > &, unsigned level ) const = 0; | 32 | epicsGuard < epicsMutex > &, unsigned level ) const = 0; |
70 | 33 | }; | 33 | }; |
71 | 34 | virtual void searchRequest ( epicsGuard < epicsMutex > &, | 34 | virtual void searchRequest ( epicsGuard < epicsMutex > &, |
72 | diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp | |||
73 | index a36899c..528cd6c 100644 | |||
74 | --- a/modules/ca/src/client/access.cpp | |||
75 | +++ b/modules/ca/src/client/access.cpp | |||
76 | @@ -183,19 +183,19 @@ int epicsShareAPI ca_context_create ( | |||
77 | 183 | } | 183 | } |
78 | 184 | 184 | ||
79 | 185 | pcac = ( ca_client_context * ) epicsThreadPrivateGet ( caClientContextId ); | 185 | pcac = ( ca_client_context * ) epicsThreadPrivateGet ( caClientContextId ); |
81 | 186 | if ( pcac ) { | 186 | if ( pcac ) { |
82 | 187 | if ( premptiveCallbackSelect == ca_enable_preemptive_callback && | 187 | if ( premptiveCallbackSelect == ca_enable_preemptive_callback && |
83 | 188 | ! pcac->preemptiveCallbakIsEnabled() ) { | 188 | ! pcac->preemptiveCallbakIsEnabled() ) { |
84 | 189 | return ECA_NOTTHREADED; | 189 | return ECA_NOTTHREADED; |
85 | 190 | } | 190 | } |
88 | 191 | return ECA_NORMAL; | 191 | return ECA_NORMAL; |
89 | 192 | } | 192 | } |
90 | 193 | 193 | ||
91 | 194 | pcac = new ca_client_context ( | 194 | pcac = new ca_client_context ( |
92 | 195 | premptiveCallbackSelect == ca_enable_preemptive_callback ); | 195 | premptiveCallbackSelect == ca_enable_preemptive_callback ); |
96 | 196 | if ( ! pcac ) { | 196 | if ( ! pcac ) { |
97 | 197 | return ECA_ALLOCMEM; | 197 | return ECA_ALLOCMEM; |
98 | 198 | } | 198 | } |
99 | 199 | 199 | ||
100 | 200 | epicsThreadPrivateSet ( caClientContextId, (void *) pcac ); | 200 | epicsThreadPrivateSet ( caClientContextId, (void *) pcac ); |
101 | 201 | } | 201 | } |
102 | @@ -467,7 +467,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout ) | |||
103 | 467 | try { | 467 | try { |
104 | 468 | // preserve past odd ball behavior of waiting forever when | 468 | // preserve past odd ball behavior of waiting forever when |
105 | 469 | // the delay is zero | 469 | // the delay is zero |
107 | 470 | if ( timeout == 0.0 ) { | 470 | if ( timeout == 0.0 ) { |
108 | 471 | while ( true ) { | 471 | while ( true ) { |
109 | 472 | pcac->pendEvent ( 60.0 ); | 472 | pcac->pendEvent ( 60.0 ); |
110 | 473 | } | 473 | } |
111 | @@ -696,7 +696,7 @@ int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ ) | |||
112 | 696 | { | 696 | { |
113 | 697 | ::printf ("The R3.14 EPICS OS abstraction API does not allow peeking at thread private storage of another thread.\n"); | 697 | ::printf ("The R3.14 EPICS OS abstraction API does not allow peeking at thread private storage of another thread.\n"); |
114 | 698 | ::printf ("Please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n"); | 698 | ::printf ("Please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n"); |
116 | 699 | return ECA_ANACHRONISM; | 699 | return ECA_ANACHRONISM; |
117 | 700 | } | 700 | } |
118 | 701 | 701 | ||
119 | 702 | // extern "C" | 702 | // extern "C" |
120 | @@ -802,253 +802,253 @@ epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = { | |||
121 | 802 | 802 | ||
122 | 803 | // extern "C" | 803 | // extern "C" |
123 | 804 | epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = { | 804 | epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = { |
168 | 805 | epicsOldStringT, | 805 | epicsOldStringT, |
169 | 806 | epicsInt16T, | 806 | epicsInt16T, |
170 | 807 | epicsFloat32T, | 807 | epicsFloat32T, |
171 | 808 | epicsEnum16T, | 808 | epicsEnum16T, |
172 | 809 | epicsUInt8T, | 809 | epicsUInt8T, |
173 | 810 | epicsInt32T, | 810 | epicsInt32T, |
174 | 811 | epicsFloat64T, | 811 | epicsFloat64T, |
175 | 812 | 812 | ||
176 | 813 | epicsOldStringT, | 813 | epicsOldStringT, |
177 | 814 | epicsInt16T, | 814 | epicsInt16T, |
178 | 815 | epicsFloat32T, | 815 | epicsFloat32T, |
179 | 816 | epicsEnum16T, | 816 | epicsEnum16T, |
180 | 817 | epicsUInt8T, | 817 | epicsUInt8T, |
181 | 818 | epicsInt32T, | 818 | epicsInt32T, |
182 | 819 | epicsFloat64T, | 819 | epicsFloat64T, |
183 | 820 | 820 | ||
184 | 821 | epicsOldStringT, | 821 | epicsOldStringT, |
185 | 822 | epicsInt16T, | 822 | epicsInt16T, |
186 | 823 | epicsFloat32T, | 823 | epicsFloat32T, |
187 | 824 | epicsEnum16T, | 824 | epicsEnum16T, |
188 | 825 | epicsUInt8T, | 825 | epicsUInt8T, |
189 | 826 | epicsInt32T, | 826 | epicsInt32T, |
190 | 827 | epicsFloat64T, | 827 | epicsFloat64T, |
191 | 828 | 828 | ||
192 | 829 | epicsOldStringT, | 829 | epicsOldStringT, |
193 | 830 | epicsInt16T, | 830 | epicsInt16T, |
194 | 831 | epicsFloat32T, | 831 | epicsFloat32T, |
195 | 832 | epicsEnum16T, | 832 | epicsEnum16T, |
196 | 833 | epicsUInt8T, | 833 | epicsUInt8T, |
197 | 834 | epicsInt32T, | 834 | epicsInt32T, |
198 | 835 | epicsFloat64T, | 835 | epicsFloat64T, |
199 | 836 | 836 | ||
200 | 837 | epicsOldStringT, | 837 | epicsOldStringT, |
201 | 838 | epicsInt16T, | 838 | epicsInt16T, |
202 | 839 | epicsFloat32T, | 839 | epicsFloat32T, |
203 | 840 | epicsEnum16T, | 840 | epicsEnum16T, |
204 | 841 | epicsUInt8T, | 841 | epicsUInt8T, |
205 | 842 | epicsInt32T, | 842 | epicsInt32T, |
206 | 843 | epicsFloat64T, | 843 | epicsFloat64T, |
207 | 844 | 844 | ||
208 | 845 | epicsUInt16T, | 845 | epicsUInt16T, |
209 | 846 | epicsUInt16T, | 846 | epicsUInt16T, |
210 | 847 | epicsOldStringT, | 847 | epicsOldStringT, |
211 | 848 | epicsOldStringT | 848 | epicsOldStringT |
212 | 849 | }; | 849 | }; |
213 | 850 | 850 | ||
214 | 851 | // extern "C" | 851 | // extern "C" |
215 | 852 | epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = { | 852 | epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = { |
262 | 853 | sizeof(dbr_string_t), /* string max size */ | 853 | sizeof(dbr_string_t), /* string max size */ |
263 | 854 | sizeof(dbr_short_t), /* short */ | 854 | sizeof(dbr_short_t), /* short */ |
264 | 855 | sizeof(dbr_float_t), /* IEEE Float */ | 855 | sizeof(dbr_float_t), /* IEEE Float */ |
265 | 856 | sizeof(dbr_enum_t), /* item number */ | 856 | sizeof(dbr_enum_t), /* item number */ |
266 | 857 | sizeof(dbr_char_t), /* character */ | 857 | sizeof(dbr_char_t), /* character */ |
267 | 858 | 858 | ||
268 | 859 | sizeof(dbr_long_t), /* long */ | 859 | sizeof(dbr_long_t), /* long */ |
269 | 860 | sizeof(dbr_double_t), /* double */ | 860 | sizeof(dbr_double_t), /* double */ |
270 | 861 | sizeof(struct dbr_sts_string), /* string field with status */ | 861 | sizeof(struct dbr_sts_string), /* string field with status */ |
271 | 862 | sizeof(struct dbr_sts_short), /* short field with status */ | 862 | sizeof(struct dbr_sts_short), /* short field with status */ |
272 | 863 | sizeof(struct dbr_sts_float), /* float field with status */ | 863 | sizeof(struct dbr_sts_float), /* float field with status */ |
273 | 864 | 864 | ||
274 | 865 | sizeof(struct dbr_sts_enum), /* item number with status */ | 865 | sizeof(struct dbr_sts_enum), /* item number with status */ |
275 | 866 | sizeof(struct dbr_sts_char), /* char field with status */ | 866 | sizeof(struct dbr_sts_char), /* char field with status */ |
276 | 867 | sizeof(struct dbr_sts_long), /* long field with status */ | 867 | sizeof(struct dbr_sts_long), /* long field with status */ |
277 | 868 | sizeof(struct dbr_sts_double), /* double field with time */ | 868 | sizeof(struct dbr_sts_double), /* double field with time */ |
278 | 869 | sizeof(struct dbr_time_string), /* string field with time */ | 869 | sizeof(struct dbr_time_string), /* string field with time */ |
279 | 870 | 870 | ||
280 | 871 | sizeof(struct dbr_time_short), /* short field with time */ | 871 | sizeof(struct dbr_time_short), /* short field with time */ |
281 | 872 | sizeof(struct dbr_time_float), /* float field with time */ | 872 | sizeof(struct dbr_time_float), /* float field with time */ |
282 | 873 | sizeof(struct dbr_time_enum), /* item number with time */ | 873 | sizeof(struct dbr_time_enum), /* item number with time */ |
283 | 874 | sizeof(struct dbr_time_char), /* char field with time */ | 874 | sizeof(struct dbr_time_char), /* char field with time */ |
284 | 875 | sizeof(struct dbr_time_long), /* long field with time */ | 875 | sizeof(struct dbr_time_long), /* long field with time */ |
285 | 876 | 876 | ||
286 | 877 | sizeof(struct dbr_time_double), /* double field with time */ | 877 | sizeof(struct dbr_time_double), /* double field with time */ |
287 | 878 | sizeof(struct dbr_sts_string), /* graphic string info */ | 878 | sizeof(struct dbr_sts_string), /* graphic string info */ |
288 | 879 | sizeof(struct dbr_gr_short), /* graphic short info */ | 879 | sizeof(struct dbr_gr_short), /* graphic short info */ |
289 | 880 | sizeof(struct dbr_gr_float), /* graphic float info */ | 880 | sizeof(struct dbr_gr_float), /* graphic float info */ |
290 | 881 | sizeof(struct dbr_gr_enum), /* graphic item info */ | 881 | sizeof(struct dbr_gr_enum), /* graphic item info */ |
291 | 882 | 882 | ||
292 | 883 | sizeof(struct dbr_gr_char), /* graphic char info */ | 883 | sizeof(struct dbr_gr_char), /* graphic char info */ |
293 | 884 | sizeof(struct dbr_gr_long), /* graphic long info */ | 884 | sizeof(struct dbr_gr_long), /* graphic long info */ |
294 | 885 | sizeof(struct dbr_gr_double), /* graphic double info */ | 885 | sizeof(struct dbr_gr_double), /* graphic double info */ |
295 | 886 | sizeof(struct dbr_sts_string), /* control string info */ | 886 | sizeof(struct dbr_sts_string), /* control string info */ |
296 | 887 | sizeof(struct dbr_ctrl_short), /* control short info */ | 887 | sizeof(struct dbr_ctrl_short), /* control short info */ |
297 | 888 | 888 | ||
298 | 889 | sizeof(struct dbr_ctrl_float), /* control float info */ | 889 | sizeof(struct dbr_ctrl_float), /* control float info */ |
299 | 890 | sizeof(struct dbr_ctrl_enum), /* control item info */ | 890 | sizeof(struct dbr_ctrl_enum), /* control item info */ |
300 | 891 | sizeof(struct dbr_ctrl_char), /* control char info */ | 891 | sizeof(struct dbr_ctrl_char), /* control char info */ |
301 | 892 | sizeof(struct dbr_ctrl_long), /* control long info */ | 892 | sizeof(struct dbr_ctrl_long), /* control long info */ |
302 | 893 | sizeof(struct dbr_ctrl_double), /* control double info */ | 893 | sizeof(struct dbr_ctrl_double), /* control double info */ |
303 | 894 | 894 | ||
304 | 895 | sizeof(dbr_put_ackt_t), /* put ackt */ | 895 | sizeof(dbr_put_ackt_t), /* put ackt */ |
305 | 896 | sizeof(dbr_put_acks_t), /* put acks */ | 896 | sizeof(dbr_put_acks_t), /* put acks */ |
306 | 897 | sizeof(struct dbr_stsack_string),/* string field with status/ack*/ | 897 | sizeof(struct dbr_stsack_string),/* string field with status/ack*/ |
307 | 898 | sizeof(dbr_string_t), /* string max size */ | 898 | sizeof(dbr_string_t), /* string max size */ |
308 | 899 | }; | 899 | }; |
309 | 900 | 900 | ||
310 | 901 | // extern "C" | 901 | // extern "C" |
311 | 902 | epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = { | 902 | epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = { |
358 | 903 | sizeof(dbr_string_t), /* string max size */ | 903 | sizeof(dbr_string_t), /* string max size */ |
359 | 904 | sizeof(dbr_short_t), /* short */ | 904 | sizeof(dbr_short_t), /* short */ |
360 | 905 | sizeof(dbr_float_t), /* IEEE Float */ | 905 | sizeof(dbr_float_t), /* IEEE Float */ |
361 | 906 | sizeof(dbr_enum_t), /* item number */ | 906 | sizeof(dbr_enum_t), /* item number */ |
362 | 907 | sizeof(dbr_char_t), /* character */ | 907 | sizeof(dbr_char_t), /* character */ |
363 | 908 | 908 | ||
364 | 909 | sizeof(dbr_long_t), /* long */ | 909 | sizeof(dbr_long_t), /* long */ |
365 | 910 | sizeof(dbr_double_t), /* double */ | 910 | sizeof(dbr_double_t), /* double */ |
366 | 911 | sizeof(dbr_string_t), /* string max size */ | 911 | sizeof(dbr_string_t), /* string max size */ |
367 | 912 | sizeof(dbr_short_t), /* short */ | 912 | sizeof(dbr_short_t), /* short */ |
368 | 913 | sizeof(dbr_float_t), /* IEEE Float */ | 913 | sizeof(dbr_float_t), /* IEEE Float */ |
369 | 914 | 914 | ||
370 | 915 | sizeof(dbr_enum_t), /* item number */ | 915 | sizeof(dbr_enum_t), /* item number */ |
371 | 916 | sizeof(dbr_char_t), /* character */ | 916 | sizeof(dbr_char_t), /* character */ |
372 | 917 | sizeof(dbr_long_t), /* long */ | 917 | sizeof(dbr_long_t), /* long */ |
373 | 918 | sizeof(dbr_double_t), /* double */ | 918 | sizeof(dbr_double_t), /* double */ |
374 | 919 | sizeof(dbr_string_t), /* string max size */ | 919 | sizeof(dbr_string_t), /* string max size */ |
375 | 920 | 920 | ||
376 | 921 | sizeof(dbr_short_t), /* short */ | 921 | sizeof(dbr_short_t), /* short */ |
377 | 922 | sizeof(dbr_float_t), /* IEEE Float */ | 922 | sizeof(dbr_float_t), /* IEEE Float */ |
378 | 923 | sizeof(dbr_enum_t), /* item number */ | 923 | sizeof(dbr_enum_t), /* item number */ |
379 | 924 | sizeof(dbr_char_t), /* character */ | 924 | sizeof(dbr_char_t), /* character */ |
380 | 925 | sizeof(dbr_long_t), /* long */ | 925 | sizeof(dbr_long_t), /* long */ |
381 | 926 | 926 | ||
382 | 927 | sizeof(dbr_double_t), /* double */ | 927 | sizeof(dbr_double_t), /* double */ |
383 | 928 | sizeof(dbr_string_t), /* string max size */ | 928 | sizeof(dbr_string_t), /* string max size */ |
384 | 929 | sizeof(dbr_short_t), /* short */ | 929 | sizeof(dbr_short_t), /* short */ |
385 | 930 | sizeof(dbr_float_t), /* IEEE Float */ | 930 | sizeof(dbr_float_t), /* IEEE Float */ |
386 | 931 | sizeof(dbr_enum_t), /* item number */ | 931 | sizeof(dbr_enum_t), /* item number */ |
387 | 932 | 932 | ||
388 | 933 | sizeof(dbr_char_t), /* character */ | 933 | sizeof(dbr_char_t), /* character */ |
389 | 934 | sizeof(dbr_long_t), /* long */ | 934 | sizeof(dbr_long_t), /* long */ |
390 | 935 | sizeof(dbr_double_t), /* double */ | 935 | sizeof(dbr_double_t), /* double */ |
391 | 936 | sizeof(dbr_string_t), /* string max size */ | 936 | sizeof(dbr_string_t), /* string max size */ |
392 | 937 | sizeof(dbr_short_t), /* short */ | 937 | sizeof(dbr_short_t), /* short */ |
393 | 938 | 938 | ||
394 | 939 | sizeof(dbr_float_t), /* IEEE Float */ | 939 | sizeof(dbr_float_t), /* IEEE Float */ |
395 | 940 | sizeof(dbr_enum_t), /* item number */ | 940 | sizeof(dbr_enum_t), /* item number */ |
396 | 941 | sizeof(dbr_char_t), /* character */ | 941 | sizeof(dbr_char_t), /* character */ |
397 | 942 | sizeof(dbr_long_t), /* long */ | 942 | sizeof(dbr_long_t), /* long */ |
398 | 943 | sizeof(dbr_double_t), /* double */ | 943 | sizeof(dbr_double_t), /* double */ |
399 | 944 | 944 | ||
400 | 945 | sizeof(dbr_ushort_t), /* put_ackt */ | 945 | sizeof(dbr_ushort_t), /* put_ackt */ |
401 | 946 | sizeof(dbr_ushort_t), /* put_acks */ | 946 | sizeof(dbr_ushort_t), /* put_acks */ |
402 | 947 | sizeof(dbr_string_t), /* string max size */ | 947 | sizeof(dbr_string_t), /* string max size */ |
403 | 948 | sizeof(dbr_string_t), /* string max size */ | 948 | sizeof(dbr_string_t), /* string max size */ |
404 | 949 | }; | 949 | }; |
405 | 950 | 950 | ||
406 | 951 | //extern "C" | 951 | //extern "C" |
407 | 952 | epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = { | 952 | epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = { |
451 | 953 | dbr_class_string, /* string max size */ | 953 | dbr_class_string, /* string max size */ |
452 | 954 | dbr_class_int, /* short */ | 954 | dbr_class_int, /* short */ |
453 | 955 | dbr_class_float, /* IEEE Float */ | 955 | dbr_class_float, /* IEEE Float */ |
454 | 956 | dbr_class_int, /* item number */ | 956 | dbr_class_int, /* item number */ |
455 | 957 | dbr_class_int, /* character */ | 957 | dbr_class_int, /* character */ |
456 | 958 | dbr_class_int, /* long */ | 958 | dbr_class_int, /* long */ |
457 | 959 | dbr_class_float, /* double */ | 959 | dbr_class_float, /* double */ |
458 | 960 | 960 | ||
459 | 961 | dbr_class_string, /* string max size */ | 961 | dbr_class_string, /* string max size */ |
460 | 962 | dbr_class_int, /* short */ | 962 | dbr_class_int, /* short */ |
461 | 963 | dbr_class_float, /* IEEE Float */ | 963 | dbr_class_float, /* IEEE Float */ |
462 | 964 | dbr_class_int, /* item number */ | 964 | dbr_class_int, /* item number */ |
463 | 965 | dbr_class_int, /* character */ | 965 | dbr_class_int, /* character */ |
464 | 966 | dbr_class_int, /* long */ | 966 | dbr_class_int, /* long */ |
465 | 967 | dbr_class_float, /* double */ | 967 | dbr_class_float, /* double */ |
466 | 968 | 968 | ||
467 | 969 | dbr_class_string, /* string max size */ | 969 | dbr_class_string, /* string max size */ |
468 | 970 | dbr_class_int, /* short */ | 970 | dbr_class_int, /* short */ |
469 | 971 | dbr_class_float, /* IEEE Float */ | 971 | dbr_class_float, /* IEEE Float */ |
470 | 972 | dbr_class_int, /* item number */ | 972 | dbr_class_int, /* item number */ |
471 | 973 | dbr_class_int, /* character */ | 973 | dbr_class_int, /* character */ |
472 | 974 | dbr_class_int, /* long */ | 974 | dbr_class_int, /* long */ |
473 | 975 | dbr_class_float, /* double */ | 975 | dbr_class_float, /* double */ |
474 | 976 | 976 | ||
475 | 977 | dbr_class_string, /* string max size */ | 977 | dbr_class_string, /* string max size */ |
476 | 978 | dbr_class_int, /* short */ | 978 | dbr_class_int, /* short */ |
477 | 979 | dbr_class_float, /* IEEE Float */ | 979 | dbr_class_float, /* IEEE Float */ |
478 | 980 | dbr_class_int, /* item number */ | 980 | dbr_class_int, /* item number */ |
479 | 981 | dbr_class_int, /* character */ | 981 | dbr_class_int, /* character */ |
480 | 982 | dbr_class_int, /* long */ | 982 | dbr_class_int, /* long */ |
481 | 983 | dbr_class_float, /* double */ | 983 | dbr_class_float, /* double */ |
482 | 984 | 984 | ||
483 | 985 | dbr_class_string, /* string max size */ | 985 | dbr_class_string, /* string max size */ |
484 | 986 | dbr_class_int, /* short */ | 986 | dbr_class_int, /* short */ |
485 | 987 | dbr_class_float, /* IEEE Float */ | 987 | dbr_class_float, /* IEEE Float */ |
486 | 988 | dbr_class_int, /* item number */ | 988 | dbr_class_int, /* item number */ |
487 | 989 | dbr_class_int, /* character */ | 989 | dbr_class_int, /* character */ |
488 | 990 | dbr_class_int, /* long */ | 990 | dbr_class_int, /* long */ |
489 | 991 | dbr_class_float, /* double */ | 991 | dbr_class_float, /* double */ |
490 | 992 | dbr_class_int, | 992 | dbr_class_int, |
491 | 993 | dbr_class_int, | 993 | dbr_class_int, |
492 | 994 | dbr_class_string, | 994 | dbr_class_string, |
493 | 995 | dbr_class_string, /* string max size */ | 995 | dbr_class_string, /* string max size */ |
494 | 996 | }; | 996 | }; |
495 | 997 | 997 | ||
496 | 998 | // extern "C" | 998 | // extern "C" |
497 | 999 | epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = { | 999 | epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = { |
537 | 1000 | 0, /* string */ | 1000 | 0, /* string */ |
538 | 1001 | 0, /* short */ | 1001 | 0, /* short */ |
539 | 1002 | 0, /* IEEE Float */ | 1002 | 0, /* IEEE Float */ |
540 | 1003 | 0, /* item number */ | 1003 | 0, /* item number */ |
541 | 1004 | 0, /* character */ | 1004 | 0, /* character */ |
542 | 1005 | 0, /* long */ | 1005 | 0, /* long */ |
543 | 1006 | 0, /* IEEE double */ | 1006 | 0, /* IEEE double */ |
544 | 1007 | (unsigned short) offsetof(dbr_sts_string,value[0]),/* string field with status */ | 1007 | (unsigned short) offsetof(dbr_sts_string,value[0]), /* string field with status */ |
545 | 1008 | (unsigned short) offsetof(dbr_sts_short,value), /* short field with status */ | 1008 | (unsigned short) offsetof(dbr_sts_short,value), /* short field with status */ |
546 | 1009 | (unsigned short) offsetof(dbr_sts_float,value), /* float field with status */ | 1009 | (unsigned short) offsetof(dbr_sts_float,value), /* float field with status */ |
547 | 1010 | (unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */ | 1010 | (unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */ |
548 | 1011 | (unsigned short) offsetof(dbr_sts_char,value), /* char field with status */ | 1011 | (unsigned short) offsetof(dbr_sts_char,value), /* char field with status */ |
549 | 1012 | (unsigned short) offsetof(dbr_sts_long,value), /* long field with status */ | 1012 | (unsigned short) offsetof(dbr_sts_long,value), /* long field with status */ |
550 | 1013 | (unsigned short) offsetof(dbr_sts_double,value), /* double field with time */ | 1013 | (unsigned short) offsetof(dbr_sts_double,value), /* double field with time */ |
551 | 1014 | (unsigned short) offsetof(dbr_time_string,value[0] ),/* string field with time */ | 1014 | (unsigned short) offsetof(dbr_time_string,value[0] ), /* string field with time */ |
552 | 1015 | (unsigned short) offsetof(dbr_time_short,value), /* short field with time */ | 1015 | (unsigned short) offsetof(dbr_time_short,value), /* short field with time */ |
553 | 1016 | (unsigned short) offsetof(dbr_time_float,value), /* float field with time */ | 1016 | (unsigned short) offsetof(dbr_time_float,value), /* float field with time */ |
554 | 1017 | (unsigned short) offsetof(dbr_time_enum,value), /* item number with time */ | 1017 | (unsigned short) offsetof(dbr_time_enum,value), /* item number with time */ |
555 | 1018 | (unsigned short) offsetof(dbr_time_char,value), /* char field with time */ | 1018 | (unsigned short) offsetof(dbr_time_char,value), /* char field with time */ |
556 | 1019 | (unsigned short) offsetof(dbr_time_long,value), /* long field with time */ | 1019 | (unsigned short) offsetof(dbr_time_long,value), /* long field with time */ |
557 | 1020 | (unsigned short) offsetof(dbr_time_double,value), /* double field with time */ | 1020 | (unsigned short) offsetof(dbr_time_double,value), /* double field with time */ |
558 | 1021 | (unsigned short) offsetof(dbr_sts_string,value[0]),/* graphic string info */ | 1021 | (unsigned short) offsetof(dbr_sts_string,value[0]), /* graphic string info */ |
559 | 1022 | (unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */ | 1022 | (unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */ |
560 | 1023 | (unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */ | 1023 | (unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */ |
561 | 1024 | (unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */ | 1024 | (unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */ |
562 | 1025 | (unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */ | 1025 | (unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */ |
563 | 1026 | (unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */ | 1026 | (unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */ |
564 | 1027 | (unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */ | 1027 | (unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */ |
565 | 1028 | (unsigned short) offsetof(dbr_sts_string,value[0]),/* control string info */ | 1028 | (unsigned short) offsetof(dbr_sts_string,value[0]), /* control string info */ |
566 | 1029 | (unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */ | 1029 | (unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */ |
567 | 1030 | (unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */ | 1030 | (unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */ |
568 | 1031 | (unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */ | 1031 | (unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */ |
569 | 1032 | (unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */ | 1032 | (unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */ |
570 | 1033 | (unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */ | 1033 | (unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */ |
571 | 1034 | (unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */ | 1034 | (unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */ |
572 | 1035 | 0, /* put ackt */ | 1035 | 0, /* put ackt */ |
573 | 1036 | 0, /* put acks */ | 1036 | 0, /* put acks */ |
574 | 1037 | (unsigned short) offsetof(dbr_stsack_string,value[0]),/* string field with status */ | 1037 | (unsigned short) offsetof(dbr_stsack_string,value[0]), /* string field with status */ |
575 | 1038 | 0, /* string */ | 1038 | 0, /* string */ |
576 | 1039 | }; | 1039 | }; |
577 | 1040 | 1040 | ||
578 | 1041 | // extern "C" | 1041 | // extern "C" |
579 | 1042 | epicsShareDef const char *dbf_text[LAST_TYPE+3] = { | 1042 | epicsShareDef const char *dbf_text[LAST_TYPE+3] = { |
589 | 1043 | "TYPENOTCONN", | 1043 | "TYPENOTCONN", |
590 | 1044 | "DBF_STRING", | 1044 | "DBF_STRING", |
591 | 1045 | "DBF_SHORT", | 1045 | "DBF_SHORT", |
592 | 1046 | "DBF_FLOAT", | 1046 | "DBF_FLOAT", |
593 | 1047 | "DBF_ENUM", | 1047 | "DBF_ENUM", |
594 | 1048 | "DBF_CHAR", | 1048 | "DBF_CHAR", |
595 | 1049 | "DBF_LONG", | 1049 | "DBF_LONG", |
596 | 1050 | "DBF_DOUBLE", | 1050 | "DBF_DOUBLE", |
597 | 1051 | "DBF_NO_ACCESS" | 1051 | "DBF_NO_ACCESS" |
598 | 1052 | }; | 1052 | }; |
599 | 1053 | 1053 | ||
600 | 1054 | // extern "C" | 1054 | // extern "C" |
601 | diff --git a/modules/ca/src/client/acctst.c b/modules/ca/src/client/acctst.c | |||
602 | index fd18ae4..9f3e907 100644 | |||
603 | --- a/modules/ca/src/client/acctst.c | |||
604 | +++ b/modules/ca/src/client/acctst.c | |||
605 | @@ -5,7 +5,7 @@ | |||
606 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
607 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
608 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
610 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
611 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
612 | 10 | 10 | ||
613 | 11 | /* | 11 | /* |
614 | @@ -14,7 +14,7 @@ | |||
615 | 14 | * Jeff Hill | 14 | * Jeff Hill |
616 | 15 | * Murali Shankar - initial versions of verifyMultithreadSubscr | 15 | * Murali Shankar - initial versions of verifyMultithreadSubscr |
617 | 16 | * Michael Abbott - initial versions of multiSubscrDestroyNoLateCallbackTest | 16 | * Michael Abbott - initial versions of multiSubscrDestroyNoLateCallbackTest |
619 | 17 | * | 17 | * |
620 | 18 | */ | 18 | */ |
621 | 19 | 19 | ||
622 | 20 | /* | 20 | /* |
623 | @@ -110,7 +110,7 @@ void nUpdatesTester ( struct event_handler_args args ) | |||
624 | 110 | ( *pCtr ) ++; | 110 | ( *pCtr ) ++; |
625 | 111 | } | 111 | } |
626 | 112 | else { | 112 | else { |
628 | 113 | printf ( "subscription update failed for \"%s\" because \"%s\"", | 113 | printf ( "subscription update failed for \"%s\" because \"%s\"", |
629 | 114 | ca_name ( args.chid ), ca_message ( args.status ) ); | 114 | ca_name ( args.chid ), ca_message ( args.status ) ); |
630 | 115 | } | 115 | } |
631 | 116 | } | 116 | } |
632 | @@ -131,7 +131,7 @@ void monitorSubscriptionFirstUpdateTest ( const char *pName, chid chan, unsigned | |||
633 | 131 | * verify that the first event arrives (with evid) | 131 | * verify that the first event arrives (with evid) |
634 | 132 | * and channel connected | 132 | * and channel connected |
635 | 133 | */ | 133 | */ |
637 | 134 | status = ca_add_event ( DBR_FLOAT, | 134 | status = ca_add_event ( DBR_FLOAT, |
638 | 135 | chan, nUpdatesTester, &eventCount, &id ); | 135 | chan, nUpdatesTester, &eventCount, &id ); |
639 | 136 | SEVCHK ( status, 0 ); | 136 | SEVCHK ( status, 0 ); |
640 | 137 | ca_flush_io (); | 137 | ca_flush_io (); |
641 | @@ -190,7 +190,7 @@ void monitorSubscriptionFirstUpdateTest ( const char *pName, chid chan, unsigned | |||
642 | 190 | waitCount = 0u; | 190 | waitCount = 0u; |
643 | 191 | status = ca_search ( pName, &chan2 ); | 191 | status = ca_search ( pName, &chan2 ); |
644 | 192 | SEVCHK ( status, 0 ); | 192 | SEVCHK ( status, 0 ); |
646 | 193 | status = ca_add_event ( DBR_FLOAT, chan2, | 193 | status = ca_add_event ( DBR_FLOAT, chan2, |
647 | 194 | nUpdatesTester, &eventCount, 0 ); | 194 | nUpdatesTester, &eventCount, 0 ); |
648 | 195 | SEVCHK ( status, 0 ); | 195 | SEVCHK ( status, 0 ); |
649 | 196 | status = ca_pend_io ( timeoutToPendIO ); | 196 | status = ca_pend_io ( timeoutToPendIO ); |
650 | @@ -250,7 +250,7 @@ void ioTesterGet ( struct event_handler_args args ) | |||
651 | 250 | ( *pCtr ) ++; | 250 | ( *pCtr ) ++; |
652 | 251 | } | 251 | } |
653 | 252 | else { | 252 | else { |
655 | 253 | printf("get call back failed for \"%s\" because \"%s\"", | 253 | printf("get call back failed for \"%s\" because \"%s\"", |
656 | 254 | ca_name ( args.chid ), ca_message ( args.status ) ); | 254 | ca_name ( args.chid ), ca_message ( args.status ) ); |
657 | 255 | } | 255 | } |
658 | 256 | } | 256 | } |
659 | @@ -263,7 +263,7 @@ void ioTesterEvent ( struct event_handler_args args ) | |||
660 | 263 | SEVCHK ( status, 0 ); | 263 | SEVCHK ( status, 0 ); |
661 | 264 | } | 264 | } |
662 | 265 | else { | 265 | else { |
664 | 266 | printf ( "subscription update failed for \"%s\" because \"%s\"", | 266 | printf ( "subscription update failed for \"%s\" because \"%s\"", |
665 | 267 | ca_name ( args.chid ), ca_message ( args.status ) ); | 267 | ca_name ( args.chid ), ca_message ( args.status ) ); |
666 | 268 | } | 268 | } |
667 | 269 | } | 269 | } |
668 | @@ -280,7 +280,7 @@ void verifyMonitorSubscriptionFlushIO ( chid chan, unsigned interestLevel ) | |||
669 | 280 | /* | 280 | /* |
670 | 281 | * verify that the first event arrives | 281 | * verify that the first event arrives |
671 | 282 | */ | 282 | */ |
673 | 283 | status = ca_add_event ( DBR_FLOAT, | 283 | status = ca_add_event ( DBR_FLOAT, |
674 | 284 | chan, nUpdatesTester, &eventCount, &id ); | 284 | chan, nUpdatesTester, &eventCount, &id ); |
675 | 285 | SEVCHK (status, 0); | 285 | SEVCHK (status, 0); |
676 | 286 | ca_flush_io (); | 286 | ca_flush_io (); |
677 | @@ -317,8 +317,8 @@ void getCallbackStateChange ( struct event_handler_args args ) | |||
678 | 317 | verify ( pChan->channel == args.chid ); | 317 | verify ( pChan->channel == args.chid ); |
679 | 318 | verify ( pChan->connected ); | 318 | verify ( pChan->connected ); |
680 | 319 | if ( args.status != ECA_NORMAL ) { | 319 | if ( args.status != ECA_NORMAL ) { |
683 | 320 | printf ( "getCallbackStateChange abnormal status was \"%s\"\n", | 320 | printf ( "getCallbackStateChange abnormal status was \"%s\"\n", |
684 | 321 | ca_message ( args.status ) ); | 321 | ca_message ( args.status ) ); |
685 | 322 | verify ( args.status == ECA_NORMAL ); | 322 | verify ( args.status == ECA_NORMAL ); |
686 | 323 | } | 323 | } |
687 | 324 | 324 | ||
688 | @@ -373,7 +373,7 @@ void subscriptionStateChange ( struct event_handler_args args ) | |||
689 | 373 | void noopSubscriptionStateChange ( struct event_handler_args args ) | 373 | void noopSubscriptionStateChange ( struct event_handler_args args ) |
690 | 374 | { | 374 | { |
691 | 375 | if ( args.status != ECA_NORMAL ) { | 375 | if ( args.status != ECA_NORMAL ) { |
693 | 376 | printf ( "noopSubscriptionStateChange: subscription update failed for \"%s\" because \"%s\"", | 376 | printf ( "noopSubscriptionStateChange: subscription update failed for \"%s\" because \"%s\"", |
694 | 377 | ca_name ( args.chid ), ca_message ( args.status ) ); | 377 | ca_name ( args.chid ), ca_message ( args.status ) ); |
695 | 378 | } | 378 | } |
696 | 379 | } | 379 | } |
697 | @@ -396,7 +396,7 @@ void noopSubscriptionStateChange ( struct event_handler_args args ) | |||
698 | 396 | * | 396 | * |
699 | 397 | * 7) verify that a nill access rights handler can be installed | 397 | * 7) verify that a nill access rights handler can be installed |
700 | 398 | */ | 398 | */ |
702 | 399 | void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | 399 | void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, |
703 | 400 | unsigned repetitionCount, unsigned interestLevel ) | 400 | unsigned repetitionCount, unsigned interestLevel ) |
704 | 401 | { | 401 | { |
705 | 402 | int status; | 402 | int status; |
706 | @@ -439,7 +439,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | |||
707 | 439 | 439 | ||
708 | 440 | showProgress ( interestLevel ); | 440 | showProgress ( interestLevel ); |
709 | 441 | 441 | ||
711 | 442 | while ( connectionUpdateCount < chanCount || | 442 | while ( connectionUpdateCount < chanCount || |
712 | 443 | getCallbackCount < chanCount ) { | 443 | getCallbackCount < chanCount ) { |
713 | 444 | epicsThreadSleep ( 0.1 ); | 444 | epicsThreadSleep ( 0.1 ); |
714 | 445 | ca_poll (); /* emulate typical GUI */ | 445 | ca_poll (); /* emulate typical GUI */ |
715 | @@ -471,7 +471,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | |||
716 | 471 | ca_self_test (); | 471 | ca_self_test (); |
717 | 472 | 472 | ||
718 | 473 | showProgress ( interestLevel ); | 473 | showProgress ( interestLevel ); |
720 | 474 | 474 | ||
721 | 475 | for ( j = 0u; j < chanCount; j++ ) { | 475 | for ( j = 0u; j < chanCount; j++ ) { |
722 | 476 | status = ca_replace_access_rights_event ( | 476 | status = ca_replace_access_rights_event ( |
723 | 477 | pChans[j].channel, 0 ); | 477 | pChans[j].channel, 0 ); |
724 | @@ -494,7 +494,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | |||
725 | 494 | /* | 494 | /* |
726 | 495 | * verifyBlockingConnect () | 495 | * verifyBlockingConnect () |
727 | 496 | * | 496 | * |
729 | 497 | * 1) verify that we dont print a disconnect message when | 497 | * 1) verify that we dont print a disconnect message when |
730 | 498 | * we delete the last channel | 498 | * we delete the last channel |
731 | 499 | * | 499 | * |
732 | 500 | * 2) verify that we delete the connection to the IOC | 500 | * 2) verify that we delete the connection to the IOC |
733 | @@ -502,7 +502,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | |||
734 | 502 | * | 502 | * |
735 | 503 | * 3) verify channel connection state variables | 503 | * 3) verify channel connection state variables |
736 | 504 | * | 504 | * |
738 | 505 | * 4) verify ca_test_io () and ca_pend_io () work with | 505 | * 4) verify ca_test_io () and ca_pend_io () work with |
739 | 506 | * channels w/o connection handlers | 506 | * channels w/o connection handlers |
740 | 507 | * | 507 | * |
741 | 508 | * 5) verify that the pending IO count is properly | 508 | * 5) verify that the pending IO count is properly |
742 | @@ -512,7 +512,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, | |||
743 | 512 | * 6) verify that the pending IO count goes to zero | 512 | * 6) verify that the pending IO count goes to zero |
744 | 513 | * if the channel is deleted before it connects. | 513 | * if the channel is deleted before it connects. |
745 | 514 | */ | 514 | */ |
747 | 515 | void verifyBlockingConnect ( appChan *pChans, unsigned chanCount, | 515 | void verifyBlockingConnect ( appChan *pChans, unsigned chanCount, |
748 | 516 | unsigned repetitionCount, unsigned interestLevel ) | 516 | unsigned repetitionCount, unsigned interestLevel ) |
749 | 517 | { | 517 | { |
750 | 518 | int status; | 518 | int status; |
751 | @@ -551,7 +551,7 @@ void verifyBlockingConnect ( appChan *pChans, unsigned chanCount, | |||
752 | 551 | verify ( INVALID_DB_REQ ( ca_field_type ( pChans[j].channel ) ) ); | 551 | verify ( INVALID_DB_REQ ( ca_field_type ( pChans[j].channel ) ) ); |
753 | 552 | verify ( ca_test_io () == ECA_IOINPROGRESS ); | 552 | verify ( ca_test_io () == ECA_IOINPROGRESS ); |
754 | 553 | } | 553 | } |
756 | 554 | 554 | ||
757 | 555 | status = ca_replace_access_rights_event ( | 555 | status = ca_replace_access_rights_event ( |
758 | 556 | pChans[j].channel, accessRightsStateChange ); | 556 | pChans[j].channel, accessRightsStateChange ); |
759 | 557 | SEVCHK ( status, NULL ); | 557 | SEVCHK ( status, NULL ); |
760 | @@ -605,7 +605,7 @@ void verifyBlockingConnect ( appChan *pChans, unsigned chanCount, | |||
761 | 605 | showProgress ( interestLevel ); | 605 | showProgress ( interestLevel ); |
762 | 606 | 606 | ||
763 | 607 | /* | 607 | /* |
765 | 608 | * verify that connections to IOC's that are | 608 | * verify that connections to IOC's that are |
766 | 609 | * not in use are dropped | 609 | * not in use are dropped |
767 | 610 | */ | 610 | */ |
768 | 611 | if ( ca_get_ioc_connection_count () != backgroundConnCount ) { | 611 | if ( ca_get_ioc_connection_count () != backgroundConnCount ) { |
769 | @@ -698,13 +698,13 @@ void verifyClear ( appChan *pChans, unsigned interestLevel ) | |||
770 | 698 | 698 | ||
771 | 699 | /* | 699 | /* |
772 | 700 | * verify subscription clear before connect | 700 | * verify subscription clear before connect |
774 | 701 | * and verify that NULL evid does not cause failure | 701 | * and verify that NULL evid does not cause failure |
775 | 702 | */ | 702 | */ |
776 | 703 | status = ca_search ( pChans[0].name, &pChans[0].channel ); | 703 | status = ca_search ( pChans[0].name, &pChans[0].channel ); |
777 | 704 | SEVCHK ( status, NULL ); | 704 | SEVCHK ( status, NULL ); |
778 | 705 | 705 | ||
779 | 706 | SEVCHK ( status, NULL ); | 706 | SEVCHK ( status, NULL ); |
781 | 707 | status = ca_add_event ( DBR_GR_DOUBLE, | 707 | status = ca_add_event ( DBR_GR_DOUBLE, |
782 | 708 | pChans[0].channel, noopSubscriptionStateChange, NULL, NULL ); | 708 | pChans[0].channel, noopSubscriptionStateChange, NULL, NULL ); |
783 | 709 | SEVCHK ( status, NULL ); | 709 | SEVCHK ( status, NULL ); |
784 | 710 | 710 | ||
785 | @@ -791,7 +791,7 @@ void ctrlDoubleTest ( chid chan, unsigned interestLevel ) | |||
786 | 791 | SEVCHK (status, "ctrlDoubleTest, ca_array_put"); | 791 | SEVCHK (status, "ctrlDoubleTest, ca_array_put"); |
787 | 792 | 792 | ||
788 | 793 | size = dbr_size_n(DBR_CTRL_DOUBLE, ca_element_count(chan)); | 793 | size = dbr_size_n(DBR_CTRL_DOUBLE, ca_element_count(chan)); |
790 | 794 | pCtrlDbl = (struct dbr_ctrl_double *) malloc (size); | 794 | pCtrlDbl = (struct dbr_ctrl_double *) malloc (size); |
791 | 795 | verify (pCtrlDbl!=NULL); | 795 | verify (pCtrlDbl!=NULL); |
792 | 796 | 796 | ||
793 | 797 | /* | 797 | /* |
794 | @@ -846,7 +846,7 @@ void verifyBlockInPendIO ( chid chan, unsigned interestLevel ) | |||
795 | 846 | else if ( resp != -100 ) { | 846 | else if ( resp != -100 ) { |
796 | 847 | printf ( "CA didnt block for get to return?\n" ); | 847 | printf ( "CA didnt block for get to return?\n" ); |
797 | 848 | } | 848 | } |
799 | 849 | 849 | ||
800 | 850 | req = 1; | 850 | req = 1; |
801 | 851 | resp = -100; | 851 | resp = -100; |
802 | 852 | SEVCHK ( ca_put (DBR_LONG, chan, &req), NULL ); | 852 | SEVCHK ( ca_put (DBR_LONG, chan, &req), NULL ); |
803 | @@ -898,7 +898,7 @@ void floatTest ( chid chan, dbr_float_t beginValue, dbr_float_t increment, | |||
804 | 898 | /* | 898 | /* |
805 | 899 | * doubleTest () | 899 | * doubleTest () |
806 | 900 | */ | 900 | */ |
808 | 901 | void doubleTest ( chid chan, dbr_double_t beginValue, | 901 | void doubleTest ( chid chan, dbr_double_t beginValue, |
809 | 902 | dbr_double_t increment, dbr_double_t epsilon, | 902 | dbr_double_t increment, dbr_double_t epsilon, |
810 | 903 | unsigned iterations) | 903 | unsigned iterations) |
811 | 904 | { | 904 | { |
812 | @@ -929,7 +929,7 @@ void doubleTest ( chid chan, dbr_double_t beginValue, | |||
813 | 929 | * Verify that we can write and then read back | 929 | * Verify that we can write and then read back |
814 | 930 | * the same analog value | 930 | * the same analog value |
815 | 931 | */ | 931 | */ |
817 | 932 | void verifyAnalogIO ( chid chan, int dataType, double min, double max, | 932 | void verifyAnalogIO ( chid chan, int dataType, double min, double max, |
818 | 933 | int minExp, int maxExp, double epsilon, unsigned interestLevel ) | 933 | int minExp, int maxExp, double epsilon, unsigned interestLevel ) |
819 | 934 | { | 934 | { |
820 | 935 | int i; | 935 | int i; |
821 | @@ -962,11 +962,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max, | |||
822 | 962 | iter = 10u; | 962 | iter = 10u; |
823 | 963 | } | 963 | } |
824 | 964 | if ( dataType == DBR_FLOAT ) { | 964 | if ( dataType == DBR_FLOAT ) { |
826 | 965 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, | 965 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, |
827 | 966 | (dbr_float_t) epsil, iter ); | 966 | (dbr_float_t) epsil, iter ); |
828 | 967 | } | 967 | } |
829 | 968 | else if (dataType == DBR_DOUBLE ) { | 968 | else if (dataType == DBR_DOUBLE ) { |
831 | 969 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, | 969 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, |
832 | 970 | (dbr_double_t) epsil, iter ); | 970 | (dbr_double_t) epsil, iter ); |
833 | 971 | } | 971 | } |
834 | 972 | else { | 972 | else { |
835 | @@ -983,11 +983,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max, | |||
836 | 983 | iter = 10u; | 983 | iter = 10u; |
837 | 984 | } | 984 | } |
838 | 985 | if ( dataType == DBR_FLOAT ) { | 985 | if ( dataType == DBR_FLOAT ) { |
840 | 986 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, | 986 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, |
841 | 987 | (dbr_float_t) epsil, iter ); | 987 | (dbr_float_t) epsil, iter ); |
842 | 988 | } | 988 | } |
843 | 989 | else if (dataType == DBR_DOUBLE ) { | 989 | else if (dataType == DBR_DOUBLE ) { |
845 | 990 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, | 990 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, |
846 | 991 | (dbr_double_t) epsil, iter ); | 991 | (dbr_double_t) epsil, iter ); |
847 | 992 | } | 992 | } |
848 | 993 | else { | 993 | else { |
849 | @@ -1004,11 +1004,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max, | |||
850 | 1004 | iter = 10l; | 1004 | iter = 10l; |
851 | 1005 | } | 1005 | } |
852 | 1006 | if ( dataType == DBR_FLOAT ) { | 1006 | if ( dataType == DBR_FLOAT ) { |
854 | 1007 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, | 1007 | floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, |
855 | 1008 | (dbr_float_t) epsil, iter ); | 1008 | (dbr_float_t) epsil, iter ); |
856 | 1009 | } | 1009 | } |
857 | 1010 | else if (dataType == DBR_DOUBLE ) { | 1010 | else if (dataType == DBR_DOUBLE ) { |
859 | 1011 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, | 1011 | doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, |
860 | 1012 | (dbr_double_t) epsil, iter ); | 1012 | (dbr_double_t) epsil, iter ); |
861 | 1013 | } | 1013 | } |
862 | 1014 | else { | 1014 | else { |
863 | @@ -1045,7 +1045,7 @@ void verifyLongIO ( chid chan, unsigned interestLevel ) | |||
864 | 1045 | if ( incr == 0 ) { | 1045 | if ( incr == 0 ) { |
865 | 1046 | incr = 1; | 1046 | incr = 1; |
866 | 1047 | } | 1047 | } |
868 | 1048 | for ( iter = cl.lower_ctrl_limit; | 1048 | for ( iter = cl.lower_ctrl_limit; |
869 | 1049 | iter <= cl.upper_ctrl_limit; iter+=incr ) { | 1049 | iter <= cl.upper_ctrl_limit; iter+=incr ) { |
870 | 1050 | 1050 | ||
871 | 1051 | ca_put ( DBR_LONG, chan, &iter ); | 1051 | ca_put ( DBR_LONG, chan, &iter ); |
872 | @@ -1089,8 +1089,8 @@ void verifyShortIO ( chid chan, unsigned interestLevel ) | |||
873 | 1089 | if ( incr == 0 ) { | 1089 | if ( incr == 0 ) { |
874 | 1090 | incr = 1; | 1090 | incr = 1; |
875 | 1091 | } | 1091 | } |
878 | 1092 | for ( iter = (dbr_short_t) cl.lower_ctrl_limit; | 1092 | for ( iter = (dbr_short_t) cl.lower_ctrl_limit; |
879 | 1093 | iter <= (dbr_short_t) cl.upper_ctrl_limit; | 1093 | iter <= (dbr_short_t) cl.upper_ctrl_limit; |
880 | 1094 | iter = (dbr_short_t) (iter + incr) ) { | 1094 | iter = (dbr_short_t) (iter + incr) ) { |
881 | 1095 | 1095 | ||
882 | 1096 | ca_put ( DBR_SHORT, chan, &iter ); | 1096 | ca_put ( DBR_SHORT, chan, &iter ); |
883 | @@ -1131,7 +1131,7 @@ void verifyHighThroughputRead ( chid chan, unsigned interestLevel ) | |||
884 | 1131 | } | 1131 | } |
885 | 1132 | } | 1132 | } |
886 | 1133 | 1133 | ||
888 | 1134 | void verifyHighThroughputWrite ( chid chan, unsigned interestLevel ) | 1134 | void verifyHighThroughputWrite ( chid chan, unsigned interestLevel ) |
889 | 1135 | { | 1135 | { |
890 | 1136 | int status; | 1136 | int status; |
891 | 1137 | unsigned i; | 1137 | unsigned i; |
892 | @@ -1155,12 +1155,12 @@ void verifyHighThroughputWrite ( chid chan, unsigned interestLevel ) | |||
893 | 1155 | * verify we dont jam up on many uninterrupted | 1155 | * verify we dont jam up on many uninterrupted |
894 | 1156 | * get callback requests | 1156 | * get callback requests |
895 | 1157 | */ | 1157 | */ |
897 | 1158 | void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel ) | 1158 | void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel ) |
898 | 1159 | { | 1159 | { |
899 | 1160 | unsigned i; | 1160 | unsigned i; |
900 | 1161 | int status; | 1161 | int status; |
901 | 1162 | 1162 | ||
903 | 1163 | if ( ca_read_access ( chan ) ) { | 1163 | if ( ca_read_access ( chan ) ) { |
904 | 1164 | unsigned count = 0u; | 1164 | unsigned count = 0u; |
905 | 1165 | showProgressBegin ( "verifyHighThroughputReadCallback", interestLevel ); | 1165 | showProgressBegin ( "verifyHighThroughputReadCallback", interestLevel ); |
906 | 1166 | for ( i=0; i<10000; i++ ) { | 1166 | for ( i=0; i<10000; i++ ) { |
907 | @@ -1203,10 +1203,10 @@ void verifyHighThroughputWriteCallback ( chid chan, unsigned interestLevel ) | |||
908 | 1203 | SEVCHK ( ca_flush_io (), NULL ); | 1203 | SEVCHK ( ca_flush_io (), NULL ); |
909 | 1204 | dval = 0.0; | 1204 | dval = 0.0; |
910 | 1205 | status = ca_get ( DBR_DOUBLE, chan, &dval ); | 1205 | status = ca_get ( DBR_DOUBLE, chan, &dval ); |
912 | 1206 | SEVCHK ( status, | 1206 | SEVCHK ( status, |
913 | 1207 | "verifyHighThroughputWriteCallback, verification get" ); | 1207 | "verifyHighThroughputWriteCallback, verification get" ); |
914 | 1208 | status = ca_pend_io ( timeoutToPendIO ); | 1208 | status = ca_pend_io ( timeoutToPendIO ); |
916 | 1209 | SEVCHK ( status, | 1209 | SEVCHK ( status, |
917 | 1210 | "verifyHighThroughputWriteCallback, verification get pend" ); | 1210 | "verifyHighThroughputWriteCallback, verification get pend" ); |
918 | 1211 | verify ( dval == i ); | 1211 | verify ( dval == i ); |
919 | 1212 | showProgressEnd ( interestLevel ); | 1212 | showProgressEnd ( interestLevel ); |
920 | @@ -1360,9 +1360,9 @@ static void noLateCallbackDetect ( struct event_handler_args args ) | |||
921 | 1360 | verify ( callbackIsOk ); | 1360 | verify ( callbackIsOk ); |
922 | 1361 | } | 1361 | } |
923 | 1362 | 1362 | ||
925 | 1363 | static void multiSubscrDestroyNoLateCallbackThread ( void * pParm ) | 1363 | static void multiSubscrDestroyNoLateCallbackThread ( void * pParm ) |
926 | 1364 | { | 1364 | { |
928 | 1365 | struct MultiSubscrDestroyNoLateCallbackTestData * const pTestData = | 1365 | struct MultiSubscrDestroyNoLateCallbackTestData * const pTestData = |
929 | 1366 | ( struct MultiSubscrDestroyNoLateCallbackTestData * ) pParm; | 1366 | ( struct MultiSubscrDestroyNoLateCallbackTestData * ) pParm; |
930 | 1367 | unsigned i, j; | 1367 | unsigned i, j; |
931 | 1368 | int status; | 1368 | int status; |
932 | @@ -1391,10 +1391,10 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm ) | |||
933 | 1391 | SEVCHK ( ca_add_event ( DBR_GR_FLOAT, pTestData->m_chan, noLateCallbackDetect, | 1391 | SEVCHK ( ca_add_event ( DBR_GR_FLOAT, pTestData->m_chan, noLateCallbackDetect, |
934 | 1392 | &pTestData->m_eventData[j], &pTestData->m_eventData[j].m_id ) , NULL ); | 1392 | &pTestData->m_eventData[j], &pTestData->m_eventData[j].m_id ) , NULL ); |
935 | 1393 | } | 1393 | } |
937 | 1394 | SEVCHK ( ca_flush_io(), NULL ); | 1394 | SEVCHK ( ca_flush_io(), NULL ); |
938 | 1395 | 1395 | ||
939 | 1396 | /* | 1396 | /* |
941 | 1397 | * raise the priority of the current thread hoping to improve our | 1397 | * raise the priority of the current thread hoping to improve our |
942 | 1398 | * likelyhood of detecting a bug | 1398 | * likelyhood of detecting a bug |
943 | 1399 | */ | 1399 | */ |
944 | 1400 | priorityOfTestThread = epicsThreadGetPrioritySelf (); | 1400 | priorityOfTestThread = epicsThreadGetPrioritySelf (); |
945 | @@ -1445,7 +1445,7 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm ) | |||
946 | 1445 | } | 1445 | } |
947 | 1446 | 1446 | ||
948 | 1447 | /* | 1447 | /* |
950 | 1448 | * verify that, in a preemtive callback mode client, a subscription callback never | 1448 | * verify that, in a preemtive callback mode client, a subscription callback never |
951 | 1449 | * comes after the subscription is destroyed | 1449 | * comes after the subscription is destroyed |
952 | 1450 | */ | 1450 | */ |
953 | 1451 | static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel ) | 1451 | static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel ) |
954 | @@ -1456,13 +1456,13 @@ static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned i | |||
955 | 1456 | 1456 | ||
956 | 1457 | pTestData = calloc ( 1u, sizeof ( struct MultiSubscrDestroyNoLateCallbackTestData ) ); | 1457 | pTestData = calloc ( 1u, sizeof ( struct MultiSubscrDestroyNoLateCallbackTestData ) ); |
957 | 1458 | verify ( pTestData ); | 1458 | verify ( pTestData ); |
959 | 1459 | pTestData->m_mutex = epicsMutexMustCreate (); | 1459 | pTestData->m_mutex = epicsMutexMustCreate (); |
960 | 1460 | pTestData->m_testDoneEvent = epicsEventMustCreate ( epicsEventEmpty ); | 1460 | pTestData->m_testDoneEvent = epicsEventMustCreate ( epicsEventEmpty ); |
961 | 1461 | pTestData->m_pChanName = pName; | 1461 | pTestData->m_pChanName = pName; |
962 | 1462 | pTestData->m_interestLevel = interestLevel; | 1462 | pTestData->m_interestLevel = interestLevel; |
963 | 1463 | epicsThreadMustCreate ( | 1463 | epicsThreadMustCreate ( |
964 | 1464 | "multiSubscrDestroyNoLateCallbackTest", | 1464 | "multiSubscrDestroyNoLateCallbackTest", |
966 | 1465 | epicsThreadPriorityLow, | 1465 | epicsThreadPriorityLow, |
967 | 1466 | epicsThreadGetStackSize ( epicsThreadStackMedium ), | 1466 | epicsThreadGetStackSize ( epicsThreadStackMedium ), |
968 | 1467 | multiSubscrDestroyNoLateCallbackThread, | 1467 | multiSubscrDestroyNoLateCallbackThread, |
969 | 1468 | pTestData ); | 1468 | pTestData ); |
970 | @@ -1488,7 +1488,7 @@ static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned i | |||
971 | 1488 | * 1) verify we can add many monitors at once | 1488 | * 1) verify we can add many monitors at once |
972 | 1489 | * 2) verify that under heavy load the last monitor | 1489 | * 2) verify that under heavy load the last monitor |
973 | 1490 | * returned is the last modification sent | 1490 | * returned is the last modification sent |
975 | 1491 | * 3) attempt to delete monitors while many monitors | 1491 | * 3) attempt to delete monitors while many monitors |
976 | 1492 | * are running | 1492 | * are running |
977 | 1493 | */ | 1493 | */ |
978 | 1494 | void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | 1494 | void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) |
979 | @@ -1497,7 +1497,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
980 | 1497 | evid mid[1000]; | 1497 | evid mid[1000]; |
981 | 1498 | dbr_float_t temp, getResp; | 1498 | dbr_float_t temp, getResp; |
982 | 1499 | unsigned i; | 1499 | unsigned i; |
984 | 1500 | 1500 | ||
985 | 1501 | showProgressBegin ( "multiSubscriptionDeleteTest", interestLevel ); | 1501 | showProgressBegin ( "multiSubscriptionDeleteTest", interestLevel ); |
986 | 1502 | 1502 | ||
987 | 1503 | for ( i=0; i < NELEMENTS (mid); i++ ) { | 1503 | for ( i=0; i < NELEMENTS (mid); i++ ) { |
988 | @@ -1510,7 +1510,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
989 | 1510 | * complete | 1510 | * complete |
990 | 1511 | * | 1511 | * |
991 | 1512 | * NOTE: this hopefully demonstrates that when the | 1512 | * NOTE: this hopefully demonstrates that when the |
993 | 1513 | * server is very busy with monitors the client | 1513 | * server is very busy with monitors the client |
994 | 1514 | * is still able to punch through with a request. | 1514 | * is still able to punch through with a request. |
995 | 1515 | */ | 1515 | */ |
996 | 1516 | SEVCHK ( ca_get ( DBR_FLOAT,chan,&getResp ), NULL ); | 1516 | SEVCHK ( ca_get ( DBR_FLOAT,chan,&getResp ), NULL ); |
997 | @@ -1521,7 +1521,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
998 | 1521 | /* | 1521 | /* |
999 | 1522 | * attempt to generate heavy event traffic before initiating | 1522 | * attempt to generate heavy event traffic before initiating |
1000 | 1523 | * the monitor delete | 1523 | * the monitor delete |
1002 | 1524 | */ | 1524 | */ |
1003 | 1525 | if ( ca_write_access (chan) ) { | 1525 | if ( ca_write_access (chan) ) { |
1004 | 1526 | for ( i=0; i < NELEMENTS (mid); i++ ) { | 1526 | for ( i=0; i < NELEMENTS (mid); i++ ) { |
1005 | 1527 | temp = (float) i; | 1527 | temp = (float) i; |
1006 | @@ -1532,12 +1532,12 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
1007 | 1532 | showProgress ( interestLevel ); | 1532 | showProgress ( interestLevel ); |
1008 | 1533 | 1533 | ||
1009 | 1534 | /* | 1534 | /* |
1011 | 1535 | * without pausing begin deleting the event subscriptions | 1535 | * without pausing begin deleting the event subscriptions |
1012 | 1536 | * while the queue is full | 1536 | * while the queue is full |
1013 | 1537 | * | 1537 | * |
1017 | 1538 | * continue attempting to generate heavy event traffic | 1538 | * continue attempting to generate heavy event traffic |
1018 | 1539 | * while deleting subscriptions with the hope that we will | 1539 | * while deleting subscriptions with the hope that we will |
1019 | 1540 | * deleting an event at the instant that its callback is | 1540 | * deleting an event at the instant that its callback is |
1020 | 1541 | * occurring | 1541 | * occurring |
1021 | 1542 | */ | 1542 | */ |
1022 | 1543 | for ( i=0; i < NELEMENTS (mid); i++ ) { | 1543 | for ( i=0; i < NELEMENTS (mid); i++ ) { |
1023 | @@ -1557,14 +1557,14 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
1024 | 1557 | SEVCHK ( ca_pend_io (timeoutToPendIO), NULL ); | 1557 | SEVCHK ( ca_pend_io (timeoutToPendIO), NULL ); |
1025 | 1558 | 1558 | ||
1026 | 1559 | showProgressEnd ( interestLevel ); | 1559 | showProgressEnd ( interestLevel ); |
1028 | 1560 | } | 1560 | } |
1029 | 1561 | 1561 | ||
1030 | 1562 | 1562 | ||
1031 | 1563 | /* | 1563 | /* |
1032 | 1564 | * singleSubscriptionDeleteTest | 1564 | * singleSubscriptionDeleteTest |
1033 | 1565 | * | 1565 | * |
1036 | 1566 | * verify that we dont fail when we repeatedly create | 1566 | * verify that we dont fail when we repeatedly create |
1037 | 1567 | * and delete only one subscription with a high level of | 1567 | * and delete only one subscription with a high level of |
1038 | 1568 | * traffic on it | 1568 | * traffic on it |
1039 | 1569 | */ | 1569 | */ |
1040 | 1570 | void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | 1570 | void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) |
1041 | @@ -1573,7 +1573,7 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
1042 | 1573 | evid sid; | 1573 | evid sid; |
1043 | 1574 | dbr_float_t temp, getResp; | 1574 | dbr_float_t temp, getResp; |
1044 | 1575 | unsigned i; | 1575 | unsigned i; |
1046 | 1576 | 1576 | ||
1047 | 1577 | showProgressBegin ( "singleSubscriptionDeleteTest", interestLevel ); | 1577 | showProgressBegin ( "singleSubscriptionDeleteTest", interestLevel ); |
1048 | 1578 | 1578 | ||
1049 | 1579 | for ( i=0; i < 1000; i++ ){ | 1579 | for ( i=0; i < 1000; i++ ){ |
1050 | @@ -1595,14 +1595,14 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
1051 | 1595 | * attempt to generate heavy event traffic before initiating | 1595 | * attempt to generate heavy event traffic before initiating |
1052 | 1596 | * the monitor delete | 1596 | * the monitor delete |
1053 | 1597 | * | 1597 | * |
1055 | 1598 | * try to interrupt the recv thread while it is processing | 1598 | * try to interrupt the recv thread while it is processing |
1056 | 1599 | * incoming subscription updates | 1599 | * incoming subscription updates |
1058 | 1600 | */ | 1600 | */ |
1059 | 1601 | if ( ca_write_access (chan) ) { | 1601 | if ( ca_write_access (chan) ) { |
1060 | 1602 | unsigned j = 0; | 1602 | unsigned j = 0; |
1061 | 1603 | while ( j < i ) { | 1603 | while ( j < i ) { |
1062 | 1604 | temp = (float) j++; | 1604 | temp = (float) j++; |
1064 | 1605 | SEVCHK ( ca_put (DBR_FLOAT, chan, &temp), | 1605 | SEVCHK ( ca_put (DBR_FLOAT, chan, &temp), |
1065 | 1606 | "singleSubscriptionDeleteTest - one of multiple puts" ); | 1606 | "singleSubscriptionDeleteTest - one of multiple puts" ); |
1066 | 1607 | } | 1607 | } |
1067 | 1608 | ca_flush_io (); | 1608 | ca_flush_io (); |
1068 | @@ -1612,7 +1612,7 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel ) | |||
1069 | 1612 | } | 1612 | } |
1070 | 1613 | 1613 | ||
1071 | 1614 | showProgressEnd ( interestLevel ); | 1614 | showProgressEnd ( interestLevel ); |
1073 | 1615 | } | 1615 | } |
1074 | 1616 | 1616 | ||
1075 | 1617 | /* | 1617 | /* |
1076 | 1618 | * channelClearWithEventTrafficTest | 1618 | * channelClearWithEventTrafficTest |
1077 | @@ -1626,13 +1626,13 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve | |||
1078 | 1626 | evid sid; | 1626 | evid sid; |
1079 | 1627 | dbr_float_t temp, getResp; | 1627 | dbr_float_t temp, getResp; |
1080 | 1628 | unsigned i; | 1628 | unsigned i; |
1082 | 1629 | 1629 | ||
1083 | 1630 | showProgressBegin ( "channelClearWithEventTrafficTest", interestLevel ); | 1630 | showProgressBegin ( "channelClearWithEventTrafficTest", interestLevel ); |
1084 | 1631 | 1631 | ||
1085 | 1632 | for ( i=0; i < 1000; i++ ) { | 1632 | for ( i=0; i < 1000; i++ ) { |
1086 | 1633 | chid chan; | 1633 | chid chan; |
1087 | 1634 | 1634 | ||
1089 | 1635 | int status = ca_create_channel ( pName, 0, 0, | 1635 | int status = ca_create_channel ( pName, 0, 0, |
1090 | 1636 | CA_PRIORITY_DEFAULT, &chan ); | 1636 | CA_PRIORITY_DEFAULT, &chan ); |
1091 | 1637 | status = ca_pend_io ( timeoutToPendIO ); | 1637 | status = ca_pend_io ( timeoutToPendIO ); |
1092 | 1638 | SEVCHK ( status, "channelClearWithEventTrafficTest: channel connect failed" ); | 1638 | SEVCHK ( status, "channelClearWithEventTrafficTest: channel connect failed" ); |
1093 | @@ -1652,9 +1652,9 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve | |||
1094 | 1652 | * attempt to generate heavy event traffic before initiating | 1652 | * attempt to generate heavy event traffic before initiating |
1095 | 1653 | * the channel delete | 1653 | * the channel delete |
1096 | 1654 | * | 1654 | * |
1098 | 1655 | * try to interrupt the recv thread while it is processing | 1655 | * try to interrupt the recv thread while it is processing |
1099 | 1656 | * incoming subscription updates | 1656 | * incoming subscription updates |
1101 | 1657 | */ | 1657 | */ |
1102 | 1658 | if ( ca_write_access (chan) ) { | 1658 | if ( ca_write_access (chan) ) { |
1103 | 1659 | unsigned j = 0; | 1659 | unsigned j = 0; |
1104 | 1660 | while ( j < i ) { | 1660 | while ( j < i ) { |
1105 | @@ -1669,7 +1669,7 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve | |||
1106 | 1669 | } | 1669 | } |
1107 | 1670 | 1670 | ||
1108 | 1671 | showProgressEnd ( interestLevel ); | 1671 | showProgressEnd ( interestLevel ); |
1110 | 1672 | } | 1672 | } |
1111 | 1673 | 1673 | ||
1112 | 1674 | 1674 | ||
1113 | 1675 | 1675 | ||
1114 | @@ -1679,7 +1679,7 @@ void selfDeleteEvent ( struct event_handler_args args ) | |||
1115 | 1679 | { | 1679 | { |
1116 | 1680 | int status; | 1680 | int status; |
1117 | 1681 | status = ca_clear_event ( globalEventID ); | 1681 | status = ca_clear_event ( globalEventID ); |
1119 | 1682 | verify ( status == ECA_NORMAL ); | 1682 | verify ( status == ECA_NORMAL ); |
1120 | 1683 | } | 1683 | } |
1121 | 1684 | 1684 | ||
1122 | 1685 | void eventClearTest ( chid chan ) | 1685 | void eventClearTest ( chid chan ) |
1123 | @@ -1687,29 +1687,29 @@ void eventClearTest ( chid chan ) | |||
1124 | 1687 | int status; | 1687 | int status; |
1125 | 1688 | evid monix1, monix2, monix3; | 1688 | evid monix1, monix2, monix3; |
1126 | 1689 | 1689 | ||
1128 | 1690 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, | 1690 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, |
1129 | 1691 | NULL, &monix1 ); | 1691 | NULL, &monix1 ); |
1130 | 1692 | SEVCHK ( status, NULL ); | 1692 | SEVCHK ( status, NULL ); |
1131 | 1693 | 1693 | ||
1132 | 1694 | status = ca_clear_event ( monix1 ); | 1694 | status = ca_clear_event ( monix1 ); |
1133 | 1695 | SEVCHK ( status, NULL ); | 1695 | SEVCHK ( status, NULL ); |
1134 | 1696 | 1696 | ||
1136 | 1697 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, | 1697 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, |
1137 | 1698 | NULL, &monix1 ); | 1698 | NULL, &monix1 ); |
1138 | 1699 | SEVCHK ( status, NULL ); | 1699 | SEVCHK ( status, NULL ); |
1139 | 1700 | 1700 | ||
1141 | 1701 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, | 1701 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, |
1142 | 1702 | NULL, &monix2); | 1702 | NULL, &monix2); |
1143 | 1703 | SEVCHK (status, NULL); | 1703 | SEVCHK (status, NULL); |
1144 | 1704 | 1704 | ||
1145 | 1705 | status = ca_clear_event ( monix2 ); | 1705 | status = ca_clear_event ( monix2 ); |
1146 | 1706 | SEVCHK ( status, NULL); | 1706 | SEVCHK ( status, NULL); |
1147 | 1707 | 1707 | ||
1149 | 1708 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, | 1708 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, |
1150 | 1709 | NULL, &monix2); | 1709 | NULL, &monix2); |
1151 | 1710 | SEVCHK ( status, NULL ); | 1710 | SEVCHK ( status, NULL ); |
1152 | 1711 | 1711 | ||
1154 | 1712 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, | 1712 | status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, |
1155 | 1713 | NULL, &monix3); | 1713 | NULL, &monix3); |
1156 | 1714 | SEVCHK ( status, NULL ); | 1714 | SEVCHK ( status, NULL ); |
1157 | 1715 | 1715 | ||
1158 | @@ -1722,7 +1722,7 @@ void eventClearTest ( chid chan ) | |||
1159 | 1722 | status = ca_clear_event ( monix3 ); | 1722 | status = ca_clear_event ( monix3 ); |
1160 | 1723 | SEVCHK ( status, NULL); | 1723 | SEVCHK ( status, NULL); |
1161 | 1724 | 1724 | ||
1163 | 1725 | status = ca_add_event ( DBR_FLOAT, chan, selfDeleteEvent, | 1725 | status = ca_add_event ( DBR_FLOAT, chan, selfDeleteEvent, |
1164 | 1726 | 0, &globalEventID ); | 1726 | 0, &globalEventID ); |
1165 | 1727 | SEVCHK ( status, NULL ); | 1727 | SEVCHK ( status, NULL ); |
1166 | 1728 | } | 1728 | } |
1167 | @@ -1739,7 +1739,7 @@ void arrayEventExceptionNotify ( struct event_handler_args args ) | |||
1168 | 1739 | if ( args.status == ECA_NORMAL ) { | 1739 | if ( args.status == ECA_NORMAL ) { |
1169 | 1740 | printf ( | 1740 | printf ( |
1170 | 1741 | "arrayEventExceptionNotify: expected " | 1741 | "arrayEventExceptionNotify: expected " |
1172 | 1742 | "exception but didnt receive one against \"%s\" \n", | 1742 | "exception but didnt receive one against \"%s\" \n", |
1173 | 1743 | ca_name ( args.chid ) ); | 1743 | ca_name ( args.chid ) ); |
1174 | 1744 | } | 1744 | } |
1175 | 1745 | else { | 1745 | else { |
1176 | @@ -1765,8 +1765,8 @@ void exceptionTest ( chid chan, unsigned interestLevel ) | |||
1177 | 1765 | 1765 | ||
1178 | 1766 | pRS = malloc ( ca_element_count (chan) * sizeof (*pRS) ); | 1766 | pRS = malloc ( ca_element_count (chan) * sizeof (*pRS) ); |
1179 | 1767 | verify ( pRS ); | 1767 | verify ( pRS ); |
1182 | 1768 | status = ca_array_get ( DBR_PUT_ACKT, | 1768 | status = ca_array_get ( DBR_PUT_ACKT, |
1183 | 1769 | ca_element_count (chan), chan, pRS ); | 1769 | ca_element_count (chan), chan, pRS ); |
1184 | 1770 | SEVCHK ( status, "array read request failed" ); | 1770 | SEVCHK ( status, "array read request failed" ); |
1185 | 1771 | ca_pend_io ( 1e-5 ); | 1771 | ca_pend_io ( 1e-5 ); |
1186 | 1772 | epicsThreadSleep ( 0.1 ); | 1772 | epicsThreadSleep ( 0.1 ); |
1187 | @@ -1787,8 +1787,8 @@ void exceptionTest ( chid chan, unsigned interestLevel ) | |||
1188 | 1787 | */ | 1787 | */ |
1189 | 1788 | { | 1788 | { |
1190 | 1789 | arrayEventExceptionNotifyComplete = 0u; | 1789 | arrayEventExceptionNotifyComplete = 0u; |
1193 | 1790 | status = ca_array_get_callback ( DBR_PUT_ACKT, | 1790 | status = ca_array_get_callback ( DBR_PUT_ACKT, |
1194 | 1791 | ca_element_count (chan), chan, arrayEventExceptionNotify, 0 ); | 1791 | ca_element_count (chan), chan, arrayEventExceptionNotify, 0 ); |
1195 | 1792 | if ( status != ECA_NORMAL ) { | 1792 | if ( status != ECA_NORMAL ) { |
1196 | 1793 | verify ( status == ECA_BADTYPE || status == ECA_GETFAIL ); | 1793 | verify ( status == ECA_BADTYPE || status == ECA_GETFAIL ); |
1197 | 1794 | arrayEventExceptionNotifyComplete = 1; | 1794 | arrayEventExceptionNotifyComplete = 1; |
1198 | @@ -1811,8 +1811,8 @@ void exceptionTest ( chid chan, unsigned interestLevel ) | |||
1199 | 1811 | evid id; | 1811 | evid id; |
1200 | 1812 | 1812 | ||
1201 | 1813 | arrayEventExceptionNotifyComplete = 0u; | 1813 | arrayEventExceptionNotifyComplete = 0u; |
1204 | 1814 | status = ca_add_array_event ( DBR_PUT_ACKT, ca_element_count ( chan ), | 1814 | status = ca_add_array_event ( DBR_PUT_ACKT, ca_element_count ( chan ), |
1205 | 1815 | chan, arrayEventExceptionNotify, 0, 0.0, 0.0, 0.0, &id ); | 1815 | chan, arrayEventExceptionNotify, 0, 0.0, 0.0, 0.0, &id ); |
1206 | 1816 | if ( status != ECA_NORMAL ) { | 1816 | if ( status != ECA_NORMAL ) { |
1207 | 1817 | verify ( status == ECA_BADTYPE || status == ECA_GETFAIL ); | 1817 | verify ( status == ECA_BADTYPE || status == ECA_GETFAIL ); |
1208 | 1818 | arrayEventExceptionNotifyComplete = 1; | 1818 | arrayEventExceptionNotifyComplete = 1; |
1209 | @@ -1846,8 +1846,8 @@ void exceptionTest ( chid chan, unsigned interestLevel ) | |||
1210 | 1846 | for ( i = 0; i < ca_element_count (chan); i++ ) { | 1846 | for ( i = 0; i < ca_element_count (chan); i++ ) { |
1211 | 1847 | strcpy ( pWS[i], "@#$%" ); | 1847 | strcpy ( pWS[i], "@#$%" ); |
1212 | 1848 | } | 1848 | } |
1215 | 1849 | status = ca_array_put ( DBR_STRING, | 1849 | status = ca_array_put ( DBR_STRING, |
1216 | 1850 | ca_element_count (chan), chan, pWS ); | 1850 | ca_element_count (chan), chan, pWS ); |
1217 | 1851 | if ( status != ECA_NORMAL ) { | 1851 | if ( status != ECA_NORMAL ) { |
1218 | 1852 | verify ( status == ECA_BADTYPE || status == ECA_PUTFAIL ); | 1852 | verify ( status == ECA_BADTYPE || status == ECA_PUTFAIL ); |
1219 | 1853 | acctstExceptionCount++; /* local PV case */ | 1853 | acctstExceptionCount++; /* local PV case */ |
1220 | @@ -1879,9 +1879,9 @@ void exceptionTest ( chid chan, unsigned interestLevel ) | |||
1221 | 1879 | strcpy ( pWS[i], "@#$%" ); | 1879 | strcpy ( pWS[i], "@#$%" ); |
1222 | 1880 | } | 1880 | } |
1223 | 1881 | arrayEventExceptionNotifyComplete = 0u; | 1881 | arrayEventExceptionNotifyComplete = 0u; |
1225 | 1882 | status = ca_array_put_callback ( DBR_STRING, | 1882 | status = ca_array_put_callback ( DBR_STRING, |
1226 | 1883 | ca_element_count (chan), chan, pWS, | 1883 | ca_element_count (chan), chan, pWS, |
1228 | 1884 | arrayEventExceptionNotify, 0); | 1884 | arrayEventExceptionNotify, 0); |
1229 | 1885 | if ( status != ECA_NORMAL ) { | 1885 | if ( status != ECA_NORMAL ) { |
1230 | 1886 | arrayEventExceptionNotifyComplete = 1; | 1886 | arrayEventExceptionNotifyComplete = 1; |
1231 | 1887 | } | 1887 | } |
1232 | @@ -1924,7 +1924,7 @@ void arrayWriteNotify ( struct event_handler_args args ) | |||
1233 | 1924 | arrayWriteNotifyComplete = 1; | 1924 | arrayWriteNotifyComplete = 1; |
1234 | 1925 | } | 1925 | } |
1235 | 1926 | else { | 1926 | else { |
1237 | 1927 | printf ( "arrayWriteNotify: update failed for \"%s\" because \"%s\"", | 1927 | printf ( "arrayWriteNotify: update failed for \"%s\" because \"%s\"", |
1238 | 1928 | ca_name ( args.chid ), ca_message ( args.status ) ); | 1928 | ca_name ( args.chid ), ca_message ( args.status ) ); |
1239 | 1929 | } | 1929 | } |
1240 | 1930 | } | 1930 | } |
1241 | @@ -1956,15 +1956,15 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1242 | 1956 | pWF[i] = rand (); | 1956 | pWF[i] = rand (); |
1243 | 1957 | pRF[i] = - pWF[i]; | 1957 | pRF[i] = - pWF[i]; |
1244 | 1958 | } | 1958 | } |
1247 | 1959 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), | 1959 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), |
1248 | 1960 | chan, pWF ); | 1960 | chan, pWF ); |
1249 | 1961 | SEVCHK ( status, "array write request failed" ); | 1961 | SEVCHK ( status, "array write request failed" ); |
1250 | 1962 | 1962 | ||
1251 | 1963 | /* | 1963 | /* |
1252 | 1964 | * read back the array | 1964 | * read back the array |
1253 | 1965 | */ | 1965 | */ |
1256 | 1966 | status = ca_array_get ( DBR_DOUBLE, ca_element_count (chan), | 1966 | status = ca_array_get ( DBR_DOUBLE, ca_element_count (chan), |
1257 | 1967 | chan, pRF ); | 1967 | chan, pRF ); |
1258 | 1968 | SEVCHK ( status, "array read request failed" ); | 1968 | SEVCHK ( status, "array read request failed" ); |
1259 | 1969 | status = ca_pend_io ( timeoutToPendIO ); | 1969 | status = ca_pend_io ( timeoutToPendIO ); |
1260 | 1970 | SEVCHK ( status, "array read failed" ); | 1970 | SEVCHK ( status, "array read failed" ); |
1261 | @@ -1991,8 +1991,8 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1262 | 1991 | 1991 | ||
1263 | 1992 | pRS = malloc ( ca_element_count (chan) * MAX_STRING_SIZE ); | 1992 | pRS = malloc ( ca_element_count (chan) * MAX_STRING_SIZE ); |
1264 | 1993 | verify ( pRS ); | 1993 | verify ( pRS ); |
1267 | 1994 | status = ca_array_get ( DBR_STRING, | 1994 | status = ca_array_get ( DBR_STRING, |
1268 | 1995 | ca_element_count (chan), chan, pRS ); | 1995 | ca_element_count (chan), chan, pRS ); |
1269 | 1996 | SEVCHK ( status, "array read request failed" ); | 1996 | SEVCHK ( status, "array read request failed" ); |
1270 | 1997 | status = ca_pend_io ( timeoutToPendIO ); | 1997 | status = ca_pend_io ( timeoutToPendIO ); |
1271 | 1998 | SEVCHK ( status, "array read failed" ); | 1998 | SEVCHK ( status, "array read failed" ); |
1272 | @@ -2010,11 +2010,11 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1273 | 2010 | pWF[i] = rand (); | 2010 | pWF[i] = rand (); |
1274 | 2011 | pRF[i] = - pWF[i]; | 2011 | pRF[i] = - pWF[i]; |
1275 | 2012 | } | 2012 | } |
1278 | 2013 | status = ca_array_put_callback ( DBR_DOUBLE, ca_element_count (chan), | 2013 | status = ca_array_put_callback ( DBR_DOUBLE, ca_element_count (chan), |
1279 | 2014 | chan, pWF, arrayWriteNotify, 0 ); | 2014 | chan, pWF, arrayWriteNotify, 0 ); |
1280 | 2015 | SEVCHK ( status, "array write notify request failed" ); | 2015 | SEVCHK ( status, "array write notify request failed" ); |
1283 | 2016 | status = ca_array_get_callback ( DBR_DOUBLE, ca_element_count (chan), | 2016 | status = ca_array_get_callback ( DBR_DOUBLE, ca_element_count (chan), |
1284 | 2017 | chan, arrayReadNotify, pWF ); | 2017 | chan, arrayReadNotify, pWF ); |
1285 | 2018 | SEVCHK ( status, "array read notify request failed" ); | 2018 | SEVCHK ( status, "array read notify request failed" ); |
1286 | 2019 | ca_flush_io (); | 2019 | ca_flush_io (); |
1287 | 2020 | while ( ! arrayWriteNotifyComplete || ! arrayReadNotifyComplete ) { | 2020 | while ( ! arrayWriteNotifyComplete || ! arrayReadNotifyComplete ) { |
1288 | @@ -2030,11 +2030,11 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1289 | 2030 | pRF[i] = - pWF[i]; | 2030 | pRF[i] = - pWF[i]; |
1290 | 2031 | } | 2031 | } |
1291 | 2032 | arrayReadNotifyComplete = 0; | 2032 | arrayReadNotifyComplete = 0; |
1294 | 2033 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), | 2033 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), |
1295 | 2034 | chan, pWF ); | 2034 | chan, pWF ); |
1296 | 2035 | SEVCHK ( status, "array write notify request failed" ); | 2035 | SEVCHK ( status, "array write notify request failed" ); |
1299 | 2036 | status = ca_add_array_event ( DBR_DOUBLE, ca_element_count ( chan ), | 2036 | status = ca_add_array_event ( DBR_DOUBLE, ca_element_count ( chan ), |
1300 | 2037 | chan, arrayReadNotify, pWF, 0.0, 0.0, 0.0, &id ); | 2037 | chan, arrayReadNotify, pWF, 0.0, 0.0, 0.0, &id ); |
1301 | 2038 | SEVCHK ( status, "array subscription request failed" ); | 2038 | SEVCHK ( status, "array subscription request failed" ); |
1302 | 2039 | ca_flush_io (); | 2039 | ca_flush_io (); |
1303 | 2040 | while ( ! arrayReadNotifyComplete ) { | 2040 | while ( ! arrayReadNotifyComplete ) { |
1304 | @@ -2052,8 +2052,8 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1305 | 2052 | acctstExceptionCount = 0u; | 2052 | acctstExceptionCount = 0u; |
1306 | 2053 | status = ca_add_exception_event ( acctstExceptionNotify, 0 ); | 2053 | status = ca_add_exception_event ( acctstExceptionNotify, 0 ); |
1307 | 2054 | SEVCHK ( status, "exception notify install failed" ); | 2054 | SEVCHK ( status, "exception notify install failed" ); |
1310 | 2055 | status = ca_array_get ( DBR_DOUBLE, | 2055 | status = ca_array_get ( DBR_DOUBLE, |
1311 | 2056 | ca_element_count (chan)+1, chan, pRF ); | 2056 | ca_element_count (chan)+1, chan, pRF ); |
1312 | 2057 | if ( status == ECA_NORMAL ) { | 2057 | if ( status == ECA_NORMAL ) { |
1313 | 2058 | ca_poll (); | 2058 | ca_poll (); |
1314 | 2059 | while ( acctstExceptionCount < 1u ) { | 2059 | while ( acctstExceptionCount < 1u ) { |
1315 | @@ -2076,7 +2076,7 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel ) | |||
1316 | 2076 | showProgressEnd ( interestLevel ); | 2076 | showProgressEnd ( interestLevel ); |
1317 | 2077 | } | 2077 | } |
1318 | 2078 | 2078 | ||
1320 | 2079 | /* | 2079 | /* |
1321 | 2080 | * verify that unequal send/recv buffer sizes work | 2080 | * verify that unequal send/recv buffer sizes work |
1322 | 2081 | * (a bug related to this test was detected in early R3.14) | 2081 | * (a bug related to this test was detected in early R3.14) |
1323 | 2082 | * | 2082 | * |
1324 | @@ -2115,8 +2115,8 @@ void unequalServerBufferSizeTest ( const char * pName, unsigned interestLevel ) | |||
1325 | 2115 | pWF = (dbr_double_t *) calloc ( ca_element_count (newChan), sizeof (*pWF) ); | 2115 | pWF = (dbr_double_t *) calloc ( ca_element_count (newChan), sizeof (*pWF) ); |
1326 | 2116 | verify ( pWF != NULL ); | 2116 | verify ( pWF != NULL ); |
1327 | 2117 | 2117 | ||
1330 | 2118 | status = ca_array_get ( DBR_DOUBLE, ca_element_count ( newChan ), | 2118 | status = ca_array_get ( DBR_DOUBLE, ca_element_count ( newChan ), |
1331 | 2119 | newChan, pRF ); | 2119 | newChan, pRF ); |
1332 | 2120 | status = ca_pend_io ( timeoutToPendIO ); | 2120 | status = ca_pend_io ( timeoutToPendIO ); |
1333 | 2121 | verify ( status == ECA_NORMAL ); | 2121 | verify ( status == ECA_NORMAL ); |
1334 | 2122 | status = ca_clear_channel ( newChan ); | 2122 | status = ca_clear_channel ( newChan ); |
1335 | @@ -2131,11 +2131,11 @@ void unequalServerBufferSizeTest ( const char * pName, unsigned interestLevel ) | |||
1336 | 2131 | 2131 | ||
1337 | 2132 | showProgress ( interestLevel ); | 2132 | showProgress ( interestLevel ); |
1338 | 2133 | 2133 | ||
1341 | 2134 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( newChan ), | 2134 | status = ca_array_put ( DBR_DOUBLE, ca_element_count ( newChan ), |
1342 | 2135 | newChan, pWF ); | 2135 | newChan, pWF ); |
1343 | 2136 | verify ( status == ECA_NORMAL ); | 2136 | verify ( status == ECA_NORMAL ); |
1346 | 2137 | status = ca_array_get ( DBR_DOUBLE, 1, | 2137 | status = ca_array_get ( DBR_DOUBLE, 1, |
1347 | 2138 | newChan, pRF ); | 2138 | newChan, pRF ); |
1348 | 2139 | verify ( status == ECA_NORMAL ); | 2139 | verify ( status == ECA_NORMAL ); |
1349 | 2140 | status = ca_pend_io ( timeoutToPendIO ); | 2140 | status = ca_pend_io ( timeoutToPendIO ); |
1350 | 2141 | verify ( status == ECA_NORMAL ); | 2141 | verify ( status == ECA_NORMAL ); |
1351 | @@ -2205,9 +2205,9 @@ void verifyDataTypeMacros (void) | |||
1352 | 2205 | verify ( dbf_type_is_valid ( DBF_SHORT ) ); | 2205 | verify ( dbf_type_is_valid ( DBF_SHORT ) ); |
1353 | 2206 | { | 2206 | { |
1354 | 2207 | int dataType = -1; | 2207 | int dataType = -1; |
1356 | 2208 | dbf_text_to_type ( "DBF_SHORT", dataType ); | 2208 | dbf_text_to_type ( "DBF_SHORT", dataType ); |
1357 | 2209 | verify ( dataType == DBF_SHORT ); | 2209 | verify ( dataType == DBF_SHORT ); |
1359 | 2210 | dbr_text_to_type ( "DBR_CLASS_NAME", dataType ); | 2210 | dbr_text_to_type ( "DBR_CLASS_NAME", dataType ); |
1360 | 2211 | verify ( dataType == DBR_CLASS_NAME ); | 2211 | verify ( dataType == DBR_CLASS_NAME ); |
1361 | 2212 | } | 2212 | } |
1362 | 2213 | } | 2213 | } |
1363 | @@ -2225,7 +2225,7 @@ void updateTestEvent ( struct event_handler_args args ) | |||
1364 | 2225 | { | 2225 | { |
1365 | 2226 | eventTest *pET = (eventTest *) args.usr; | 2226 | eventTest *pET = (eventTest *) args.usr; |
1366 | 2227 | struct dbr_gr_float *pGF = (struct dbr_gr_float *) args.dbr; | 2227 | struct dbr_gr_float *pGF = (struct dbr_gr_float *) args.dbr; |
1368 | 2228 | pET->lastValue = pGF->value; | 2228 | pET->lastValue = pGF->value; |
1369 | 2229 | pET->count++; | 2229 | pET->count++; |
1370 | 2230 | } | 2230 | } |
1371 | 2231 | 2231 | ||
1372 | @@ -2246,7 +2246,7 @@ void clearChannelInGetCallbackTest ( const char *pName, unsigned level ) | |||
1373 | 2246 | unsigned i; | 2246 | unsigned i; |
1374 | 2247 | chid chan; | 2247 | chid chan; |
1375 | 2248 | int status; | 2248 | int status; |
1377 | 2249 | 2249 | ||
1378 | 2250 | showProgressBegin ( "clearChannelInGetCallbackTest", level ); | 2250 | showProgressBegin ( "clearChannelInGetCallbackTest", level ); |
1379 | 2251 | 2251 | ||
1380 | 2252 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2252 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1381 | @@ -2259,15 +2259,15 @@ void clearChannelInGetCallbackTest ( const char *pName, unsigned level ) | |||
1382 | 2259 | 2259 | ||
1383 | 2260 | status = ca_pend_io ( timeoutToPendIO ); | 2260 | status = ca_pend_io ( timeoutToPendIO ); |
1384 | 2261 | SEVCHK ( status, "clearChannelInGetCallbackTest connect channel" ); | 2261 | SEVCHK ( status, "clearChannelInGetCallbackTest connect channel" ); |
1386 | 2262 | 2262 | ||
1387 | 2263 | status = ca_get_callback ( DBR_DOUBLE, chan, callbackClearsChannel, 0 ); | 2263 | status = ca_get_callback ( DBR_DOUBLE, chan, callbackClearsChannel, 0 ); |
1388 | 2264 | SEVCHK ( status, "clearChannelInGetCallbackTest get callback" ); | 2264 | SEVCHK ( status, "clearChannelInGetCallbackTest get callback" ); |
1390 | 2265 | 2265 | ||
1391 | 2266 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2266 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1392 | 2267 | ca_pend_event ( 0.1 ); | 2267 | ca_pend_event ( 0.1 ); |
1393 | 2268 | verify ( i < 100 ); | 2268 | verify ( i < 100 ); |
1394 | 2269 | } | 2269 | } |
1396 | 2270 | 2270 | ||
1397 | 2271 | showProgressEnd ( level ); | 2271 | showProgressEnd ( level ); |
1398 | 2272 | } | 2272 | } |
1399 | 2273 | 2273 | ||
1400 | @@ -2277,7 +2277,7 @@ void clearChannelInPutCallbackTest ( const char *pName, unsigned level ) | |||
1401 | 2277 | const dbr_double_t value = 1.1; | 2277 | const dbr_double_t value = 1.1; |
1402 | 2278 | chid chan; | 2278 | chid chan; |
1403 | 2279 | int status; | 2279 | int status; |
1405 | 2280 | 2280 | ||
1406 | 2281 | showProgressBegin ( "clearChannelInPutCallbackTest", level ); | 2281 | showProgressBegin ( "clearChannelInPutCallbackTest", level ); |
1407 | 2282 | 2282 | ||
1408 | 2283 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2283 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1409 | @@ -2291,15 +2291,15 @@ void clearChannelInPutCallbackTest ( const char *pName, unsigned level ) | |||
1410 | 2291 | status = ca_pend_io ( timeoutToPendIO ); | 2291 | status = ca_pend_io ( timeoutToPendIO ); |
1411 | 2292 | SEVCHK ( status, "clearChannelInPutCallbackTest connect channel" ); | 2292 | SEVCHK ( status, "clearChannelInPutCallbackTest connect channel" ); |
1412 | 2293 | 2293 | ||
1414 | 2294 | status = ca_put_callback ( DBR_DOUBLE, chan, & value, | 2294 | status = ca_put_callback ( DBR_DOUBLE, chan, & value, |
1415 | 2295 | callbackClearsChannel, 0 ); | 2295 | callbackClearsChannel, 0 ); |
1416 | 2296 | SEVCHK ( status, "clearChannelInPutCallbackTest get callback" ); | 2296 | SEVCHK ( status, "clearChannelInPutCallbackTest get callback" ); |
1418 | 2297 | 2297 | ||
1419 | 2298 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2298 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1420 | 2299 | ca_pend_event ( 0.1 ); | 2299 | ca_pend_event ( 0.1 ); |
1421 | 2300 | verify ( i < 100 ); | 2300 | verify ( i < 100 ); |
1422 | 2301 | } | 2301 | } |
1424 | 2302 | 2302 | ||
1425 | 2303 | showProgressEnd ( level ); | 2303 | showProgressEnd ( level ); |
1426 | 2304 | } | 2304 | } |
1427 | 2305 | 2305 | ||
1428 | @@ -2308,7 +2308,7 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level ) | |||
1429 | 2308 | unsigned i; | 2308 | unsigned i; |
1430 | 2309 | chid chan; | 2309 | chid chan; |
1431 | 2310 | int status; | 2310 | int status; |
1433 | 2311 | 2311 | ||
1434 | 2312 | showProgressBegin ( "clearChannelInSubscrCallbackTest", level ); | 2312 | showProgressBegin ( "clearChannelInSubscrCallbackTest", level ); |
1435 | 2313 | 2313 | ||
1436 | 2314 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2314 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1437 | @@ -2321,8 +2321,8 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level ) | |||
1438 | 2321 | 2321 | ||
1439 | 2322 | status = ca_pend_io ( timeoutToPendIO ); | 2322 | status = ca_pend_io ( timeoutToPendIO ); |
1440 | 2323 | SEVCHK ( status, "clearChannelInSubscrCallbackTest connect channel" ); | 2323 | SEVCHK ( status, "clearChannelInSubscrCallbackTest connect channel" ); |
1443 | 2324 | 2324 | ||
1444 | 2325 | status = ca_create_subscription ( DBR_DOUBLE, 1, chan, | 2325 | status = ca_create_subscription ( DBR_DOUBLE, 1, chan, |
1445 | 2326 | DBE_VALUE, callbackClearsChannel, 0, 0 ); | 2326 | DBE_VALUE, callbackClearsChannel, 0, 0 ); |
1446 | 2327 | SEVCHK ( status, "clearChannelInSubscrCallbackTest subscribe" ); | 2327 | SEVCHK ( status, "clearChannelInSubscrCallbackTest subscribe" ); |
1447 | 2328 | 2328 | ||
1448 | @@ -2330,18 +2330,18 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level ) | |||
1449 | 2330 | ca_pend_event ( 0.1 ); | 2330 | ca_pend_event ( 0.1 ); |
1450 | 2331 | verify ( i < 100 ); | 2331 | verify ( i < 100 ); |
1451 | 2332 | } | 2332 | } |
1453 | 2333 | 2333 | ||
1454 | 2334 | showProgressEnd ( level ); | 2334 | showProgressEnd ( level ); |
1455 | 2335 | } | 2335 | } |
1456 | 2336 | 2336 | ||
1458 | 2337 | void monitorAddConnectionCallback ( struct connection_handler_args args ) | 2337 | void monitorAddConnectionCallback ( struct connection_handler_args args ) |
1459 | 2338 | { | 2338 | { |
1460 | 2339 | if ( args.op == CA_OP_CONN_UP ) { | 2339 | if ( args.op == CA_OP_CONN_UP ) { |
1461 | 2340 | unsigned * pEventCount = ( unsigned * ) ca_puser ( args.chid ); | 2340 | unsigned * pEventCount = ( unsigned * ) ca_puser ( args.chid ); |
1462 | 2341 | int status; | 2341 | int status; |
1463 | 2342 | verify ( *pEventCount == 0u ); | 2342 | verify ( *pEventCount == 0u ); |
1464 | 2343 | (*pEventCount)++; | 2343 | (*pEventCount)++; |
1466 | 2344 | status = ca_create_subscription ( DBR_DOUBLE, 1, | 2344 | status = ca_create_subscription ( DBR_DOUBLE, 1, |
1467 | 2345 | args.chid, DBE_VALUE, nUpdatesTester, ca_puser ( args.chid ), 0 ); | 2345 | args.chid, DBE_VALUE, nUpdatesTester, ca_puser ( args.chid ), 0 ); |
1468 | 2346 | SEVCHK ( status, "monitorAddConnectionCallback create subscription" ); | 2346 | SEVCHK ( status, "monitorAddConnectionCallback create subscription" ); |
1469 | 2347 | } | 2347 | } |
1470 | @@ -2363,7 +2363,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve | |||
1471 | 2363 | int status; | 2363 | int status; |
1472 | 2364 | unsigned eventCount = 0u; | 2364 | unsigned eventCount = 0u; |
1473 | 2365 | unsigned getCallbackCount = 0u; | 2365 | unsigned getCallbackCount = 0u; |
1475 | 2366 | 2366 | ||
1476 | 2367 | showProgressBegin ( "monitorAddConnectionCallbackTest", interestLevel ); | 2367 | showProgressBegin ( "monitorAddConnectionCallbackTest", interestLevel ); |
1477 | 2368 | 2368 | ||
1478 | 2369 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { | 2369 | for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) { |
1479 | @@ -2371,7 +2371,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve | |||
1480 | 2371 | verify ( i < 100 ); | 2371 | verify ( i < 100 ); |
1481 | 2372 | } | 2372 | } |
1482 | 2373 | 2373 | ||
1484 | 2374 | status = ca_create_channel ( pName, | 2374 | status = ca_create_channel ( pName, |
1485 | 2375 | monitorAddConnectionCallback, &eventCount, 0, & chan ); | 2375 | monitorAddConnectionCallback, &eventCount, 0, & chan ); |
1486 | 2376 | SEVCHK ( status, "monitorAddConnectionCallbackTest create channel" ); | 2376 | SEVCHK ( status, "monitorAddConnectionCallbackTest create channel" ); |
1487 | 2377 | 2377 | ||
1488 | @@ -2379,7 +2379,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve | |||
1489 | 2379 | ca_pend_event ( 0.1 ); | 2379 | ca_pend_event ( 0.1 ); |
1490 | 2380 | } | 2380 | } |
1491 | 2381 | verify ( eventCount >= 2u ); | 2381 | verify ( eventCount >= 2u ); |
1493 | 2382 | 2382 | ||
1494 | 2383 | status = ca_get_callback ( DBR_DOUBLE, chan, nUpdatesTester, &getCallbackCount ); | 2383 | status = ca_get_callback ( DBR_DOUBLE, chan, nUpdatesTester, &getCallbackCount ); |
1495 | 2384 | SEVCHK ( status, "monitorAddConnectionCallback get callback" ); | 2384 | SEVCHK ( status, "monitorAddConnectionCallback get callback" ); |
1496 | 2385 | while ( getCallbackCount == 0 ) { | 2385 | while ( getCallbackCount == 0 ) { |
1497 | @@ -2390,7 +2390,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve | |||
1498 | 2390 | 2390 | ||
1499 | 2391 | status = ca_clear_channel ( chan ); | 2391 | status = ca_clear_channel ( chan ); |
1500 | 2392 | SEVCHK ( status, "monitorAddConnectionCallbackTest clear channel" ); | 2392 | SEVCHK ( status, "monitorAddConnectionCallbackTest clear channel" ); |
1502 | 2393 | 2393 | ||
1503 | 2394 | status = ca_flush_io (); | 2394 | status = ca_flush_io (); |
1504 | 2395 | SEVCHK ( status, "monitorAddConnectionCallbackTest flush" ); | 2395 | SEVCHK ( status, "monitorAddConnectionCallbackTest flush" ); |
1505 | 2396 | 2396 | ||
1506 | @@ -2423,7 +2423,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1507 | 2423 | printf ("skipped monitorUpdateTest test - not an analog type\n"); | 2423 | printf ("skipped monitorUpdateTest test - not an analog type\n"); |
1508 | 2424 | return; | 2424 | return; |
1509 | 2425 | } | 2425 | } |
1511 | 2426 | 2426 | ||
1512 | 2427 | showProgressBegin ( "monitorUpdateTest", interestLevel ); | 2427 | showProgressBegin ( "monitorUpdateTest", interestLevel ); |
1513 | 2428 | 2428 | ||
1514 | 2429 | /* | 2429 | /* |
1515 | @@ -2444,12 +2444,12 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1516 | 2444 | * complete | 2444 | * complete |
1517 | 2445 | * | 2445 | * |
1518 | 2446 | * NOTE: this hopefully demonstrates that when the | 2446 | * NOTE: this hopefully demonstrates that when the |
1520 | 2447 | * server is very busy with monitors the client | 2447 | * server is very busy with monitors the client |
1521 | 2448 | * is still able to punch through with a request. | 2448 | * is still able to punch through with a request. |
1522 | 2449 | */ | 2449 | */ |
1523 | 2450 | SEVCHK ( ca_get ( DBR_FLOAT, chan, &getResp) ,NULL ); | 2450 | SEVCHK ( ca_get ( DBR_FLOAT, chan, &getResp) ,NULL ); |
1524 | 2451 | SEVCHK ( ca_pend_io ( timeoutToPendIO ) ,NULL ); | 2451 | SEVCHK ( ca_pend_io ( timeoutToPendIO ) ,NULL ); |
1526 | 2452 | 2452 | ||
1527 | 2453 | showProgress ( interestLevel ); | 2453 | showProgress ( interestLevel ); |
1528 | 2454 | 2454 | ||
1529 | 2455 | /* | 2455 | /* |
1530 | @@ -2483,7 +2483,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1531 | 2483 | /* | 2483 | /* |
1532 | 2484 | * attempt to uncover problems where the last event isnt sent | 2484 | * attempt to uncover problems where the last event isnt sent |
1533 | 2485 | * and hopefully get into a flow control situation | 2485 | * and hopefully get into a flow control situation |
1535 | 2486 | */ | 2486 | */ |
1536 | 2487 | prevPassCount = 0u; | 2487 | prevPassCount = 0u; |
1537 | 2488 | for ( i = 0; i < 10; i++ ) { | 2488 | for ( i = 0; i < 10; i++ ) { |
1538 | 2489 | for ( j = 0; j < NELEMENTS(test); j++ ) { | 2489 | for ( j = 0; j < NELEMENTS(test); j++ ) { |
1539 | @@ -2492,7 +2492,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1540 | 2492 | test[j].lastValue = -1.0f; | 2492 | test[j].lastValue = -1.0f; |
1541 | 2493 | SEVCHK ( ca_add_event ( DBR_GR_FLOAT, chan, updateTestEvent, | 2493 | SEVCHK ( ca_add_event ( DBR_GR_FLOAT, chan, updateTestEvent, |
1542 | 2494 | &test[j], &test[j].id ) , NULL ); | 2494 | &test[j], &test[j].id ) , NULL ); |
1544 | 2495 | } | 2495 | } |
1545 | 2496 | 2496 | ||
1546 | 2497 | for ( j = 0; j <= i; j++ ) { | 2497 | for ( j = 0; j <= i; j++ ) { |
1547 | 2498 | temp = monitorUpdateTestPattern ( j ); | 2498 | temp = monitorUpdateTestPattern ( j ); |
1548 | @@ -2522,7 +2522,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1549 | 2522 | ca_poll (); /* emulate typical GUI */ | 2522 | ca_poll (); /* emulate typical GUI */ |
1550 | 2523 | for ( j = 0; j < NELEMENTS ( test ); j++ ) { | 2523 | for ( j = 0; j < NELEMENTS ( test ); j++ ) { |
1551 | 2524 | /* | 2524 | /* |
1553 | 2525 | * we shouldnt see old monitors because | 2525 | * we shouldnt see old monitors because |
1554 | 2526 | * we resubscribed | 2526 | * we resubscribed |
1555 | 2527 | */ | 2527 | */ |
1556 | 2528 | verify ( test[j].count <= i + 2 ); | 2528 | verify ( test[j].count <= i + 2 ); |
1557 | @@ -2562,12 +2562,12 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1558 | 2562 | showProgress ( interestLevel ); | 2562 | showProgress ( interestLevel ); |
1559 | 2563 | 2563 | ||
1560 | 2564 | /* | 2564 | /* |
1562 | 2565 | * delete the event subscriptions | 2565 | * delete the event subscriptions |
1563 | 2566 | */ | 2566 | */ |
1564 | 2567 | for ( i = 0; i < NELEMENTS ( test ); i++ ) { | 2567 | for ( i = 0; i < NELEMENTS ( test ); i++ ) { |
1565 | 2568 | SEVCHK ( ca_clear_event ( test[i].id ), NULL ); | 2568 | SEVCHK ( ca_clear_event ( test[i].id ), NULL ); |
1566 | 2569 | } | 2569 | } |
1568 | 2570 | 2570 | ||
1569 | 2571 | /* | 2571 | /* |
1570 | 2572 | * force all of the clear event requests to | 2572 | * force all of the clear event requests to |
1571 | 2573 | * complete | 2573 | * complete |
1572 | @@ -2578,7 +2578,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel ) | |||
1573 | 2578 | /* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */ | 2578 | /* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */ |
1574 | 2579 | 2579 | ||
1575 | 2580 | showProgressEnd ( interestLevel ); | 2580 | showProgressEnd ( interestLevel ); |
1577 | 2581 | } | 2581 | } |
1578 | 2582 | 2582 | ||
1579 | 2583 | void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel ) | 2583 | void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel ) |
1580 | 2584 | { | 2584 | { |
1581 | @@ -2594,7 +2594,7 @@ void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel ) | |||
1582 | 2594 | ca_beacon_anomaly_count () ); | 2594 | ca_beacon_anomaly_count () ); |
1583 | 2595 | 2595 | ||
1584 | 2596 | beaconPeriod = ca_beacon_period ( chan ); | 2596 | beaconPeriod = ca_beacon_period ( chan ); |
1586 | 2597 | printf ( "Estimated beacon period for channel %s = %g sec.\n", | 2597 | printf ( "Estimated beacon period for channel %s = %g sec.\n", |
1587 | 2598 | ca_name ( chan ), beaconPeriod ); | 2598 | ca_name ( chan ), beaconPeriod ); |
1588 | 2599 | 2599 | ||
1589 | 2600 | watchDogDelay = ca_receive_watchdog_delay ( chan ); | 2600 | watchDogDelay = ca_receive_watchdog_delay ( chan ); |
1590 | @@ -2603,8 +2603,8 @@ void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel ) | |||
1591 | 2603 | printf ( "busy: receive watchdog for \"%s\" expires in %g sec.\n", | 2603 | printf ( "busy: receive watchdog for \"%s\" expires in %g sec.\n", |
1592 | 2604 | ca_name ( chan ), watchDogDelay ); | 2604 | ca_name ( chan ), watchDogDelay ); |
1593 | 2605 | 2605 | ||
1596 | 2606 | /* | 2606 | /* |
1597 | 2607 | * let one default connection timeout go by w/o receive activity | 2607 | * let one default connection timeout go by w/o receive activity |
1598 | 2608 | * so we can see if beacons reset the watchdog | 2608 | * so we can see if beacons reset the watchdog |
1599 | 2609 | */ | 2609 | */ |
1600 | 2610 | for ( i = 0u; i < 15u; i++ ) { | 2610 | for ( i = 0u; i < 15u; i++ ) { |
1601 | @@ -2667,18 +2667,18 @@ void verifyTimeStamps ( chid chan, unsigned interestLevel ) | |||
1602 | 2667 | status = ca_pend_io ( timeoutToPendIO ); | 2667 | status = ca_pend_io ( timeoutToPendIO ); |
1603 | 2668 | verify ( status == ECA_NORMAL ); | 2668 | verify ( status == ECA_NORMAL ); |
1604 | 2669 | 2669 | ||
1606 | 2670 | length = epicsTimeToStrftime ( buf, sizeof ( buf ), | 2670 | length = epicsTimeToStrftime ( buf, sizeof ( buf ), |
1607 | 2671 | "%a %b %d %Y %H:%M:%S.%f", & first.stamp ); | 2671 | "%a %b %d %Y %H:%M:%S.%f", & first.stamp ); |
1608 | 2672 | verify ( length ); | 2672 | verify ( length ); |
1610 | 2673 | printf ("Processing time of channel \"%s\" was \"%s\"\n", | 2673 | printf ("Processing time of channel \"%s\" was \"%s\"\n", |
1611 | 2674 | ca_name ( chan ), buf ); | 2674 | ca_name ( chan ), buf ); |
1612 | 2675 | 2675 | ||
1613 | 2676 | diff = epicsTimeDiffInSeconds ( & last.stamp, & first.stamp ); | 2676 | diff = epicsTimeDiffInSeconds ( & last.stamp, & first.stamp ); |
1615 | 2677 | printf ("Time difference between two successive reads was %g sec\n", | 2677 | printf ("Time difference between two successive reads was %g sec\n", |
1616 | 2678 | diff ); | 2678 | diff ); |
1617 | 2679 | 2679 | ||
1618 | 2680 | diff = epicsTimeDiffInSeconds ( & first.stamp, & localTime ); | 2680 | diff = epicsTimeDiffInSeconds ( & first.stamp, & localTime ); |
1620 | 2681 | printf ("Time difference between client and server %g sec\n", | 2681 | printf ("Time difference between client and server %g sec\n", |
1621 | 2682 | diff ); | 2682 | diff ); |
1622 | 2683 | 2683 | ||
1623 | 2684 | showProgressEnd ( interestLevel ); | 2684 | showProgressEnd ( interestLevel ); |
1624 | @@ -2700,7 +2700,7 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel ) | |||
1625 | 2700 | double value; | 2700 | double value; |
1626 | 2701 | chid chan0, chan1; | 2701 | chid chan0, chan1; |
1627 | 2702 | unsigned priority0, priority1; | 2702 | unsigned priority0, priority1; |
1629 | 2703 | 2703 | ||
1630 | 2704 | priority0 = ( i * ( CA_PRIORITY_MAX - CA_PRIORITY_MIN ) ) / nPrio; | 2704 | priority0 = ( i * ( CA_PRIORITY_MAX - CA_PRIORITY_MIN ) ) / nPrio; |
1631 | 2705 | priority0 += CA_PRIORITY_MIN; | 2705 | priority0 += CA_PRIORITY_MIN; |
1632 | 2706 | if ( priority0 > CA_PRIORITY_MAX ) { | 2706 | if ( priority0 > CA_PRIORITY_MAX ) { |
1633 | @@ -2713,11 +2713,11 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel ) | |||
1634 | 2713 | priority1 = CA_PRIORITY_MAX; | 2713 | priority1 = CA_PRIORITY_MAX; |
1635 | 2714 | } | 2714 | } |
1636 | 2715 | 2715 | ||
1638 | 2716 | status = ca_create_channel ( pName, 0, 0, | 2716 | status = ca_create_channel ( pName, 0, 0, |
1639 | 2717 | priority0, &chan0 ); | 2717 | priority0, &chan0 ); |
1640 | 2718 | SEVCHK ( status, "prioritized channel create failed" ); | 2718 | SEVCHK ( status, "prioritized channel create failed" ); |
1641 | 2719 | 2719 | ||
1643 | 2720 | status = ca_create_channel ( pName, 0, 0, | 2720 | status = ca_create_channel ( pName, 0, 0, |
1644 | 2721 | priority1, &chan1 ); | 2721 | priority1, &chan1 ); |
1645 | 2722 | SEVCHK ( status, "prioritized channel create failed" ); | 2722 | SEVCHK ( status, "prioritized channel create failed" ); |
1646 | 2723 | 2723 | ||
1647 | @@ -2751,8 +2751,8 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel ) | |||
1648 | 2751 | showProgressEnd ( interestLevel ); | 2751 | showProgressEnd ( interestLevel ); |
1649 | 2752 | } | 2752 | } |
1650 | 2753 | 2753 | ||
1653 | 2754 | void verifyTearDownWhenChannelConnected ( const char * pName, | 2754 | void verifyTearDownWhenChannelConnected ( const char * pName, |
1654 | 2755 | enum ca_preemptive_callback_select select, | 2755 | enum ca_preemptive_callback_select select, |
1655 | 2756 | unsigned interestLevel ) | 2756 | unsigned interestLevel ) |
1656 | 2757 | { | 2757 | { |
1657 | 2758 | static const unsigned chanCount = 20; | 2758 | static const unsigned chanCount = 20; |
1658 | @@ -2761,15 +2761,15 @@ void verifyTearDownWhenChannelConnected ( const char * pName, | |||
1659 | 2761 | chid * const pChans = (chid * const) calloc ( chanCount, sizeof ( *pChans ) ); | 2761 | chid * const pChans = (chid * const) calloc ( chanCount, sizeof ( *pChans ) ); |
1660 | 2762 | double * const pValues = (double * const) calloc ( chanCount, sizeof ( *pValues ) ); | 2762 | double * const pValues = (double * const) calloc ( chanCount, sizeof ( *pValues ) ); |
1661 | 2763 | unsigned i, j; | 2763 | unsigned i, j; |
1663 | 2764 | 2764 | ||
1664 | 2765 | verify ( pChans && pValues ); | 2765 | verify ( pChans && pValues ); |
1666 | 2766 | 2766 | ||
1667 | 2767 | showProgressBegin ( "verifyTearDownWhenChannelConnected", interestLevel ); | 2767 | showProgressBegin ( "verifyTearDownWhenChannelConnected", interestLevel ); |
1668 | 2768 | 2768 | ||
1669 | 2769 | for ( i = 0u; i < loopCount; i++ ) { | 2769 | for ( i = 0u; i < loopCount; i++ ) { |
1670 | 2770 | int status; | 2770 | int status; |
1671 | 2771 | ca_context_create ( select ); | 2771 | ca_context_create ( select ); |
1673 | 2772 | 2772 | ||
1674 | 2773 | for ( j = 0; j < chanCount; j++ ) { | 2773 | for ( j = 0; j < chanCount; j++ ) { |
1675 | 2774 | status = ca_create_channel ( pName, 0, 0, 0, & pChans[j] ); | 2774 | status = ca_create_channel ( pName, 0, 0, 0, & pChans[j] ); |
1676 | 2775 | SEVCHK ( status, "immediate tear down channel create failed" ); | 2775 | SEVCHK ( status, "immediate tear down channel create failed" ); |
1677 | @@ -2782,11 +2782,11 @@ void verifyTearDownWhenChannelConnected ( const char * pName, | |||
1678 | 2782 | status = ca_get ( DBR_DOUBLE, pChans[j], &pValues[j] ); | 2782 | status = ca_get ( DBR_DOUBLE, pChans[j], &pValues[j] ); |
1679 | 2783 | SEVCHK ( status, "immediate tear down channel get failed" ); | 2783 | SEVCHK ( status, "immediate tear down channel get failed" ); |
1680 | 2784 | } | 2784 | } |
1682 | 2785 | 2785 | ||
1683 | 2786 | status = ca_pend_io ( timeoutToPendIO ); | 2786 | status = ca_pend_io ( timeoutToPendIO ); |
1684 | 2787 | SEVCHK ( status, "immediate tear down get pend io failed" ); | 2787 | SEVCHK ( status, "immediate tear down get pend io failed" ); |
1685 | 2788 | 2788 | ||
1687 | 2789 | ca_context_destroy (); | 2789 | ca_context_destroy (); |
1688 | 2790 | } | 2790 | } |
1689 | 2791 | 2791 | ||
1690 | 2792 | ca_context_create ( select ); | 2792 | ca_context_create ( select ); |
1691 | @@ -2798,8 +2798,8 @@ void verifyTearDownWhenChannelConnected ( const char * pName, | |||
1692 | 2798 | } | 2798 | } |
1693 | 2799 | 2799 | ||
1694 | 2800 | 2800 | ||
1697 | 2801 | void verifyImmediateTearDown ( const char * pName, | 2801 | void verifyImmediateTearDown ( const char * pName, |
1698 | 2802 | enum ca_preemptive_callback_select select, | 2802 | enum ca_preemptive_callback_select select, |
1699 | 2803 | unsigned interestLevel ) | 2803 | unsigned interestLevel ) |
1700 | 2804 | { | 2804 | { |
1701 | 2805 | int i; | 2805 | int i; |
1702 | @@ -2817,8 +2817,8 @@ void verifyImmediateTearDown ( const char * pName, | |||
1703 | 2817 | status = ca_pend_io ( timeoutToPendIO ); | 2817 | status = ca_pend_io ( timeoutToPendIO ); |
1704 | 2818 | SEVCHK ( status, "immediate tear down channel connect failed" ); | 2818 | SEVCHK ( status, "immediate tear down channel connect failed" ); |
1705 | 2819 | verify ( status == ECA_NORMAL ); | 2819 | verify ( status == ECA_NORMAL ); |
1708 | 2820 | /* | 2820 | /* |
1709 | 2821 | * verify that puts pending when we call ca_task_exit() | 2821 | * verify that puts pending when we call ca_task_exit() |
1710 | 2822 | * get flushed out | 2822 | * get flushed out |
1711 | 2823 | */ | 2823 | */ |
1712 | 2824 | if ( i > 0 ) { | 2824 | if ( i > 0 ) { |
1713 | @@ -2868,12 +2868,12 @@ void fdRegCB ( void * parg, int fd, int opened ) | |||
1714 | 2868 | 2868 | ||
1715 | 2869 | fdctx * mgrCtx = ( fdctx * ) parg; | 2869 | fdctx * mgrCtx = ( fdctx * ) parg; |
1716 | 2870 | if ( opened ) { | 2870 | if ( opened ) { |
1718 | 2871 | status = fdmgr_add_callback ( | 2871 | status = fdmgr_add_callback ( |
1719 | 2872 | mgrCtx, fd, fdi_read, fdcb, 0 ); | 2872 | mgrCtx, fd, fdi_read, fdcb, 0 ); |
1720 | 2873 | verify ( status >= 0 ); | 2873 | verify ( status >= 0 ); |
1721 | 2874 | } | 2874 | } |
1722 | 2875 | else { | 2875 | else { |
1724 | 2876 | status = fdmgr_clear_callback ( | 2876 | status = fdmgr_clear_callback ( |
1725 | 2877 | mgrCtx, fd, fdi_read ); | 2877 | mgrCtx, fd, fdi_read ); |
1726 | 2878 | verify ( status >= 0 ); | 2878 | verify ( status >= 0 ); |
1727 | 2879 | } | 2879 | } |
1728 | @@ -2893,21 +2893,21 @@ typedef struct { | |||
1729 | 2893 | unsigned m_interestLevel; | 2893 | unsigned m_interestLevel; |
1730 | 2894 | } MultiThreadSubscrTest; | 2894 | } MultiThreadSubscrTest; |
1731 | 2895 | 2895 | ||
1733 | 2896 | static void testMultithreadSubscrSubscrCallback | 2896 | static void testMultithreadSubscrSubscrCallback |
1734 | 2897 | ( struct event_handler_args eha ) | 2897 | ( struct event_handler_args eha ) |
1735 | 2898 | { | 2898 | { |
1736 | 2899 | const epicsEventId firstUpdateEvent = ( epicsEventId ) eha.usr; | 2899 | const epicsEventId firstUpdateEvent = ( epicsEventId ) eha.usr; |
1737 | 2900 | epicsEventSignal ( firstUpdateEvent ); | 2900 | epicsEventSignal ( firstUpdateEvent ); |
1738 | 2901 | } | 2901 | } |
1739 | 2902 | 2902 | ||
1741 | 2903 | static void testMultithreadSubscrCreateSubscr ( void * pParm ) | 2903 | static void testMultithreadSubscrCreateSubscr ( void * pParm ) |
1742 | 2904 | { | 2904 | { |
1743 | 2905 | static unsigned nElem = 0; | 2905 | static unsigned nElem = 0; |
1744 | 2906 | int testComplete = FALSE; | 2906 | int testComplete = FALSE; |
1745 | 2907 | evid id; | 2907 | evid id; |
1746 | 2908 | epicsEventId firstUpdateEvent; | 2908 | epicsEventId firstUpdateEvent; |
1749 | 2909 | epicsEventWaitStatus eventWaitStatus; | 2909 | epicsEventWaitStatus eventWaitStatus; |
1750 | 2910 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = | 2910 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = |
1751 | 2911 | ( MultiThreadSubscrTest * ) pParm; | 2911 | ( MultiThreadSubscrTest * ) pParm; |
1752 | 2912 | 2912 | ||
1753 | 2913 | /* this is required for the ca_flush below to work correctly */ | 2913 | /* this is required for the ca_flush below to work correctly */ |
1754 | @@ -2915,19 +2915,19 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm ) | |||
1755 | 2915 | verify ( status == ECA_NORMAL ); | 2915 | verify ( status == ECA_NORMAL ); |
1756 | 2916 | firstUpdateEvent = epicsEventMustCreate ( epicsEventEmpty ); | 2916 | firstUpdateEvent = epicsEventMustCreate ( epicsEventEmpty ); |
1757 | 2917 | verify ( firstUpdateEvent ); | 2917 | verify ( firstUpdateEvent ); |
1765 | 2918 | status = ca_create_subscription ( | 2918 | status = ca_create_subscription ( |
1766 | 2919 | DBR_TIME_LONG, | 2919 | DBR_TIME_LONG, |
1767 | 2920 | nElem, | 2920 | nElem, |
1768 | 2921 | pMultiThreadSubscrTest->m_chan, | 2921 | pMultiThreadSubscrTest->m_chan, |
1769 | 2922 | DBE_VALUE, | 2922 | DBE_VALUE, |
1770 | 2923 | testMultithreadSubscrSubscrCallback, | 2923 | testMultithreadSubscrSubscrCallback, |
1771 | 2924 | firstUpdateEvent, | 2924 | firstUpdateEvent, |
1772 | 2925 | & id ); | 2925 | & id ); |
1773 | 2926 | verify ( status == ECA_NORMAL ); | 2926 | verify ( status == ECA_NORMAL ); |
1774 | 2927 | status = ca_flush_io (); | 2927 | status = ca_flush_io (); |
1775 | 2928 | verify ( status == ECA_NORMAL ); | 2928 | verify ( status == ECA_NORMAL ); |
1776 | 2929 | /* wait for first update */ | 2929 | /* wait for first update */ |
1778 | 2930 | eventWaitStatus = epicsEventWaitWithTimeout ( | 2930 | eventWaitStatus = epicsEventWaitWithTimeout ( |
1779 | 2931 | firstUpdateEvent, 60.0 * 10 ); | 2931 | firstUpdateEvent, 60.0 * 10 ); |
1780 | 2932 | verify ( eventWaitStatus == epicsEventWaitOK ); | 2932 | verify ( eventWaitStatus == epicsEventWaitOK ); |
1781 | 2933 | epicsEventDestroy ( firstUpdateEvent ); | 2933 | epicsEventDestroy ( firstUpdateEvent ); |
1782 | @@ -2935,7 +2935,7 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm ) | |||
1783 | 2935 | verify ( status == ECA_NORMAL ); | 2935 | verify ( status == ECA_NORMAL ); |
1784 | 2936 | epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex ); | 2936 | epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex ); |
1785 | 2937 | pMultiThreadSubscrTest->m_nUpdatesReceived++; | 2937 | pMultiThreadSubscrTest->m_nUpdatesReceived++; |
1787 | 2938 | testComplete = ( pMultiThreadSubscrTest->m_nUpdatesReceived == | 2938 | testComplete = ( pMultiThreadSubscrTest->m_nUpdatesReceived == |
1788 | 2939 | pMultiThreadSubscrTest->m_nUpdatesRequired ); | 2939 | pMultiThreadSubscrTest->m_nUpdatesRequired ); |
1789 | 2940 | pMultiThreadSubscrTest->m_testComplete = testComplete; | 2940 | pMultiThreadSubscrTest->m_testComplete = testComplete; |
1790 | 2941 | epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex ); | 2941 | epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex ); |
1791 | @@ -2946,10 +2946,10 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm ) | |||
1792 | 2946 | 2946 | ||
1793 | 2947 | void testMultithreadSubscrConnHandler ( struct connection_handler_args args ) | 2947 | void testMultithreadSubscrConnHandler ( struct connection_handler_args args ) |
1794 | 2948 | { | 2948 | { |
1796 | 2949 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = | 2949 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = |
1797 | 2950 | ( MultiThreadSubscrTest * ) ca_puser ( args.chid ); | 2950 | ( MultiThreadSubscrTest * ) ca_puser ( args.chid ); |
1798 | 2951 | epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex ); | 2951 | epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex ); |
1800 | 2952 | if ( !pMultiThreadSubscrTest->m_testInitiated && | 2952 | if ( !pMultiThreadSubscrTest->m_testInitiated && |
1801 | 2953 | args.op == CA_OP_CONN_UP ) { | 2953 | args.op == CA_OP_CONN_UP ) { |
1802 | 2954 | int i; | 2954 | int i; |
1803 | 2955 | pMultiThreadSubscrTest->m_testInitiated = TRUE; | 2955 | pMultiThreadSubscrTest->m_testInitiated = TRUE; |
1804 | @@ -2957,10 +2957,10 @@ void testMultithreadSubscrConnHandler ( struct connection_handler_args args ) | |||
1805 | 2957 | char threadname[64]; | 2957 | char threadname[64]; |
1806 | 2958 | epicsThreadId threadId; | 2958 | epicsThreadId threadId; |
1807 | 2959 | sprintf(threadname, "testSubscr%06u", i); | 2959 | sprintf(threadname, "testSubscr%06u", i); |
1812 | 2960 | threadId = epicsThreadCreate ( threadname, | 2960 | threadId = epicsThreadCreate ( threadname, |
1813 | 2961 | epicsThreadPriorityMedium, | 2961 | epicsThreadPriorityMedium, |
1814 | 2962 | epicsThreadGetStackSize(epicsThreadStackSmall), | 2962 | epicsThreadGetStackSize(epicsThreadStackSmall), |
1815 | 2963 | testMultithreadSubscrCreateSubscr, | 2963 | testMultithreadSubscrCreateSubscr, |
1816 | 2964 | pMultiThreadSubscrTest ); | 2964 | pMultiThreadSubscrTest ); |
1817 | 2965 | verify ( threadId ); | 2965 | verify ( threadId ); |
1818 | 2966 | } | 2966 | } |
1819 | @@ -2970,7 +2970,7 @@ void testMultithreadSubscrConnHandler ( struct connection_handler_args args ) | |||
1820 | 2970 | 2970 | ||
1821 | 2971 | void testMultithreadSubscr ( void * pParm ) | 2971 | void testMultithreadSubscr ( void * pParm ) |
1822 | 2972 | { | 2972 | { |
1824 | 2973 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = | 2973 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = |
1825 | 2974 | ( MultiThreadSubscrTest * ) pParm; | 2974 | ( MultiThreadSubscrTest * ) pParm; |
1826 | 2975 | int status; | 2975 | int status; |
1827 | 2976 | unsigned i; | 2976 | unsigned i; |
1828 | @@ -2983,11 +2983,11 @@ void testMultithreadSubscr ( void * pParm ) | |||
1829 | 2983 | pMultiThreadSubscrTest->m_chanName, | 2983 | pMultiThreadSubscrTest->m_chanName, |
1830 | 2984 | testMultithreadSubscrConnHandler, | 2984 | testMultithreadSubscrConnHandler, |
1831 | 2985 | pMultiThreadSubscrTest, | 2985 | pMultiThreadSubscrTest, |
1833 | 2986 | CA_PRIORITY_MIN, | 2986 | CA_PRIORITY_MIN, |
1834 | 2987 | & pMultiThreadSubscrTest->m_chan ); | 2987 | & pMultiThreadSubscrTest->m_chan ); |
1835 | 2988 | verify ( status == ECA_NORMAL ); | 2988 | verify ( status == ECA_NORMAL ); |
1836 | 2989 | 2989 | ||
1838 | 2990 | showProgressBegin ( "verifyMultithreadSubscr", | 2990 | showProgressBegin ( "verifyMultithreadSubscr", |
1839 | 2991 | pMultiThreadSubscrTest->m_interestLevel ); | 2991 | pMultiThreadSubscrTest->m_interestLevel ); |
1840 | 2992 | i = 0; | 2992 | i = 0; |
1841 | 2993 | while ( TRUE ) { | 2993 | while ( TRUE ) { |
1842 | @@ -2999,11 +2999,11 @@ void testMultithreadSubscr ( void * pParm ) | |||
1843 | 2999 | if ( success ) { | 2999 | if ( success ) { |
1844 | 3000 | break; | 3000 | break; |
1845 | 3001 | } | 3001 | } |
1847 | 3002 | eventWaitStatus = epicsEventWaitWithTimeout ( | 3002 | eventWaitStatus = epicsEventWaitWithTimeout ( |
1848 | 3003 | pMultiThreadSubscrTest->m_testCompleteEvent, 0.1 ); | 3003 | pMultiThreadSubscrTest->m_testCompleteEvent, 0.1 ); |
1850 | 3004 | verify ( eventWaitStatus == epicsEventWaitOK || | 3004 | verify ( eventWaitStatus == epicsEventWaitOK || |
1851 | 3005 | eventWaitStatus == epicsEventWaitTimeout ); | 3005 | eventWaitStatus == epicsEventWaitTimeout ); |
1853 | 3006 | if ( i++ % 100 == 0u ) | 3006 | if ( i++ % 100 == 0u ) |
1854 | 3007 | showProgress ( pMultiThreadSubscrTest->m_interestLevel ); | 3007 | showProgress ( pMultiThreadSubscrTest->m_interestLevel ); |
1855 | 3008 | verify ( i < 1000 ); | 3008 | verify ( i < 1000 ); |
1856 | 3009 | } | 3009 | } |
1857 | @@ -3023,33 +3023,33 @@ void verifyMultithreadSubscr ( const char * pName, unsigned interestLevel ) | |||
1858 | 3023 | { | 3023 | { |
1859 | 3024 | static unsigned nSubscr = 3000; | 3024 | static unsigned nSubscr = 3000; |
1860 | 3025 | epicsThreadId threadId; | 3025 | epicsThreadId threadId; |
1863 | 3026 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = | 3026 | MultiThreadSubscrTest * const pMultiThreadSubscrTest = |
1864 | 3027 | (MultiThreadSubscrTest*) calloc ( 1, | 3027 | (MultiThreadSubscrTest*) calloc ( 1, |
1865 | 3028 | sizeof ( MultiThreadSubscrTest ) ); | 3028 | sizeof ( MultiThreadSubscrTest ) ); |
1866 | 3029 | verify ( pMultiThreadSubscrTest); | 3029 | verify ( pMultiThreadSubscrTest); |
1867 | 3030 | pMultiThreadSubscrTest->m_mutex = epicsMutexMustCreate (); | 3030 | pMultiThreadSubscrTest->m_mutex = epicsMutexMustCreate (); |
1868 | 3031 | verify ( pMultiThreadSubscrTest->m_mutex ); | 3031 | verify ( pMultiThreadSubscrTest->m_mutex ); |
1870 | 3032 | pMultiThreadSubscrTest->m_testCompleteEvent = | 3032 | pMultiThreadSubscrTest->m_testCompleteEvent = |
1871 | 3033 | epicsEventMustCreate ( epicsEventEmpty ); | 3033 | epicsEventMustCreate ( epicsEventEmpty ); |
1872 | 3034 | verify ( pMultiThreadSubscrTest->m_testCompleteEvent ); | 3034 | verify ( pMultiThreadSubscrTest->m_testCompleteEvent ); |
1874 | 3035 | pMultiThreadSubscrTest->m_threadExitEvent = | 3035 | pMultiThreadSubscrTest->m_threadExitEvent = |
1875 | 3036 | epicsEventMustCreate ( epicsEventEmpty ); | 3036 | epicsEventMustCreate ( epicsEventEmpty ); |
1876 | 3037 | verify ( pMultiThreadSubscrTest->m_threadExitEvent ); | 3037 | verify ( pMultiThreadSubscrTest->m_threadExitEvent ); |
1878 | 3038 | strncpy ( pMultiThreadSubscrTest->m_chanName, pName, | 3038 | strncpy ( pMultiThreadSubscrTest->m_chanName, pName, |
1879 | 3039 | sizeof ( pMultiThreadSubscrTest->m_chanName ) ); | 3039 | sizeof ( pMultiThreadSubscrTest->m_chanName ) ); |
1880 | 3040 | pMultiThreadSubscrTest->m_chanName | 3040 | pMultiThreadSubscrTest->m_chanName |
1881 | 3041 | [ sizeof ( pMultiThreadSubscrTest->m_chanName ) - 1u ] = '\0'; | 3041 | [ sizeof ( pMultiThreadSubscrTest->m_chanName ) - 1u ] = '\0'; |
1882 | 3042 | pMultiThreadSubscrTest->m_nUpdatesRequired = nSubscr; | 3042 | pMultiThreadSubscrTest->m_nUpdatesRequired = nSubscr; |
1883 | 3043 | pMultiThreadSubscrTest->m_interestLevel = interestLevel; | 3043 | pMultiThreadSubscrTest->m_interestLevel = interestLevel; |
1888 | 3044 | threadId = epicsThreadCreate ( | 3044 | threadId = epicsThreadCreate ( |
1889 | 3045 | "testMultithreadSubscr", | 3045 | "testMultithreadSubscr", |
1890 | 3046 | epicsThreadPriorityMedium, | 3046 | epicsThreadPriorityMedium, |
1891 | 3047 | epicsThreadGetStackSize(epicsThreadStackSmall), | 3047 | epicsThreadGetStackSize(epicsThreadStackSmall), |
1892 | 3048 | testMultithreadSubscr, pMultiThreadSubscrTest ); | 3048 | testMultithreadSubscr, pMultiThreadSubscrTest ); |
1893 | 3049 | verify ( threadId ); | 3049 | verify ( threadId ); |
1894 | 3050 | { | 3050 | { |
1895 | 3051 | epicsEventWaitStatus eventWaitStatus; | 3051 | epicsEventWaitStatus eventWaitStatus; |
1897 | 3052 | eventWaitStatus = epicsEventWaitWithTimeout ( | 3052 | eventWaitStatus = epicsEventWaitWithTimeout ( |
1898 | 3053 | pMultiThreadSubscrTest->m_threadExitEvent, 1000.0 ); | 3053 | pMultiThreadSubscrTest->m_threadExitEvent, 1000.0 ); |
1899 | 3054 | verify ( eventWaitStatus == epicsEventWaitOK ); | 3054 | verify ( eventWaitStatus == epicsEventWaitOK ); |
1900 | 3055 | } | 3055 | } |
1901 | @@ -3068,7 +3068,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel ) | |||
1902 | 3068 | evid subscription; | 3068 | evid subscription; |
1903 | 3069 | unsigned eventCount = 0u; | 3069 | unsigned eventCount = 0u; |
1904 | 3070 | epicsTimeStamp begin, end; | 3070 | epicsTimeStamp begin, end; |
1906 | 3071 | 3071 | ||
1907 | 3072 | mgrCtx = fdmgr_init (); | 3072 | mgrCtx = fdmgr_init (); |
1908 | 3073 | verify ( mgrCtx ); | 3073 | verify ( mgrCtx ); |
1909 | 3074 | 3074 | ||
1910 | @@ -3089,7 +3089,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel ) | |||
1911 | 3089 | 3089 | ||
1912 | 3090 | showProgress ( interestLevel ); | 3090 | showProgress ( interestLevel ); |
1913 | 3091 | 3091 | ||
1915 | 3092 | status = ca_add_event ( DBR_FLOAT, newChan, | 3092 | status = ca_add_event ( DBR_FLOAT, newChan, |
1916 | 3093 | nUpdatesTester, & eventCount, & subscription ); | 3093 | nUpdatesTester, & eventCount, & subscription ); |
1917 | 3094 | verify ( status == ECA_NORMAL ); | 3094 | verify ( status == ECA_NORMAL ); |
1918 | 3095 | 3095 | ||
1919 | @@ -3142,7 +3142,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel ) | |||
1920 | 3142 | showProgressEnd ( interestLevel ); | 3142 | showProgressEnd ( interestLevel ); |
1921 | 3143 | } | 3143 | } |
1922 | 3144 | 3144 | ||
1924 | 3145 | void verifyConnectWithDisconnectedChannels ( | 3145 | void verifyConnectWithDisconnectedChannels ( |
1925 | 3146 | const char *pName, unsigned interestLevel ) | 3146 | const char *pName, unsigned interestLevel ) |
1926 | 3147 | { | 3147 | { |
1927 | 3148 | int status; | 3148 | int status; |
1928 | @@ -3171,11 +3171,11 @@ void verifyConnectWithDisconnectedChannels ( | |||
1929 | 3171 | status = ca_create_channel ( pName, 0, 0, 0, & validChan ); | 3171 | status = ca_create_channel ( pName, 0, 0, 0, & validChan ); |
1930 | 3172 | verify ( status == ECA_NORMAL ); | 3172 | verify ( status == ECA_NORMAL ); |
1931 | 3173 | 3173 | ||
1934 | 3174 | /* | 3174 | /* |
1935 | 3175 | * we should be able to connect to a valid | 3175 | * we should be able to connect to a valid |
1936 | 3176 | * channel within a reasonable delay even | 3176 | * channel within a reasonable delay even |
1939 | 3177 | * though there is one permanently | 3177 | * though there is one permanently |
1940 | 3178 | * diasconnected channel | 3178 | * diasconnected channel |
1941 | 3179 | */ | 3179 | */ |
1942 | 3180 | status = ca_pend_io ( timeoutToPendIO ); | 3180 | status = ca_pend_io ( timeoutToPendIO ); |
1943 | 3181 | verify ( status == ECA_NORMAL ); | 3181 | verify ( status == ECA_NORMAL ); |
1944 | @@ -3205,7 +3205,7 @@ void noopExceptionCallback ( struct exception_handler_args args ) | |||
1945 | 3205 | { | 3205 | { |
1946 | 3206 | } | 3206 | } |
1947 | 3207 | 3207 | ||
1949 | 3208 | void verifyDisconnect ( | 3208 | void verifyDisconnect ( |
1950 | 3209 | const char * pName, unsigned interestLevel ) | 3209 | const char * pName, unsigned interestLevel ) |
1951 | 3210 | { | 3210 | { |
1952 | 3211 | int disconnectFlag = 0; | 3211 | int disconnectFlag = 0; |
1953 | @@ -3214,8 +3214,8 @@ void verifyDisconnect ( | |||
1954 | 3214 | chid chan1; | 3214 | chid chan1; |
1955 | 3215 | int status; | 3215 | int status; |
1956 | 3216 | 3216 | ||
1959 | 3217 | status = ca_create_channel ( | 3217 | status = ca_create_channel ( |
1960 | 3218 | pName, verifyClearChannelOnDisconnectCallback, | 3218 | pName, verifyClearChannelOnDisconnectCallback, |
1961 | 3219 | & disconnectFlag, 0, & chan0 ); | 3219 | & disconnectFlag, 0, & chan0 ); |
1962 | 3220 | SEVCHK ( status, NULL ); | 3220 | SEVCHK ( status, NULL ); |
1963 | 3221 | 3221 | ||
1964 | @@ -3256,7 +3256,7 @@ void verifyDisconnect ( | |||
1965 | 3256 | fprintf ( stdout, "confirmed.\n" ); | 3256 | fprintf ( stdout, "confirmed.\n" ); |
1966 | 3257 | /* channel cleared by disconnect handler */ | 3257 | /* channel cleared by disconnect handler */ |
1967 | 3258 | 3258 | ||
1969 | 3259 | status = ca_create_channel ( | 3259 | status = ca_create_channel ( |
1970 | 3260 | pName, 0, 0, 0, & chan1 ); | 3260 | pName, 0, 0, 0, & chan1 ); |
1971 | 3261 | SEVCHK ( status, NULL ); | 3261 | SEVCHK ( status, NULL ); |
1972 | 3262 | 3262 | ||
1973 | @@ -3275,11 +3275,11 @@ void verifyDisconnect ( | |||
1974 | 3275 | SEVCHK ( status, NULL ); | 3275 | SEVCHK ( status, NULL ); |
1975 | 3276 | } | 3276 | } |
1976 | 3277 | 3277 | ||
1978 | 3278 | void verifyName ( | 3278 | void verifyName ( |
1979 | 3279 | const char * pName, unsigned interestLevel ) | 3279 | const char * pName, unsigned interestLevel ) |
1980 | 3280 | { | 3280 | { |
1981 | 3281 | chid chan; | 3281 | chid chan; |
1983 | 3282 | int status = ca_create_channel ( | 3282 | int status = ca_create_channel ( |
1984 | 3283 | pName, 0, 0, 0, & chan ); | 3283 | pName, 0, 0, 0, & chan ); |
1985 | 3284 | SEVCHK ( status, NULL ); | 3284 | SEVCHK ( status, NULL ); |
1986 | 3285 | if ( strcmp ( pName, ca_name ( chan ) ) != 0 ) { | 3285 | if ( strcmp ( pName, ca_name ( chan ) ) != 0 ) { |
1987 | @@ -3297,13 +3297,13 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel ) | |||
1988 | 3297 | 3297 | ||
1989 | 3298 | for ( i=0u; i < 1000; i++ ) { | 3298 | for ( i=0u; i < 1000; i++ ) { |
1990 | 3299 | const dbr_double_t stim = i; | 3299 | const dbr_double_t stim = i; |
1993 | 3300 | 3300 | ||
1994 | 3301 | { | 3301 | { |
1995 | 3302 | chid chan; | 3302 | chid chan; |
1996 | 3303 | int status; | 3303 | int status; |
1997 | 3304 | status = ca_context_create ( ca_disable_preemptive_callback ); | 3304 | status = ca_context_create ( ca_disable_preemptive_callback ); |
1998 | 3305 | SEVCHK ( status, "context create failed" ); | 3305 | SEVCHK ( status, "context create failed" ); |
2000 | 3306 | 3306 | ||
2001 | 3307 | status = ca_create_channel ( pName, 0, 0, 0, & chan ); | 3307 | status = ca_create_channel ( pName, 0, 0, 0, & chan ); |
2002 | 3308 | /* | 3308 | /* |
2003 | 3309 | * currently in-memory channels cant be used with this test | 3309 | * currently in-memory channels cant be used with this test |
2004 | @@ -3311,26 +3311,26 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel ) | |||
2005 | 3311 | */ | 3311 | */ |
2006 | 3312 | if ( status != ECA_UNAVAILINSERV ) { | 3312 | if ( status != ECA_UNAVAILINSERV ) { |
2007 | 3313 | SEVCHK ( status, NULL ); | 3313 | SEVCHK ( status, NULL ); |
2009 | 3314 | 3314 | ||
2010 | 3315 | status = ca_pend_io( timeoutToPendIO ); | 3315 | status = ca_pend_io( timeoutToPendIO ); |
2011 | 3316 | SEVCHK ( status, "channel connect failed" ); | 3316 | SEVCHK ( status, "channel connect failed" ); |
2013 | 3317 | 3317 | ||
2014 | 3318 | status = ca_put ( DBR_DOUBLE, chan, & stim ); | 3318 | status = ca_put ( DBR_DOUBLE, chan, & stim ); |
2015 | 3319 | SEVCHK ( status, "channel put failed" ); | 3319 | SEVCHK ( status, "channel put failed" ); |
2017 | 3320 | 3320 | ||
2018 | 3321 | status = ca_clear_channel ( chan ); | 3321 | status = ca_clear_channel ( chan ); |
2019 | 3322 | SEVCHK ( status, NULL ); | 3322 | SEVCHK ( status, NULL ); |
2020 | 3323 | } | 3323 | } |
2021 | 3324 | ca_context_destroy (); | 3324 | ca_context_destroy (); |
2022 | 3325 | } | 3325 | } |
2024 | 3326 | 3326 | ||
2025 | 3327 | { | 3327 | { |
2026 | 3328 | chid chan; | 3328 | chid chan; |
2027 | 3329 | int status; | 3329 | int status; |
2028 | 3330 | dbr_double_t resp; | 3330 | dbr_double_t resp; |
2029 | 3331 | status = ca_context_create ( ca_disable_preemptive_callback ); | 3331 | status = ca_context_create ( ca_disable_preemptive_callback ); |
2030 | 3332 | SEVCHK ( status, "context create failed" ); | 3332 | SEVCHK ( status, "context create failed" ); |
2032 | 3333 | 3333 | ||
2033 | 3334 | status = ca_create_channel ( pName, 0, 0, 0, & chan ); | 3334 | status = ca_create_channel ( pName, 0, 0, 0, & chan ); |
2034 | 3335 | SEVCHK ( status, NULL ); | 3335 | SEVCHK ( status, NULL ); |
2035 | 3336 | /* | 3336 | /* |
2036 | @@ -3340,15 +3340,15 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel ) | |||
2037 | 3340 | if ( status != ECA_UNAVAILINSERV ) { | 3340 | if ( status != ECA_UNAVAILINSERV ) { |
2038 | 3341 | status = ca_pend_io( timeoutToPendIO ); | 3341 | status = ca_pend_io( timeoutToPendIO ); |
2039 | 3342 | SEVCHK ( status, "channel connect failed" ); | 3342 | SEVCHK ( status, "channel connect failed" ); |
2041 | 3343 | 3343 | ||
2042 | 3344 | status = ca_get ( DBR_DOUBLE, chan, & resp ); | 3344 | status = ca_get ( DBR_DOUBLE, chan, & resp ); |
2043 | 3345 | SEVCHK ( status, "channel get failed" ); | 3345 | SEVCHK ( status, "channel get failed" ); |
2045 | 3346 | 3346 | ||
2046 | 3347 | status = ca_pend_io ( timeoutToPendIO ); | 3347 | status = ca_pend_io ( timeoutToPendIO ); |
2047 | 3348 | SEVCHK ( status, "get, pend io failed" ); | 3348 | SEVCHK ( status, "get, pend io failed" ); |
2049 | 3349 | 3349 | ||
2050 | 3350 | verify ( stim == resp ); | 3350 | verify ( stim == resp ); |
2052 | 3351 | 3351 | ||
2053 | 3352 | status = ca_clear_channel ( chan ); | 3352 | status = ca_clear_channel ( chan ); |
2054 | 3353 | SEVCHK ( status, NULL ); | 3353 | SEVCHK ( status, NULL ); |
2055 | 3354 | } | 3354 | } |
2056 | @@ -3359,11 +3359,11 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel ) | |||
2057 | 3359 | showProgress ( interestLevel ); | 3359 | showProgress ( interestLevel ); |
2058 | 3360 | } | 3360 | } |
2059 | 3361 | } | 3361 | } |
2061 | 3362 | 3362 | ||
2062 | 3363 | showProgressEnd ( interestLevel ); | 3363 | showProgressEnd ( interestLevel ); |
2063 | 3364 | } | 3364 | } |
2064 | 3365 | 3365 | ||
2066 | 3366 | void verifyContextRundownChanStillExist ( | 3366 | void verifyContextRundownChanStillExist ( |
2067 | 3367 | const char * pName, unsigned interestLevel ) | 3367 | const char * pName, unsigned interestLevel ) |
2068 | 3368 | { | 3368 | { |
2069 | 3369 | chid chan[10000]; | 3369 | chid chan[10000]; |
2070 | @@ -3374,7 +3374,7 @@ void verifyContextRundownChanStillExist ( | |||
2071 | 3374 | 3374 | ||
2072 | 3375 | status = ca_context_create ( ca_disable_preemptive_callback ); | 3375 | status = ca_context_create ( ca_disable_preemptive_callback ); |
2073 | 3376 | SEVCHK ( status, "context create failed" ); | 3376 | SEVCHK ( status, "context create failed" ); |
2075 | 3377 | 3377 | ||
2076 | 3378 | for ( i = 0; i < NELEMENTS ( chan ); i++ ) { | 3378 | for ( i = 0; i < NELEMENTS ( chan ); i++ ) { |
2077 | 3379 | status = ca_create_channel ( pName, 0, 0, 0, & chan[i] ); | 3379 | status = ca_create_channel ( pName, 0, 0, 0, & chan[i] ); |
2078 | 3380 | /* | 3380 | /* |
2079 | @@ -3386,17 +3386,17 @@ void verifyContextRundownChanStillExist ( | |||
2080 | 3386 | } | 3386 | } |
2081 | 3387 | SEVCHK ( status, NULL ); | 3387 | SEVCHK ( status, NULL ); |
2082 | 3388 | } | 3388 | } |
2084 | 3389 | 3389 | ||
2085 | 3390 | status = ca_pend_io( timeoutToPendIO ); | 3390 | status = ca_pend_io( timeoutToPendIO ); |
2086 | 3391 | SEVCHK ( status, "channel connect failed" ); | 3391 | SEVCHK ( status, "channel connect failed" ); |
2087 | 3392 | 3392 | ||
2088 | 3393 | ca_context_destroy (); | 3393 | ca_context_destroy (); |
2090 | 3394 | 3394 | ||
2091 | 3395 | showProgressEnd ( interestLevel ); | 3395 | showProgressEnd ( interestLevel ); |
2092 | 3396 | } | 3396 | } |
2093 | 3397 | 3397 | ||
2096 | 3398 | int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | 3398 | int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, |
2097 | 3399 | unsigned repetitionCount, enum ca_preemptive_callback_select select ) | 3399 | unsigned repetitionCount, enum ca_preemptive_callback_select select ) |
2098 | 3400 | { | 3400 | { |
2099 | 3401 | chid chan; | 3401 | chid chan; |
2100 | 3402 | int status; | 3402 | int status; |
2101 | @@ -3405,7 +3405,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2102 | 3405 | unsigned connections; | 3405 | unsigned connections; |
2103 | 3406 | unsigned maxArrayBytes = 10000000; | 3406 | unsigned maxArrayBytes = 10000000; |
2104 | 3407 | 3407 | ||
2106 | 3408 | printf ( "CA Client V%s, channel name \"%s\", timeout %g\n", | 3408 | printf ( "CA Client V%s, channel name \"%s\", timeout %g\n", |
2107 | 3409 | ca_version (), pName, timeoutToPendIO ); | 3409 | ca_version (), pName, timeoutToPendIO ); |
2108 | 3410 | if ( select == ca_enable_preemptive_callback ) { | 3410 | if ( select == ca_enable_preemptive_callback ) { |
2109 | 3411 | printf ( "Preemptive call back is enabled.\n" ); | 3411 | printf ( "Preemptive call back is enabled.\n" ); |
2110 | @@ -3414,7 +3414,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2111 | 3414 | { | 3414 | { |
2112 | 3415 | char tmpString[32]; | 3415 | char tmpString[32]; |
2113 | 3416 | sprintf ( tmpString, "%u", maxArrayBytes ); | 3416 | sprintf ( tmpString, "%u", maxArrayBytes ); |
2115 | 3417 | epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString ); | 3417 | epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString ); |
2116 | 3418 | } | 3418 | } |
2117 | 3419 | 3419 | ||
2118 | 3420 | /* | 3420 | /* |
2119 | @@ -3447,7 +3447,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2120 | 3447 | showProgressEnd ( interestLevel ); | 3447 | showProgressEnd ( interestLevel ); |
2121 | 3448 | 3448 | ||
2122 | 3449 | printf ( "native type was %s, native count was %lu\n", | 3449 | printf ( "native type was %s, native count was %lu\n", |
2124 | 3450 | dbf_type_to_text ( ca_field_type ( chan ) ), | 3450 | dbf_type_to_text ( ca_field_type ( chan ) ), |
2125 | 3451 | ca_element_count ( chan ) ); | 3451 | ca_element_count ( chan ) ); |
2126 | 3452 | 3452 | ||
2127 | 3453 | connections = ca_get_ioc_connection_count (); | 3453 | connections = ca_get_ioc_connection_count (); |
2128 | @@ -3464,14 +3464,14 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2129 | 3464 | verifyTimeStamps ( chan, interestLevel ); | 3464 | verifyTimeStamps ( chan, interestLevel ); |
2130 | 3465 | verifyOldPend ( interestLevel ); | 3465 | verifyOldPend ( interestLevel ); |
2131 | 3466 | exceptionTest ( chan, interestLevel ); | 3466 | exceptionTest ( chan, interestLevel ); |
2133 | 3467 | arrayTest ( chan, maxArrayBytes, interestLevel ); | 3467 | arrayTest ( chan, maxArrayBytes, interestLevel ); |
2134 | 3468 | verifyMonitorSubscriptionFlushIO ( chan, interestLevel ); | 3468 | verifyMonitorSubscriptionFlushIO ( chan, interestLevel ); |
2135 | 3469 | monitorSubscriptionFirstUpdateTest ( pName, chan, interestLevel ); | 3469 | monitorSubscriptionFirstUpdateTest ( pName, chan, interestLevel ); |
2136 | 3470 | ctrlDoubleTest ( chan, interestLevel ); | 3470 | ctrlDoubleTest ( chan, interestLevel ); |
2137 | 3471 | verifyBlockInPendIO ( chan, interestLevel ); | 3471 | verifyBlockInPendIO ( chan, interestLevel ); |
2139 | 3472 | verifyAnalogIO ( chan, DBR_FLOAT, FLT_MIN, FLT_MAX, | 3472 | verifyAnalogIO ( chan, DBR_FLOAT, FLT_MIN, FLT_MAX, |
2140 | 3473 | FLT_MIN_EXP, FLT_MAX_EXP, FLT_EPSILON, interestLevel ); | 3473 | FLT_MIN_EXP, FLT_MAX_EXP, FLT_EPSILON, interestLevel ); |
2142 | 3474 | verifyAnalogIO ( chan, DBR_DOUBLE, DBL_MIN, DBL_MAX, | 3474 | verifyAnalogIO ( chan, DBR_DOUBLE, DBL_MIN, DBL_MAX, |
2143 | 3475 | DBL_MIN_EXP, DBL_MAX_EXP, DBL_EPSILON, interestLevel ); | 3475 | DBL_MIN_EXP, DBL_MAX_EXP, DBL_EPSILON, interestLevel ); |
2144 | 3476 | verifyLongIO ( chan, interestLevel ); | 3476 | verifyLongIO ( chan, interestLevel ); |
2145 | 3477 | verifyShortIO ( chan, interestLevel ); | 3477 | verifyShortIO ( chan, interestLevel ); |
2146 | @@ -3486,7 +3486,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2147 | 3486 | verifyBadString ( chan, interestLevel ); | 3486 | verifyBadString ( chan, interestLevel ); |
2148 | 3487 | verifyMultithreadSubscr ( pName, interestLevel ); | 3487 | verifyMultithreadSubscr ( pName, interestLevel ); |
2149 | 3488 | if ( select != ca_enable_preemptive_callback ) { | 3488 | if ( select != ca_enable_preemptive_callback ) { |
2151 | 3489 | fdManagerVerify ( pName, interestLevel ); | 3489 | fdManagerVerify ( pName, interestLevel ); |
2152 | 3490 | } | 3490 | } |
2153 | 3491 | 3491 | ||
2154 | 3492 | /* | 3492 | /* |
2155 | @@ -3497,7 +3497,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2156 | 3497 | printf ( "\n" ); | 3497 | printf ( "\n" ); |
2157 | 3498 | pend_event_delay_test ( 1.0 ); | 3498 | pend_event_delay_test ( 1.0 ); |
2158 | 3499 | pend_event_delay_test ( 0.1 ); | 3499 | pend_event_delay_test ( 0.1 ); |
2160 | 3500 | pend_event_delay_test ( 0.25 ); | 3500 | pend_event_delay_test ( 0.25 ); |
2161 | 3501 | 3501 | ||
2162 | 3502 | /* ca_channel_status ( 0 ); */ | 3502 | /* ca_channel_status ( 0 ); */ |
2163 | 3503 | ca_client_status ( 0 ); | 3503 | ca_client_status ( 0 ); |
2164 | @@ -3539,10 +3539,10 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, | |||
2165 | 3539 | /* SEVCHK ( status, NULL ); */ | 3539 | /* SEVCHK ( status, NULL ); */ |
2166 | 3540 | 3540 | ||
2167 | 3541 | caTaskExitTest ( interestLevel ); | 3541 | caTaskExitTest ( interestLevel ); |
2169 | 3542 | 3542 | ||
2170 | 3543 | verifyContextRundownFlush ( pName, interestLevel ); | 3543 | verifyContextRundownFlush ( pName, interestLevel ); |
2171 | 3544 | verifyContextRundownChanStillExist ( pName, interestLevel ); | 3544 | verifyContextRundownChanStillExist ( pName, interestLevel ); |
2173 | 3545 | 3545 | ||
2174 | 3546 | free ( pChans ); | 3546 | free ( pChans ); |
2175 | 3547 | 3547 | ||
2176 | 3548 | printf ( "\nTest Complete\n" ); | 3548 | printf ( "\nTest Complete\n" ); |
2177 | diff --git a/modules/ca/src/client/acctstMain.c b/modules/ca/src/client/acctstMain.c | |||
2178 | index 4c700a3..5386019 100644 | |||
2179 | --- a/modules/ca/src/client/acctstMain.c | |||
2180 | +++ b/modules/ca/src/client/acctstMain.c | |||
2181 | @@ -5,7 +5,7 @@ | |||
2182 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2183 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2184 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2186 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2187 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2188 | 10 | 10 | ||
2189 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
2190 | @@ -19,15 +19,15 @@ int main ( int argc, char **argv ) | |||
2191 | 19 | unsigned progressLoggingLevel; | 19 | unsigned progressLoggingLevel; |
2192 | 20 | unsigned channelCount; | 20 | unsigned channelCount; |
2193 | 21 | unsigned repetitionCount; | 21 | unsigned repetitionCount; |
2196 | 22 | enum ca_preemptive_callback_select preempt; | 22 | enum ca_preemptive_callback_select preempt; |
2197 | 23 | int aBoolean; | 23 | int aBoolean; |
2198 | 24 | 24 | ||
2199 | 25 | 25 | ||
2200 | 26 | if ( argc < 2 || argc > 6 ) { | 26 | if ( argc < 2 || argc > 6 ) { |
2201 | 27 | printf ("usage: %s <PV name> [progress logging level] [channel count] " | 27 | printf ("usage: %s <PV name> [progress logging level] [channel count] " |
2203 | 28 | "[repetition count] [enable preemptive callback]\n", | 28 | "[repetition count] [enable preemptive callback]\n", |
2204 | 29 | argv[0] ); | 29 | argv[0] ); |
2206 | 30 | return 1; | 30 | return 1; |
2207 | 31 | } | 31 | } |
2208 | 32 | 32 | ||
2209 | 33 | if ( argc >= 3 ) { | 33 | if ( argc >= 3 ) { |
2210 | @@ -57,12 +57,12 @@ int main ( int argc, char **argv ) | |||
2211 | 57 | else { | 57 | else { |
2212 | 58 | aBoolean = 0; | 58 | aBoolean = 0; |
2213 | 59 | } | 59 | } |
2220 | 60 | if ( aBoolean ) { | 60 | if ( aBoolean ) { |
2221 | 61 | preempt = ca_enable_preemptive_callback; | 61 | preempt = ca_enable_preemptive_callback; |
2222 | 62 | } | 62 | } |
2223 | 63 | else { | 63 | else { |
2224 | 64 | preempt = ca_disable_preemptive_callback; | 64 | preempt = ca_disable_preemptive_callback; |
2225 | 65 | } | 65 | } |
2226 | 66 | 66 | ||
2227 | 67 | acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt ); | 67 | acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt ); |
2228 | 68 | 68 | ||
2229 | diff --git a/modules/ca/src/client/acctstRegister.cpp b/modules/ca/src/client/acctstRegister.cpp | |||
2230 | index e75ed7f..5ddc5af 100644 | |||
2231 | --- a/modules/ca/src/client/acctstRegister.cpp | |||
2232 | +++ b/modules/ca/src/client/acctstRegister.cpp | |||
2233 | @@ -60,7 +60,7 @@ struct AutoInit { | |||
2234 | 60 | AutoInit (); | 60 | AutoInit (); |
2235 | 61 | }; | 61 | }; |
2236 | 62 | 62 | ||
2238 | 63 | AutoInit :: AutoInit () | 63 | AutoInit :: AutoInit () |
2239 | 64 | { | 64 | { |
2240 | 65 | iocshRegister ( &acctstFuncDef, acctstCallFunc ); | 65 | iocshRegister ( &acctstFuncDef, acctstCallFunc ); |
2241 | 66 | } | 66 | } |
2242 | diff --git a/modules/ca/src/client/addrList.h b/modules/ca/src/client/addrList.h | |||
2243 | index c06c8b2..9d51e0c 100644 | |||
2244 | --- a/modules/ca/src/client/addrList.h | |||
2245 | +++ b/modules/ca/src/client/addrList.h | |||
2246 | @@ -5,28 +5,28 @@ | |||
2247 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2248 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2249 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2251 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2252 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2253 | 10 | 10 | ||
2254 | 11 | #ifndef addrListh | 11 | #ifndef addrListh |
2255 | 12 | #define addrListh | 12 | #define addrListh |
2256 | 13 | 13 | ||
2257 | 14 | #include "shareLib.h" | 14 | #include "shareLib.h" |
2259 | 15 | #include "envDefs.h" | 15 | #include "envDefs.h" |
2260 | 16 | #include "osiSock.h" | 16 | #include "osiSock.h" |
2261 | 17 | 17 | ||
2262 | 18 | #ifdef __cplusplus | 18 | #ifdef __cplusplus |
2263 | 19 | extern "C" { | 19 | extern "C" { |
2264 | 20 | #endif | 20 | #endif |
2265 | 21 | 21 | ||
2267 | 22 | epicsShareFunc void epicsShareAPI configureChannelAccessAddressList | 22 | epicsShareFunc void epicsShareAPI configureChannelAccessAddressList |
2268 | 23 | ( struct ELLLIST *pList, SOCKET sock, unsigned short port ); | 23 | ( struct ELLLIST *pList, SOCKET sock, unsigned short port ); |
2269 | 24 | 24 | ||
2270 | 25 | epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList | 25 | epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList |
2272 | 26 | ( struct ELLLIST *pList, const ENV_PARAM *pEnv, | 26 | ( struct ELLLIST *pList, const ENV_PARAM *pEnv, |
2273 | 27 | unsigned short port, int ignoreNonDefaultPort ); | 27 | unsigned short port, int ignoreNonDefaultPort ); |
2274 | 28 | 28 | ||
2276 | 29 | epicsShareFunc void epicsShareAPI printChannelAccessAddressList | 29 | epicsShareFunc void epicsShareAPI printChannelAccessAddressList |
2277 | 30 | ( const struct ELLLIST *pList ); | 30 | ( const struct ELLLIST *pList ); |
2278 | 31 | 31 | ||
2279 | 32 | epicsShareFunc void epicsShareAPI removeDuplicateAddresses | 32 | epicsShareFunc void epicsShareAPI removeDuplicateAddresses |
2280 | diff --git a/modules/ca/src/client/autoPtrFreeList.h b/modules/ca/src/client/autoPtrFreeList.h | |||
2281 | index 7dc7360..9c1d967 100644 | |||
2282 | --- a/modules/ca/src/client/autoPtrFreeList.h | |||
2283 | +++ b/modules/ca/src/client/autoPtrFreeList.h | |||
2284 | @@ -5,22 +5,22 @@ | |||
2285 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2286 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2287 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2289 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2290 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2291 | 10 | 10 | ||
2293 | 11 | /* | 11 | /* |
2294 | 12 | * | ||
2295 | 12 | * | 13 | * |
2296 | 13 | * | ||
2297 | 14 | * L O S A L A M O S | 14 | * L O S A L A M O S |
2298 | 15 | * Los Alamos National Laboratory | 15 | * Los Alamos National Laboratory |
2299 | 16 | * Los Alamos, New Mexico 87545 | 16 | * Los Alamos, New Mexico 87545 |
2301 | 17 | * | 17 | * |
2302 | 18 | * Copyright, The Regents of the University of California. | 18 | * Copyright, The Regents of the University of California. |
2308 | 19 | * | 19 | * |
2309 | 20 | * | 20 | * |
2310 | 21 | * Author Jeffrey O. Hill | 21 | * Author Jeffrey O. Hill |
2311 | 22 | * johill@lanl.gov | 22 | * johill@lanl.gov |
2312 | 23 | * 505 665 1831 | 23 | * 505 665 1831 |
2313 | 24 | */ | 24 | */ |
2314 | 25 | 25 | ||
2315 | 26 | #ifndef autoPtrFreeListh | 26 | #ifndef autoPtrFreeListh |
2316 | @@ -56,7 +56,7 @@ private: | |||
2317 | 56 | }; | 56 | }; |
2318 | 57 | 57 | ||
2319 | 58 | template < class T, unsigned N, class MUTEX > | 58 | template < class T, unsigned N, class MUTEX > |
2321 | 59 | inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList ( | 59 | inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList ( |
2322 | 60 | tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) : | 60 | tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) : |
2323 | 61 | p ( pIn ), freeList ( freeListIn ) {} | 61 | p ( pIn ), freeList ( freeListIn ) {} |
2324 | 62 | 62 | ||
2325 | diff --git a/modules/ca/src/client/autoPtrRecycle.h b/modules/ca/src/client/autoPtrRecycle.h | |||
2326 | index 173e148..600bb5a 100644 | |||
2327 | --- a/modules/ca/src/client/autoPtrRecycle.h | |||
2328 | +++ b/modules/ca/src/client/autoPtrRecycle.h | |||
2329 | @@ -5,22 +5,22 @@ | |||
2330 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2331 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2332 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2334 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2335 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2336 | 10 | 10 | ||
2338 | 11 | /* | 11 | /* |
2339 | 12 | * | ||
2340 | 12 | * | 13 | * |
2341 | 13 | * | ||
2342 | 14 | * L O S A L A M O S | 14 | * L O S A L A M O S |
2343 | 15 | * Los Alamos National Laboratory | 15 | * Los Alamos National Laboratory |
2344 | 16 | * Los Alamos, New Mexico 87545 | 16 | * Los Alamos, New Mexico 87545 |
2346 | 17 | * | 17 | * |
2347 | 18 | * Copyright, The Regents of the University of California. | 18 | * Copyright, The Regents of the University of California. |
2353 | 19 | * | 19 | * |
2354 | 20 | * | 20 | * |
2355 | 21 | * Author Jeffrey O. Hill | 21 | * Author Jeffrey O. Hill |
2356 | 22 | * johill@lanl.gov | 22 | * johill@lanl.gov |
2357 | 23 | * 505 665 1831 | 23 | * 505 665 1831 |
2358 | 24 | */ | 24 | */ |
2359 | 25 | 25 | ||
2360 | 26 | #ifndef autoPtrRecycleh | 26 | #ifndef autoPtrRecycleh |
2361 | @@ -29,7 +29,7 @@ | |||
2362 | 29 | template < class T > | 29 | template < class T > |
2363 | 30 | class autoPtrRecycle { | 30 | class autoPtrRecycle { |
2364 | 31 | public: | 31 | public: |
2366 | 32 | autoPtrRecycle ( | 32 | autoPtrRecycle ( |
2367 | 33 | epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &, | 33 | epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &, |
2368 | 34 | cacRecycle &, T * ); | 34 | cacRecycle &, T * ); |
2369 | 35 | ~autoPtrRecycle (); | 35 | ~autoPtrRecycle (); |
2370 | @@ -43,12 +43,12 @@ private: | |||
2371 | 43 | chronIntIdResTable < baseNMIU > & ioTable; | 43 | chronIntIdResTable < baseNMIU > & ioTable; |
2372 | 44 | epicsGuard < epicsMutex > & guard; | 44 | epicsGuard < epicsMutex > & guard; |
2373 | 45 | // not implemented | 45 | // not implemented |
2376 | 46 | autoPtrRecycle ( const autoPtrRecycle & ); | 46 | autoPtrRecycle ( const autoPtrRecycle & ); |
2377 | 47 | autoPtrRecycle & operator = ( const autoPtrRecycle & ); | 47 | autoPtrRecycle & operator = ( const autoPtrRecycle & ); |
2378 | 48 | }; | 48 | }; |
2379 | 49 | 49 | ||
2380 | 50 | template < class T > | 50 | template < class T > |
2382 | 51 | inline autoPtrRecycle<T>::autoPtrRecycle ( | 51 | inline autoPtrRecycle<T>::autoPtrRecycle ( |
2383 | 52 | epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl, | 52 | epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl, |
2384 | 53 | cacRecycle & rIn, T * pIn ) : | 53 | cacRecycle & rIn, T * pIn ) : |
2385 | 54 | p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {} | 54 | p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {} |
2386 | diff --git a/modules/ca/src/client/baseNMIU.cpp b/modules/ca/src/client/baseNMIU.cpp | |||
2387 | index 20f153b..8d444c1 100644 | |||
2388 | --- a/modules/ca/src/client/baseNMIU.cpp | |||
2389 | +++ b/modules/ca/src/client/baseNMIU.cpp | |||
2390 | @@ -5,10 +5,10 @@ | |||
2391 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2392 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2393 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2395 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2396 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2397 | 10 | 10 | ||
2399 | 11 | /* | 11 | /* |
2400 | 12 | * | 12 | * |
2401 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
2402 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
2403 | diff --git a/modules/ca/src/client/bhe.cpp b/modules/ca/src/client/bhe.cpp | |||
2404 | index d6f1796..4fac257 100644 | |||
2405 | --- a/modules/ca/src/client/bhe.cpp | |||
2406 | +++ b/modules/ca/src/client/bhe.cpp | |||
2407 | @@ -5,10 +5,10 @@ | |||
2408 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2409 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2410 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2412 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2413 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2416 | 10 | 10 | ||
2417 | 11 | /* | 11 | /* |
2418 | 12 | * | 12 | * |
2419 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
2420 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
2421 | @@ -42,12 +42,12 @@ | |||
2422 | 42 | * start up | 42 | * start up |
2423 | 43 | * | 43 | * |
2424 | 44 | * if creating this in response to a search reply | 44 | * if creating this in response to a search reply |
2426 | 45 | * and not in response to a beacon then | 45 | * and not in response to a beacon then |
2427 | 46 | * we set the beacon time stamp to | 46 | * we set the beacon time stamp to |
2428 | 47 | * zero (so we can correctly compute the period | 47 | * zero (so we can correctly compute the period |
2429 | 48 | * between the 1st and 2nd beacons) | 48 | * between the 1st and 2nd beacons) |
2430 | 49 | */ | 49 | */ |
2432 | 50 | bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp, | 50 | bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp, |
2433 | 51 | unsigned initialBeaconNumber, const inetAddrID & addr ) : | 51 | unsigned initialBeaconNumber, const inetAddrID & addr ) : |
2434 | 52 | inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ), | 52 | inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ), |
2435 | 53 | mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber ) | 53 | mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber ) |
2436 | @@ -74,7 +74,7 @@ void bhe::beaconAnomalyNotify ( epicsGuard < epicsMutex > & guard ) | |||
2437 | 74 | } | 74 | } |
2438 | 75 | 75 | ||
2439 | 76 | #ifdef DEBUG | 76 | #ifdef DEBUG |
2441 | 77 | void bhe::logBeacon ( const char * pDiagnostic, | 77 | void bhe::logBeacon ( const char * pDiagnostic, |
2442 | 78 | const double & currentPeriod, | 78 | const double & currentPeriod, |
2443 | 79 | const epicsTime & currentTime ) | 79 | const epicsTime & currentTime ) |
2444 | 80 | { | 80 | { |
2445 | @@ -82,10 +82,10 @@ void bhe::logBeacon ( const char * pDiagnostic, | |||
2446 | 82 | char name[64]; | 82 | char name[64]; |
2447 | 83 | this->name ( name, sizeof ( name ) ); | 83 | this->name ( name, sizeof ( name ) ); |
2448 | 84 | char date[64]; | 84 | char date[64]; |
2450 | 85 | currentTime.strftime ( date, sizeof ( date ), | 85 | currentTime.strftime ( date, sizeof ( date ), |
2451 | 86 | "%a %b %d %Y %H:%M:%S.%f"); | 86 | "%a %b %d %Y %H:%M:%S.%f"); |
2452 | 87 | ::printf ( "%s cp=%g ap=%g %s %s\n", | 87 | ::printf ( "%s cp=%g ap=%g %s %s\n", |
2454 | 88 | pDiagnostic, currentPeriod, | 88 | pDiagnostic, currentPeriod, |
2455 | 89 | this->averagePeriod, name, date ); | 89 | this->averagePeriod, name, date ); |
2456 | 90 | } | 90 | } |
2457 | 91 | } | 91 | } |
2458 | @@ -105,7 +105,7 @@ void bhe::logBeaconDiscard ( unsigned beaconAdvance, | |||
2459 | 105 | char name[64]; | 105 | char name[64]; |
2460 | 106 | this->name ( name, sizeof ( name ) ); | 106 | this->name ( name, sizeof ( name ) ); |
2461 | 107 | char date[64]; | 107 | char date[64]; |
2463 | 108 | currentTime.strftime ( date, sizeof ( date ), | 108 | currentTime.strftime ( date, sizeof ( date ), |
2464 | 109 | "%a %b %d %Y %H:%M:%S.%f"); | 109 | "%a %b %d %Y %H:%M:%S.%f"); |
2465 | 110 | ::printf ( "bb %u %s %s\n", | 110 | ::printf ( "bb %u %s %s\n", |
2466 | 111 | beaconAdvance, name, date ); | 111 | beaconAdvance, name, date ); |
2467 | @@ -123,16 +123,16 @@ void bhe::logBeaconDiscard ( unsigned /* beaconAdvance */, | |||
2468 | 123 | * | 123 | * |
2469 | 124 | * updates beacon period, and looks for beacon anomalies | 124 | * updates beacon period, and looks for beacon anomalies |
2470 | 125 | */ | 125 | */ |
2474 | 126 | bool bhe::updatePeriod ( | 126 | bool bhe::updatePeriod ( |
2475 | 127 | epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime, | 127 | epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime, |
2476 | 128 | const epicsTime & currentTime, ca_uint32_t beaconNumber, | 128 | const epicsTime & currentTime, ca_uint32_t beaconNumber, |
2477 | 129 | unsigned protocolRevision ) | 129 | unsigned protocolRevision ) |
2478 | 130 | { | 130 | { |
2479 | 131 | guard.assertIdenticalMutex ( this->mutex ); | 131 | guard.assertIdenticalMutex ( this->mutex ); |
2480 | 132 | 132 | ||
2481 | 133 | // | 133 | // |
2482 | 134 | // this block is enetered if the beacon was created as a side effect of | 134 | // this block is enetered if the beacon was created as a side effect of |
2484 | 135 | // creating a connection and so we dont yet know the first beacon time | 135 | // creating a connection and so we dont yet know the first beacon time |
2485 | 136 | // and sequence number | 136 | // and sequence number |
2486 | 137 | // | 137 | // |
2487 | 138 | if ( this->timeStamp == epicsTime () ) { | 138 | if ( this->timeStamp == epicsTime () ) { |
2488 | @@ -142,7 +142,7 @@ bool bhe::updatePeriod ( | |||
2489 | 142 | 142 | ||
2490 | 143 | this->beaconAnomalyNotify ( guard ); | 143 | this->beaconAnomalyNotify ( guard ); |
2491 | 144 | 144 | ||
2493 | 145 | /* | 145 | /* |
2494 | 146 | * this is the 1st beacon seen - the beacon time stamp | 146 | * this is the 1st beacon seen - the beacon time stamp |
2495 | 147 | * was not initialized during BHE create because | 147 | * was not initialized during BHE create because |
2496 | 148 | * a TCP/IP connection created the beacon. | 148 | * a TCP/IP connection created the beacon. |
2497 | @@ -167,15 +167,15 @@ bool bhe::updatePeriod ( | |||
2498 | 167 | } | 167 | } |
2499 | 168 | this->lastBeaconNumber = beaconNumber; | 168 | this->lastBeaconNumber = beaconNumber; |
2500 | 169 | 169 | ||
2502 | 170 | // throw out sequence numbers just prior to, or the same as, the last one received | 170 | // throw out sequence numbers just prior to, or the same as, the last one received |
2503 | 171 | // (this situation is probably caused by a temporary duplicate route ) | 171 | // (this situation is probably caused by a temporary duplicate route ) |
2504 | 172 | if ( beaconSeqAdvance == 0 || beaconSeqAdvance > ca_uint32_max - 256 ) { | 172 | if ( beaconSeqAdvance == 0 || beaconSeqAdvance > ca_uint32_max - 256 ) { |
2505 | 173 | logBeaconDiscard ( beaconSeqAdvance, currentTime ); | 173 | logBeaconDiscard ( beaconSeqAdvance, currentTime ); |
2506 | 174 | return false; | 174 | return false; |
2507 | 175 | } | 175 | } |
2508 | 176 | 176 | ||
2511 | 177 | // throw out sequence numbers that jump forward by only a few numbers | 177 | // throw out sequence numbers that jump forward by only a few numbers |
2512 | 178 | // (this situation is probably caused by a duplicate route | 178 | // (this situation is probably caused by a duplicate route |
2513 | 179 | // or a beacon due to input queue overun) | 179 | // or a beacon due to input queue overun) |
2514 | 180 | if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) { | 180 | if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) { |
2515 | 181 | logBeaconDiscard ( beaconSeqAdvance, currentTime ); | 181 | logBeaconDiscard ( beaconSeqAdvance, currentTime ); |
2516 | @@ -205,7 +205,7 @@ bool bhe::updatePeriod ( | |||
2517 | 205 | /* | 205 | /* |
2518 | 206 | * ignore beacons seen for the first time shortly after | 206 | * ignore beacons seen for the first time shortly after |
2519 | 207 | * init, but do not ignore beacons arriving with a short | 207 | * init, but do not ignore beacons arriving with a short |
2521 | 208 | * period because the IOC was rebooted soon after the | 208 | * period because the IOC was rebooted soon after the |
2522 | 209 | * client starts up. | 209 | * client starts up. |
2523 | 210 | */ | 210 | */ |
2524 | 211 | totalRunningTime = this->timeStamp - programBeginTime; | 211 | totalRunningTime = this->timeStamp - programBeginTime; |
2525 | @@ -217,24 +217,24 @@ bool bhe::updatePeriod ( | |||
2526 | 217 | 217 | ||
2527 | 218 | /* | 218 | /* |
2528 | 219 | * Is this an IOC seen because of a restored | 219 | * Is this an IOC seen because of a restored |
2530 | 220 | * network segment? | 220 | * network segment? |
2531 | 221 | * | 221 | * |
2533 | 222 | * It may be possible to get false triggers here | 222 | * It may be possible to get false triggers here |
2534 | 223 | * if the client is busy, but this does not cause | 223 | * if the client is busy, but this does not cause |
2536 | 224 | * problems because the echo response will tell us | 224 | * problems because the echo response will tell us |
2537 | 225 | * that the server is available | 225 | * that the server is available |
2538 | 226 | */ | 226 | */ |
2539 | 227 | if ( currentPeriod >= this->averagePeriod * 1.25 ) { | 227 | if ( currentPeriod >= this->averagePeriod * 1.25 ) { |
2540 | 228 | 228 | ||
2543 | 229 | /* | 229 | /* |
2544 | 230 | * trigger on any missing beacon | 230 | * trigger on any missing beacon |
2545 | 231 | * if connected to this server | 231 | * if connected to this server |
2547 | 232 | */ | 232 | */ |
2548 | 233 | this->beaconAnomalyNotify ( guard ); | 233 | this->beaconAnomalyNotify ( guard ); |
2549 | 234 | 234 | ||
2550 | 235 | if ( currentPeriod >= this->averagePeriod * 3.25 ) { | 235 | if ( currentPeriod >= this->averagePeriod * 3.25 ) { |
2553 | 236 | /* | 236 | /* |
2554 | 237 | * trigger on any 3 contiguous missing beacons | 237 | * trigger on any 3 contiguous missing beacons |
2555 | 238 | * if not connected to this server | 238 | * if not connected to this server |
2556 | 239 | */ | 239 | */ |
2557 | 240 | netChange = true; | 240 | netChange = true; |
2558 | @@ -248,9 +248,9 @@ bool bhe::updatePeriod ( | |||
2559 | 248 | * IOC reboots). Lower tolarance here because we | 248 | * IOC reboots). Lower tolarance here because we |
2560 | 249 | * dont have to worry about lost beacons. | 249 | * dont have to worry about lost beacons. |
2561 | 250 | * | 250 | * |
2563 | 251 | * It may be possible to get false triggers here | 251 | * It may be possible to get false triggers here |
2564 | 252 | * if the client is busy, but this does not cause | 252 | * if the client is busy, but this does not cause |
2566 | 253 | * problems because the echo response will tell us | 253 | * problems because the echo response will tell us |
2567 | 254 | * that the server is available | 254 | * that the server is available |
2568 | 255 | */ | 255 | */ |
2569 | 256 | else if ( currentPeriod <= this->averagePeriod * 0.80 ) { | 256 | else if ( currentPeriod <= this->averagePeriod * 0.80 ) { |
2570 | @@ -259,14 +259,14 @@ bool bhe::updatePeriod ( | |||
2571 | 259 | logBeacon ( "bal", currentPeriod, currentTime ); | 259 | logBeacon ( "bal", currentPeriod, currentTime ); |
2572 | 260 | } | 260 | } |
2573 | 261 | else if ( this->pIIU ) { | 261 | else if ( this->pIIU ) { |
2575 | 262 | // update state of health for active virtual circuits | 262 | // update state of health for active virtual circuits |
2576 | 263 | // if the beacon looks ok | 263 | // if the beacon looks ok |
2577 | 264 | this->pIIU->beaconArrivalNotify ( guard ); | 264 | this->pIIU->beaconArrivalNotify ( guard ); |
2578 | 265 | logBeacon ( "vb", currentPeriod, currentTime ); | 265 | logBeacon ( "vb", currentPeriod, currentTime ); |
2579 | 266 | } | 266 | } |
2580 | 267 | 267 | ||
2581 | 268 | // update a running average period | 268 | // update a running average period |
2583 | 269 | this->averagePeriod = currentPeriod * 0.125 + | 269 | this->averagePeriod = currentPeriod * 0.125 + |
2584 | 270 | this->averagePeriod * 0.875; | 270 | this->averagePeriod * 0.875; |
2585 | 271 | } | 271 | } |
2586 | 272 | 272 | ||
2587 | @@ -286,22 +286,22 @@ void bhe::show ( epicsGuard < epicsMutex > &, unsigned level ) const | |||
2588 | 286 | char host [64]; | 286 | char host [64]; |
2589 | 287 | this->name ( host, sizeof ( host ) ); | 287 | this->name ( host, sizeof ( host ) ); |
2590 | 288 | if ( this->averagePeriod == -DBL_MAX ) { | 288 | if ( this->averagePeriod == -DBL_MAX ) { |
2592 | 289 | ::printf ( "CA beacon hash entry for %s <no period estimate>\n", | 289 | ::printf ( "CA beacon hash entry for %s <no period estimate>\n", |
2593 | 290 | host ); | 290 | host ); |
2594 | 291 | } | 291 | } |
2595 | 292 | else { | 292 | else { |
2597 | 293 | ::printf ( "CA beacon hash entry for %s with period estimate %f\n", | 293 | ::printf ( "CA beacon hash entry for %s with period estimate %f\n", |
2598 | 294 | host, this->averagePeriod ); | 294 | host, this->averagePeriod ); |
2599 | 295 | } | 295 | } |
2600 | 296 | if ( level > 0u ) { | 296 | if ( level > 0u ) { |
2601 | 297 | char date[64]; | 297 | char date[64]; |
2602 | 298 | this->timeStamp.strftime ( date, sizeof ( date ), "%a %b %d %Y %H:%M:%S"); | 298 | this->timeStamp.strftime ( date, sizeof ( date ), "%a %b %d %Y %H:%M:%S"); |
2604 | 299 | ::printf ( "\tbeacon number %u, on %s\n", | 299 | ::printf ( "\tbeacon number %u, on %s\n", |
2605 | 300 | this->lastBeaconNumber, date ); | 300 | this->lastBeaconNumber, date ); |
2606 | 301 | } | 301 | } |
2607 | 302 | } | 302 | } |
2608 | 303 | 303 | ||
2610 | 304 | double bhe::period ( epicsGuard < epicsMutex > & guard ) const | 304 | double bhe::period ( epicsGuard < epicsMutex > & guard ) const |
2611 | 305 | { | 305 | { |
2612 | 306 | guard.assertIdenticalMutex ( this->mutex ); | 306 | guard.assertIdenticalMutex ( this->mutex ); |
2613 | 307 | return this->averagePeriod; | 307 | return this->averagePeriod; |
2614 | @@ -313,14 +313,14 @@ epicsTime bhe::updateTime ( epicsGuard < epicsMutex > & guard ) const | |||
2615 | 313 | return this->timeStamp; | 313 | return this->timeStamp; |
2616 | 314 | } | 314 | } |
2617 | 315 | 315 | ||
2619 | 316 | void bhe::registerIIU ( | 316 | void bhe::registerIIU ( |
2620 | 317 | epicsGuard < epicsMutex > & guard, tcpiiu & iiu ) | 317 | epicsGuard < epicsMutex > & guard, tcpiiu & iiu ) |
2621 | 318 | { | 318 | { |
2622 | 319 | guard.assertIdenticalMutex ( this->mutex ); | 319 | guard.assertIdenticalMutex ( this->mutex ); |
2623 | 320 | this->pIIU = & iiu; | 320 | this->pIIU = & iiu; |
2624 | 321 | } | 321 | } |
2625 | 322 | 322 | ||
2627 | 323 | void bhe::unregisterIIU ( | 323 | void bhe::unregisterIIU ( |
2628 | 324 | epicsGuard < epicsMutex > & guard, tcpiiu & iiu ) | 324 | epicsGuard < epicsMutex > & guard, tcpiiu & iiu ) |
2629 | 325 | { | 325 | { |
2630 | 326 | guard.assertIdenticalMutex ( this->mutex ); | 326 | guard.assertIdenticalMutex ( this->mutex ); |
2631 | diff --git a/modules/ca/src/client/bhe.h b/modules/ca/src/client/bhe.h | |||
2632 | index 4da9520..b1be35f 100644 | |||
2633 | --- a/modules/ca/src/client/bhe.h | |||
2634 | +++ b/modules/ca/src/client/bhe.h | |||
2635 | @@ -5,10 +5,10 @@ | |||
2636 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2637 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2638 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2640 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2641 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2642 | 10 | 10 | ||
2644 | 11 | /* | 11 | /* |
2645 | 12 | * | 12 | * |
2646 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
2647 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
2648 | @@ -54,14 +54,14 @@ public: | |||
2649 | 54 | 54 | ||
2650 | 55 | class bhe : public tsSLNode < bhe >, public inetAddrID { | 55 | class bhe : public tsSLNode < bhe >, public inetAddrID { |
2651 | 56 | public: | 56 | public: |
2654 | 57 | epicsShareFunc bhe ( | 57 | epicsShareFunc bhe ( |
2655 | 58 | epicsMutex &, const epicsTime & initialTimeStamp, | 58 | epicsMutex &, const epicsTime & initialTimeStamp, |
2656 | 59 | unsigned initialBeaconNumber, const inetAddrID & addr ); | 59 | unsigned initialBeaconNumber, const inetAddrID & addr ); |
2659 | 60 | epicsShareFunc ~bhe (); | 60 | epicsShareFunc ~bhe (); |
2660 | 61 | epicsShareFunc bool updatePeriod ( | 61 | epicsShareFunc bool updatePeriod ( |
2661 | 62 | epicsGuard < epicsMutex > &, | 62 | epicsGuard < epicsMutex > &, |
2664 | 63 | const epicsTime & programBeginTime, | 63 | const epicsTime & programBeginTime, |
2665 | 64 | const epicsTime & currentTime, ca_uint32_t beaconNumber, | 64 | const epicsTime & currentTime, ca_uint32_t beaconNumber, |
2666 | 65 | unsigned protocolRevision ); | 65 | unsigned protocolRevision ); |
2667 | 66 | epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const; | 66 | epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const; |
2668 | 67 | epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const; | 67 | epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const; |
2669 | @@ -80,13 +80,13 @@ private: | |||
2670 | 80 | tcpiiu * pIIU; | 80 | tcpiiu * pIIU; |
2671 | 81 | ca_uint32_t lastBeaconNumber; | 81 | ca_uint32_t lastBeaconNumber; |
2672 | 82 | void beaconAnomalyNotify ( epicsGuard < epicsMutex > & ); | 82 | void beaconAnomalyNotify ( epicsGuard < epicsMutex > & ); |
2674 | 83 | void logBeacon ( const char * pDiagnostic, | 83 | void logBeacon ( const char * pDiagnostic, |
2675 | 84 | const double & currentPeriod, | 84 | const double & currentPeriod, |
2676 | 85 | const epicsTime & currentTime ); | 85 | const epicsTime & currentTime ); |
2677 | 86 | void logBeaconDiscard ( unsigned beaconAdvance, | 86 | void logBeaconDiscard ( unsigned beaconAdvance, |
2678 | 87 | const epicsTime & currentTime ); | 87 | const epicsTime & currentTime ); |
2681 | 88 | bhe ( const bhe & ); | 88 | bhe ( const bhe & ); |
2682 | 89 | bhe & operator = ( const bhe & ); | 89 | bhe & operator = ( const bhe & ); |
2683 | 90 | epicsShareFunc void operator delete ( void * ); | 90 | epicsShareFunc void operator delete ( void * ); |
2684 | 91 | }; | 91 | }; |
2685 | 92 | 92 | ||
2686 | @@ -99,20 +99,20 @@ public: | |||
2687 | 99 | void release ( void * ); | 99 | void release ( void * ); |
2688 | 100 | private: | 100 | private: |
2689 | 101 | tsFreeList < bhe, 0x100 > freeList; | 101 | tsFreeList < bhe, 0x100 > freeList; |
2692 | 102 | bheFreeStore ( const bheFreeStore & ); | 102 | bheFreeStore ( const bheFreeStore & ); |
2693 | 103 | bheFreeStore & operator = ( const bheFreeStore & ); | 103 | bheFreeStore & operator = ( const bheFreeStore & ); |
2694 | 104 | }; | 104 | }; |
2695 | 105 | 105 | ||
2697 | 106 | inline void * bhe::operator new ( size_t size, | 106 | inline void * bhe::operator new ( size_t size, |
2698 | 107 | bheMemoryManager & mgr ) | 107 | bheMemoryManager & mgr ) |
2700 | 108 | { | 108 | { |
2701 | 109 | return mgr.allocate ( size ); | 109 | return mgr.allocate ( size ); |
2702 | 110 | } | 110 | } |
2703 | 111 | 111 | ||
2704 | 112 | #ifdef CXX_PLACEMENT_DELETE | 112 | #ifdef CXX_PLACEMENT_DELETE |
2706 | 113 | inline void bhe::operator delete ( void * pCadaver, | 113 | inline void bhe::operator delete ( void * pCadaver, |
2707 | 114 | bheMemoryManager & mgr ) | 114 | bheMemoryManager & mgr ) |
2709 | 115 | { | 115 | { |
2710 | 116 | mgr.release ( pCadaver ); | 116 | mgr.release ( pCadaver ); |
2711 | 117 | } | 117 | } |
2712 | 118 | #endif | 118 | #endif |
2713 | diff --git a/modules/ca/src/client/caConnTest.cpp b/modules/ca/src/client/caConnTest.cpp | |||
2714 | index 2107739..bd479e6 100644 | |||
2715 | --- a/modules/ca/src/client/caConnTest.cpp | |||
2716 | +++ b/modules/ca/src/client/caConnTest.cpp | |||
2717 | @@ -5,7 +5,7 @@ | |||
2718 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2719 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2720 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2722 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2723 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2724 | 10 | 10 | ||
2725 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
2726 | @@ -60,50 +60,50 @@ void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn ) | |||
2727 | 60 | { | 60 | { |
2728 | 61 | unsigned iteration = 0u; | 61 | unsigned iteration = 0u; |
2729 | 62 | int status; | 62 | int status; |
2732 | 63 | unsigned i; | 63 | unsigned i; |
2733 | 64 | chid *pChans; | 64 | chid *pChans; |
2734 | 65 | 65 | ||
2735 | 66 | channelCount = channelCountIn; | 66 | channelCount = channelCountIn; |
2736 | 67 | 67 | ||
2737 | 68 | pChans = new chid [channelCount]; | 68 | pChans = new chid [channelCount]; |
2740 | 69 | 69 | ||
2741 | 70 | while ( 1 ) { | 70 | while ( 1 ) { |
2742 | 71 | connCount = 0u; | 71 | connCount = 0u; |
2743 | 72 | subsequentConnect = false; | 72 | subsequentConnect = false; |
2744 | 73 | begin = epicsTime::getCurrent (); | 73 | begin = epicsTime::getCurrent (); |
2745 | 74 | 74 | ||
2746 | 75 | printf ( "initializing CA client library\n" ); | 75 | printf ( "initializing CA client library\n" ); |
2747 | 76 | 76 | ||
2750 | 77 | status = ca_task_initialize(); | 77 | status = ca_task_initialize(); |
2751 | 78 | SEVCHK ( status, "CA init failed" ); | 78 | SEVCHK ( status, "CA init failed" ); |
2752 | 79 | 79 | ||
2753 | 80 | printf ( "creating channels\n" ); | 80 | printf ( "creating channels\n" ); |
2754 | 81 | 81 | ||
2757 | 82 | for ( i = 0u; i < channelCount; i++ ) { | 82 | for ( i = 0u; i < channelCount; i++ ) { |
2758 | 83 | status = ca_search_and_connect ( pNameIn, | 83 | status = ca_search_and_connect ( pNameIn, |
2759 | 84 | &pChans[i], caConnTestConnHandler, 0 ); | 84 | &pChans[i], caConnTestConnHandler, 0 ); |
2762 | 85 | SEVCHK ( status, "CA search problems" ); | 85 | SEVCHK ( status, "CA search problems" ); |
2763 | 86 | } | 86 | } |
2764 | 87 | 87 | ||
2765 | 88 | printf ( "all channels were created\n" ); | 88 | printf ( "all channels were created\n" ); |
2766 | 89 | 89 | ||
2768 | 90 | ca_pend_event ( delayIn ); | 90 | ca_pend_event ( delayIn ); |
2769 | 91 | 91 | ||
2770 | 92 | if ( iteration & 1 ) { | 92 | if ( iteration & 1 ) { |
2775 | 93 | for ( i = 0u; i < channelCount; i++ ) { | 93 | for ( i = 0u; i < channelCount; i++ ) { |
2776 | 94 | status = ca_clear_channel ( pChans[i] ); | 94 | status = ca_clear_channel ( pChans[i] ); |
2777 | 95 | SEVCHK ( status, "ca_clear_channel() problems" ); | 95 | SEVCHK ( status, "ca_clear_channel() problems" ); |
2778 | 96 | } | 96 | } |
2779 | 97 | printf ( "all channels were destroyed\n" ); | 97 | printf ( "all channels were destroyed\n" ); |
2780 | 98 | } | 98 | } |
2781 | 99 | 99 | ||
2782 | 100 | printf ( "shutting down CA client library\n" ); | 100 | printf ( "shutting down CA client library\n" ); |
2783 | 101 | 101 | ||
2786 | 102 | status = ca_task_exit (); | 102 | status = ca_task_exit (); |
2787 | 103 | SEVCHK ( status, "task exit problems" ); | 103 | SEVCHK ( status, "task exit problems" ); |
2788 | 104 | 104 | ||
2789 | 105 | iteration++; | 105 | iteration++; |
2791 | 106 | } | 106 | } |
2792 | 107 | 107 | ||
2793 | 108 | //delete [] pChans; | 108 | //delete [] pChans; |
2794 | 109 | } | 109 | } |
2795 | diff --git a/modules/ca/src/client/caConnTestMain.cpp b/modules/ca/src/client/caConnTestMain.cpp | |||
2796 | index f398580..b5e921c 100644 | |||
2797 | --- a/modules/ca/src/client/caConnTestMain.cpp | |||
2798 | +++ b/modules/ca/src/client/caConnTestMain.cpp | |||
2799 | @@ -5,7 +5,7 @@ | |||
2800 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2801 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2802 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2804 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2805 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2806 | 10 | 10 | ||
2807 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
2808 | diff --git a/modules/ca/src/client/caDiagnostics.h b/modules/ca/src/client/caDiagnostics.h | |||
2809 | index 90221e1..87029ce 100644 | |||
2810 | --- a/modules/ca/src/client/caDiagnostics.h | |||
2811 | +++ b/modules/ca/src/client/caDiagnostics.h | |||
2812 | @@ -5,7 +5,7 @@ | |||
2813 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2814 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2815 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2817 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2818 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2819 | 10 | 10 | ||
2820 | 11 | #ifndef caDiagnosticsh | 11 | #ifndef caDiagnosticsh |
2821 | @@ -20,8 +20,8 @@ extern "C" { | |||
2822 | 20 | enum appendNumberFlag {appendNumber, dontAppendNumber}; | 20 | enum appendNumberFlag {appendNumber, dontAppendNumber}; |
2823 | 21 | int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF ); | 21 | int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF ); |
2824 | 22 | 22 | ||
2827 | 23 | int acctst ( const char *pname, unsigned logggingInterestLevel, | 23 | int acctst ( const char *pname, unsigned logggingInterestLevel, |
2828 | 24 | unsigned channelCount, unsigned repetitionCount, | 24 | unsigned channelCount, unsigned repetitionCount, |
2829 | 25 | enum ca_preemptive_callback_select select ); | 25 | enum ca_preemptive_callback_select select ); |
2830 | 26 | 26 | ||
2831 | 27 | #define CATIME_OK 0 | 27 | #define CATIME_OK 0 |
2832 | diff --git a/modules/ca/src/client/caEventRate.cpp b/modules/ca/src/client/caEventRate.cpp | |||
2833 | index 8beb163..efb6dc7 100644 | |||
2834 | --- a/modules/ca/src/client/caEventRate.cpp | |||
2835 | +++ b/modules/ca/src/client/caEventRate.cpp | |||
2836 | @@ -5,7 +5,7 @@ | |||
2837 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2838 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2839 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2841 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2842 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2843 | 10 | 10 | ||
2844 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
2845 | @@ -38,50 +38,50 @@ void caEventRate ( const char *pName, unsigned count ) | |||
2846 | 38 | chid * pChidTable = new chid [ count ]; | 38 | chid * pChidTable = new chid [ count ]; |
2847 | 39 | 39 | ||
2848 | 40 | { | 40 | { |
2850 | 41 | printf ( "Connecting to CA Channel \"%s\" %u times.", | 41 | printf ( "Connecting to CA Channel \"%s\" %u times.", |
2851 | 42 | pName, count ); | 42 | pName, count ); |
2852 | 43 | fflush ( stdout ); | 43 | fflush ( stdout ); |
2854 | 44 | 44 | ||
2855 | 45 | epicsTime begin = epicsTime::getCurrent (); | 45 | epicsTime begin = epicsTime::getCurrent (); |
2856 | 46 | for ( unsigned i = 0u; i < count; i++ ) { | 46 | for ( unsigned i = 0u; i < count; i++ ) { |
2857 | 47 | int status = ca_search ( pName, & pChidTable[i] ); | 47 | int status = ca_search ( pName, & pChidTable[i] ); |
2858 | 48 | SEVCHK ( status, NULL ); | 48 | SEVCHK ( status, NULL ); |
2859 | 49 | } | 49 | } |
2861 | 50 | 50 | ||
2862 | 51 | int status = ca_pend_io ( 10000.0 ); | 51 | int status = ca_pend_io ( 10000.0 ); |
2863 | 52 | if ( status != ECA_NORMAL ) { | 52 | if ( status != ECA_NORMAL ) { |
2864 | 53 | fprintf ( stderr, " not found.\n" ); | 53 | fprintf ( stderr, " not found.\n" ); |
2865 | 54 | return; | 54 | return; |
2866 | 55 | } | 55 | } |
2867 | 56 | epicsTime end = epicsTime::getCurrent (); | 56 | epicsTime end = epicsTime::getCurrent (); |
2869 | 57 | 57 | ||
2870 | 58 | printf ( " done(%f sec).\n", end - begin ); | 58 | printf ( " done(%f sec).\n", end - begin ); |
2871 | 59 | } | 59 | } |
2872 | 60 | 60 | ||
2873 | 61 | { | 61 | { |
2874 | 62 | printf ( "Subscribing %u times.", count ); | 62 | printf ( "Subscribing %u times.", count ); |
2875 | 63 | fflush ( stdout ); | 63 | fflush ( stdout ); |
2877 | 64 | 64 | ||
2878 | 65 | epicsTime begin = epicsTime::getCurrent (); | 65 | epicsTime begin = epicsTime::getCurrent (); |
2879 | 66 | for ( unsigned i = 0u; i < count; i++ ) { | 66 | for ( unsigned i = 0u; i < count; i++ ) { |
2881 | 67 | int addEventStatus = ca_add_event ( DBR_FLOAT, | 67 | int addEventStatus = ca_add_event ( DBR_FLOAT, |
2882 | 68 | pChidTable[i], eventCallBack, &eventCount, NULL); | 68 | pChidTable[i], eventCallBack, &eventCount, NULL); |
2883 | 69 | SEVCHK ( addEventStatus, __FILE__ ); | 69 | SEVCHK ( addEventStatus, __FILE__ ); |
2884 | 70 | } | 70 | } |
2886 | 71 | 71 | ||
2887 | 72 | int status = ca_flush_io (); | 72 | int status = ca_flush_io (); |
2888 | 73 | SEVCHK ( status, __FILE__ ); | 73 | SEVCHK ( status, __FILE__ ); |
2890 | 74 | 74 | ||
2891 | 75 | epicsTime end = epicsTime::getCurrent (); | 75 | epicsTime end = epicsTime::getCurrent (); |
2893 | 76 | 76 | ||
2894 | 77 | printf ( " done(%f sec).\n", end - begin ); | 77 | printf ( " done(%f sec).\n", end - begin ); |
2895 | 78 | } | 78 | } |
2897 | 79 | 79 | ||
2898 | 80 | { | 80 | { |
2899 | 81 | printf ( "Waiting for initial value events." ); | 81 | printf ( "Waiting for initial value events." ); |
2900 | 82 | fflush ( stdout ); | 82 | fflush ( stdout ); |
2903 | 83 | 83 | ||
2904 | 84 | // let the first one go by | 84 | // let the first one go by |
2905 | 85 | epicsTime begin = epicsTime::getCurrent (); | 85 | epicsTime begin = epicsTime::getCurrent (); |
2906 | 86 | while ( eventCount < count ) { | 86 | while ( eventCount < count ) { |
2907 | 87 | int status = ca_pend_event ( 0.01 ); | 87 | int status = ca_pend_event ( 0.01 ); |
2908 | @@ -90,7 +90,7 @@ void caEventRate ( const char *pName, unsigned count ) | |||
2909 | 90 | } | 90 | } |
2910 | 91 | } | 91 | } |
2911 | 92 | epicsTime end = epicsTime::getCurrent (); | 92 | epicsTime end = epicsTime::getCurrent (); |
2913 | 93 | 93 | ||
2914 | 94 | printf ( " done(%f sec).\n", end - begin ); | 94 | printf ( " done(%f sec).\n", end - begin ); |
2915 | 95 | } | 95 | } |
2916 | 96 | 96 | ||
2917 | @@ -128,7 +128,7 @@ void caEventRate ( const char *pName, unsigned count ) | |||
2918 | 128 | double mean = X / N; | 128 | double mean = X / N; |
2919 | 129 | double stdDev = sqrt ( XX / N - mean * mean ); | 129 | double stdDev = sqrt ( XX / N - mean * mean ); |
2920 | 130 | 130 | ||
2922 | 131 | printf ( "CA Event Rate (Hz): current %g mean %g std dev %g\n", | 131 | printf ( "CA Event Rate (Hz): current %g mean %g std dev %g\n", |
2923 | 132 | Hz, mean, stdDev ); | 132 | Hz, mean, stdDev ); |
2924 | 133 | 133 | ||
2925 | 134 | if ( samplePeriod < maxSamplePeriod ) { | 134 | if ( samplePeriod < maxSamplePeriod ) { |
2926 | diff --git a/modules/ca/src/client/caEventRateMain.cpp b/modules/ca/src/client/caEventRateMain.cpp | |||
2927 | index 725e661..7ace11d 100644 | |||
2928 | --- a/modules/ca/src/client/caEventRateMain.cpp | |||
2929 | +++ b/modules/ca/src/client/caEventRateMain.cpp | |||
2930 | @@ -5,7 +5,7 @@ | |||
2931 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2932 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2933 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2935 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2936 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2937 | 10 | 10 | ||
2938 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
2939 | diff --git a/modules/ca/src/client/caProto.h b/modules/ca/src/client/caProto.h | |||
2940 | index 781c89b..dd59fd4 100644 | |||
2941 | --- a/modules/ca/src/client/caProto.h | |||
2942 | +++ b/modules/ca/src/client/caProto.h | |||
2943 | @@ -5,7 +5,7 @@ | |||
2944 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
2945 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
2946 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
2948 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
2949 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
2950 | 10 | /* | 10 | /* |
2951 | 11 | * | 11 | * |
2952 | @@ -15,14 +15,14 @@ | |||
2953 | 15 | */ | 15 | */ |
2954 | 16 | 16 | ||
2955 | 17 | #ifndef __CAPROTO__ | 17 | #ifndef __CAPROTO__ |
2957 | 18 | #define __CAPROTO__ | 18 | #define __CAPROTO__ |
2958 | 19 | 19 | ||
2959 | 20 | #define capStrOf(A) #A | 20 | #define capStrOf(A) #A |
2960 | 21 | #define capStrOfX(A) capStrOf ( A ) | 21 | #define capStrOfX(A) capStrOf ( A ) |
2961 | 22 | 22 | ||
2963 | 23 | /* | 23 | /* |
2964 | 24 | * CA protocol revision | 24 | * CA protocol revision |
2966 | 25 | * TCP/UDP port number (bumped each major protocol change) | 25 | * TCP/UDP port number (bumped each major protocol change) |
2967 | 26 | */ | 26 | */ |
2968 | 27 | #define CA_MAJOR_PROTOCOL_REVISION 4 | 27 | #define CA_MAJOR_PROTOCOL_REVISION 4 |
2969 | 28 | #define CA_VERSION_STRING( MINOR_REVISION ) \ | 28 | #define CA_VERSION_STRING( MINOR_REVISION ) \ |
2970 | @@ -30,7 +30,7 @@ | |||
2971 | 30 | #define CA_UKN_MINOR_VERSION 0u /* unknown minor version */ | 30 | #define CA_UKN_MINOR_VERSION 0u /* unknown minor version */ |
2972 | 31 | #define CA_MINIMUM_SUPPORTED_VERSION 4u | 31 | #define CA_MINIMUM_SUPPORTED_VERSION 4u |
2973 | 32 | # define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION) | 32 | # define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION) |
2975 | 33 | # define CA_V41(MINOR) ((MINOR)>=1u) | 33 | # define CA_V41(MINOR) ((MINOR)>=1u) |
2976 | 34 | # define CA_V42(MINOR) ((MINOR)>=2u) | 34 | # define CA_V42(MINOR) ((MINOR)>=2u) |
2977 | 35 | # define CA_V43(MINOR) ((MINOR)>=3u) | 35 | # define CA_V43(MINOR) ((MINOR)>=3u) |
2978 | 36 | # define CA_V44(MINOR) ((MINOR)>=4u) | 36 | # define CA_V44(MINOR) ((MINOR)>=4u) |
2979 | @@ -45,8 +45,8 @@ | |||
2980 | 45 | # define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */ | 45 | # define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */ |
2981 | 46 | 46 | ||
2982 | 47 | /* | 47 | /* |
2985 | 48 | * These port numbers are only used if the CA repeater and | 48 | * These port numbers are only used if the CA repeater and |
2986 | 49 | * CA server port numbers cant be obtained from the EPICS | 49 | * CA server port numbers cant be obtained from the EPICS |
2987 | 50 | * environment variables "EPICS_CA_REPEATER_PORT" and | 50 | * environment variables "EPICS_CA_REPEATER_PORT" and |
2988 | 51 | * "EPICS_CA_SERVER_PORT" | 51 | * "EPICS_CA_SERVER_PORT" |
2989 | 52 | */ | 52 | */ |
2990 | @@ -54,8 +54,8 @@ | |||
2991 | 54 | #define CA_SERVER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u) | 54 | #define CA_SERVER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u) |
2992 | 55 | #define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u) | 55 | #define CA_REPEATER_PORT (CA_PORT_BASE+CA_MAJOR_PROTOCOL_REVISION*2u+1u) |
2993 | 56 | 56 | ||
2996 | 57 | /* | 57 | /* |
2997 | 58 | * 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP) | 58 | * 1500 (max of ethernet and 802.{2,3} MTU) - 20(IP) - 8(UDP) |
2998 | 59 | * (the MTU of Ethernet is currently independent of its speed varient) | 59 | * (the MTU of Ethernet is currently independent of its speed varient) |
2999 | 60 | */ | 60 | */ |
3000 | 61 | #define ETHERNET_MAX_UDP ( 1500u - 20u - 8u ) | 61 | #define ETHERNET_MAX_UDP ( 1500u - 20u - 8u ) |
3001 | @@ -89,10 +89,10 @@ typedef ca_uint32_t caResId; | |||
3002 | 89 | #define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */ | 89 | #define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */ |
3003 | 90 | #define CA_PROTO_SEARCH 6u /* IOC channel search */ | 90 | #define CA_PROTO_SEARCH 6u /* IOC channel search */ |
3004 | 91 | #define CA_PROTO_BUILD 7u /* build - obsolete */ | 91 | #define CA_PROTO_BUILD 7u /* build - obsolete */ |
3009 | 92 | #define CA_PROTO_EVENTS_OFF 8u /* flow control */ | 92 | #define CA_PROTO_EVENTS_OFF 8u /* flow control */ |
3010 | 93 | #define CA_PROTO_EVENTS_ON 9u /* flow control */ | 93 | #define CA_PROTO_EVENTS_ON 9u /* flow control */ |
3011 | 94 | #define CA_PROTO_READ_SYNC 10u /* purge old reads */ | 94 | #define CA_PROTO_READ_SYNC 10u /* purge old reads */ |
3012 | 95 | #define CA_PROTO_ERROR 11u /* an operation failed */ | 95 | #define CA_PROTO_ERROR 11u /* an operation failed */ |
3013 | 96 | #define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */ | 96 | #define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */ |
3014 | 97 | #define CA_PROTO_RSRV_IS_UP 13u /* CA server has joined the net */ | 97 | #define CA_PROTO_RSRV_IS_UP 13u /* CA server has joined the net */ |
3015 | 98 | #define CA_PROTO_NOT_FOUND 14u /* channel not found */ | 98 | #define CA_PROTO_NOT_FOUND 14u /* channel not found */ |
3016 | @@ -172,7 +172,7 @@ typedef struct ca_hdr { | |||
3017 | 172 | */ | 172 | */ |
3018 | 173 | struct mon_info { | 173 | struct mon_info { |
3019 | 174 | ca_float32_t m_lval; /* low delta */ | 174 | ca_float32_t m_lval; /* low delta */ |
3021 | 175 | ca_float32_t m_hval; /* high delta */ | 175 | ca_float32_t m_hval; /* high delta */ |
3022 | 176 | ca_float32_t m_toval; /* period btween samples */ | 176 | ca_float32_t m_toval; /* period btween samples */ |
3023 | 177 | ca_uint16_t m_mask; /* event select mask */ | 177 | ca_uint16_t m_mask; /* event select mask */ |
3024 | 178 | ca_uint16_t m_pad; /* extend to 32 bits */ | 178 | ca_uint16_t m_pad; /* extend to 32 bits */ |
3025 | diff --git a/modules/ca/src/client/caRepeater.cpp b/modules/ca/src/client/caRepeater.cpp | |||
3026 | index 2561223..634a2bc 100644 | |||
3027 | --- a/modules/ca/src/client/caRepeater.cpp | |||
3028 | +++ b/modules/ca/src/client/caRepeater.cpp | |||
3029 | @@ -5,7 +5,7 @@ | |||
3030 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3031 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3032 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3034 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3035 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3036 | 10 | /* | 10 | /* |
3037 | 11 | * | 11 | * |
3038 | diff --git a/modules/ca/src/client/caServerID.h b/modules/ca/src/client/caServerID.h | |||
3039 | index 08bfdd5..430f314 100644 | |||
3040 | --- a/modules/ca/src/client/caServerID.h | |||
3041 | +++ b/modules/ca/src/client/caServerID.h | |||
3042 | @@ -5,7 +5,7 @@ | |||
3043 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3044 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3045 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3047 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3048 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3049 | 10 | /* | 10 | /* |
3050 | 11 | * | 11 | * |
3051 | @@ -37,7 +37,7 @@ private: | |||
3052 | 37 | ca_uint8_t pri; | 37 | ca_uint8_t pri; |
3053 | 38 | }; | 38 | }; |
3054 | 39 | 39 | ||
3056 | 40 | inline caServerID::caServerID ( | 40 | inline caServerID::caServerID ( |
3057 | 41 | const struct sockaddr_in & addrIn, unsigned priorityIn ) : | 41 | const struct sockaddr_in & addrIn, unsigned priorityIn ) : |
3058 | 42 | addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) ) | 42 | addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) ) |
3059 | 43 | { | 43 | { |
3060 | @@ -46,7 +46,7 @@ inline caServerID::caServerID ( | |||
3061 | 46 | 46 | ||
3062 | 47 | inline bool caServerID::operator == ( const caServerID & rhs ) const | 47 | inline bool caServerID::operator == ( const caServerID & rhs ) const |
3063 | 48 | { | 48 | { |
3065 | 49 | if ( this->addr.sin_addr.s_addr == rhs.addr.sin_addr.s_addr && | 49 | if ( this->addr.sin_addr.s_addr == rhs.addr.sin_addr.s_addr && |
3066 | 50 | this->addr.sin_port == rhs.addr.sin_port && | 50 | this->addr.sin_port == rhs.addr.sin_port && |
3067 | 51 | this->pri == rhs.pri ) { | 51 | this->pri == rhs.pri ) { |
3068 | 52 | return true; | 52 | return true; |
3069 | @@ -67,7 +67,7 @@ inline resTableIndex caServerID::hash () const | |||
3070 | 67 | index ^= this->addr.sin_port; | 67 | index ^= this->addr.sin_port; |
3071 | 68 | index ^= this->addr.sin_port >> 8u; | 68 | index ^= this->addr.sin_port >> 8u; |
3072 | 69 | index ^= this->pri; | 69 | index ^= this->pri; |
3074 | 70 | return integerHash ( caServerMinIndexBitWidth, | 70 | return integerHash ( caServerMinIndexBitWidth, |
3075 | 71 | caServerMaxIndexBitWidth, index ); | 71 | caServerMaxIndexBitWidth, index ); |
3076 | 72 | } | 72 | } |
3077 | 73 | 73 | ||
3078 | diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp | |||
3079 | index 3fd0512..44d6427 100644 | |||
3080 | --- a/modules/ca/src/client/ca_client_context.cpp | |||
3081 | +++ b/modules/ca/src/client/ca_client_context.cpp | |||
3082 | @@ -17,9 +17,9 @@ | |||
3083 | 17 | * Copyright, 1986, The Regents of the University of California. | 17 | * Copyright, 1986, The Regents of the University of California. |
3084 | 18 | * | 18 | * |
3085 | 19 | * | 19 | * |
3089 | 20 | * Author Jeffrey O. Hill | 20 | * Author Jeffrey O. Hill |
3090 | 21 | * johill@lanl.gov | 21 | * johill@lanl.gov |
3091 | 22 | * 505 665 1831 | 22 | * 505 665 1831 |
3092 | 23 | */ | 23 | */ |
3093 | 24 | 24 | ||
3094 | 25 | #ifdef _MSC_VER | 25 | #ifdef _MSC_VER |
3095 | diff --git a/modules/ca/src/client/cac.cpp b/modules/ca/src/client/cac.cpp | |||
3096 | index 476d1c3..e335e6e 100644 | |||
3097 | --- a/modules/ca/src/client/cac.cpp | |||
3098 | +++ b/modules/ca/src/client/cac.cpp | |||
3099 | @@ -155,7 +155,7 @@ cac::cac ( | |||
3100 | 155 | } | 155 | } |
3101 | 156 | 156 | ||
3102 | 157 | try { | 157 | try { |
3104 | 158 | long status; | 158 | long status; |
3105 | 159 | 159 | ||
3106 | 160 | /* | 160 | /* |
3107 | 161 | * Certain os, such as HPUX, do not unblock a socket system call | 161 | * Certain os, such as HPUX, do not unblock a socket system call |
3108 | diff --git a/modules/ca/src/client/cac.h b/modules/ca/src/client/cac.h | |||
3109 | index 7db5c6d..c98f05d 100644 | |||
3110 | --- a/modules/ca/src/client/cac.h | |||
3111 | +++ b/modules/ca/src/client/cac.h | |||
3112 | @@ -81,8 +81,8 @@ public: | |||
3113 | 81 | void release ( void * ); | 81 | void release ( void * ); |
3114 | 82 | private: | 82 | private: |
3115 | 83 | tsFreeList < comBuf, 0x20 > freeList; | 83 | tsFreeList < comBuf, 0x20 > freeList; |
3118 | 84 | cacComBufMemoryManager ( const cacComBufMemoryManager & ); | 84 | cacComBufMemoryManager ( const cacComBufMemoryManager & ); |
3119 | 85 | cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & ); | 85 | cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & ); |
3120 | 86 | }; | 86 | }; |
3121 | 87 | 87 | ||
3122 | 88 | class notifyGuard { | 88 | class notifyGuard { |
3123 | @@ -348,8 +348,8 @@ private: | |||
3124 | 348 | const char *pCtx, unsigned status ); | 348 | const char *pCtx, unsigned status ); |
3125 | 349 | static const pExcepProtoStubTCP tcpExcepJumpTableCAC []; | 349 | static const pExcepProtoStubTCP tcpExcepJumpTableCAC []; |
3126 | 350 | 350 | ||
3129 | 351 | cac ( const cac & ); | 351 | cac ( const cac & ); |
3130 | 352 | cac & operator = ( const cac & ); | 352 | cac & operator = ( const cac & ); |
3131 | 353 | 353 | ||
3132 | 354 | friend class tcpiiu; | 354 | friend class tcpiiu; |
3133 | 355 | }; | 355 | }; |
3134 | diff --git a/modules/ca/src/client/cacChannel.cpp b/modules/ca/src/client/cacChannel.cpp | |||
3135 | index c1a52a0..80f622f 100644 | |||
3136 | --- a/modules/ca/src/client/cacChannel.cpp | |||
3137 | +++ b/modules/ca/src/client/cacChannel.cpp | |||
3138 | @@ -5,11 +5,11 @@ | |||
3139 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3140 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3141 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3143 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3144 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3145 | 10 | 10 | ||
3146 | 11 | 11 | ||
3148 | 12 | /* | 12 | /* |
3149 | 13 | * | 13 | * |
3150 | 14 | * L O S A L A M O S | 14 | * L O S A L A M O S |
3151 | 15 | * Los Alamos National Laboratory | 15 | * Los Alamos National Laboratory |
3152 | @@ -41,7 +41,7 @@ private: | |||
3153 | 41 | epicsSingleton < localHostName > :: reference | 41 | epicsSingleton < localHostName > :: reference |
3154 | 42 | _refLocalHostName; | 42 | _refLocalHostName; |
3155 | 43 | }; | 43 | }; |
3157 | 44 | 44 | ||
3158 | 45 | static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT; | 45 | static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT; |
3159 | 46 | 46 | ||
3160 | 47 | const cacChannel::priLev cacChannel::priorityMax = 99u; | 47 | const cacChannel::priLev cacChannel::priorityMax = 99u; |
3161 | @@ -55,63 +55,63 @@ cacChannel::~cacChannel () | |||
3162 | 55 | { | 55 | { |
3163 | 56 | } | 56 | } |
3164 | 57 | 57 | ||
3167 | 58 | caAccessRights cacChannel::accessRights ( | 58 | caAccessRights cacChannel::accessRights ( |
3168 | 59 | epicsGuard < epicsMutex > & ) const | 59 | epicsGuard < epicsMutex > & ) const |
3169 | 60 | { | 60 | { |
3170 | 61 | static caAccessRights ar ( true, true ); | 61 | static caAccessRights ar ( true, true ); |
3171 | 62 | return ar; | 62 | return ar; |
3172 | 63 | } | 63 | } |
3173 | 64 | 64 | ||
3176 | 65 | unsigned cacChannel::searchAttempts ( | 65 | unsigned cacChannel::searchAttempts ( |
3177 | 66 | epicsGuard < epicsMutex > & ) const | 66 | epicsGuard < epicsMutex > & ) const |
3178 | 67 | { | 67 | { |
3179 | 68 | return 0u; | 68 | return 0u; |
3180 | 69 | } | 69 | } |
3181 | 70 | 70 | ||
3184 | 71 | double cacChannel::beaconPeriod ( | 71 | double cacChannel::beaconPeriod ( |
3185 | 72 | epicsGuard < epicsMutex > & ) const | 72 | epicsGuard < epicsMutex > & ) const |
3186 | 73 | { | 73 | { |
3187 | 74 | return - DBL_MAX; | 74 | return - DBL_MAX; |
3188 | 75 | } | 75 | } |
3189 | 76 | 76 | ||
3191 | 77 | double cacChannel::receiveWatchdogDelay ( | 77 | double cacChannel::receiveWatchdogDelay ( |
3192 | 78 | epicsGuard < epicsMutex > & ) const | 78 | epicsGuard < epicsMutex > & ) const |
3193 | 79 | { | 79 | { |
3194 | 80 | return - DBL_MAX; | 80 | return - DBL_MAX; |
3195 | 81 | } | 81 | } |
3196 | 82 | 82 | ||
3197 | 83 | bool cacChannel::ca_v42_ok ( | 83 | bool cacChannel::ca_v42_ok ( |
3199 | 84 | epicsGuard < epicsMutex > & ) const | 84 | epicsGuard < epicsMutex > & ) const |
3200 | 85 | { | 85 | { |
3201 | 86 | return true; | 86 | return true; |
3202 | 87 | } | 87 | } |
3203 | 88 | 88 | ||
3204 | 89 | bool cacChannel::connected ( | 89 | bool cacChannel::connected ( |
3206 | 90 | epicsGuard < epicsMutex > & ) const | 90 | epicsGuard < epicsMutex > & ) const |
3207 | 91 | { | 91 | { |
3208 | 92 | return true; | 92 | return true; |
3209 | 93 | } | 93 | } |
3210 | 94 | 94 | ||
3212 | 95 | CACChannelPrivate :: | 95 | CACChannelPrivate :: |
3213 | 96 | CACChannelPrivate() : | 96 | CACChannelPrivate() : |
3214 | 97 | _refLocalHostName ( localHostNameCache.getReference () ) | 97 | _refLocalHostName ( localHostNameCache.getReference () ) |
3215 | 98 | { | 98 | { |
3216 | 99 | } | 99 | } |
3217 | 100 | 100 | ||
3219 | 101 | inline unsigned CACChannelPrivate :: | 101 | inline unsigned CACChannelPrivate :: |
3220 | 102 | getHostName ( char * pBuf, unsigned bufLength ) | 102 | getHostName ( char * pBuf, unsigned bufLength ) |
3221 | 103 | { | 103 | { |
3222 | 104 | return _refLocalHostName->getName ( pBuf, bufLength ); | 104 | return _refLocalHostName->getName ( pBuf, bufLength ); |
3223 | 105 | } | 105 | } |
3226 | 106 | 106 | ||
3227 | 107 | inline const char * CACChannelPrivate :: | 107 | inline const char * CACChannelPrivate :: |
3228 | 108 | pHostName () | 108 | pHostName () |
3229 | 109 | { | 109 | { |
3230 | 110 | return _refLocalHostName->pointer (); | 110 | return _refLocalHostName->pointer (); |
3231 | 111 | } | 111 | } |
3232 | 112 | 112 | ||
3233 | 113 | static CACChannelPrivate * pCACChannelPrivate = 0; | 113 | static CACChannelPrivate * pCACChannelPrivate = 0; |
3235 | 114 | 114 | ||
3236 | 115 | // runs once only for each process | 115 | // runs once only for each process |
3237 | 116 | extern "C" void cacChannelSetup ( void * ) | 116 | extern "C" void cacChannelSetup ( void * ) |
3238 | 117 | { | 117 | { |
3239 | @@ -119,7 +119,7 @@ extern "C" void cacChannelSetup ( void * ) | |||
3240 | 119 | } | 119 | } |
3241 | 120 | 120 | ||
3242 | 121 | // the default is to assume that it is a locally hosted channel | 121 | // the default is to assume that it is a locally hosted channel |
3244 | 122 | unsigned cacChannel::getHostName ( | 122 | unsigned cacChannel::getHostName ( |
3245 | 123 | epicsGuard < epicsMutex > &, | 123 | epicsGuard < epicsMutex > &, |
3246 | 124 | char * pBuf, unsigned bufLength ) const throw () | 124 | char * pBuf, unsigned bufLength ) const throw () |
3247 | 125 | { | 125 | { |
3248 | diff --git a/modules/ca/src/client/cacChannelNotify.cpp b/modules/ca/src/client/cacChannelNotify.cpp | |||
3249 | index 08d2cab..5819b6b 100644 | |||
3250 | --- a/modules/ca/src/client/cacChannelNotify.cpp | |||
3251 | +++ b/modules/ca/src/client/cacChannelNotify.cpp | |||
3252 | @@ -5,21 +5,21 @@ | |||
3253 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3254 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3255 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3257 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3258 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3260 | 10 | /* | 10 | /* |
3261 | 11 | * | ||
3262 | 11 | * | 12 | * |
3263 | 12 | * | ||
3264 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
3265 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
3266 | 15 | * Los Alamos, New Mexico 87545 | 15 | * Los Alamos, New Mexico 87545 |
3268 | 16 | * | 16 | * |
3269 | 17 | * Copyright, 1986, The Regents of the University of California. | 17 | * Copyright, 1986, The Regents of the University of California. |
3275 | 18 | * | 18 | * |
3276 | 19 | * | 19 | * |
3277 | 20 | * Author Jeffrey O. Hill | 20 | * Author Jeffrey O. Hill |
3278 | 21 | * johill@lanl.gov | 21 | * johill@lanl.gov |
3279 | 22 | * 505 665 1831 | 22 | * 505 665 1831 |
3280 | 23 | */ | 23 | */ |
3281 | 24 | 24 | ||
3282 | 25 | #include "iocinf.h" | 25 | #include "iocinf.h" |
3283 | @@ -28,7 +28,7 @@ | |||
3284 | 28 | #include "cacIO.h" | 28 | #include "cacIO.h" |
3285 | 29 | #undef epicsExportSharedSymbols | 29 | #undef epicsExportSharedSymbols |
3286 | 30 | 30 | ||
3288 | 31 | cacChannelNotify::~cacChannelNotify () | 31 | cacChannelNotify::~cacChannelNotify () |
3289 | 32 | { | 32 | { |
3290 | 33 | } | 33 | } |
3291 | 34 | 34 | ||
3292 | diff --git a/modules/ca/src/client/cacContextNotify.cpp b/modules/ca/src/client/cacContextNotify.cpp | |||
3293 | index a4498ac..b7d96ac 100644 | |||
3294 | --- a/modules/ca/src/client/cacContextNotify.cpp | |||
3295 | +++ b/modules/ca/src/client/cacContextNotify.cpp | |||
3296 | @@ -5,10 +5,10 @@ | |||
3297 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3298 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3299 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3301 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3302 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3303 | 10 | 10 | ||
3305 | 11 | /* | 11 | /* |
3306 | 12 | * | 12 | * |
3307 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
3308 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
3309 | @@ -31,11 +31,11 @@ cacContextNotify::~cacContextNotify () | |||
3310 | 31 | { | 31 | { |
3311 | 32 | } | 32 | } |
3312 | 33 | 33 | ||
3314 | 34 | void cacContextNotify::callbackProcessingInitiateNotify () | 34 | void cacContextNotify::callbackProcessingInitiateNotify () |
3315 | 35 | { | 35 | { |
3316 | 36 | } | 36 | } |
3317 | 37 | 37 | ||
3319 | 38 | void cacContextNotify::callbackProcessingCompleteNotify () | 38 | void cacContextNotify::callbackProcessingCompleteNotify () |
3320 | 39 | { | 39 | { |
3321 | 40 | } | 40 | } |
3322 | 41 | 41 | ||
3323 | diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h | |||
3324 | index 4e8af4a..426ba02 100644 | |||
3325 | --- a/modules/ca/src/client/cacIO.h | |||
3326 | +++ b/modules/ca/src/client/cacIO.h | |||
3327 | @@ -17,9 +17,9 @@ | |||
3328 | 17 | * Copyright, 1986, The Regents of the University of California. | 17 | * Copyright, 1986, The Regents of the University of California. |
3329 | 18 | * | 18 | * |
3330 | 19 | * | 19 | * |
3334 | 20 | * Author Jeffrey O. Hill | 20 | * Author Jeffrey O. Hill |
3335 | 21 | * johill@lanl.gov | 21 | * johill@lanl.gov |
3336 | 22 | * 505 665 1831 | 22 | * 505 665 1831 |
3337 | 23 | */ | 23 | */ |
3338 | 24 | 24 | ||
3339 | 25 | #ifndef cacIOh | 25 | #ifndef cacIOh |
3340 | @@ -273,8 +273,8 @@ protected: | |||
3341 | 273 | 273 | ||
3342 | 274 | private: | 274 | private: |
3343 | 275 | cacChannelNotify & callback; | 275 | cacChannelNotify & callback; |
3346 | 276 | cacChannel ( const cacChannel & ); | 276 | cacChannel ( const cacChannel & ); |
3347 | 277 | cacChannel & operator = ( const cacChannel & ); | 277 | cacChannel & operator = ( const cacChannel & ); |
3348 | 278 | }; | 278 | }; |
3349 | 279 | 279 | ||
3350 | 280 | class epicsShareClass cacContext { | 280 | class epicsShareClass cacContext { |
3351 | diff --git a/modules/ca/src/client/cacReadNotify.cpp b/modules/ca/src/client/cacReadNotify.cpp | |||
3352 | index 23284c8..3d3d5a7 100644 | |||
3353 | --- a/modules/ca/src/client/cacReadNotify.cpp | |||
3354 | +++ b/modules/ca/src/client/cacReadNotify.cpp | |||
3355 | @@ -5,10 +5,10 @@ | |||
3356 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3357 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3358 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3360 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3361 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3362 | 10 | 10 | ||
3364 | 11 | /* | 11 | /* |
3365 | 12 | * | 12 | * |
3366 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
3367 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
3368 | diff --git a/modules/ca/src/client/cacStateNotify.cpp b/modules/ca/src/client/cacStateNotify.cpp | |||
3369 | index 0885248..ba5575f 100644 | |||
3370 | --- a/modules/ca/src/client/cacStateNotify.cpp | |||
3371 | +++ b/modules/ca/src/client/cacStateNotify.cpp | |||
3372 | @@ -5,10 +5,10 @@ | |||
3373 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3374 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3375 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3377 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3378 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3379 | 10 | 10 | ||
3381 | 11 | /* | 11 | /* |
3382 | 12 | * | 12 | * |
3383 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
3384 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
3385 | diff --git a/modules/ca/src/client/cacWriteNotify.cpp b/modules/ca/src/client/cacWriteNotify.cpp | |||
3386 | index 13d47cd..2bd2221 100644 | |||
3387 | --- a/modules/ca/src/client/cacWriteNotify.cpp | |||
3388 | +++ b/modules/ca/src/client/cacWriteNotify.cpp | |||
3389 | @@ -5,10 +5,10 @@ | |||
3390 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3391 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3392 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3394 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3395 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3396 | 10 | 10 | ||
3398 | 11 | /* | 11 | /* |
3399 | 12 | * | 12 | * |
3400 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
3401 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
3402 | diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h | |||
3403 | index e62dd72..7e34b38 100644 | |||
3404 | --- a/modules/ca/src/client/cadef.h | |||
3405 | +++ b/modules/ca/src/client/cadef.h | |||
3406 | @@ -5,9 +5,9 @@ | |||
3407 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3408 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3409 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3411 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3412 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3414 | 10 | /* | 10 | /* |
3415 | 11 | * | 11 | * |
3416 | 12 | * L O S A L A M O S | 12 | * L O S A L A M O S |
3417 | 13 | * Los Alamos National Laboratory | 13 | * Los Alamos National Laboratory |
3418 | @@ -83,8 +83,8 @@ typedef void caArh (struct access_rights_handler_args args); | |||
3419 | 83 | /* The conversion routine to call for each type */ | 83 | /* The conversion routine to call for each type */ |
3420 | 84 | #define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE) | 84 | #define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE) |
3421 | 85 | 85 | ||
3424 | 86 | /* | 86 | /* |
3425 | 87 | * Arguments passed to event handlers and get/put call back handlers. | 87 | * Arguments passed to event handlers and get/put call back handlers. |
3426 | 88 | * | 88 | * |
3427 | 89 | * The status field below is the CA ECA_XXX status of the requested | 89 | * The status field below is the CA ECA_XXX status of the requested |
3428 | 90 | * operation which is saved from when the operation was attempted in the | 90 | * operation which is saved from when the operation was attempted in the |
3429 | @@ -95,7 +95,7 @@ typedef void caArh (struct access_rights_handler_args args); | |||
3430 | 95 | typedef struct event_handler_args { | 95 | typedef struct event_handler_args { |
3431 | 96 | void *usr; /* user argument supplied with request */ | 96 | void *usr; /* user argument supplied with request */ |
3432 | 97 | chanId chid; /* channel id */ | 97 | chanId chid; /* channel id */ |
3434 | 98 | long type; /* the type of the item returned */ | 98 | long type; /* the type of the item returned */ |
3435 | 99 | long count; /* the element count of the item returned */ | 99 | long count; /* the element count of the item returned */ |
3436 | 100 | const void *dbr; /* a pointer to the item returned */ | 100 | const void *dbr; /* a pointer to the item returned */ |
3437 | 101 | int status; /* ECA_XXX status of the requested op from the server */ | 101 | int status; /* ECA_XXX status of the requested op from the server */ |
3438 | @@ -133,8 +133,8 @@ typedef unsigned CA_SYNC_GID; | |||
3439 | 133 | #define CA_OP_CLEAR_EVENT 4 | 133 | #define CA_OP_CLEAR_EVENT 4 |
3440 | 134 | #define CA_OP_OTHER 5 | 134 | #define CA_OP_OTHER 5 |
3441 | 135 | 135 | ||
3444 | 136 | /* | 136 | /* |
3445 | 137 | * used with connection_handler_args | 137 | * used with connection_handler_args |
3446 | 138 | */ | 138 | */ |
3447 | 139 | #define CA_OP_CONN_UP 6 | 139 | #define CA_OP_CONN_UP 6 |
3448 | 140 | #define CA_OP_CONN_DOWN 7 | 140 | #define CA_OP_CONN_DOWN 7 |
3449 | @@ -167,8 +167,8 @@ epicsShareFunc unsigned epicsShareAPI ca_read_access (chid chan); | |||
3450 | 167 | epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan); | 167 | epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan); |
3451 | 168 | 168 | ||
3452 | 169 | /* | 169 | /* |
3455 | 170 | * cs_ - `channel state' | 170 | * cs_ - `channel state' |
3456 | 171 | * | 171 | * |
3457 | 172 | * cs_never_conn valid chid, IOC not found | 172 | * cs_never_conn valid chid, IOC not found |
3458 | 173 | * cs_prev_conn valid chid, IOC was found, but unavailable | 173 | * cs_prev_conn valid chid, IOC was found, but unavailable |
3459 | 174 | * cs_conn valid chid, IOC was found, still available | 174 | * cs_conn valid chid, IOC was found, still available |
3460 | @@ -183,11 +183,11 @@ epicsShareFunc enum channel_state epicsShareAPI ca_state (chid chan); | |||
3461 | 183 | /* Must be called once before calling any of the other routines */ | 183 | /* Must be called once before calling any of the other routines */ |
3462 | 184 | /************************************************************************/ | 184 | /************************************************************************/ |
3463 | 185 | epicsShareFunc int epicsShareAPI ca_task_initialize (void); | 185 | epicsShareFunc int epicsShareAPI ca_task_initialize (void); |
3465 | 186 | enum ca_preemptive_callback_select | 186 | enum ca_preemptive_callback_select |
3466 | 187 | { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; | 187 | { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; |
3468 | 188 | epicsShareFunc int epicsShareAPI | 188 | epicsShareFunc int epicsShareAPI |
3469 | 189 | ca_context_create (enum ca_preemptive_callback_select select); | 189 | ca_context_create (enum ca_preemptive_callback_select select); |
3471 | 190 | epicsShareFunc void epicsShareAPI ca_detach_context (); | 190 | epicsShareFunc void epicsShareAPI ca_detach_context (); |
3472 | 191 | 191 | ||
3473 | 192 | /************************************************************************/ | 192 | /************************************************************************/ |
3474 | 193 | /* Remove CA facility from your task */ | 193 | /* Remove CA facility from your task */ |
3475 | @@ -197,7 +197,7 @@ epicsShareFunc void epicsShareAPI ca_detach_context (); | |||
3476 | 197 | epicsShareFunc int epicsShareAPI ca_task_exit (void); | 197 | epicsShareFunc int epicsShareAPI ca_task_exit (void); |
3477 | 198 | epicsShareFunc void epicsShareAPI ca_context_destroy (void); | 198 | epicsShareFunc void epicsShareAPI ca_context_destroy (void); |
3478 | 199 | 199 | ||
3480 | 200 | typedef unsigned capri; | 200 | typedef unsigned capri; |
3481 | 201 | #define CA_PRIORITY_MAX 99 | 201 | #define CA_PRIORITY_MAX 99 |
3482 | 202 | #define CA_PRIORITY_MIN 0 | 202 | #define CA_PRIORITY_MIN 0 |
3483 | 203 | #define CA_PRIORITY_DEFAULT CA_PRIORITY_MIN | 203 | #define CA_PRIORITY_DEFAULT CA_PRIORITY_MIN |
3484 | @@ -210,7 +210,7 @@ typedef unsigned capri; | |||
3485 | 210 | * ca_create_channel () | 210 | * ca_create_channel () |
3486 | 211 | * | 211 | * |
3487 | 212 | * pChanName R channel name string | 212 | * pChanName R channel name string |
3489 | 213 | * pConnStateCallback R address of connection state change | 213 | * pConnStateCallback R address of connection state change |
3490 | 214 | * callback function | 214 | * callback function |
3491 | 215 | * pUserPrivate R placed in the channel's user private field | 215 | * pUserPrivate R placed in the channel's user private field |
3492 | 216 | * o can be fetched later by ca_puser(CHID) | 216 | * o can be fetched later by ca_puser(CHID) |
3493 | @@ -220,8 +220,8 @@ typedef unsigned capri; | |||
3494 | 220 | */ | 220 | */ |
3495 | 221 | epicsShareFunc int epicsShareAPI ca_create_channel | 221 | epicsShareFunc int epicsShareAPI ca_create_channel |
3496 | 222 | ( | 222 | ( |
3499 | 223 | const char *pChanName, | 223 | const char *pChanName, |
3500 | 224 | caCh *pConnStateCallback, | 224 | caCh *pConnStateCallback, |
3501 | 225 | void *pUserPrivate, | 225 | void *pUserPrivate, |
3502 | 226 | capri priority, | 226 | capri priority, |
3503 | 227 | chid *pChanID | 227 | chid *pChanID |
3504 | @@ -230,7 +230,7 @@ epicsShareFunc int epicsShareAPI ca_create_channel | |||
3505 | 230 | /* | 230 | /* |
3506 | 231 | * ca_change_connection_event() | 231 | * ca_change_connection_event() |
3507 | 232 | * | 232 | * |
3509 | 233 | * chan R channel identifier | 233 | * chan R channel identifier |
3510 | 234 | * pfunc R address of connection call-back function | 234 | * pfunc R address of connection call-back function |
3511 | 235 | */ | 235 | */ |
3512 | 236 | epicsShareFunc int epicsShareAPI ca_change_connection_event | 236 | epicsShareFunc int epicsShareAPI ca_change_connection_event |
3513 | @@ -242,7 +242,7 @@ epicsShareFunc int epicsShareAPI ca_change_connection_event | |||
3514 | 242 | /* | 242 | /* |
3515 | 243 | * ca_replace_access_rights_event () | 243 | * ca_replace_access_rights_event () |
3516 | 244 | * | 244 | * |
3518 | 245 | * chan R channel identifier | 245 | * chan R channel identifier |
3519 | 246 | * pfunc R address of access rights call-back function | 246 | * pfunc R address of access rights call-back function |
3520 | 247 | */ | 247 | */ |
3521 | 248 | epicsShareFunc int epicsShareAPI ca_replace_access_rights_event ( | 248 | epicsShareFunc int epicsShareAPI ca_replace_access_rights_event ( |
3522 | @@ -256,7 +256,7 @@ epicsShareFunc int epicsShareAPI ca_replace_access_rights_event ( | |||
3523 | 256 | * replace the default exception handler | 256 | * replace the default exception handler |
3524 | 257 | * | 257 | * |
3525 | 258 | * pfunc R address of exception call-back function | 258 | * pfunc R address of exception call-back function |
3527 | 259 | * pArg R copy of this pointer passed to exception | 259 | * pArg R copy of this pointer passed to exception |
3528 | 260 | * call-back function | 260 | * call-back function |
3529 | 261 | */ | 261 | */ |
3530 | 262 | typedef void caExceptionHandler (struct exception_handler_args); | 262 | typedef void caExceptionHandler (struct exception_handler_args); |
3531 | @@ -283,10 +283,10 @@ epicsShareFunc int epicsShareAPI ca_clear_channel | |||
3532 | 283 | /* | 283 | /* |
3533 | 284 | * ca_bput() | 284 | * ca_bput() |
3534 | 285 | * | 285 | * |
3536 | 286 | * WARNING: this copies the new value from a string (dbr_string_t) | 286 | * WARNING: this copies the new value from a string (dbr_string_t) |
3537 | 287 | * (and not as an integer) | 287 | * (and not as an integer) |
3538 | 288 | * | 288 | * |
3540 | 289 | * chan R channel identifier | 289 | * chan R channel identifier |
3541 | 290 | * pValue R new channel value string copied from this location | 290 | * pValue R new channel value string copied from this location |
3542 | 291 | */ | 291 | */ |
3543 | 292 | #define ca_bput(chan, pValue) \ | 292 | #define ca_bput(chan, pValue) \ |
3544 | @@ -295,9 +295,9 @@ ca_array_put(DBR_STRING, 1u, chan, (const dbr_string_t *) (pValue)) | |||
3545 | 295 | /* | 295 | /* |
3546 | 296 | * ca_rput() | 296 | * ca_rput() |
3547 | 297 | * | 297 | * |
3549 | 298 | * WARNING: this copies the new value from a dbr_float_t | 298 | * WARNING: this copies the new value from a dbr_float_t |
3550 | 299 | * | 299 | * |
3552 | 300 | * chan R channel identifier | 300 | * chan R channel identifier |
3553 | 301 | * pValue R new channel value copied from this location | 301 | * pValue R new channel value copied from this location |
3554 | 302 | */ | 302 | */ |
3555 | 303 | #define ca_rput(chan,pValue) \ | 303 | #define ca_rput(chan,pValue) \ |
3556 | @@ -307,7 +307,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue) | |||
3557 | 307 | * ca_put() | 307 | * ca_put() |
3558 | 308 | * | 308 | * |
3559 | 309 | * type R data type from db_access.h | 309 | * type R data type from db_access.h |
3561 | 310 | * chan R channel identifier | 310 | * chan R channel identifier |
3562 | 311 | * pValue R new channel value copied from this location | 311 | * pValue R new channel value copied from this location |
3563 | 312 | */ | 312 | */ |
3564 | 313 | #define ca_put(type, chan, pValue) ca_array_put (type, 1u, chan, pValue) | 313 | #define ca_put(type, chan, pValue) ca_array_put (type, 1u, chan, pValue) |
3565 | @@ -317,13 +317,13 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue) | |||
3566 | 317 | * | 317 | * |
3567 | 318 | * type R data type from db_access.h | 318 | * type R data type from db_access.h |
3568 | 319 | * count R array element count | 319 | * count R array element count |
3570 | 320 | * chan R channel identifier | 320 | * chan R channel identifier |
3571 | 321 | * pValue R new channel value copied from this location | 321 | * pValue R new channel value copied from this location |
3572 | 322 | */ | 322 | */ |
3573 | 323 | epicsShareFunc int epicsShareAPI ca_array_put | 323 | epicsShareFunc int epicsShareAPI ca_array_put |
3574 | 324 | ( | 324 | ( |
3577 | 325 | chtype type, | 325 | chtype type, |
3578 | 326 | unsigned long count, | 326 | unsigned long count, |
3579 | 327 | chid chanId, | 327 | chid chanId, |
3580 | 328 | const void * pValue | 328 | const void * pValue |
3581 | 329 | ); | 329 | ); |
3582 | @@ -331,8 +331,8 @@ epicsShareFunc int epicsShareAPI ca_array_put | |||
3583 | 331 | /* | 331 | /* |
3584 | 332 | * ca_array_put_callback() | 332 | * ca_array_put_callback() |
3585 | 333 | * | 333 | * |
3588 | 334 | * This routine functions identically to the original ca put request | 334 | * This routine functions identically to the original ca put request |
3589 | 335 | * with the addition of a callback to the user supplied function | 335 | * with the addition of a callback to the user supplied function |
3590 | 336 | * after recod processing completes in the IOC. The arguments | 336 | * after recod processing completes in the IOC. The arguments |
3591 | 337 | * to the user supplied callback function are declared in | 337 | * to the user supplied callback function are declared in |
3592 | 338 | * the structure event_handler_args and include the pointer | 338 | * the structure event_handler_args and include the pointer |
3593 | @@ -340,15 +340,15 @@ epicsShareFunc int epicsShareAPI ca_array_put | |||
3594 | 340 | * | 340 | * |
3595 | 341 | * type R data type from db_access.h | 341 | * type R data type from db_access.h |
3596 | 342 | * count R array element count | 342 | * count R array element count |
3598 | 343 | * chan R channel identifier | 343 | * chan R channel identifier |
3599 | 344 | * pValue R new channel value copied from this location | 344 | * pValue R new channel value copied from this location |
3600 | 345 | * pFunc R pointer to call-back function | 345 | * pFunc R pointer to call-back function |
3601 | 346 | * pArg R copy of this pointer passed to pFunc | 346 | * pArg R copy of this pointer passed to pFunc |
3602 | 347 | */ | 347 | */ |
3603 | 348 | epicsShareFunc int epicsShareAPI ca_array_put_callback | 348 | epicsShareFunc int epicsShareAPI ca_array_put_callback |
3604 | 349 | ( | 349 | ( |
3607 | 350 | chtype type, | 350 | chtype type, |
3608 | 351 | unsigned long count, | 351 | unsigned long count, |
3609 | 352 | chid chanId, | 352 | chid chanId, |
3610 | 353 | const void * pValue, | 353 | const void * pValue, |
3611 | 354 | caEventCallBackFunc * pFunc, | 354 | caEventCallBackFunc * pFunc, |
3612 | @@ -365,10 +365,10 @@ epicsShareFunc int epicsShareAPI ca_array_put_callback | |||
3613 | 365 | /* | 365 | /* |
3614 | 366 | * ca_bget() | 366 | * ca_bget() |
3615 | 367 | * | 367 | * |
3617 | 368 | * WARNING: this copies the new value into a string (dbr_string_t) | 368 | * WARNING: this copies the new value into a string (dbr_string_t) |
3618 | 369 | * (and not into an integer) | 369 | * (and not into an integer) |
3619 | 370 | * | 370 | * |
3621 | 371 | * chan R channel identifier | 371 | * chan R channel identifier |
3622 | 372 | * pValue W channel value copied to this location | 372 | * pValue W channel value copied to this location |
3623 | 373 | */ | 373 | */ |
3624 | 374 | #define ca_bget(chan, pValue) \ | 374 | #define ca_bget(chan, pValue) \ |
3625 | @@ -377,9 +377,9 @@ ca_array_get(DBR_STRING, 1u, chan, (dbr_string_t *)(pValue)) | |||
3626 | 377 | /* | 377 | /* |
3627 | 378 | * ca_rget() | 378 | * ca_rget() |
3628 | 379 | * | 379 | * |
3630 | 380 | * WARNING: this copies the new value into a 32 bit float (dbr_float_t) | 380 | * WARNING: this copies the new value into a 32 bit float (dbr_float_t) |
3631 | 381 | * | 381 | * |
3633 | 382 | * chan R channel identifier | 382 | * chan R channel identifier |
3634 | 383 | * pValue W channel value copied to this location | 383 | * pValue W channel value copied to this location |
3635 | 384 | */ | 384 | */ |
3636 | 385 | #define ca_rget(chan, pValue) \ | 385 | #define ca_rget(chan, pValue) \ |
3637 | @@ -389,7 +389,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) | |||
3638 | 389 | * ca_rget() | 389 | * ca_rget() |
3639 | 390 | * | 390 | * |
3640 | 391 | * type R data type from db_access.h | 391 | * type R data type from db_access.h |
3642 | 392 | * chan R channel identifier | 392 | * chan R channel identifier |
3643 | 393 | * pValue W channel value copied to this location | 393 | * pValue W channel value copied to this location |
3644 | 394 | */ | 394 | */ |
3645 | 395 | #define ca_get(type, chan, pValue) ca_array_get(type, 1u, chan, pValue) | 395 | #define ca_get(type, chan, pValue) ca_array_get(type, 1u, chan, pValue) |
3646 | @@ -399,13 +399,13 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) | |||
3647 | 399 | * | 399 | * |
3648 | 400 | * type R data type from db_access.h | 400 | * type R data type from db_access.h |
3649 | 401 | * count R array element count | 401 | * count R array element count |
3651 | 402 | * chan R channel identifier | 402 | * chan R channel identifier |
3652 | 403 | * pValue W channel value copied to this location | 403 | * pValue W channel value copied to this location |
3653 | 404 | */ | 404 | */ |
3654 | 405 | epicsShareFunc int epicsShareAPI ca_array_get | 405 | epicsShareFunc int epicsShareAPI ca_array_get |
3655 | 406 | ( | 406 | ( |
3658 | 407 | chtype type, | 407 | chtype type, |
3659 | 408 | unsigned long count, | 408 | unsigned long count, |
3660 | 409 | chid chanId, | 409 | chid chanId, |
3661 | 410 | void * pValue | 410 | void * pValue |
3662 | 411 | ); | 411 | ); |
3663 | @@ -419,10 +419,10 @@ epicsShareFunc int epicsShareAPI ca_array_get | |||
3664 | 419 | /* | 419 | /* |
3665 | 420 | * ca_bget_callback() | 420 | * ca_bget_callback() |
3666 | 421 | * | 421 | * |
3668 | 422 | * WARNING: this returns the new value as a string (dbr_string_t) | 422 | * WARNING: this returns the new value as a string (dbr_string_t) |
3669 | 423 | * (and not as an integer) | 423 | * (and not as an integer) |
3670 | 424 | * | 424 | * |
3672 | 425 | * chan R channel identifier | 425 | * chan R channel identifier |
3673 | 426 | * pFunc R pointer to call-back function | 426 | * pFunc R pointer to call-back function |
3674 | 427 | * pArg R copy of this pointer passed to pFunc | 427 | * pArg R copy of this pointer passed to pFunc |
3675 | 428 | */ | 428 | */ |
3676 | @@ -432,9 +432,9 @@ ca_array_get_callback (DBR_STRING, 1u, chan, pFunc, pArg) | |||
3677 | 432 | /* | 432 | /* |
3678 | 433 | * ca_rget_callback() | 433 | * ca_rget_callback() |
3679 | 434 | * | 434 | * |
3681 | 435 | * WARNING: this returns the new value as a float (dbr_float_t) | 435 | * WARNING: this returns the new value as a float (dbr_float_t) |
3682 | 436 | * | 436 | * |
3684 | 437 | * chan R channel identifier | 437 | * chan R channel identifier |
3685 | 438 | * pFunc R pointer to call-back function | 438 | * pFunc R pointer to call-back function |
3686 | 439 | * pArg R copy of this pointer passed to pFunc | 439 | * pArg R copy of this pointer passed to pFunc |
3687 | 440 | */ | 440 | */ |
3688 | @@ -445,7 +445,7 @@ ca_array_get_callback (DBR_FLOAT, 1u, chan, pFunc, pArg) | |||
3689 | 445 | * ca_get_callback() | 445 | * ca_get_callback() |
3690 | 446 | * | 446 | * |
3691 | 447 | * type R data type from db_access.h | 447 | * type R data type from db_access.h |
3693 | 448 | * chan R channel identifier | 448 | * chan R channel identifier |
3694 | 449 | * pFunc R pointer to call-back function | 449 | * pFunc R pointer to call-back function |
3695 | 450 | * pArg R copy of this pointer passed to pFunc | 450 | * pArg R copy of this pointer passed to pFunc |
3696 | 451 | */ | 451 | */ |
3697 | @@ -457,14 +457,14 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg) | |||
3698 | 457 | * | 457 | * |
3699 | 458 | * type R data type from db_access.h | 458 | * type R data type from db_access.h |
3700 | 459 | * count R array element count | 459 | * count R array element count |
3702 | 460 | * chan R channel identifier | 460 | * chan R channel identifier |
3703 | 461 | * pFunc R pointer to call-back function | 461 | * pFunc R pointer to call-back function |
3704 | 462 | * pArg R copy of this pointer passed to pFunc | 462 | * pArg R copy of this pointer passed to pFunc |
3705 | 463 | */ | 463 | */ |
3706 | 464 | epicsShareFunc int epicsShareAPI ca_array_get_callback | 464 | epicsShareFunc int epicsShareAPI ca_array_get_callback |
3707 | 465 | ( | 465 | ( |
3710 | 466 | chtype type, | 466 | chtype type, |
3711 | 467 | unsigned long count, | 467 | unsigned long count, |
3712 | 468 | chid chanId, | 468 | chid chanId, |
3713 | 469 | caEventCallBackFunc * pFunc, | 469 | caEventCallBackFunc * pFunc, |
3714 | 470 | void * pArg | 470 | void * pArg |
3715 | @@ -476,7 +476,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback | |||
3716 | 476 | /* NOTES: */ | 476 | /* NOTES: */ |
3717 | 477 | /* 1) Evid may be omited by passing a NULL pointer */ | 477 | /* 1) Evid may be omited by passing a NULL pointer */ |
3718 | 478 | /* */ | 478 | /* */ |
3720 | 479 | /* 2) An array count of zero specifies the native db count */ | 479 | /* 2) An array count of zero specifies the native db count */ |
3721 | 480 | /* */ | 480 | /* */ |
3722 | 481 | /************************************************************************/ | 481 | /************************************************************************/ |
3723 | 482 | 482 | ||
3724 | @@ -485,7 +485,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback | |||
3725 | 485 | * | 485 | * |
3726 | 486 | * type R data type from db_access.h | 486 | * type R data type from db_access.h |
3727 | 487 | * count R array element count | 487 | * count R array element count |
3729 | 488 | * chan R channel identifier | 488 | * chan R channel identifier |
3730 | 489 | * mask R event mask - one of {DBE_VALUE, DBE_ALARM, DBE_LOG} | 489 | * mask R event mask - one of {DBE_VALUE, DBE_ALARM, DBE_LOG} |
3731 | 490 | * pFunc R pointer to call-back function | 490 | * pFunc R pointer to call-back function |
3732 | 491 | * pArg R copy of this pointer passed to pFunc | 491 | * pArg R copy of this pointer passed to pFunc |
3733 | @@ -493,8 +493,8 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback | |||
3734 | 493 | */ | 493 | */ |
3735 | 494 | epicsShareFunc int epicsShareAPI ca_create_subscription | 494 | epicsShareFunc int epicsShareAPI ca_create_subscription |
3736 | 495 | ( | 495 | ( |
3739 | 496 | chtype type, | 496 | chtype type, |
3740 | 497 | unsigned long count, | 497 | unsigned long count, |
3741 | 498 | chid chanId, | 498 | chid chanId, |
3742 | 499 | long mask, | 499 | long mask, |
3743 | 500 | caEventCallBackFunc * pFunc, | 500 | caEventCallBackFunc * pFunc, |
3744 | @@ -535,24 +535,24 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id ); | |||
3745 | 535 | /* FLOW OF TYPICAL APPLICATION */ | 535 | /* FLOW OF TYPICAL APPLICATION */ |
3746 | 536 | /* */ | 536 | /* */ |
3747 | 537 | /* search() ! Obtain Channel ids */ | 537 | /* search() ! Obtain Channel ids */ |
3749 | 538 | /* . ! " */ | 538 | /* . ! " */ |
3750 | 539 | /* . ! " */ | 539 | /* . ! " */ |
3751 | 540 | /* pend_io ! wait for channels to connect */ | 540 | /* pend_io ! wait for channels to connect */ |
3752 | 541 | /* */ | 541 | /* */ |
3753 | 542 | /* get() ! several requests for remote info */ | 542 | /* get() ! several requests for remote info */ |
3757 | 543 | /* get() ! " */ | 543 | /* get() ! " */ |
3758 | 544 | /* add_event() ! " */ | 544 | /* add_event() ! " */ |
3759 | 545 | /* get() ! " */ | 545 | /* get() ! " */ |
3760 | 546 | /* . */ | 546 | /* . */ |
3761 | 547 | /* . */ | 547 | /* . */ |
3762 | 548 | /* . */ | 548 | /* . */ |
3763 | 549 | /* flush_io() ! send get requests */ | 549 | /* flush_io() ! send get requests */ |
3764 | 550 | /* ! optional parallel processing */ | 550 | /* ! optional parallel processing */ |
3767 | 551 | /* . ! " */ | 551 | /* . ! " */ |
3768 | 552 | /* . ! " */ | 552 | /* . ! " */ |
3769 | 553 | /* pend_io() ! wait for replies from get requests */ | 553 | /* pend_io() ! wait for replies from get requests */ |
3770 | 554 | /* . ! access to requested data */ | 554 | /* . ! access to requested data */ |
3772 | 555 | /* . ! " */ | 555 | /* . ! " */ |
3773 | 556 | /* pend_event() ! wait for requested events */ | 556 | /* pend_event() ! wait for requested events */ |
3774 | 557 | /* */ | 557 | /* */ |
3775 | 558 | /************************************************************************/ | 558 | /************************************************************************/ |
3776 | @@ -562,7 +562,7 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id ); | |||
3777 | 562 | /* functions specified with add_event when events occur. If the */ | 562 | /* functions specified with add_event when events occur. If the */ |
3778 | 563 | /* timeout is specified as 0 an infinite timeout is assumed. */ | 563 | /* timeout is specified as 0 an infinite timeout is assumed. */ |
3779 | 564 | /* ca_flush_io() is called by this routine. If ca_pend_io () */ | 564 | /* ca_flush_io() is called by this routine. If ca_pend_io () */ |
3781 | 565 | /* is called when no IO is outstanding then it will return immediately */ | 565 | /* is called when no IO is outstanding then it will return immediately */ |
3782 | 566 | /* without processing. */ | 566 | /* without processing. */ |
3783 | 567 | /************************************************************************/ | 567 | /************************************************************************/ |
3784 | 568 | 568 | ||
3785 | @@ -577,8 +577,8 @@ epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut); | |||
3786 | 577 | /* | 577 | /* |
3787 | 578 | * ca_pend_io() | 578 | * ca_pend_io() |
3788 | 579 | * | 579 | * |
3791 | 580 | * timeOut R wait for this delay in seconds but return early | 580 | * timeOut R wait for this delay in seconds but return early |
3792 | 581 | * if all get requests (or search requests with null | 581 | * if all get requests (or search requests with null |
3793 | 582 | * connection handler pointer have completed) | 582 | * connection handler pointer have completed) |
3794 | 583 | */ | 583 | */ |
3795 | 584 | epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut); | 584 | epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut); |
3796 | @@ -589,7 +589,7 @@ epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early); | |||
3797 | 589 | /* | 589 | /* |
3798 | 590 | * ca_test_io() | 590 | * ca_test_io() |
3799 | 591 | * | 591 | * |
3801 | 592 | * returns TRUE when get requests (or search requests with null | 592 | * returns TRUE when get requests (or search requests with null |
3802 | 593 | * connection handler pointer) are outstanding | 593 | * connection handler pointer) are outstanding |
3803 | 594 | */ | 594 | */ |
3804 | 595 | epicsShareFunc int epicsShareAPI ca_test_io (void); | 595 | epicsShareFunc int epicsShareAPI ca_test_io (void); |
3805 | @@ -611,8 +611,8 @@ epicsShareFunc int epicsShareAPI ca_flush_io (void); | |||
3806 | 611 | */ | 611 | */ |
3807 | 612 | epicsShareFunc void epicsShareAPI ca_signal | 612 | epicsShareFunc void epicsShareAPI ca_signal |
3808 | 613 | ( | 613 | ( |
3811 | 614 | long errorCode, | 614 | long errorCode, |
3812 | 615 | const char *pCtxStr | 615 | const char *pCtxStr |
3813 | 616 | ); | 616 | ); |
3814 | 617 | 617 | ||
3815 | 618 | /* | 618 | /* |
3816 | @@ -625,10 +625,10 @@ epicsShareFunc void epicsShareAPI ca_signal | |||
3817 | 625 | */ | 625 | */ |
3818 | 626 | epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno | 626 | epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno |
3819 | 627 | ( | 627 | ( |
3824 | 628 | long errorCode, | 628 | long errorCode, |
3825 | 629 | const char *pCtxStr, | 629 | const char *pCtxStr, |
3826 | 630 | const char *pFileStr, | 630 | const char *pFileStr, |
3827 | 631 | int lineNo | 631 | int lineNo |
3828 | 632 | ); | 632 | ); |
3829 | 633 | 633 | ||
3830 | 634 | /* | 634 | /* |
3831 | @@ -639,7 +639,7 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno | |||
3832 | 639 | * pFormat R printf dtyle format string (and optional arguments) | 639 | * pFormat R printf dtyle format string (and optional arguments) |
3833 | 640 | * | 640 | * |
3834 | 641 | */ | 641 | */ |
3836 | 642 | epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, | 642 | epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, |
3837 | 643 | int lineno, const char *pFormat, ...); | 643 | int lineno, const char *pFormat, ...); |
3838 | 644 | 644 | ||
3839 | 645 | /* | 645 | /* |
3840 | @@ -651,13 +651,13 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char | |||
3841 | 651 | */ | 651 | */ |
3842 | 652 | epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel); | 652 | epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel); |
3843 | 653 | /* thread safe version */ | 653 | /* thread safe version */ |
3845 | 654 | epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan, | 654 | epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan, |
3846 | 655 | char *pBuf, unsigned bufLength ); | 655 | char *pBuf, unsigned bufLength ); |
3847 | 656 | 656 | ||
3848 | 657 | /* | 657 | /* |
3849 | 658 | * CA_ADD_FD_REGISTRATION | 658 | * CA_ADD_FD_REGISTRATION |
3850 | 659 | * | 659 | * |
3852 | 660 | * call their function with their argument whenever | 660 | * call their function with their argument whenever |
3853 | 661 | * a new fd is added or removed | 661 | * a new fd is added or removed |
3854 | 662 | * (for use with a manager of the select system call under UNIX) | 662 | * (for use with a manager of the select system call under UNIX) |
3855 | 663 | * | 663 | * |
3856 | @@ -665,7 +665,7 @@ epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan, | |||
3857 | 665 | * if (!opened) then fd was deleted | 665 | * if (!opened) then fd was deleted |
3858 | 666 | * | 666 | * |
3859 | 667 | */ | 667 | */ |
3861 | 668 | typedef void CAFDHANDLER (void *parg, int fd, int opened); | 668 | typedef void CAFDHANDLER (void *parg, int fd, int opened); |
3862 | 669 | 669 | ||
3863 | 670 | /* | 670 | /* |
3864 | 671 | * ca_add_fd_registration() | 671 | * ca_add_fd_registration() |
3865 | @@ -696,7 +696,7 @@ epicsShareFunc int epicsShareAPI ca_add_fd_registration | |||
3866 | 696 | * | 696 | * |
3867 | 697 | * create a sync group | 697 | * create a sync group |
3868 | 698 | * | 698 | * |
3870 | 699 | * pgid W pointer to sync group id that will be written | 699 | * pgid W pointer to sync group id that will be written |
3871 | 700 | */ | 700 | */ |
3872 | 701 | epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); | 701 | epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); |
3873 | 702 | 702 | ||
3874 | @@ -705,16 +705,16 @@ epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); | |||
3875 | 705 | * | 705 | * |
3876 | 706 | * delete a sync group | 706 | * delete a sync group |
3877 | 707 | * | 707 | * |
3879 | 708 | * gid R sync group id | 708 | * gid R sync group id |
3880 | 709 | */ | 709 | */ |
3881 | 710 | epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); | 710 | epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); |
3882 | 711 | 711 | ||
3883 | 712 | /* | 712 | /* |
3884 | 713 | * ca_sg_block() | 713 | * ca_sg_block() |
3885 | 714 | * | 714 | * |
3887 | 715 | * block for IO performed within a sync group to complete | 715 | * block for IO performed within a sync group to complete |
3888 | 716 | * | 716 | * |
3890 | 717 | * gid R sync group id | 717 | * gid R sync group id |
3891 | 718 | * timeout R wait for this duration prior to timing out | 718 | * timeout R wait for this duration prior to timing out |
3892 | 719 | * and returning ECA_TIMEOUT | 719 | * and returning ECA_TIMEOUT |
3893 | 720 | */ | 720 | */ |
3894 | @@ -726,7 +726,7 @@ epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real tim | |||
3895 | 726 | * test for sync group IO operations in progress | 726 | * test for sync group IO operations in progress |
3896 | 727 | * | 727 | * |
3897 | 728 | * gid R sync group id | 728 | * gid R sync group id |
3899 | 729 | * | 729 | * |
3900 | 730 | * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE | 730 | * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE |
3901 | 731 | */ | 731 | */ |
3902 | 732 | epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); | 732 | epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); |
3903 | @@ -747,16 +747,16 @@ epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); | |||
3904 | 747 | * gid R sync group id | 747 | * gid R sync group id |
3905 | 748 | * type R data type from db_access.h | 748 | * type R data type from db_access.h |
3906 | 749 | * count R array element count | 749 | * count R array element count |
3908 | 750 | * chan R channel identifier | 750 | * chan R channel identifier |
3909 | 751 | * pValue W channel value copied to this location | 751 | * pValue W channel value copied to this location |
3910 | 752 | */ | 752 | */ |
3911 | 753 | epicsShareFunc int epicsShareAPI ca_sg_array_get | 753 | epicsShareFunc int epicsShareAPI ca_sg_array_get |
3912 | 754 | ( | 754 | ( |
3913 | 755 | const CA_SYNC_GID gid, | 755 | const CA_SYNC_GID gid, |
3915 | 756 | chtype type, | 756 | chtype type, |
3916 | 757 | unsigned long count, | 757 | unsigned long count, |
3917 | 758 | chid chan, | 758 | chid chan, |
3919 | 759 | void *pValue | 759 | void *pValue |
3920 | 760 | ); | 760 | ); |
3921 | 761 | 761 | ||
3922 | 762 | #define ca_sg_get(gid, type, chan, pValue) \ | 762 | #define ca_sg_get(gid, type, chan, pValue) \ |
3923 | @@ -771,16 +771,16 @@ ca_sg_array_get (gid, type, 1u, chan, pValue) | |||
3924 | 771 | * gid R sync group id | 771 | * gid R sync group id |
3925 | 772 | * type R data type from db_access.h | 772 | * type R data type from db_access.h |
3926 | 773 | * count R array element count | 773 | * count R array element count |
3928 | 774 | * chan R channel identifier | 774 | * chan R channel identifier |
3929 | 775 | * pValue R new channel value copied from this location | 775 | * pValue R new channel value copied from this location |
3930 | 776 | */ | 776 | */ |
3931 | 777 | epicsShareFunc int epicsShareAPI ca_sg_array_put | 777 | epicsShareFunc int epicsShareAPI ca_sg_array_put |
3932 | 778 | ( | 778 | ( |
3933 | 779 | const CA_SYNC_GID gid, | 779 | const CA_SYNC_GID gid, |
3935 | 780 | chtype type, | 780 | chtype type, |
3936 | 781 | unsigned long count, | 781 | unsigned long count, |
3937 | 782 | chid chan, | 782 | chid chan, |
3939 | 783 | const void *pValue | 783 | const void *pValue |
3940 | 784 | ); | 784 | ); |
3941 | 785 | 785 | ||
3942 | 786 | #define ca_sg_put(gid, type, chan, pValue) \ | 786 | #define ca_sg_put(gid, type, chan, pValue) \ |
3943 | @@ -801,11 +801,11 @@ epicsShareFunc void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, cons | |||
3944 | 801 | /* | 801 | /* |
3945 | 802 | * ca_v42_ok() | 802 | * ca_v42_ok() |
3946 | 803 | * | 803 | * |
3948 | 804 | * Put call back is available if the CA server is on version is 4.2 | 804 | * Put call back is available if the CA server is on version is 4.2 |
3949 | 805 | * or higher. | 805 | * or higher. |
3950 | 806 | * | 806 | * |
3951 | 807 | * chan R channel identifier | 807 | * chan R channel identifier |
3953 | 808 | * | 808 | * |
3954 | 809 | * (returns true or false) | 809 | * (returns true or false) |
3955 | 810 | */ | 810 | */ |
3956 | 811 | epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan); | 811 | epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan); |
3957 | @@ -865,12 +865,12 @@ ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) | |||
3958 | 865 | #define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ | 865 | #define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ |
3959 | 866 | ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) | 866 | ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) |
3960 | 867 | epicsShareFunc int epicsShareAPI ca_build_and_connect | 867 | epicsShareFunc int epicsShareAPI ca_build_and_connect |
3962 | 868 | ( const char *pChanName, chtype, unsigned long, | 868 | ( const char *pChanName, chtype, unsigned long, |
3963 | 869 | chid * pChanID, void *, caCh * pFunc, void * pArg ); | 869 | chid * pChanID, void *, caCh * pFunc, void * pArg ); |
3964 | 870 | #define ca_search(pChanName, pChanID)\ | 870 | #define ca_search(pChanName, pChanID)\ |
3965 | 871 | ca_search_and_connect (pChanName, pChanID, 0, 0) | 871 | ca_search_and_connect (pChanName, pChanID, 0, 0) |
3966 | 872 | epicsShareFunc int epicsShareAPI ca_search_and_connect | 872 | epicsShareFunc int epicsShareAPI ca_search_and_connect |
3968 | 873 | ( const char * pChanName, chid * pChanID, | 873 | ( const char * pChanName, chid * pChanID, |
3969 | 874 | caCh *pFunc, void * pArg ); | 874 | caCh *pFunc, void * pArg ); |
3970 | 875 | epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid); | 875 | epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid); |
3971 | 876 | epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID ); | 876 | epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID ); |
3972 | diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h | |||
3973 | index 5393096..fd67a5f 100644 | |||
3974 | --- a/modules/ca/src/client/caerr.h | |||
3975 | +++ b/modules/ca/src/client/caerr.h | |||
3976 | @@ -5,7 +5,7 @@ | |||
3977 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
3978 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
3979 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
3981 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
3982 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
3983 | 10 | /* | 10 | /* |
3984 | 11 | * | 11 | * |
3985 | @@ -17,7 +17,7 @@ | |||
3986 | 17 | * | 17 | * |
3987 | 18 | * Author: Jeffrey O. Hill | 18 | * Author: Jeffrey O. Hill |
3988 | 19 | * | 19 | * |
3990 | 20 | */ | 20 | */ |
3991 | 21 | 21 | ||
3992 | 22 | 22 | ||
3993 | 23 | #ifndef INCLcaerrh | 23 | #ifndef INCLcaerrh |
3994 | @@ -78,9 +78,9 @@ | |||
3995 | 78 | (CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY)) | 78 | (CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY)) |
3996 | 79 | 79 | ||
3997 | 80 | /* | 80 | /* |
3999 | 81 | * In the lines below "defunct" indicates that current release | 81 | * In the lines below "defunct" indicates that current release |
4000 | 82 | * servers and client library will not return this error code, but | 82 | * servers and client library will not return this error code, but |
4002 | 83 | * servers on earlier releases that communicate with current clients | 83 | * servers on earlier releases that communicate with current clients |
4003 | 84 | * might still generate exceptions with these error constants | 84 | * might still generate exceptions with these error constants |
4004 | 85 | */ | 85 | */ |
4005 | 86 | #define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */ | 86 | #define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */ |
4006 | @@ -89,10 +89,10 @@ | |||
4007 | 89 | #define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */ | 89 | #define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */ |
4008 | 90 | #define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */ | 90 | #define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */ |
4009 | 91 | #define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */ | 91 | #define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */ |
4011 | 92 | #define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6) | 92 | #define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6) |
4012 | 93 | #define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */ | 93 | #define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */ |
4013 | 94 | #define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */ | 94 | #define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */ |
4015 | 95 | #define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9) | 95 | #define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9) |
4016 | 96 | #define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10) | 96 | #define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10) |
4017 | 97 | #define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */ | 97 | #define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */ |
4018 | 98 | #define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */ | 98 | #define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */ |
4019 | diff --git a/modules/ca/src/client/caeventmask.h b/modules/ca/src/client/caeventmask.h | |||
4020 | index 5f09145..4f0f2ec 100644 | |||
4021 | --- a/modules/ca/src/client/caeventmask.h | |||
4022 | +++ b/modules/ca/src/client/caeventmask.h | |||
4023 | @@ -5,7 +5,7 @@ | |||
4024 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4025 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4026 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4028 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4029 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4030 | 10 | 10 | ||
4031 | 11 | #ifndef INCLcaeventmaskh | 11 | #ifndef INCLcaeventmaskh |
4032 | @@ -13,12 +13,12 @@ | |||
4033 | 13 | 13 | ||
4034 | 14 | /* | 14 | /* |
4035 | 15 | event selections | 15 | event selections |
4038 | 16 | (If any more than 8 of these are needed then update the | 16 | (If any more than 8 of these are needed then update the |
4039 | 17 | select field in the event_block struct in db_event.c from | 17 | select field in the event_block struct in db_event.c from |
4040 | 18 | unsigned char to unsigned short) | 18 | unsigned char to unsigned short) |
4041 | 19 | 19 | ||
4042 | 20 | 20 | ||
4044 | 21 | DBE_VALUE | 21 | DBE_VALUE |
4045 | 22 | Trigger an event when a significant change in the channel's value | 22 | Trigger an event when a significant change in the channel's value |
4046 | 23 | occurs. Relies on the monitor deadband field under DCT. | 23 | occurs. Relies on the monitor deadband field under DCT. |
4047 | 24 | 24 | ||
4048 | diff --git a/modules/ca/src/client/casw.cpp b/modules/ca/src/client/casw.cpp | |||
4049 | index ed17660..e527a3c 100644 | |||
4050 | --- a/modules/ca/src/client/casw.cpp | |||
4051 | +++ b/modules/ca/src/client/casw.cpp | |||
4052 | @@ -5,10 +5,10 @@ | |||
4053 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4054 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4055 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4057 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4058 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4059 | 10 | 10 | ||
4061 | 11 | /* | 11 | /* |
4062 | 12 | * | 12 | * |
4063 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
4064 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
4065 | @@ -23,7 +23,7 @@ | |||
4066 | 23 | 23 | ||
4067 | 24 | #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" | 24 | #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" |
4068 | 25 | 25 | ||
4070 | 26 | #include "envDefs.h" | 26 | #include "envDefs.h" |
4071 | 27 | #include "errlog.h" | 27 | #include "errlog.h" |
4072 | 28 | #include "osiWireFormat.h" | 28 | #include "osiWireFormat.h" |
4073 | 29 | 29 | ||
4074 | @@ -40,8 +40,8 @@ public: | |||
4075 | 40 | void release ( void * ); | 40 | void release ( void * ); |
4076 | 41 | private: | 41 | private: |
4077 | 42 | tsFreeList < class bhe, 0x100 > freeList; | 42 | tsFreeList < class bhe, 0x100 > freeList; |
4080 | 43 | bheFreeStoreMgr ( const bheFreeStoreMgr & ); | 43 | bheFreeStoreMgr ( const bheFreeStoreMgr & ); |
4081 | 44 | bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & ); | 44 | bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & ); |
4082 | 45 | }; | 45 | }; |
4083 | 46 | 46 | ||
4084 | 47 | void * bheFreeStoreMgr::allocate ( size_t size ) | 47 | void * bheFreeStoreMgr::allocate ( size_t size ) |
4085 | @@ -108,7 +108,7 @@ int main ( int argc, char ** argv ) | |||
4086 | 108 | sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); | 108 | sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); |
4087 | 109 | if ( sock == INVALID_SOCKET ) { | 109 | if ( sock == INVALID_SOCKET ) { |
4088 | 110 | char sockErrBuf[64]; | 110 | char sockErrBuf[64]; |
4090 | 111 | epicsSocketConvertErrnoToString ( | 111 | epicsSocketConvertErrnoToString ( |
4091 | 112 | sockErrBuf, sizeof ( sockErrBuf ) ); | 112 | sockErrBuf, sizeof ( sockErrBuf ) ); |
4092 | 113 | errlogPrintf ("casw: unable to create datagram socket because = \"%s\"\n", | 113 | errlogPrintf ("casw: unable to create datagram socket because = \"%s\"\n", |
4093 | 114 | sockErrBuf ); | 114 | sockErrBuf ); |
4094 | @@ -122,7 +122,7 @@ int main ( int argc, char ** argv ) | |||
4095 | 122 | status = bind ( sock, &addr.sa, sizeof (addr) ); | 122 | status = bind ( sock, &addr.sa, sizeof (addr) ); |
4096 | 123 | if ( status < 0 ) { | 123 | if ( status < 0 ) { |
4097 | 124 | char sockErrBuf[64]; | 124 | char sockErrBuf[64]; |
4099 | 125 | epicsSocketConvertErrnoToString ( | 125 | epicsSocketConvertErrnoToString ( |
4100 | 126 | sockErrBuf, sizeof ( sockErrBuf ) ); | 126 | sockErrBuf, sizeof ( sockErrBuf ) ); |
4101 | 127 | epicsSocketDestroy ( sock ); | 127 | epicsSocketDestroy ( sock ); |
4102 | 128 | errlogPrintf ( "casw: unable to bind to an unconstrained address because = \"%s\"\n", | 128 | errlogPrintf ( "casw: unable to bind to an unconstrained address because = \"%s\"\n", |
4103 | @@ -134,7 +134,7 @@ int main ( int argc, char ** argv ) | |||
4104 | 134 | status = socket_ioctl ( sock, FIONBIO, &yes ); | 134 | status = socket_ioctl ( sock, FIONBIO, &yes ); |
4105 | 135 | if ( status < 0 ) { | 135 | if ( status < 0 ) { |
4106 | 136 | char sockErrBuf[64]; | 136 | char sockErrBuf[64]; |
4108 | 137 | epicsSocketConvertErrnoToString ( | 137 | epicsSocketConvertErrnoToString ( |
4109 | 138 | sockErrBuf, sizeof ( sockErrBuf ) ); | 138 | sockErrBuf, sizeof ( sockErrBuf ) ); |
4110 | 139 | epicsSocketDestroy ( sock ); | 139 | epicsSocketDestroy ( sock ); |
4111 | 140 | errlogPrintf ( "casw: unable to set socket to nonblocking state because \"%s\"\n", | 140 | errlogPrintf ( "casw: unable to set socket to nonblocking state because \"%s\"\n", |
4112 | @@ -169,7 +169,7 @@ int main ( int argc, char ** argv ) | |||
4113 | 169 | status = socket_ioctl ( sock, FIONBIO, &no ); | 169 | status = socket_ioctl ( sock, FIONBIO, &no ); |
4114 | 170 | if ( status < 0 ) { | 170 | if ( status < 0 ) { |
4115 | 171 | char sockErrBuf[64]; | 171 | char sockErrBuf[64]; |
4117 | 172 | epicsSocketConvertErrnoToString ( | 172 | epicsSocketConvertErrnoToString ( |
4118 | 173 | sockErrBuf, sizeof ( sockErrBuf ) ); | 173 | sockErrBuf, sizeof ( sockErrBuf ) ); |
4119 | 174 | epicsSocketDestroy ( sock ); | 174 | epicsSocketDestroy ( sock ); |
4120 | 175 | errlogPrintf ( "casw: unable to set socket to blocking state because \"%s\"\n", | 175 | errlogPrintf ( "casw: unable to set socket to blocking state because \"%s\"\n", |
4121 | @@ -185,7 +185,7 @@ int main ( int argc, char ** argv ) | |||
4122 | 185 | &addr.sa, &addrSize ); | 185 | &addr.sa, &addrSize ); |
4123 | 186 | if ( status <= 0 ) { | 186 | if ( status <= 0 ) { |
4124 | 187 | char sockErrBuf[64]; | 187 | char sockErrBuf[64]; |
4126 | 188 | epicsSocketConvertErrnoToString ( | 188 | epicsSocketConvertErrnoToString ( |
4127 | 189 | sockErrBuf, sizeof ( sockErrBuf ) ); | 189 | sockErrBuf, sizeof ( sockErrBuf ) ); |
4128 | 190 | epicsSocketDestroy ( sock ); | 190 | epicsSocketDestroy ( sock ); |
4129 | 191 | errlogPrintf ("casw: error from recv was = \"%s\"\n", | 191 | errlogPrintf ("casw: error from recv was = \"%s\"\n", |
4130 | @@ -196,7 +196,7 @@ int main ( int argc, char ** argv ) | |||
4131 | 196 | if ( addr.sa.sa_family != AF_INET ) { | 196 | if ( addr.sa.sa_family != AF_INET ) { |
4132 | 197 | continue; | 197 | continue; |
4133 | 198 | } | 198 | } |
4135 | 199 | 199 | ||
4136 | 200 | unsigned byteCount = static_cast <unsigned> ( status ); | 200 | unsigned byteCount = static_cast <unsigned> ( status ); |
4137 | 201 | pCurMsg = reinterpret_cast < const caHdr * > ( ( pCurBuf = buf ) ); | 201 | pCurMsg = reinterpret_cast < const caHdr * > ( ( pCurBuf = buf ) ); |
4138 | 202 | while ( byteCount ) { | 202 | while ( byteCount ) { |
4139 | @@ -213,9 +213,9 @@ int main ( int argc, char ** argv ) | |||
4140 | 213 | epicsTime previousTime; | 213 | epicsTime previousTime; |
4141 | 214 | struct sockaddr_in ina; | 214 | struct sockaddr_in ina; |
4142 | 215 | 215 | ||
4144 | 216 | /* | 216 | /* |
4145 | 217 | * this allows a fan-out server to potentially | 217 | * this allows a fan-out server to potentially |
4147 | 218 | * insert the true address of the CA server | 218 | * insert the true address of the CA server |
4148 | 219 | * | 219 | * |
4149 | 220 | * old servers: | 220 | * old servers: |
4150 | 221 | * 1) set this field to one of the ip addresses of the host _or_ | 221 | * 1) set this field to one of the ip addresses of the host _or_ |
4151 | @@ -252,8 +252,8 @@ int main ( int argc, char ** argv ) | |||
4152 | 252 | bhe *pBHE = beaconTable.lookup ( ina ); | 252 | bhe *pBHE = beaconTable.lookup ( ina ); |
4153 | 253 | if ( pBHE ) { | 253 | if ( pBHE ) { |
4154 | 254 | previousTime = pBHE->updateTime ( guard ); | 254 | previousTime = pBHE->updateTime ( guard ); |
4157 | 255 | anomaly = pBHE->updatePeriod ( | 255 | anomaly = pBHE->updatePeriod ( |
4158 | 256 | guard, programBeginTime, | 256 | guard, programBeginTime, |
4159 | 257 | currentTime, beaconNumber, protocolRevision ); | 257 | currentTime, beaconNumber, protocolRevision ); |
4160 | 258 | } | 258 | } |
4161 | 259 | else { | 259 | else { |
4162 | @@ -264,7 +264,7 @@ int main ( int argc, char ** argv ) | |||
4163 | 264 | * time that we have seen a server's beacon | 264 | * time that we have seen a server's beacon |
4164 | 265 | * shortly after the program started up) | 265 | * shortly after the program started up) |
4165 | 266 | */ | 266 | */ |
4167 | 267 | pBHE = new ( bheFreeList ) | 267 | pBHE = new ( bheFreeList ) |
4168 | 268 | bhe ( mutex, currentTime, beaconNumber, ina ); | 268 | bhe ( mutex, currentTime, beaconNumber, ina ); |
4169 | 269 | if ( pBHE ) { | 269 | if ( pBHE ) { |
4170 | 270 | if ( beaconTable.add ( *pBHE ) < 0 ) { | 270 | if ( beaconTable.add ( *pBHE ) < 0 ) { |
4171 | @@ -275,7 +275,7 @@ int main ( int argc, char ** argv ) | |||
4172 | 275 | } | 275 | } |
4173 | 276 | if ( anomaly || interest > 1 ) { | 276 | if ( anomaly || interest > 1 ) { |
4174 | 277 | char date[64]; | 277 | char date[64]; |
4176 | 278 | currentTime.strftime ( date, sizeof ( date ), | 278 | currentTime.strftime ( date, sizeof ( date ), |
4177 | 279 | "%Y-%m-%d %H:%M:%S.%09f"); | 279 | "%Y-%m-%d %H:%M:%S.%09f"); |
4178 | 280 | char host[64]; | 280 | char host[64]; |
4179 | 281 | ipAddrToA ( &ina, host, sizeof ( host ) ); | 281 | ipAddrToA ( &ina, host, sizeof ( host ) ); |
4180 | @@ -288,11 +288,11 @@ int main ( int argc, char ** argv ) | |||
4181 | 288 | pPrefix = " "; | 288 | pPrefix = " "; |
4182 | 289 | } | 289 | } |
4183 | 290 | } | 290 | } |
4185 | 291 | printf ( "%s%-40s %s\n", | 291 | printf ( "%s%-40s %s\n", |
4186 | 292 | pPrefix, host, date ); | 292 | pPrefix, host, date ); |
4187 | 293 | if ( anomaly && interest > 0 ) { | 293 | if ( anomaly && interest > 0 ) { |
4190 | 294 | printf ( "\testimate=%f current=%f\n", | 294 | printf ( "\testimate=%f current=%f\n", |
4191 | 295 | pBHE->period ( guard ), | 295 | pBHE->period ( guard ), |
4192 | 296 | currentTime - previousTime ); | 296 | currentTime - previousTime ); |
4193 | 297 | } | 297 | } |
4194 | 298 | fflush(stdout); | 298 | fflush(stdout); |
4195 | diff --git a/modules/ca/src/client/catime.c b/modules/ca/src/client/catime.c | |||
4196 | index cccd940..ab758d3 100644 | |||
4197 | --- a/modules/ca/src/client/catime.c | |||
4198 | +++ b/modules/ca/src/client/catime.c | |||
4199 | @@ -5,17 +5,17 @@ | |||
4200 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4201 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4202 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4204 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4205 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4206 | 10 | /* | 10 | /* |
4207 | 11 | * | 11 | * |
4209 | 12 | * CA performance test | 12 | * CA performance test |
4210 | 13 | * | 13 | * |
4212 | 14 | * History | 14 | * History |
4213 | 15 | * joh 09-12-89 Initial release | 15 | * joh 09-12-89 Initial release |
4214 | 16 | * joh 12-20-94 portability | 16 | * joh 12-20-94 portability |
4215 | 17 | * | 17 | * |
4217 | 18 | * | 18 | * |
4218 | 19 | */ | 19 | */ |
4219 | 20 | 20 | ||
4220 | 21 | #include <stdio.h> | 21 | #include <stdio.h> |
4221 | @@ -45,7 +45,7 @@ typedef struct testItem { | |||
4222 | 45 | char name[128]; | 45 | char name[128]; |
4223 | 46 | int type; | 46 | int type; |
4224 | 47 | int count; | 47 | int count; |
4226 | 48 | void * pValue; | 48 | void * pValue; |
4227 | 49 | } ti; | 49 | } ti; |
4228 | 50 | 50 | ||
4229 | 51 | typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter ); | 51 | typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter ); |
4230 | @@ -144,7 +144,7 @@ unsigned *pInlineIter | |||
4231 | 144 | { | 144 | { |
4232 | 145 | int status; | 145 | int status; |
4233 | 146 | unsigned i; | 146 | unsigned i; |
4235 | 147 | 147 | ||
4236 | 148 | for (i=0u; i<iterations; i++) { | 148 | for (i=0u; i<iterations; i++) { |
4237 | 149 | status = ca_clear_channel (pItems[i].chix); | 149 | status = ca_clear_channel (pItems[i].chix); |
4238 | 150 | SEVCHK (status, NULL); | 150 | SEVCHK (status, NULL); |
4239 | @@ -166,7 +166,7 @@ unsigned *pInlineIter | |||
4240 | 166 | ti *pi; | 166 | ti *pi; |
4241 | 167 | int status; | 167 | int status; |
4242 | 168 | dbr_int_t val; | 168 | dbr_int_t val; |
4244 | 169 | 169 | ||
4245 | 170 | for (pi=pItems; pi < &pItems[iterations]; pi++) { | 170 | for (pi=pItems; pi < &pItems[iterations]; pi++) { |
4246 | 171 | status = ca_array_put( | 171 | status = ca_array_put( |
4247 | 172 | pi->type, | 172 | pi->type, |
4248 | @@ -257,7 +257,7 @@ unsigned *pInlineIter | |||
4249 | 257 | { | 257 | { |
4250 | 258 | ti *pi; | 258 | ti *pi; |
4251 | 259 | int status; | 259 | int status; |
4253 | 260 | 260 | ||
4254 | 261 | for (pi=pItems; pi<&pItems[iterations]; pi++) { | 261 | for (pi=pItems; pi<&pItems[iterations]; pi++) { |
4255 | 262 | status = ca_array_get( | 262 | status = ca_array_get( |
4256 | 263 | pi->type, | 263 | pi->type, |
4257 | @@ -337,7 +337,7 @@ unsigned *pInlineIter | |||
4258 | 337 | { | 337 | { |
4259 | 338 | ti *pi; | 338 | ti *pi; |
4260 | 339 | int status; | 339 | int status; |
4262 | 340 | 340 | ||
4263 | 341 | for (pi=pItems; pi<&pItems[iterations]; pi++) { | 341 | for (pi=pItems; pi<&pItems[iterations]; pi++) { |
4264 | 342 | status = ca_array_get( | 342 | status = ca_array_get( |
4265 | 343 | pi->type, | 343 | pi->type, |
4266 | @@ -361,9 +361,9 @@ static void measure_get_latency (ti *pItems, unsigned iterations) | |||
4267 | 361 | epicsTimeStamp start_time; | 361 | epicsTimeStamp start_time; |
4268 | 362 | double delay; | 362 | double delay; |
4269 | 363 | double X = 0u; | 363 | double X = 0u; |
4273 | 364 | double XX = 0u; | 364 | double XX = 0u; |
4274 | 365 | double max = DBL_MIN; | 365 | double max = DBL_MIN; |
4275 | 366 | double min = DBL_MAX; | 366 | double min = DBL_MAX; |
4276 | 367 | double mean; | 367 | double mean; |
4277 | 368 | double stdDev; | 368 | double stdDev; |
4278 | 369 | ti *pi; | 369 | ti *pi; |
4279 | @@ -371,7 +371,7 @@ static void measure_get_latency (ti *pItems, unsigned iterations) | |||
4280 | 371 | 371 | ||
4281 | 372 | for ( pi = pItems; pi < &pItems[iterations]; pi++ ) { | 372 | for ( pi = pItems; pi < &pItems[iterations]; pi++ ) { |
4282 | 373 | epicsTimeGetCurrent ( &start_time ); | 373 | epicsTimeGetCurrent ( &start_time ); |
4284 | 374 | status = ca_array_get ( pi->type, pi->count, | 374 | status = ca_array_get ( pi->type, pi->count, |
4285 | 375 | pi->chix, pi->pValue ); | 375 | pi->chix, pi->pValue ); |
4286 | 376 | SEVCHK ( status, NULL ); | 376 | SEVCHK ( status, NULL ); |
4287 | 377 | status = ca_pend_io ( 100.0 ); | 377 | status = ca_pend_io ( 100.0 ); |
4288 | @@ -395,13 +395,13 @@ static void measure_get_latency (ti *pItems, unsigned iterations) | |||
4289 | 395 | 395 | ||
4290 | 396 | mean = X/iterations; | 396 | mean = X/iterations; |
4291 | 397 | stdDev = sqrt ( XX/iterations - mean*mean ); | 397 | stdDev = sqrt ( XX/iterations - mean*mean ); |
4293 | 398 | printf ( | 398 | printf ( |
4294 | 399 | "Get Latency - " | 399 | "Get Latency - " |
4295 | 400 | "mean = %3.1f uS, " | 400 | "mean = %3.1f uS, " |
4296 | 401 | "std dev = %3.1f uS, " | 401 | "std dev = %3.1f uS, " |
4297 | 402 | "min = %3.1f uS " | 402 | "min = %3.1f uS " |
4298 | 403 | "max = %3.1f uS\n", | 403 | "max = %3.1f uS\n", |
4300 | 404 | mean * 1e6, stdDev * 1e6, | 404 | mean * 1e6, stdDev * 1e6, |
4301 | 405 | min * 1e6, max * 1e6 ); | 405 | min * 1e6, max * 1e6 ); |
4302 | 406 | } | 406 | } |
4303 | 407 | 407 | ||
4304 | @@ -412,9 +412,9 @@ static void printSearchStat ( const ti * pi, unsigned iterations ) | |||
4305 | 412 | { | 412 | { |
4306 | 413 | unsigned i; | 413 | unsigned i; |
4307 | 414 | double X = 0u; | 414 | double X = 0u; |
4311 | 415 | double XX = 0u; | 415 | double XX = 0u; |
4312 | 416 | double max = DBL_MIN; | 416 | double max = DBL_MIN; |
4313 | 417 | double min = DBL_MAX; | 417 | double min = DBL_MAX; |
4314 | 418 | double mean; | 418 | double mean; |
4315 | 419 | double stdDev; | 419 | double stdDev; |
4316 | 420 | 420 | ||
4317 | @@ -432,7 +432,7 @@ static void printSearchStat ( const ti * pi, unsigned iterations ) | |||
4318 | 432 | 432 | ||
4319 | 433 | mean = X / iterations; | 433 | mean = X / iterations; |
4320 | 434 | stdDev = sqrt( XX / iterations - mean * mean ); | 434 | stdDev = sqrt( XX / iterations - mean * mean ); |
4322 | 435 | printf ( | 435 | printf ( |
4323 | 436 | "Search tries per chan - " | 436 | "Search tries per chan - " |
4324 | 437 | "mean = %3.1f " | 437 | "mean = %3.1f " |
4325 | 438 | "std dev = %3.1f " | 438 | "std dev = %3.1f " |
4326 | @@ -458,10 +458,10 @@ void timeIt ( tf *pfunc, ti *pItems, unsigned iterations, | |||
4327 | 458 | delay = epicsTimeDiffInSeconds ( &end_time, &start_time ); | 458 | delay = epicsTimeDiffInSeconds ( &end_time, &start_time ); |
4328 | 459 | if ( delay > 0.0 ) { | 459 | if ( delay > 0.0 ) { |
4329 | 460 | double freq = ( iterations * inlineIter ) / delay; | 460 | double freq = ( iterations * inlineIter ) / delay; |
4331 | 461 | printf ( "Per Op, %8.4f uS ( %8.4f MHz )", | 461 | printf ( "Per Op, %8.4f uS ( %8.4f MHz )", |
4332 | 462 | 1e6 / freq, freq / 1e6 ); | 462 | 1e6 / freq, freq / 1e6 ); |
4333 | 463 | if ( pItems != NULL ) { | 463 | if ( pItems != NULL ) { |
4335 | 464 | printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n", | 464 | printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n", |
4336 | 465 | (inlineIter*nBytesSent*CHAR_BIT)/(delay*1e6), | 465 | (inlineIter*nBytesSent*CHAR_BIT)/(delay*1e6), |
4337 | 466 | (inlineIter*nBytesRecv*CHAR_BIT)/(delay*1e6) ); | 466 | (inlineIter*nBytesRecv*CHAR_BIT)/(delay*1e6) ); |
4338 | 467 | } | 467 | } |
4339 | @@ -479,13 +479,13 @@ static void test ( ti *pItems, unsigned iterations ) | |||
4340 | 479 | unsigned payloadSize, dblPayloadSize; | 479 | unsigned payloadSize, dblPayloadSize; |
4341 | 480 | unsigned nBytesSent, nBytesRecv; | 480 | unsigned nBytesSent, nBytesRecv; |
4342 | 481 | 481 | ||
4344 | 482 | payloadSize = | 482 | payloadSize = |
4345 | 483 | dbr_size_n ( pItems[0].type, pItems[0].count ); | 483 | dbr_size_n ( pItems[0].type, pItems[0].count ); |
4346 | 484 | payloadSize = CA_MESSAGE_ALIGN ( payloadSize ); | 484 | payloadSize = CA_MESSAGE_ALIGN ( payloadSize ); |
4347 | 485 | 485 | ||
4348 | 486 | dblPayloadSize = dbr_size [ DBR_DOUBLE ]; | 486 | dblPayloadSize = dbr_size [ DBR_DOUBLE ]; |
4349 | 487 | dblPayloadSize = CA_MESSAGE_ALIGN ( dblPayloadSize ); | 487 | dblPayloadSize = CA_MESSAGE_ALIGN ( dblPayloadSize ); |
4351 | 488 | 488 | ||
4352 | 489 | if ( payloadSize > dblPayloadSize ) { | 489 | if ( payloadSize > dblPayloadSize ) { |
4353 | 490 | unsigned factor = payloadSize / dblPayloadSize; | 490 | unsigned factor = payloadSize / dblPayloadSize; |
4354 | 491 | while ( factor ) { | 491 | while ( factor ) { |
4355 | @@ -500,15 +500,15 @@ static void test ( ti *pItems, unsigned iterations ) | |||
4356 | 500 | printf ( "\t### async put test ###\n"); | 500 | printf ( "\t### async put test ###\n"); |
4357 | 501 | nBytesSent = sizeof ( caHdr ) + CA_MESSAGE_ALIGN( payloadSize ); | 501 | nBytesSent = sizeof ( caHdr ) + CA_MESSAGE_ALIGN( payloadSize ); |
4358 | 502 | nBytesRecv = 0u; | 502 | nBytesRecv = 0u; |
4361 | 503 | timeIt ( test_put, pItems, iterations, | 503 | timeIt ( test_put, pItems, iterations, |
4362 | 504 | nBytesSent * iterations, | 504 | nBytesSent * iterations, |
4363 | 505 | nBytesRecv * iterations ); | 505 | nBytesRecv * iterations ); |
4364 | 506 | 506 | ||
4365 | 507 | printf ( "\t### async get test ###\n"); | 507 | printf ( "\t### async get test ###\n"); |
4366 | 508 | nBytesSent = sizeof ( caHdr ); | 508 | nBytesSent = sizeof ( caHdr ); |
4367 | 509 | nBytesRecv = sizeof ( caHdr ) + CA_MESSAGE_ALIGN ( payloadSize ); | 509 | nBytesRecv = sizeof ( caHdr ) + CA_MESSAGE_ALIGN ( payloadSize ); |
4370 | 510 | timeIt ( test_get, pItems, iterations, | 510 | timeIt ( test_get, pItems, iterations, |
4371 | 511 | nBytesSent * ( iterations ), | 511 | nBytesSent * ( iterations ), |
4372 | 512 | nBytesRecv * ( iterations ) ); | 512 | nBytesRecv * ( iterations ) ); |
4373 | 513 | 513 | ||
4374 | 514 | printf ("\t### synch get test ###\n"); | 514 | printf ("\t### synch get test ###\n"); |
4375 | @@ -520,7 +520,7 @@ static void test ( ti *pItems, unsigned iterations ) | |||
4376 | 520 | else if ( iterations > 10 ) { | 520 | else if ( iterations > 10 ) { |
4377 | 521 | iterations /= 10; | 521 | iterations /= 10; |
4378 | 522 | } | 522 | } |
4380 | 523 | timeIt ( test_wait, pItems, iterations, | 523 | timeIt ( test_wait, pItems, iterations, |
4381 | 524 | nBytesSent * iterations, | 524 | nBytesSent * iterations, |
4382 | 525 | nBytesRecv * iterations ); | 525 | nBytesRecv * iterations ); |
4383 | 526 | } | 526 | } |
4384 | @@ -528,7 +528,7 @@ static void test ( ti *pItems, unsigned iterations ) | |||
4385 | 528 | /* | 528 | /* |
4386 | 529 | * catime () | 529 | * catime () |
4387 | 530 | */ | 530 | */ |
4389 | 531 | int catime ( const char * channelName, | 531 | int catime ( const char * channelName, |
4390 | 532 | unsigned channelCount, enum appendNumberFlag appNF ) | 532 | unsigned channelCount, enum appendNumberFlag appNF ) |
4391 | 533 | { | 533 | { |
4392 | 534 | unsigned i; | 534 | unsigned i; |
4393 | @@ -536,7 +536,7 @@ int catime ( const char * channelName, | |||
4394 | 536 | unsigned strsize; | 536 | unsigned strsize; |
4395 | 537 | unsigned nBytesSent, nBytesRecv; | 537 | unsigned nBytesSent, nBytesRecv; |
4396 | 538 | ti *pItemList; | 538 | ti *pItemList; |
4398 | 539 | 539 | ||
4399 | 540 | if ( channelCount == 0 ) { | 540 | if ( channelCount == 0 ) { |
4400 | 541 | printf ( "channel count was zero\n" ); | 541 | printf ( "channel count was zero\n" ); |
4401 | 542 | return 0; | 542 | return 0; |
4402 | @@ -547,15 +547,15 @@ int catime ( const char * channelName, | |||
4403 | 547 | return -1; | 547 | return -1; |
4404 | 548 | } | 548 | } |
4405 | 549 | 549 | ||
4407 | 550 | SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ), | 550 | SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ), |
4408 | 551 | "Unable to initialize" ); | 551 | "Unable to initialize" ); |
4409 | 552 | 552 | ||
4410 | 553 | if ( appNF == appendNumber ) { | 553 | if ( appNF == appendNumber ) { |
4412 | 554 | printf ( "Testing with %u channels named %snnn\n", | 554 | printf ( "Testing with %u channels named %snnn\n", |
4413 | 555 | channelCount, channelName ); | 555 | channelCount, channelName ); |
4414 | 556 | } | 556 | } |
4415 | 557 | else { | 557 | else { |
4417 | 558 | printf ( "Testing with %u channels named %s\n", | 558 | printf ( "Testing with %u channels named %s\n", |
4418 | 559 | channelCount, channelName ); | 559 | channelCount, channelName ); |
4419 | 560 | } | 560 | } |
4420 | 561 | 561 | ||
4421 | @@ -573,7 +573,7 @@ int catime ( const char * channelName, | |||
4422 | 573 | pItemList[i].name[strsize]= '\0'; | 573 | pItemList[i].name[strsize]= '\0'; |
4423 | 574 | pItemList[i].count = 0; | 574 | pItemList[i].count = 0; |
4424 | 575 | pItemList[i].pValue = 0; | 575 | pItemList[i].pValue = 0; |
4426 | 576 | nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) ) | 576 | nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) ) |
4427 | 577 | + sizeof (caHdr) ); | 577 | + sizeof (caHdr) ); |
4428 | 578 | nBytesRecv += 2 * sizeof (caHdr); | 578 | nBytesRecv += 2 * sizeof (caHdr); |
4429 | 579 | } | 579 | } |
4430 | @@ -582,7 +582,7 @@ int catime ( const char * channelName, | |||
4431 | 582 | printf ( "--------------------\n" ); | 582 | printf ( "--------------------\n" ); |
4432 | 583 | timeIt ( test_search, pItemList, channelCount, nBytesSent, nBytesRecv ); | 583 | timeIt ( test_search, pItemList, channelCount, nBytesSent, nBytesRecv ); |
4433 | 584 | printSearchStat ( pItemList, channelCount ); | 584 | printSearchStat ( pItemList, channelCount ); |
4435 | 585 | 585 | ||
4436 | 586 | for ( i = 0; i < channelCount; i++ ) { | 586 | for ( i = 0; i < channelCount; i++ ) { |
4437 | 587 | size_t count = ca_element_count ( pItemList[i].chix ); | 587 | size_t count = ca_element_count ( pItemList[i].chix ); |
4438 | 588 | size_t size = sizeof ( dbr_string_t ) * count; | 588 | size_t size = sizeof ( dbr_string_t ) * count; |
4439 | @@ -608,7 +608,7 @@ int catime ( const char * channelName, | |||
4440 | 608 | for ( j = 0; j < pItemList[i].count; j++ ) { | 608 | for ( j = 0; j < pItemList[i].count; j++ ) { |
4441 | 609 | pFltVal[j] = (dbr_float_t) val; | 609 | pFltVal[j] = (dbr_float_t) val; |
4442 | 610 | } | 610 | } |
4444 | 611 | pItemList[i].type = DBR_FLOAT; | 611 | pItemList[i].type = DBR_FLOAT; |
4445 | 612 | } | 612 | } |
4446 | 613 | printf ( "DBR_FLOAT Test\n" ); | 613 | printf ( "DBR_FLOAT Test\n" ); |
4447 | 614 | printf ( "--------------\n" ); | 614 | printf ( "--------------\n" ); |
4448 | @@ -621,13 +621,13 @@ int catime ( const char * channelName, | |||
4449 | 621 | for ( j = 0; j < pItemList[i].count; j++ ) { | 621 | for ( j = 0; j < pItemList[i].count; j++ ) { |
4450 | 622 | pDblVal[j] = (dbr_double_t) val; | 622 | pDblVal[j] = (dbr_double_t) val; |
4451 | 623 | } | 623 | } |
4453 | 624 | pItemList[i].type = DBR_DOUBLE; | 624 | pItemList[i].type = DBR_DOUBLE; |
4454 | 625 | } | 625 | } |
4455 | 626 | printf ( "DBR_DOUBLE Test\n" ); | 626 | printf ( "DBR_DOUBLE Test\n" ); |
4456 | 627 | printf ( "---------------\n" ); | 627 | printf ( "---------------\n" ); |
4457 | 628 | test ( pItemList, channelCount ); | 628 | test ( pItemList, channelCount ); |
4458 | 629 | 629 | ||
4460 | 630 | 630 | ||
4461 | 631 | for ( i = 0; i < channelCount; i++ ) { | 631 | for ( i = 0; i < channelCount; i++ ) { |
4462 | 632 | dbr_string_t * pStrVal = ( dbr_string_t * ) pItemList[i].pValue; | 632 | dbr_string_t * pStrVal = ( dbr_string_t * ) pItemList[i].pValue; |
4463 | 633 | double val = i; | 633 | double val = i; |
4464 | @@ -635,7 +635,7 @@ int catime ( const char * channelName, | |||
4465 | 635 | for ( j = 0; j < pItemList[i].count; j++ ) { | 635 | for ( j = 0; j < pItemList[i].count; j++ ) { |
4466 | 636 | sprintf ( pStrVal[j], "%f", val ); | 636 | sprintf ( pStrVal[j], "%f", val ); |
4467 | 637 | } | 637 | } |
4469 | 638 | pItemList[i].type = DBR_STRING; | 638 | pItemList[i].type = DBR_STRING; |
4470 | 639 | } | 639 | } |
4471 | 640 | printf ( "DBR_STRING Test\n" ); | 640 | printf ( "DBR_STRING Test\n" ); |
4472 | 641 | printf ( "---------------\n" ); | 641 | printf ( "---------------\n" ); |
4473 | @@ -648,7 +648,7 @@ int catime ( const char * channelName, | |||
4474 | 648 | for ( j = 0; j < pItemList[i].count; j++ ) { | 648 | for ( j = 0; j < pItemList[i].count; j++ ) { |
4475 | 649 | pIntVal[j] = (dbr_int_t) val; | 649 | pIntVal[j] = (dbr_int_t) val; |
4476 | 650 | } | 650 | } |
4478 | 651 | pItemList[i].type = DBR_INT; | 651 | pItemList[i].type = DBR_INT; |
4479 | 652 | } | 652 | } |
4480 | 653 | printf ( "DBR_INT Test\n" ); | 653 | printf ( "DBR_INT Test\n" ); |
4481 | 654 | printf ( "------------\n" ); | 654 | printf ( "------------\n" ); |
4482 | @@ -661,8 +661,8 @@ int catime ( const char * channelName, | |||
4483 | 661 | for ( j = 0; j < pItemList[i].count; j++ ) { | 661 | for ( j = 0; j < pItemList[i].count; j++ ) { |
4484 | 662 | pDblVal[j] = 0; | 662 | pDblVal[j] = 0; |
4485 | 663 | } | 663 | } |
4488 | 664 | pItemList[i].type = DBR_DOUBLE; | 664 | pItemList[i].type = DBR_DOUBLE; |
4489 | 665 | } | 665 | } |
4490 | 666 | measure_get_latency ( pItemList, channelCount ); | 666 | measure_get_latency ( pItemList, channelCount ); |
4491 | 667 | 667 | ||
4492 | 668 | printf ( "Free Channel Test\n" ); | 668 | printf ( "Free Channel Test\n" ); |
4493 | @@ -670,10 +670,10 @@ int catime ( const char * channelName, | |||
4494 | 670 | timeIt ( test_free, pItemList, channelCount, 0, 0 ); | 670 | timeIt ( test_free, pItemList, channelCount, 0, 0 ); |
4495 | 671 | 671 | ||
4496 | 672 | SEVCHK ( ca_task_exit (), "Unable to free resources at exit" ); | 672 | SEVCHK ( ca_task_exit (), "Unable to free resources at exit" ); |
4498 | 673 | 673 | ||
4499 | 674 | for ( i = 0; i < channelCount; i++ ) { | 674 | for ( i = 0; i < channelCount; i++ ) { |
4500 | 675 | free ( pItemList[i].pValue ); | 675 | free ( pItemList[i].pValue ); |
4502 | 676 | } | 676 | } |
4503 | 677 | 677 | ||
4504 | 678 | free ( pItemList ); | 678 | free ( pItemList ); |
4505 | 679 | 679 | ||
4506 | diff --git a/modules/ca/src/client/catimeMain.c b/modules/ca/src/client/catimeMain.c | |||
4507 | index 598ec45..cc9ec83 100644 | |||
4508 | --- a/modules/ca/src/client/catimeMain.c | |||
4509 | +++ b/modules/ca/src/client/catimeMain.c | |||
4510 | @@ -5,7 +5,7 @@ | |||
4511 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4512 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4513 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4515 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4516 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4517 | 10 | 10 | ||
4518 | 11 | #include <stdio.h> | 11 | #include <stdio.h> |
4519 | diff --git a/modules/ca/src/client/comBuf.cpp b/modules/ca/src/client/comBuf.cpp | |||
4520 | index 94245d3..ec99ad0 100644 | |||
4521 | --- a/modules/ca/src/client/comBuf.cpp | |||
4522 | +++ b/modules/ca/src/client/comBuf.cpp | |||
4523 | @@ -5,20 +5,20 @@ | |||
4524 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4525 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4526 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4528 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4529 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4531 | 10 | /* | 10 | /* |
4532 | 11 | * | ||
4533 | 11 | * | 12 | * |
4534 | 12 | * | ||
4535 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
4536 | 14 | * Los Alamos National Laboratory | 14 | * Los Alamos National Laboratory |
4537 | 15 | * Los Alamos, New Mexico 87545 | 15 | * Los Alamos, New Mexico 87545 |
4539 | 16 | * | 16 | * |
4540 | 17 | * Copyright, 1986, The Regents of the University of California. | 17 | * Copyright, 1986, The Regents of the University of California. |
4545 | 18 | * | 18 | * |
4546 | 19 | * | 19 | * |
4547 | 20 | * Author Jeffrey O. Hill | 20 | * Author Jeffrey O. Hill |
4548 | 21 | * johill@lanl.gov | 21 | * johill@lanl.gov |
4549 | 22 | */ | 22 | */ |
4550 | 23 | 23 | ||
4551 | 24 | #include <stdexcept> | 24 | #include <stdexcept> |
4552 | @@ -33,7 +33,7 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime | |||
4553 | 33 | unsigned index = this->nextReadIndex; | 33 | unsigned index = this->nextReadIndex; |
4554 | 34 | unsigned finalIndex = this->commitIndex; | 34 | unsigned finalIndex = this->commitIndex; |
4555 | 35 | while ( index < finalIndex ) { | 35 | while ( index < finalIndex ) { |
4557 | 36 | unsigned nBytes = wire.sendBytes ( | 36 | unsigned nBytes = wire.sendBytes ( |
4558 | 37 | &this->buf[index], finalIndex - index, currentTime ); | 37 | &this->buf[index], finalIndex - index, currentTime ); |
4559 | 38 | if ( nBytes == 0u ) { | 38 | if ( nBytes == 0u ) { |
4560 | 39 | this->nextReadIndex = index; | 39 | this->nextReadIndex = index; |
4561 | @@ -45,9 +45,9 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime | |||
4562 | 45 | return true; | 45 | return true; |
4563 | 46 | } | 46 | } |
4564 | 47 | 47 | ||
4566 | 48 | // throwing the exception from a function that isnt inline | 48 | // throwing the exception from a function that isnt inline |
4567 | 49 | // shrinks the GNU compiled object code | 49 | // shrinks the GNU compiled object code |
4569 | 50 | void comBuf::throwInsufficentBytesException () | 50 | void comBuf::throwInsufficentBytesException () |
4570 | 51 | { | 51 | { |
4571 | 52 | throw comBuf::insufficentBytesAvailable (); | 52 | throw comBuf::insufficentBytesAvailable (); |
4572 | 53 | } | 53 | } |
4573 | diff --git a/modules/ca/src/client/comBuf.h b/modules/ca/src/client/comBuf.h | |||
4574 | index 59e3878..3425bb3 100644 | |||
4575 | --- a/modules/ca/src/client/comBuf.h | |||
4576 | +++ b/modules/ca/src/client/comBuf.h | |||
4577 | @@ -5,7 +5,7 @@ | |||
4578 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4579 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4580 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4582 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4583 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4584 | 10 | /* | 10 | /* |
4585 | 11 | * | 11 | * |
4586 | @@ -17,8 +17,8 @@ | |||
4587 | 17 | * Copyright, 1986, The Regents of the University of California. | 17 | * Copyright, 1986, The Regents of the University of California. |
4588 | 18 | * | 18 | * |
4589 | 19 | * | 19 | * |
4592 | 20 | * Author Jeffrey O. Hill | 20 | * Author Jeffrey O. Hill |
4593 | 21 | * johill@lanl.gov | 21 | * johill@lanl.gov |
4594 | 22 | */ | 22 | */ |
4595 | 23 | 23 | ||
4596 | 24 | #ifndef comBufh | 24 | #ifndef comBufh |
4597 | @@ -40,23 +40,23 @@ static const unsigned comBufSize = 0x4000; | |||
4598 | 40 | class comBufMemoryManager { | 40 | class comBufMemoryManager { |
4599 | 41 | public: | 41 | public: |
4600 | 42 | virtual ~comBufMemoryManager (); | 42 | virtual ~comBufMemoryManager (); |
4603 | 43 | virtual void * allocate ( size_t ) = 0; | 43 | virtual void * allocate ( size_t ) = 0; |
4604 | 44 | virtual void release ( void * ) = 0; | 44 | virtual void release ( void * ) = 0; |
4605 | 45 | }; | 45 | }; |
4606 | 46 | 46 | ||
4607 | 47 | class wireSendAdapter { | 47 | class wireSendAdapter { |
4608 | 48 | public: | 48 | public: |
4611 | 49 | virtual unsigned sendBytes ( const void * pBuf, | 49 | virtual unsigned sendBytes ( const void * pBuf, |
4612 | 50 | unsigned nBytesInBuf, | 50 | unsigned nBytesInBuf, |
4613 | 51 | const class epicsTime & currentTime ) = 0; | 51 | const class epicsTime & currentTime ) = 0; |
4614 | 52 | protected: | 52 | protected: |
4615 | 53 | virtual ~wireSendAdapter() {} | 53 | virtual ~wireSendAdapter() {} |
4616 | 54 | }; | 54 | }; |
4617 | 55 | 55 | ||
4622 | 56 | enum swioCircuitState { | 56 | enum swioCircuitState { |
4623 | 57 | swioConnected, | 57 | swioConnected, |
4624 | 58 | swioPeerHangup, | 58 | swioPeerHangup, |
4625 | 59 | swioPeerAbort, | 59 | swioPeerAbort, |
4626 | 60 | swioLinkFailure, | 60 | swioLinkFailure, |
4627 | 61 | swioLocalAbort | 61 | swioLocalAbort |
4628 | 62 | }; | 62 | }; |
4629 | @@ -67,7 +67,7 @@ struct statusWireIO { | |||
4630 | 67 | 67 | ||
4631 | 68 | class wireRecvAdapter { | 68 | class wireRecvAdapter { |
4632 | 69 | public: | 69 | public: |
4634 | 70 | virtual void recvBytes ( void * pBuf, | 70 | virtual void recvBytes ( void * pBuf, |
4635 | 71 | unsigned nBytesInBuf, statusWireIO & ) = 0; | 71 | unsigned nBytesInBuf, statusWireIO & ) = 0; |
4636 | 72 | protected: | 72 | protected: |
4637 | 73 | virtual ~wireRecvAdapter() {} | 73 | virtual ~wireRecvAdapter() {} |
4638 | @@ -106,7 +106,7 @@ public: | |||
4639 | 106 | template < class T > | 106 | template < class T > |
4640 | 107 | popStatus pop ( T & ); | 107 | popStatus pop ( T & ); |
4641 | 108 | static void throwInsufficentBytesException (); | 108 | static void throwInsufficentBytesException (); |
4643 | 109 | void * operator new ( size_t size, | 109 | void * operator new ( size_t size, |
4644 | 110 | comBufMemoryManager & ); | 110 | comBufMemoryManager & ); |
4645 | 111 | epicsPlacementDeleteOperator (( void *, comBufMemoryManager & )) | 111 | epicsPlacementDeleteOperator (( void *, comBufMemoryManager & )) |
4646 | 112 | private: | 112 | private: |
4647 | @@ -119,14 +119,14 @@ private: | |||
4648 | 119 | bool push ( const T * ); // disabled | 119 | bool push ( const T * ); // disabled |
4649 | 120 | }; | 120 | }; |
4650 | 121 | 121 | ||
4652 | 122 | inline void * comBuf::operator new ( size_t size, | 122 | inline void * comBuf::operator new ( size_t size, |
4653 | 123 | comBufMemoryManager & mgr ) | 123 | comBufMemoryManager & mgr ) |
4654 | 124 | { | 124 | { |
4655 | 125 | return mgr.allocate ( size ); | 125 | return mgr.allocate ( size ); |
4656 | 126 | } | 126 | } |
4658 | 127 | 127 | ||
4659 | 128 | #ifdef CXX_PLACEMENT_DELETE | 128 | #ifdef CXX_PLACEMENT_DELETE |
4661 | 129 | inline void comBuf::operator delete ( void * pCadaver, | 129 | inline void comBuf::operator delete ( void * pCadaver, |
4662 | 130 | comBufMemoryManager & mgr ) | 130 | comBufMemoryManager & mgr ) |
4663 | 131 | { | 131 | { |
4664 | 132 | mgr.release ( pCadaver ); | 132 | mgr.release ( pCadaver ); |
4665 | @@ -162,8 +162,8 @@ inline unsigned comBuf :: uncommittedBytes () const | |||
4666 | 162 | 162 | ||
4667 | 163 | inline unsigned comBuf :: push ( comBuf & bufIn ) | 163 | inline unsigned comBuf :: push ( comBuf & bufIn ) |
4668 | 164 | { | 164 | { |
4671 | 165 | unsigned nBytes = this->copyInBytes ( | 165 | unsigned nBytes = this->copyInBytes ( |
4672 | 166 | & bufIn.buf[ bufIn.nextReadIndex ], | 166 | & bufIn.buf[ bufIn.nextReadIndex ], |
4673 | 167 | bufIn.commitIndex - bufIn.nextReadIndex ); | 167 | bufIn.commitIndex - bufIn.nextReadIndex ); |
4674 | 168 | bufIn.nextReadIndex += nBytes; | 168 | bufIn.nextReadIndex += nBytes; |
4675 | 169 | return nBytes; | 169 | return nBytes; |
4676 | @@ -174,11 +174,11 @@ inline unsigned comBuf :: capacityBytes () | |||
4677 | 174 | return comBufSize; | 174 | return comBufSize; |
4678 | 175 | } | 175 | } |
4679 | 176 | 176 | ||
4681 | 177 | inline void comBuf :: fillFromWire ( | 177 | inline void comBuf :: fillFromWire ( |
4682 | 178 | wireRecvAdapter & wire, statusWireIO & stat ) | 178 | wireRecvAdapter & wire, statusWireIO & stat ) |
4683 | 179 | { | 179 | { |
4686 | 180 | wire.recvBytes ( | 180 | wire.recvBytes ( |
4687 | 181 | & this->buf[this->nextWriteIndex], | 181 | & this->buf[this->nextWriteIndex], |
4688 | 182 | sizeof ( this->buf ) - this->nextWriteIndex, stat ); | 182 | sizeof ( this->buf ) - this->nextWriteIndex, stat ); |
4689 | 183 | if ( stat.circuitState == swioConnected ) { | 183 | if ( stat.circuitState == swioConnected ) { |
4690 | 184 | this->nextWriteIndex += stat.bytesCopied; | 184 | this->nextWriteIndex += stat.bytesCopied; |
4691 | diff --git a/modules/ca/src/client/comQueRecv.cpp b/modules/ca/src/client/comQueRecv.cpp | |||
4692 | index 8826354..4fe7d09 100644 | |||
4693 | --- a/modules/ca/src/client/comQueRecv.cpp | |||
4694 | +++ b/modules/ca/src/client/comQueRecv.cpp | |||
4695 | @@ -5,9 +5,9 @@ | |||
4696 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4697 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4698 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4700 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4701 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4703 | 10 | /* | 10 | /* |
4704 | 11 | * | 11 | * |
4705 | 12 | * | 12 | * |
4706 | 13 | * L O S A L A M O S | 13 | * L O S A L A M O S |
4707 | @@ -26,8 +26,8 @@ | |||
4708 | 26 | #include "iocinf.h" | 26 | #include "iocinf.h" |
4709 | 27 | #include "virtualCircuit.h" | 27 | #include "virtualCircuit.h" |
4710 | 28 | 28 | ||
4713 | 29 | comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ): | 29 | comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ): |
4714 | 30 | comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u ) | 30 | comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u ) |
4715 | 31 | { | 31 | { |
4716 | 32 | } | 32 | } |
4717 | 33 | 33 | ||
4718 | @@ -101,7 +101,7 @@ void comQueRecv::popString ( epicsOldString *pStr ) | |||
4719 | 101 | } | 101 | } |
4720 | 102 | 102 | ||
4721 | 103 | void comQueRecv::pushLastComBufReceived ( comBuf & bufIn ) | 103 | void comQueRecv::pushLastComBufReceived ( comBuf & bufIn ) |
4723 | 104 | 104 | ||
4724 | 105 | { | 105 | { |
4725 | 106 | bufIn.commitIncomming (); | 106 | bufIn.commitIncomming (); |
4726 | 107 | comBuf * pComBuf = this->bufs.last (); | 107 | comBuf * pComBuf = this->bufs.last (); |
4727 | @@ -172,7 +172,7 @@ void comQueRecv::removeAndDestroyBuf ( comBuf & buf ) | |||
4728 | 172 | this->comBufMemMgr.release ( & buf ); | 172 | this->comBufMemMgr.release ( & buf ); |
4729 | 173 | } | 173 | } |
4730 | 174 | 174 | ||
4732 | 175 | epicsUInt8 comQueRecv::popUInt8 () | 175 | epicsUInt8 comQueRecv::popUInt8 () |
4733 | 176 | { | 176 | { |
4734 | 177 | comBuf * pComBuf = this->bufs.first (); | 177 | comBuf * pComBuf = this->bufs.first (); |
4735 | 178 | if ( ! pComBuf ) { | 178 | if ( ! pComBuf ) { |
4736 | diff --git a/modules/ca/src/client/comQueRecv.h b/modules/ca/src/client/comQueRecv.h | |||
4737 | index 7f3153d..2e71478 100644 | |||
4738 | --- a/modules/ca/src/client/comQueRecv.h | |||
4739 | +++ b/modules/ca/src/client/comQueRecv.h | |||
4740 | @@ -5,25 +5,25 @@ | |||
4741 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4742 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4743 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4745 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4746 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4747 | 10 | 10 | ||
4749 | 11 | /* | 11 | /* |
4750 | 12 | * | ||
4751 | 12 | * | 13 | * |
4752 | 13 | * | ||
4753 | 14 | * L O S A L A M O S | 14 | * L O S A L A M O S |
4754 | 15 | * Los Alamos National Laboratory | 15 | * Los Alamos National Laboratory |
4755 | 16 | * Los Alamos, New Mexico 87545 | 16 | * Los Alamos, New Mexico 87545 |
4757 | 17 | * | 17 | * |
4758 | 18 | * Copyright, 1986, The Regents of the University of California. | 18 | * Copyright, 1986, The Regents of the University of California. |
4764 | 19 | * | 19 | * |
4765 | 20 | * | 20 | * |
4766 | 21 | * Author Jeffrey O. Hill | 21 | * Author Jeffrey O. Hill |
4767 | 22 | * johill@lanl.gov | 22 | * johill@lanl.gov |
4768 | 23 | * 505 665 1831 | 23 | * 505 665 1831 |
4769 | 24 | */ | 24 | */ |
4770 | 25 | 25 | ||
4772 | 26 | #ifndef comQueRecvh | 26 | #ifndef comQueRecvh |
4773 | 27 | #define comQueRecvh | 27 | #define comQueRecvh |
4774 | 28 | 28 | ||
4775 | 29 | #include "comBuf.h" | 29 | #include "comBuf.h" |
4776 | @@ -54,8 +54,8 @@ private: | |||
4777 | 54 | epicsUInt16 multiBufferPopUInt16 (); | 54 | epicsUInt16 multiBufferPopUInt16 (); |
4778 | 55 | epicsUInt32 multiBufferPopUInt32 (); | 55 | epicsUInt32 multiBufferPopUInt32 (); |
4779 | 56 | void removeAndDestroyBuf ( comBuf & ); | 56 | void removeAndDestroyBuf ( comBuf & ); |
4782 | 57 | comQueRecv ( const comQueRecv & ); | 57 | comQueRecv ( const comQueRecv & ); |
4783 | 58 | comQueRecv & operator = ( const comQueRecv & ); | 58 | comQueRecv & operator = ( const comQueRecv & ); |
4784 | 59 | }; | 59 | }; |
4785 | 60 | 60 | ||
4786 | 61 | inline unsigned comQueRecv::occupiedBytes () const | 61 | inline unsigned comQueRecv::occupiedBytes () const |
4787 | diff --git a/modules/ca/src/client/comQueSend.cpp b/modules/ca/src/client/comQueSend.cpp | |||
4788 | index 6ed516b..7bf75c7 100644 | |||
4789 | --- a/modules/ca/src/client/comQueSend.cpp | |||
4790 | +++ b/modules/ca/src/client/comQueSend.cpp | |||
4791 | @@ -5,21 +5,21 @@ | |||
4792 | 5 | * Operator of Los Alamos National Laboratory. | 5 | * Operator of Los Alamos National Laboratory. |
4793 | 6 | * EPICS BASE Versions 3.13.7 | 6 | * EPICS BASE Versions 3.13.7 |
4794 | 7 | * and higher are distributed subject to a Software License Agreement found | 7 | * and higher are distributed subject to a Software License Agreement found |
4796 | 8 | * in file LICENSE that is included with this distribution. | 8 | * in file LICENSE that is included with this distribution. |
4797 | 9 | \*************************************************************************/ | 9 | \*************************************************************************/ |
4798 | 10 | 10 | ||
4800 | 11 | /* | 11 | /* |
4801 | 12 | * | ||
4802 | 12 | * | 13 | * |
4803 | 13 | * | ||
4804 | 14 | * L O S A L A M O S | 14 | * L O S A L A M O S |
4805 | 15 | * Los Alamos National Laboratory | 15 | * Los Alamos National Laboratory |
4806 | 16 | * Los Alamos, New Mexico 87545 | 16 | * Los Alamos, New Mexico 87545 |
4808 | 17 | * | 17 | * |
4809 | 18 | * Copyright, 1986, The Regents of the University of California. | 18 | * Copyright, 1986, The Regents of the University of California. |
4814 | 19 | * | 19 | * |
4815 | 20 | * | 20 | * |
4816 | 21 | * Author Jeffrey O. Hill | 21 | * Author Jeffrey O. Hill |
4817 | 22 | * johill@lanl.gov | 22 | * johill@lanl.gov |
4818 | 23 | */ | 23 | */ |
4819 | 24 | 24 | ||
4820 | 25 | // | 25 | // |
4821 | @@ -35,7 +35,7 @@ | |||
4822 | 35 | // a connection dropped. | 35 | // a connection dropped. |
4823 | 36 | // 4) Do not allocate too much memory in exception situatons (such as | 36 | // 4) Do not allocate too much memory in exception situatons (such as |
4824 | 37 | // after a circuit disconnect). | 37 | // after a circuit disconnect). |
4826 | 38 | // 5) Avoid allocating more memory than is absolutely necessary to meet | 38 | // 5) Avoid allocating more memory than is absolutely necessary to meet |
4827 | 39 | // the above requirements. | 39 | // the above requirements. |
4828 | 40 | // 6) Message fragments must never be sent to the IOC when there isnt | 40 | // 6) Message fragments must never be sent to the IOC when there isnt |
4829 | 41 | // enough memory to queue part of a message (we also must not force | 41 | // enough memory to queue part of a message (we also must not force |
4830 | @@ -44,7 +44,7 @@ | |||
4831 | 44 | // protocol stream. | 44 | // protocol stream. |
4832 | 45 | // | 45 | // |
4833 | 46 | // Implementation: | 46 | // Implementation: |
4835 | 47 | // 1) When queuing a complete message, first test to see if a flush is | 47 | // 1) When queuing a complete message, first test to see if a flush is |
4836 | 48 | // required. If it is a receive thread scheduals the flush with the | 48 | // required. If it is a receive thread scheduals the flush with the |
4837 | 49 | // send thread, and otherwise directly execute the system call. The | 49 | // send thread, and otherwise directly execute the system call. The |
4838 | 50 | // send thread must run at a higher priority than the receive thread | 50 | // send thread must run at a higher priority than the receive thread |
4839 | @@ -52,14 +52,14 @@ | |||
4840 | 52 | // 2) Preallocate space for the entire message prior to copying in the | 52 | // 2) Preallocate space for the entire message prior to copying in the |
4841 | 53 | // message so that message fragments are not flushed out just prior | 53 | // message so that message fragments are not flushed out just prior |
4842 | 54 | // to detecting that memory is unavailable. | 54 | // to detecting that memory is unavailable. |
4844 | 55 | // 3) Return a special error constant when the following situations | 55 | // 3) Return a special error constant when the following situations |
4845 | 56 | // are detected when the user is attempting to queue a request | 56 | // are detected when the user is attempting to queue a request |
4846 | 57 | // from within a user callback executed by a receive thread: | 57 | // from within a user callback executed by a receive thread: |
4848 | 58 | // a) A user is queuing more requests that demand a response from a | 58 | // a) A user is queuing more requests that demand a response from a |
4849 | 59 | // callback than are removed by the response that initiated the | 59 | // callback than are removed by the response that initiated the |
4850 | 60 | // callback, and this situation persists for many callbacks until | 60 | // callback, and this situation persists for many callbacks until |
4851 | 61 | // all buffering in the system is exausted. | 61 | // all buffering in the system is exausted. |
4853 | 62 | // b) A user is queuing many requests that demand a response from one | 62 | // b) A user is queuing many requests that demand a response from one |
4854 | 63 | // callback until all buffering in the system is exausted. | 63 | // callback until all buffering in the system is exausted. |
4855 | 64 | // c) Some combination of both (a) nad (b). | 64 | // c) Some combination of both (a) nad (b). |
4856 | 65 | // | 65 | // |
4857 | @@ -73,15 +73,15 @@ | |||
4858 | 73 | #include "db_access.h" // for dbr_short_t etc | 73 | #include "db_access.h" // for dbr_short_t etc |
4859 | 74 | 74 | ||
4860 | 75 | // nill message alignment pad bytes | 75 | // nill message alignment pad bytes |
4863 | 76 | const char cacNillBytes [] = | 76 | const char cacNillBytes [] = |
4864 | 77 | { | 77 | { |
4865 | 78 | 0, 0, 0, 0, | 78 | 0, 0, 0, 0, |
4866 | 79 | 0, 0, 0, 0 | 79 | 0, 0, 0, 0 |
4867 | 80 | }; | 80 | }; |
4868 | 81 | 81 | ||
4870 | 82 | comQueSend::comQueSend ( wireSendAdapter & wireIn, | 82 | comQueSend::comQueSend ( wireSendAdapter & wireIn, |
4871 | 83 | comBufMemoryManager & comBufMemMgrIn ): | 83 | comBufMemoryManager & comBufMemMgrIn ): |
4873 | 84 | comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ), | 84 | comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ), |
4874 | 85 | nBytesPending ( 0u ) | 85 | nBytesPending ( 0u ) |
4875 | 86 | { | 86 | { |
4876 | 87 | } | 87 | } |
4877 | @@ -91,7 +91,7 @@ comQueSend::~comQueSend () | |||
4878 | 91 | this->clear (); | 91 | this->clear (); |
4879 | 92 | } | 92 | } |
4880 | 93 | 93 | ||
4882 | 94 | void comQueSend::clear () | 94 | void comQueSend::clear () |
4883 | 95 | { | 95 | { |
4884 | 96 | comBuf *pBuf; | 96 | comBuf *pBuf; |
4885 | 97 | 97 | ||
4886 | @@ -181,32 +181,32 @@ const comQueSend::copyScalarFunc_t comQueSend::dbrCopyScalar [39] = { | |||
4887 | 181 | &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME | 181 | &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME |
4888 | 182 | }; | 182 | }; |
4889 | 183 | 183 | ||
4891 | 184 | void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem ) | 184 | void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem ) |
4892 | 185 | { | 185 | { |
4893 | 186 | this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE ); | 186 | this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE ); |
4894 | 187 | } | 187 | } |
4895 | 188 | 188 | ||
4897 | 189 | void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem ) | 189 | void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem ) |
4898 | 190 | { | 190 | { |
4899 | 191 | this->push ( static_cast <const dbr_short_t *> ( pValue ), nElem ); | 191 | this->push ( static_cast <const dbr_short_t *> ( pValue ), nElem ); |
4900 | 192 | } | 192 | } |
4901 | 193 | 193 | ||
4903 | 194 | void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem ) | 194 | void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem ) |
4904 | 195 | { | 195 | { |
4905 | 196 | this->push ( static_cast <const dbr_float_t *> ( pValue ), nElem ); | 196 | this->push ( static_cast <const dbr_float_t *> ( pValue ), nElem ); |
4906 | 197 | } | 197 | } |
4907 | 198 | 198 | ||
4909 | 199 | void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem ) | 199 | void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem ) |
4910 | 200 | { | 200 | { |
4911 | 201 | this->push ( static_cast <const dbr_char_t *> ( pValue ), nElem ); | 201 | this->push ( static_cast <const dbr_char_t *> ( pValue ), nElem ); |
4912 | 202 | } | 202 | } |
4913 | 203 | 203 | ||
4915 | 204 | void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem ) | 204 | void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem ) |
4916 | 205 | { | 205 | { |
4917 | 206 | this->push ( static_cast <const dbr_long_t *> ( pValue ), nElem ); | 206 | this->push ( static_cast <const dbr_long_t *> ( pValue ), nElem ); |
4918 | 207 | } | 207 | } |
4919 | 208 | 208 | ||
4921 | 209 | void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem ) | 209 | void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem ) |
4922 | 210 | { | 210 | { |
4923 | 211 | this->push ( static_cast <const dbr_double_t *> ( pValue ), nElem ); | 211 | this->push ( static_cast <const dbr_double_t *> ( pValue ), nElem ); |
4924 | 212 | } | 212 | } |
4925 | @@ -258,7 +258,7 @@ const comQueSend::copyVectorFunc_t comQueSend::dbrCopyVector [39] = { | |||
4926 | 258 | &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME | 258 | &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME |
4927 | 259 | }; | 259 | }; |
4928 | 260 | 260 | ||
4930 | 261 | comBuf * comQueSend::popNextComBufToSend () | 261 | comBuf * comQueSend::popNextComBufToSend () |
4931 | 262 | { | 262 | { |
4932 | 263 | comBuf *pBuf = this->bufs.get (); | 263 | comBuf *pBuf = this->bufs.get (); |
4933 | 264 | if ( pBuf ) { | 264 | if ( pBuf ) { |
4934 | @@ -279,9 +279,9 @@ comBuf * comQueSend::popNextComBufToSend () | |||
4935 | 279 | } | 279 | } |
4936 | 280 | 280 | ||
4937 | 281 | void comQueSend::insertRequestHeader ( | 281 | void comQueSend::insertRequestHeader ( |
4941 | 282 | ca_uint16_t request, ca_uint32_t payloadSize, | 282 | ca_uint16_t request, ca_uint32_t payloadSize, |
4942 | 283 | ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid, | 283 | ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid, |
4943 | 284 | ca_uint32_t requestDependent, bool v49Ok ) | 284 | ca_uint32_t requestDependent, bool v49Ok ) |
4944 | 285 | { | 285 | { |
4945 | 286 | if ( payloadSize < 0xffff && nElem < 0xffff ) { | 286 | if ( payloadSize < 0xffff && nElem < 0xffff ) { |
4946 | 287 | comBuf * pComBuf = this->bufs.last (); | 287 | comBuf * pComBuf = this->bufs.last (); |
4947 | @@ -289,12 +289,12 @@ void comQueSend::insertRequestHeader ( | |||
4948 | 289 | pComBuf = newComBuf (); | 289 | pComBuf = newComBuf (); |
4949 | 290 | this->pushComBuf ( *pComBuf ); | 290 | this->pushComBuf ( *pComBuf ); |
4950 | 291 | } | 291 | } |
4957 | 292 | pComBuf->push ( request ); | 292 | pComBuf->push ( request ); |
4958 | 293 | pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) ); | 293 | pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) ); |
4959 | 294 | pComBuf->push ( dataType ); | 294 | pComBuf->push ( dataType ); |
4960 | 295 | pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) ); | 295 | pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) ); |
4961 | 296 | pComBuf->push ( cid ); | 296 | pComBuf->push ( cid ); |
4962 | 297 | pComBuf->push ( requestDependent ); | 297 | pComBuf->push ( requestDependent ); |
4963 | 298 | } | 298 | } |
4964 | 299 | else if ( v49Ok ) { | 299 | else if ( v49Ok ) { |
4965 | 300 | comBuf * pComBuf = this->bufs.last (); | 300 | comBuf * pComBuf = this->bufs.last (); |
4966 | @@ -302,14 +302,14 @@ void comQueSend::insertRequestHeader ( | |||
4967 | 302 | pComBuf = newComBuf (); | 302 | pComBuf = newComBuf (); |
4968 | 303 | this->pushComBuf ( *pComBuf ); | 303 | this->pushComBuf ( *pComBuf ); |
4969 | 304 | } | 304 | } |
4978 | 305 | pComBuf->push ( request ); | 305 | pComBuf->push ( request ); |
4979 | 306 | pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) ); | 306 | pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) ); |
4980 | 307 | pComBuf->push ( dataType ); | 307 | pComBuf->push ( dataType ); |
4981 | 308 | pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) ); | 308 | pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) ); |
4982 | 309 | pComBuf->push ( cid ); | 309 | pComBuf->push ( cid ); |
4983 | 310 | pComBuf->push ( requestDependent ); | 310 | pComBuf->push ( requestDependent ); |
4984 | 311 | pComBuf->push ( payloadSize ); | 311 | pComBuf->push ( payloadSize ); |
4985 | 312 | pComBuf->push ( nElem ); | 312 | pComBuf->push ( nElem ); |
4986 | 313 | } | 313 | } |
4987 | 314 | else { | 314 | else { |
4988 | 315 | throw cacChannel::outOfBounds (); | 315 | throw cacChannel::outOfBounds (); |
4989 | @@ -317,9 +317,9 @@ void comQueSend::insertRequestHeader ( | |||
4990 | 317 | } | 317 | } |
4991 | 318 | 318 | ||
4992 | 319 | void comQueSend::insertRequestWithPayLoad ( | 319 | void comQueSend::insertRequestWithPayLoad ( |
4996 | 320 | ca_uint16_t request, unsigned dataType, arrayElementCount nElem, | 320 | ca_uint16_t request, unsigned dataType, arrayElementCount nElem, |
4997 | 321 | ca_uint32_t cid, ca_uint32_t requestDependent, | 321 | ca_uint32_t cid, ca_uint32_t requestDependent, |
4998 | 322 | const void * pPayload, bool v49Ok ) | 322 | const void * pPayload, bool v49Ok ) |
4999 | 323 | { | 323 | { |
5000 | 324 | if ( INVALID_DB_REQ ( dataType ) ) { | 324 | if ( INVALID_DB_REQ ( dataType ) ) { |
I am concerned that merging this as is will make it difficult to merge commits made on the 3.15 branch up into the 7.0 branch. I just spent quite a few hours doing just that, without having to contend with a large number of lines that had white-space changes as well as code a documentation changes. Git's recursive merge strategy supports the flag -Xignore- space-change which ought to help, but for several of the conflicts I just had to fix git didn't make any attempt to do a 3-way merge at all, because there were file renames involved as well as large content changes, and it didn't recognize these as such.
If you don't think this will be a problem, please try checking out this branch and doing a git merge of the 3.15 branch into it. I got 63 lines of output with 31 CONFLICT lines when I did that last night to the 7.0 branch.
Don't get me wrong I would like us to have a unified source format and coding style (which of course would follow *my* code-formatting preferences, n'est-pas?), but since we have 2 branches to support I don't think this is the best way to achieve that (nor would doing this in the 3.15 branch and merging up be much better). This approach is fine for the PVA submodules because they don't have any older branches to support though.
We might be able to minimize the churn if we add a .indent.pro file and reformat both branches identically, then merge up with no code changes, but I'd want to try that out before committing to the approach. Are GNU indent and BSD indent (as provided on MacOS) fully compatible? I would also only do this once we have minimized the number of outstanding merge & pull requests.