Merge ~dirk.zimoch/epics-base:CleanupWhitespace into ~epics-core/epics-base/+git/epics-base:7.0

Proposed by Dirk Zimoch
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)
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?

To post a comment you must log in.
Revision history for this message
Andrew Johnson (anj) wrote :

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.

Revision history for this message
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.

review: Approve
Revision history for this message
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.

Revision history for this message
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/src/ioc/dbStatic/dbBase.h only but spaces on line end are in 225 more header files and multiple empty lines at file end in 51 headers.

Revision history for this message
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?

Revision history for this message
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)
            doThis(i);
        else
        {
            switch (i)
            {
                case 42:
                    doSomethingSpecial();
                    break;
                default:
                {
                    doTheNormalThing(i, a, b);
                    break;
                }
            }
        }
    }
    return 0;
}

Revision history for this message
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://astyle.sourceforge.net/astyle.html#_Brace_Style_Options

I don't think agreement will be easy.

Revision history for this message
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.

Revision history for this message
Dirk Zimoch (dirk.zimoch) wrote :

'git blame -w' to ignore whitespace change?

Revision history for this message
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 ...

Revision history for this message
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

Revision history for this message
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.

review: Needs Fixing
Revision history for this message
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/epicsCalcTest.cpp

Revision history for this message
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.

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Ok by me.

review: Approve
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Applied as 36a8b51d8e743c487cc5f4c079746b234b2afca1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/modules/ca/src/client/CASG.cpp b/modules/ca/src/client/CASG.cpp
index 4ffb414..9eb44e6 100644
--- a/modules/ca/src/client/CASG.cpp
+++ b/modules/ca/src/client/CASG.cpp
@@ -209,23 +209,23 @@ bool CASG::ioComplete (
209 return this->ioPendingList.count () == 0u;209 return this->ioPendingList.count () == 0u;
210}210}
211211
212void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan, 212void CASG::put ( epicsGuard < epicsMutex > & guard, chid pChan,
213 unsigned type, arrayElementCount count, const void * pValue )213 unsigned type, arrayElementCount count, const void * pValue )
214{214{
215 guard.assertIdenticalMutex ( this->client.mutexRef() );215 guard.assertIdenticalMutex ( this->client.mutexRef() );
216 sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this );216 sgAutoPtr < syncGroupWriteNotify > pNotify ( guard, *this );
217 pNotify = syncGroupWriteNotify::factory ( 217 pNotify = syncGroupWriteNotify::factory (
218 this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan );218 this->freeListWriteOP, *this, & CASG :: recycleWriteNotifyIO, pChan );
219 pNotify->begin ( guard, type, count, pValue );219 pNotify->begin ( guard, type, count, pValue );
220 pNotify.release ();220 pNotify.release ();
221}221}
222222
223void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan, 223void CASG::get ( epicsGuard < epicsMutex > & guard, chid pChan,
224 unsigned type, arrayElementCount count, void *pValue )224 unsigned type, arrayElementCount count, void *pValue )
225{225{
226 guard.assertIdenticalMutex ( this->client.mutexRef() );226 guard.assertIdenticalMutex ( this->client.mutexRef() );
227 sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this );227 sgAutoPtr < syncGroupReadNotify > pNotify ( guard, *this );
228 pNotify = syncGroupReadNotify::factory ( 228 pNotify = syncGroupReadNotify::factory (
229 this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue );229 this->freeListReadOP, *this, & CASG :: recycleReadNotifyIO, pChan, pValue );
230 pNotify->begin ( guard, type, count );230 pNotify->begin ( guard, type, count );
231 pNotify.release ();231 pNotify.release ();
@@ -242,14 +242,14 @@ void CASG::completionNotify (
242 }242 }
243}243}
244244
245void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard, 245void CASG :: recycleReadNotifyIO ( epicsGuard < epicsMutex > & guard,
246 syncGroupReadNotify & io )246 syncGroupReadNotify & io )
247{247{
248 guard.assertIdenticalMutex ( this->client.mutexRef() );248 guard.assertIdenticalMutex ( this->client.mutexRef() );
249 this->freeListReadOP.release ( & io );249 this->freeListReadOP.release ( & io );
250}250}
251251
252void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard, 252void CASG :: recycleWriteNotifyIO ( epicsGuard < epicsMutex > & guard,
253 syncGroupWriteNotify & io )253 syncGroupWriteNotify & io )
254{254{
255 guard.assertIdenticalMutex ( this->client.mutexRef() );255 guard.assertIdenticalMutex ( this->client.mutexRef() );
diff --git a/modules/ca/src/client/SearchDest.h b/modules/ca/src/client/SearchDest.h
index c22be7c..c31f688 100644
--- a/modules/ca/src/client/SearchDest.h
+++ b/modules/ca/src/client/SearchDest.h
@@ -5,7 +5,7 @@
5 * Operator of Los Alamos National Laboratory.5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE Versions 3.13.76 * EPICS BASE Versions 3.13.7
7 * and higher are distributed subject to a Software License Agreement found7 * and higher are distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution. 8 * in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#ifndef SearchDest_h11#ifndef SearchDest_h
@@ -28,7 +28,7 @@ struct SearchDest :
28 virtual void notify (28 virtual void notify (
29 const caHdr & msg, const void * pPayload,29 const caHdr & msg, const void * pPayload,
30 const osiSockAddr & addr, const epicsTime & ) = 0;30 const osiSockAddr & addr, const epicsTime & ) = 0;
31 virtual void show ( 31 virtual void show (
32 epicsGuard < epicsMutex > &, unsigned level ) const = 0;32 epicsGuard < epicsMutex > &, unsigned level ) const = 0;
33 };33 };
34 virtual void searchRequest ( epicsGuard < epicsMutex > &,34 virtual void searchRequest ( epicsGuard < epicsMutex > &,
diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp
index a36899c..528cd6c 100644
--- a/modules/ca/src/client/access.cpp
+++ b/modules/ca/src/client/access.cpp
@@ -183,19 +183,19 @@ int epicsShareAPI ca_context_create (
183 }183 }
184184
185 pcac = ( ca_client_context * ) epicsThreadPrivateGet ( caClientContextId );185 pcac = ( ca_client_context * ) epicsThreadPrivateGet ( caClientContextId );
186 if ( pcac ) {186 if ( pcac ) {
187 if ( premptiveCallbackSelect == ca_enable_preemptive_callback &&187 if ( premptiveCallbackSelect == ca_enable_preemptive_callback &&
188 ! pcac->preemptiveCallbakIsEnabled() ) {188 ! pcac->preemptiveCallbakIsEnabled() ) {
189 return ECA_NOTTHREADED;189 return ECA_NOTTHREADED;
190 }190 }
191 return ECA_NORMAL;191 return ECA_NORMAL;
192 }192 }
193193
194 pcac = new ca_client_context (194 pcac = new ca_client_context (
195 premptiveCallbackSelect == ca_enable_preemptive_callback );195 premptiveCallbackSelect == ca_enable_preemptive_callback );
196 if ( ! pcac ) {196 if ( ! pcac ) {
197 return ECA_ALLOCMEM;197 return ECA_ALLOCMEM;
198 }198 }
199199
200 epicsThreadPrivateSet ( caClientContextId, (void *) pcac );200 epicsThreadPrivateSet ( caClientContextId, (void *) pcac );
201 }201 }
@@ -467,7 +467,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout )
467 try {467 try {
468 // preserve past odd ball behavior of waiting forever when468 // preserve past odd ball behavior of waiting forever when
469 // the delay is zero469 // the delay is zero
470 if ( timeout == 0.0 ) {470 if ( timeout == 0.0 ) {
471 while ( true ) {471 while ( true ) {
472 pcac->pendEvent ( 60.0 );472 pcac->pendEvent ( 60.0 );
473 }473 }
@@ -696,7 +696,7 @@ int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ )
696{696{
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");
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");
699 return ECA_ANACHRONISM;699 return ECA_ANACHRONISM;
700}700}
701701
702// extern "C"702// extern "C"
@@ -802,253 +802,253 @@ epicsShareDef const int epicsTypeToDBR_XXXX [lastEpicsType+1] = {
802802
803// extern "C"803// extern "C"
804epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = {804epicsShareDef const epicsType DBR_XXXXToEpicsType [LAST_BUFFER_TYPE+1] = {
805 epicsOldStringT,805 epicsOldStringT,
806 epicsInt16T,806 epicsInt16T,
807 epicsFloat32T,807 epicsFloat32T,
808 epicsEnum16T,808 epicsEnum16T,
809 epicsUInt8T,809 epicsUInt8T,
810 epicsInt32T,810 epicsInt32T,
811 epicsFloat64T,811 epicsFloat64T,
812812
813 epicsOldStringT,813 epicsOldStringT,
814 epicsInt16T,814 epicsInt16T,
815 epicsFloat32T,815 epicsFloat32T,
816 epicsEnum16T,816 epicsEnum16T,
817 epicsUInt8T,817 epicsUInt8T,
818 epicsInt32T,818 epicsInt32T,
819 epicsFloat64T,819 epicsFloat64T,
820820
821 epicsOldStringT,821 epicsOldStringT,
822 epicsInt16T,822 epicsInt16T,
823 epicsFloat32T,823 epicsFloat32T,
824 epicsEnum16T,824 epicsEnum16T,
825 epicsUInt8T,825 epicsUInt8T,
826 epicsInt32T,826 epicsInt32T,
827 epicsFloat64T,827 epicsFloat64T,
828828
829 epicsOldStringT,829 epicsOldStringT,
830 epicsInt16T,830 epicsInt16T,
831 epicsFloat32T,831 epicsFloat32T,
832 epicsEnum16T,832 epicsEnum16T,
833 epicsUInt8T,833 epicsUInt8T,
834 epicsInt32T,834 epicsInt32T,
835 epicsFloat64T,835 epicsFloat64T,
836836
837 epicsOldStringT,837 epicsOldStringT,
838 epicsInt16T,838 epicsInt16T,
839 epicsFloat32T,839 epicsFloat32T,
840 epicsEnum16T,840 epicsEnum16T,
841 epicsUInt8T,841 epicsUInt8T,
842 epicsInt32T,842 epicsInt32T,
843 epicsFloat64T,843 epicsFloat64T,
844844
845 epicsUInt16T,845 epicsUInt16T,
846 epicsUInt16T,846 epicsUInt16T,
847 epicsOldStringT,847 epicsOldStringT,
848 epicsOldStringT848 epicsOldStringT
849};849};
850850
851// extern "C"851// extern "C"
852epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = {852epicsShareDef const unsigned short dbr_size[LAST_BUFFER_TYPE+1] = {
853 sizeof(dbr_string_t), /* string max size */853 sizeof(dbr_string_t), /* string max size */
854 sizeof(dbr_short_t), /* short */854 sizeof(dbr_short_t), /* short */
855 sizeof(dbr_float_t), /* IEEE Float */855 sizeof(dbr_float_t), /* IEEE Float */
856 sizeof(dbr_enum_t), /* item number */856 sizeof(dbr_enum_t), /* item number */
857 sizeof(dbr_char_t), /* character */857 sizeof(dbr_char_t), /* character */
858858
859 sizeof(dbr_long_t), /* long */859 sizeof(dbr_long_t), /* long */
860 sizeof(dbr_double_t), /* double */860 sizeof(dbr_double_t), /* double */
861 sizeof(struct dbr_sts_string), /* string field with status */861 sizeof(struct dbr_sts_string), /* string field with status */
862 sizeof(struct dbr_sts_short), /* short field with status */862 sizeof(struct dbr_sts_short), /* short field with status */
863 sizeof(struct dbr_sts_float), /* float field with status */863 sizeof(struct dbr_sts_float), /* float field with status */
864864
865 sizeof(struct dbr_sts_enum), /* item number with status */865 sizeof(struct dbr_sts_enum), /* item number with status */
866 sizeof(struct dbr_sts_char), /* char field with status */866 sizeof(struct dbr_sts_char), /* char field with status */
867 sizeof(struct dbr_sts_long), /* long field with status */867 sizeof(struct dbr_sts_long), /* long field with status */
868 sizeof(struct dbr_sts_double), /* double field with time */868 sizeof(struct dbr_sts_double), /* double field with time */
869 sizeof(struct dbr_time_string), /* string field with time */869 sizeof(struct dbr_time_string), /* string field with time */
870870
871 sizeof(struct dbr_time_short), /* short field with time */871 sizeof(struct dbr_time_short), /* short field with time */
872 sizeof(struct dbr_time_float), /* float field with time */872 sizeof(struct dbr_time_float), /* float field with time */
873 sizeof(struct dbr_time_enum), /* item number with time */873 sizeof(struct dbr_time_enum), /* item number with time */
874 sizeof(struct dbr_time_char), /* char field with time */874 sizeof(struct dbr_time_char), /* char field with time */
875 sizeof(struct dbr_time_long), /* long field with time */875 sizeof(struct dbr_time_long), /* long field with time */
876876
877 sizeof(struct dbr_time_double), /* double field with time */877 sizeof(struct dbr_time_double), /* double field with time */
878 sizeof(struct dbr_sts_string), /* graphic string info */878 sizeof(struct dbr_sts_string), /* graphic string info */
879 sizeof(struct dbr_gr_short), /* graphic short info */879 sizeof(struct dbr_gr_short), /* graphic short info */
880 sizeof(struct dbr_gr_float), /* graphic float info */880 sizeof(struct dbr_gr_float), /* graphic float info */
881 sizeof(struct dbr_gr_enum), /* graphic item info */881 sizeof(struct dbr_gr_enum), /* graphic item info */
882882
883 sizeof(struct dbr_gr_char), /* graphic char info */883 sizeof(struct dbr_gr_char), /* graphic char info */
884 sizeof(struct dbr_gr_long), /* graphic long info */884 sizeof(struct dbr_gr_long), /* graphic long info */
885 sizeof(struct dbr_gr_double), /* graphic double info */885 sizeof(struct dbr_gr_double), /* graphic double info */
886 sizeof(struct dbr_sts_string), /* control string info */886 sizeof(struct dbr_sts_string), /* control string info */
887 sizeof(struct dbr_ctrl_short), /* control short info */887 sizeof(struct dbr_ctrl_short), /* control short info */
888888
889 sizeof(struct dbr_ctrl_float), /* control float info */889 sizeof(struct dbr_ctrl_float), /* control float info */
890 sizeof(struct dbr_ctrl_enum), /* control item info */890 sizeof(struct dbr_ctrl_enum), /* control item info */
891 sizeof(struct dbr_ctrl_char), /* control char info */891 sizeof(struct dbr_ctrl_char), /* control char info */
892 sizeof(struct dbr_ctrl_long), /* control long info */892 sizeof(struct dbr_ctrl_long), /* control long info */
893 sizeof(struct dbr_ctrl_double), /* control double info */893 sizeof(struct dbr_ctrl_double), /* control double info */
894894
895 sizeof(dbr_put_ackt_t), /* put ackt */895 sizeof(dbr_put_ackt_t), /* put ackt */
896 sizeof(dbr_put_acks_t), /* put acks */896 sizeof(dbr_put_acks_t), /* put acks */
897 sizeof(struct dbr_stsack_string),/* string field with status/ack*/897 sizeof(struct dbr_stsack_string),/* string field with status/ack*/
898 sizeof(dbr_string_t), /* string max size */898 sizeof(dbr_string_t), /* string max size */
899};899};
900900
901// extern "C"901// extern "C"
902epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = {902epicsShareDef const unsigned short dbr_value_size[LAST_BUFFER_TYPE+1] = {
903 sizeof(dbr_string_t), /* string max size */903 sizeof(dbr_string_t), /* string max size */
904 sizeof(dbr_short_t), /* short */904 sizeof(dbr_short_t), /* short */
905 sizeof(dbr_float_t), /* IEEE Float */905 sizeof(dbr_float_t), /* IEEE Float */
906 sizeof(dbr_enum_t), /* item number */906 sizeof(dbr_enum_t), /* item number */
907 sizeof(dbr_char_t), /* character */907 sizeof(dbr_char_t), /* character */
908908
909 sizeof(dbr_long_t), /* long */909 sizeof(dbr_long_t), /* long */
910 sizeof(dbr_double_t), /* double */910 sizeof(dbr_double_t), /* double */
911 sizeof(dbr_string_t), /* string max size */911 sizeof(dbr_string_t), /* string max size */
912 sizeof(dbr_short_t), /* short */912 sizeof(dbr_short_t), /* short */
913 sizeof(dbr_float_t), /* IEEE Float */913 sizeof(dbr_float_t), /* IEEE Float */
914914
915 sizeof(dbr_enum_t), /* item number */915 sizeof(dbr_enum_t), /* item number */
916 sizeof(dbr_char_t), /* character */916 sizeof(dbr_char_t), /* character */
917 sizeof(dbr_long_t), /* long */917 sizeof(dbr_long_t), /* long */
918 sizeof(dbr_double_t), /* double */918 sizeof(dbr_double_t), /* double */
919 sizeof(dbr_string_t), /* string max size */919 sizeof(dbr_string_t), /* string max size */
920920
921 sizeof(dbr_short_t), /* short */921 sizeof(dbr_short_t), /* short */
922 sizeof(dbr_float_t), /* IEEE Float */922 sizeof(dbr_float_t), /* IEEE Float */
923 sizeof(dbr_enum_t), /* item number */923 sizeof(dbr_enum_t), /* item number */
924 sizeof(dbr_char_t), /* character */924 sizeof(dbr_char_t), /* character */
925 sizeof(dbr_long_t), /* long */925 sizeof(dbr_long_t), /* long */
926926
927 sizeof(dbr_double_t), /* double */927 sizeof(dbr_double_t), /* double */
928 sizeof(dbr_string_t), /* string max size */928 sizeof(dbr_string_t), /* string max size */
929 sizeof(dbr_short_t), /* short */929 sizeof(dbr_short_t), /* short */
930 sizeof(dbr_float_t), /* IEEE Float */930 sizeof(dbr_float_t), /* IEEE Float */
931 sizeof(dbr_enum_t), /* item number */931 sizeof(dbr_enum_t), /* item number */
932932
933 sizeof(dbr_char_t), /* character */933 sizeof(dbr_char_t), /* character */
934 sizeof(dbr_long_t), /* long */934 sizeof(dbr_long_t), /* long */
935 sizeof(dbr_double_t), /* double */935 sizeof(dbr_double_t), /* double */
936 sizeof(dbr_string_t), /* string max size */936 sizeof(dbr_string_t), /* string max size */
937 sizeof(dbr_short_t), /* short */937 sizeof(dbr_short_t), /* short */
938938
939 sizeof(dbr_float_t), /* IEEE Float */939 sizeof(dbr_float_t), /* IEEE Float */
940 sizeof(dbr_enum_t), /* item number */940 sizeof(dbr_enum_t), /* item number */
941 sizeof(dbr_char_t), /* character */941 sizeof(dbr_char_t), /* character */
942 sizeof(dbr_long_t), /* long */942 sizeof(dbr_long_t), /* long */
943 sizeof(dbr_double_t), /* double */943 sizeof(dbr_double_t), /* double */
944944
945 sizeof(dbr_ushort_t), /* put_ackt */945 sizeof(dbr_ushort_t), /* put_ackt */
946 sizeof(dbr_ushort_t), /* put_acks */946 sizeof(dbr_ushort_t), /* put_acks */
947 sizeof(dbr_string_t), /* string max size */947 sizeof(dbr_string_t), /* string max size */
948 sizeof(dbr_string_t), /* string max size */948 sizeof(dbr_string_t), /* string max size */
949};949};
950950
951//extern "C"951//extern "C"
952epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = {952epicsShareDef const enum dbr_value_class dbr_value_class[LAST_BUFFER_TYPE+1] = {
953 dbr_class_string, /* string max size */953 dbr_class_string, /* string max size */
954 dbr_class_int, /* short */954 dbr_class_int, /* short */
955 dbr_class_float, /* IEEE Float */955 dbr_class_float, /* IEEE Float */
956 dbr_class_int, /* item number */956 dbr_class_int, /* item number */
957 dbr_class_int, /* character */957 dbr_class_int, /* character */
958 dbr_class_int, /* long */958 dbr_class_int, /* long */
959 dbr_class_float, /* double */959 dbr_class_float, /* double */
960960
961 dbr_class_string, /* string max size */961 dbr_class_string, /* string max size */
962 dbr_class_int, /* short */962 dbr_class_int, /* short */
963 dbr_class_float, /* IEEE Float */963 dbr_class_float, /* IEEE Float */
964 dbr_class_int, /* item number */964 dbr_class_int, /* item number */
965 dbr_class_int, /* character */965 dbr_class_int, /* character */
966 dbr_class_int, /* long */966 dbr_class_int, /* long */
967 dbr_class_float, /* double */967 dbr_class_float, /* double */
968968
969 dbr_class_string, /* string max size */969 dbr_class_string, /* string max size */
970 dbr_class_int, /* short */970 dbr_class_int, /* short */
971 dbr_class_float, /* IEEE Float */971 dbr_class_float, /* IEEE Float */
972 dbr_class_int, /* item number */972 dbr_class_int, /* item number */
973 dbr_class_int, /* character */973 dbr_class_int, /* character */
974 dbr_class_int, /* long */974 dbr_class_int, /* long */
975 dbr_class_float, /* double */975 dbr_class_float, /* double */
976976
977 dbr_class_string, /* string max size */977 dbr_class_string, /* string max size */
978 dbr_class_int, /* short */978 dbr_class_int, /* short */
979 dbr_class_float, /* IEEE Float */979 dbr_class_float, /* IEEE Float */
980 dbr_class_int, /* item number */980 dbr_class_int, /* item number */
981 dbr_class_int, /* character */981 dbr_class_int, /* character */
982 dbr_class_int, /* long */982 dbr_class_int, /* long */
983 dbr_class_float, /* double */983 dbr_class_float, /* double */
984984
985 dbr_class_string, /* string max size */985 dbr_class_string, /* string max size */
986 dbr_class_int, /* short */986 dbr_class_int, /* short */
987 dbr_class_float, /* IEEE Float */987 dbr_class_float, /* IEEE Float */
988 dbr_class_int, /* item number */988 dbr_class_int, /* item number */
989 dbr_class_int, /* character */989 dbr_class_int, /* character */
990 dbr_class_int, /* long */990 dbr_class_int, /* long */
991 dbr_class_float, /* double */991 dbr_class_float, /* double */
992 dbr_class_int,992 dbr_class_int,
993 dbr_class_int,993 dbr_class_int,
994 dbr_class_string,994 dbr_class_string,
995 dbr_class_string, /* string max size */995 dbr_class_string, /* string max size */
996};996};
997997
998// extern "C"998// extern "C"
999epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = {999epicsShareDef const unsigned short dbr_value_offset[LAST_BUFFER_TYPE+1] = {
1000 0, /* string */1000 0, /* string */
1001 0, /* short */1001 0, /* short */
1002 0, /* IEEE Float */1002 0, /* IEEE Float */
1003 0, /* item number */1003 0, /* item number */
1004 0, /* character */1004 0, /* character */
1005 0, /* long */1005 0, /* long */
1006 0, /* IEEE double */1006 0, /* IEEE double */
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 */
1008 (unsigned short) offsetof(dbr_sts_short,value), /* short field with status */1008 (unsigned short) offsetof(dbr_sts_short,value), /* short field with status */
1009 (unsigned short) offsetof(dbr_sts_float,value), /* float field with status */1009 (unsigned short) offsetof(dbr_sts_float,value), /* float field with status */
1010 (unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */1010 (unsigned short) offsetof(dbr_sts_enum,value), /* item number with status */
1011 (unsigned short) offsetof(dbr_sts_char,value), /* char field with status */1011 (unsigned short) offsetof(dbr_sts_char,value), /* char field with status */
1012 (unsigned short) offsetof(dbr_sts_long,value), /* long field with status */1012 (unsigned short) offsetof(dbr_sts_long,value), /* long field with status */
1013 (unsigned short) offsetof(dbr_sts_double,value), /* double field with time */1013 (unsigned short) offsetof(dbr_sts_double,value), /* double field with time */
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 */
1015 (unsigned short) offsetof(dbr_time_short,value), /* short field with time */1015 (unsigned short) offsetof(dbr_time_short,value), /* short field with time */
1016 (unsigned short) offsetof(dbr_time_float,value), /* float field with time */1016 (unsigned short) offsetof(dbr_time_float,value), /* float field with time */
1017 (unsigned short) offsetof(dbr_time_enum,value), /* item number with time */1017 (unsigned short) offsetof(dbr_time_enum,value), /* item number with time */
1018 (unsigned short) offsetof(dbr_time_char,value), /* char field with time */1018 (unsigned short) offsetof(dbr_time_char,value), /* char field with time */
1019 (unsigned short) offsetof(dbr_time_long,value), /* long field with time */1019 (unsigned short) offsetof(dbr_time_long,value), /* long field with time */
1020 (unsigned short) offsetof(dbr_time_double,value), /* double field with time */1020 (unsigned short) offsetof(dbr_time_double,value), /* double field with time */
1021 (unsigned short) offsetof(dbr_sts_string,value[0]),/* graphic string info */1021 (unsigned short) offsetof(dbr_sts_string,value[0]), /* graphic string info */
1022 (unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */1022 (unsigned short) offsetof(dbr_gr_short,value), /* graphic short info */
1023 (unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */1023 (unsigned short) offsetof(dbr_gr_float,value), /* graphic float info */
1024 (unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */1024 (unsigned short) offsetof(dbr_gr_enum,value), /* graphic item info */
1025 (unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */1025 (unsigned short) offsetof(dbr_gr_char,value), /* graphic char info */
1026 (unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */1026 (unsigned short) offsetof(dbr_gr_long,value), /* graphic long info */
1027 (unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */1027 (unsigned short) offsetof(dbr_gr_double,value), /* graphic double info */
1028 (unsigned short) offsetof(dbr_sts_string,value[0]),/* control string info */1028 (unsigned short) offsetof(dbr_sts_string,value[0]), /* control string info */
1029 (unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */1029 (unsigned short) offsetof(dbr_ctrl_short,value), /* control short info */
1030 (unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */1030 (unsigned short) offsetof(dbr_ctrl_float,value), /* control float info */
1031 (unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */1031 (unsigned short) offsetof(dbr_ctrl_enum,value), /* control item info */
1032 (unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */1032 (unsigned short) offsetof(dbr_ctrl_char,value), /* control char info */
1033 (unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */1033 (unsigned short) offsetof(dbr_ctrl_long,value), /* control long info */
1034 (unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */1034 (unsigned short) offsetof(dbr_ctrl_double,value), /* control double info */
1035 0, /* put ackt */1035 0, /* put ackt */
1036 0, /* put acks */1036 0, /* put acks */
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 */
1038 0, /* string */1038 0, /* string */
1039};1039};
10401040
1041// extern "C"1041// extern "C"
1042epicsShareDef const char *dbf_text[LAST_TYPE+3] = {1042epicsShareDef const char *dbf_text[LAST_TYPE+3] = {
1043 "TYPENOTCONN",1043 "TYPENOTCONN",
1044 "DBF_STRING",1044 "DBF_STRING",
1045 "DBF_SHORT",1045 "DBF_SHORT",
1046 "DBF_FLOAT",1046 "DBF_FLOAT",
1047 "DBF_ENUM",1047 "DBF_ENUM",
1048 "DBF_CHAR",1048 "DBF_CHAR",
1049 "DBF_LONG",1049 "DBF_LONG",
1050 "DBF_DOUBLE",1050 "DBF_DOUBLE",
1051 "DBF_NO_ACCESS"1051 "DBF_NO_ACCESS"
1052};1052};
10531053
1054// extern "C"1054// extern "C"
diff --git a/modules/ca/src/client/acctst.c b/modules/ca/src/client/acctst.c
index fd18ae4..9f3e907 100644
--- a/modules/ca/src/client/acctst.c
+++ b/modules/ca/src/client/acctst.c
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/*11/*
@@ -14,7 +14,7 @@
14 * Jeff Hill14 * Jeff Hill
15 * Murali Shankar - initial versions of verifyMultithreadSubscr15 * Murali Shankar - initial versions of verifyMultithreadSubscr
16 * Michael Abbott - initial versions of multiSubscrDestroyNoLateCallbackTest16 * Michael Abbott - initial versions of multiSubscrDestroyNoLateCallbackTest
17 * 17 *
18 */18 */
1919
20/*20/*
@@ -110,7 +110,7 @@ void nUpdatesTester ( struct event_handler_args args )
110 ( *pCtr ) ++;110 ( *pCtr ) ++;
111 }111 }
112 else {112 else {
113 printf ( "subscription update failed for \"%s\" because \"%s\"", 113 printf ( "subscription update failed for \"%s\" because \"%s\"",
114 ca_name ( args.chid ), ca_message ( args.status ) );114 ca_name ( args.chid ), ca_message ( args.status ) );
115 }115 }
116}116}
@@ -131,7 +131,7 @@ void monitorSubscriptionFirstUpdateTest ( const char *pName, chid chan, unsigned
131 * verify that the first event arrives (with evid)131 * verify that the first event arrives (with evid)
132 * and channel connected132 * and channel connected
133 */133 */
134 status = ca_add_event ( DBR_FLOAT, 134 status = ca_add_event ( DBR_FLOAT,
135 chan, nUpdatesTester, &eventCount, &id );135 chan, nUpdatesTester, &eventCount, &id );
136 SEVCHK ( status, 0 );136 SEVCHK ( status, 0 );
137 ca_flush_io ();137 ca_flush_io ();
@@ -190,7 +190,7 @@ void monitorSubscriptionFirstUpdateTest ( const char *pName, chid chan, unsigned
190 waitCount = 0u;190 waitCount = 0u;
191 status = ca_search ( pName, &chan2 );191 status = ca_search ( pName, &chan2 );
192 SEVCHK ( status, 0 );192 SEVCHK ( status, 0 );
193 status = ca_add_event ( DBR_FLOAT, chan2, 193 status = ca_add_event ( DBR_FLOAT, chan2,
194 nUpdatesTester, &eventCount, 0 );194 nUpdatesTester, &eventCount, 0 );
195 SEVCHK ( status, 0 );195 SEVCHK ( status, 0 );
196 status = ca_pend_io ( timeoutToPendIO );196 status = ca_pend_io ( timeoutToPendIO );
@@ -250,7 +250,7 @@ void ioTesterGet ( struct event_handler_args args )
250 ( *pCtr ) ++;250 ( *pCtr ) ++;
251 }251 }
252 else {252 else {
253 printf("get call back failed for \"%s\" because \"%s\"", 253 printf("get call back failed for \"%s\" because \"%s\"",
254 ca_name ( args.chid ), ca_message ( args.status ) );254 ca_name ( args.chid ), ca_message ( args.status ) );
255 }255 }
256}256}
@@ -263,7 +263,7 @@ void ioTesterEvent ( struct event_handler_args args )
263 SEVCHK ( status, 0 );263 SEVCHK ( status, 0 );
264 }264 }
265 else {265 else {
266 printf ( "subscription update failed for \"%s\" because \"%s\"", 266 printf ( "subscription update failed for \"%s\" because \"%s\"",
267 ca_name ( args.chid ), ca_message ( args.status ) );267 ca_name ( args.chid ), ca_message ( args.status ) );
268 }268 }
269}269}
@@ -280,7 +280,7 @@ void verifyMonitorSubscriptionFlushIO ( chid chan, unsigned interestLevel )
280 /*280 /*
281 * verify that the first event arrives281 * verify that the first event arrives
282 */282 */
283 status = ca_add_event ( DBR_FLOAT, 283 status = ca_add_event ( DBR_FLOAT,
284 chan, nUpdatesTester, &eventCount, &id );284 chan, nUpdatesTester, &eventCount, &id );
285 SEVCHK (status, 0);285 SEVCHK (status, 0);
286 ca_flush_io ();286 ca_flush_io ();
@@ -317,8 +317,8 @@ void getCallbackStateChange ( struct event_handler_args args )
317 verify ( pChan->channel == args.chid );317 verify ( pChan->channel == args.chid );
318 verify ( pChan->connected );318 verify ( pChan->connected );
319 if ( args.status != ECA_NORMAL ) {319 if ( args.status != ECA_NORMAL ) {
320 printf ( "getCallbackStateChange abnormal status was \"%s\"\n", 320 printf ( "getCallbackStateChange abnormal status was \"%s\"\n",
321 ca_message ( args.status ) ); 321 ca_message ( args.status ) );
322 verify ( args.status == ECA_NORMAL );322 verify ( args.status == ECA_NORMAL );
323 }323 }
324324
@@ -373,7 +373,7 @@ void subscriptionStateChange ( struct event_handler_args args )
373void noopSubscriptionStateChange ( struct event_handler_args args )373void noopSubscriptionStateChange ( struct event_handler_args args )
374{374{
375 if ( args.status != ECA_NORMAL ) {375 if ( args.status != ECA_NORMAL ) {
376 printf ( "noopSubscriptionStateChange: subscription update failed for \"%s\" because \"%s\"", 376 printf ( "noopSubscriptionStateChange: subscription update failed for \"%s\" because \"%s\"",
377 ca_name ( args.chid ), ca_message ( args.status ) );377 ca_name ( args.chid ), ca_message ( args.status ) );
378 }378 }
379}379}
@@ -396,7 +396,7 @@ void noopSubscriptionStateChange ( struct event_handler_args args )
396 *396 *
397 * 7) verify that a nill access rights handler can be installed397 * 7) verify that a nill access rights handler can be installed
398 */398 */
399void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount, 399void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
400 unsigned repetitionCount, unsigned interestLevel )400 unsigned repetitionCount, unsigned interestLevel )
401{401{
402 int status;402 int status;
@@ -439,7 +439,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
439439
440 showProgress ( interestLevel );440 showProgress ( interestLevel );
441441
442 while ( connectionUpdateCount < chanCount || 442 while ( connectionUpdateCount < chanCount ||
443 getCallbackCount < chanCount ) {443 getCallbackCount < chanCount ) {
444 epicsThreadSleep ( 0.1 );444 epicsThreadSleep ( 0.1 );
445 ca_poll (); /* emulate typical GUI */445 ca_poll (); /* emulate typical GUI */
@@ -471,7 +471,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
471 ca_self_test ();471 ca_self_test ();
472472
473 showProgress ( interestLevel );473 showProgress ( interestLevel );
474 474
475 for ( j = 0u; j < chanCount; j++ ) {475 for ( j = 0u; j < chanCount; j++ ) {
476 status = ca_replace_access_rights_event (476 status = ca_replace_access_rights_event (
477 pChans[j].channel, 0 );477 pChans[j].channel, 0 );
@@ -494,7 +494,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
494/*494/*
495 * verifyBlockingConnect ()495 * verifyBlockingConnect ()
496 *496 *
497 * 1) verify that we dont print a disconnect message when 497 * 1) verify that we dont print a disconnect message when
498 * we delete the last channel498 * we delete the last channel
499 *499 *
500 * 2) verify that we delete the connection to the IOC500 * 2) verify that we delete the connection to the IOC
@@ -502,7 +502,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
502 *502 *
503 * 3) verify channel connection state variables503 * 3) verify channel connection state variables
504 *504 *
505 * 4) verify ca_test_io () and ca_pend_io () work with 505 * 4) verify ca_test_io () and ca_pend_io () work with
506 * channels w/o connection handlers506 * channels w/o connection handlers
507 *507 *
508 * 5) verify that the pending IO count is properly508 * 5) verify that the pending IO count is properly
@@ -512,7 +512,7 @@ void verifyConnectionHandlerConnect ( appChan *pChans, unsigned chanCount,
512 * 6) verify that the pending IO count goes to zero512 * 6) verify that the pending IO count goes to zero
513 * if the channel is deleted before it connects.513 * if the channel is deleted before it connects.
514 */514 */
515void verifyBlockingConnect ( appChan *pChans, unsigned chanCount, 515void verifyBlockingConnect ( appChan *pChans, unsigned chanCount,
516 unsigned repetitionCount, unsigned interestLevel )516 unsigned repetitionCount, unsigned interestLevel )
517{517{
518 int status;518 int status;
@@ -551,7 +551,7 @@ void verifyBlockingConnect ( appChan *pChans, unsigned chanCount,
551 verify ( INVALID_DB_REQ ( ca_field_type ( pChans[j].channel ) ) );551 verify ( INVALID_DB_REQ ( ca_field_type ( pChans[j].channel ) ) );
552 verify ( ca_test_io () == ECA_IOINPROGRESS );552 verify ( ca_test_io () == ECA_IOINPROGRESS );
553 }553 }
554 554
555 status = ca_replace_access_rights_event (555 status = ca_replace_access_rights_event (
556 pChans[j].channel, accessRightsStateChange );556 pChans[j].channel, accessRightsStateChange );
557 SEVCHK ( status, NULL );557 SEVCHK ( status, NULL );
@@ -605,7 +605,7 @@ void verifyBlockingConnect ( appChan *pChans, unsigned chanCount,
605 showProgress ( interestLevel );605 showProgress ( interestLevel );
606606
607 /*607 /*
608 * verify that connections to IOC's that are 608 * verify that connections to IOC's that are
609 * not in use are dropped609 * not in use are dropped
610 */610 */
611 if ( ca_get_ioc_connection_count () != backgroundConnCount ) {611 if ( ca_get_ioc_connection_count () != backgroundConnCount ) {
@@ -698,13 +698,13 @@ void verifyClear ( appChan *pChans, unsigned interestLevel )
698698
699 /*699 /*
700 * verify subscription clear before connect700 * verify subscription clear before connect
701 * and verify that NULL evid does not cause failure 701 * and verify that NULL evid does not cause failure
702 */702 */
703 status = ca_search ( pChans[0].name, &pChans[0].channel );703 status = ca_search ( pChans[0].name, &pChans[0].channel );
704 SEVCHK ( status, NULL );704 SEVCHK ( status, NULL );
705705
706 SEVCHK ( status, NULL );706 SEVCHK ( status, NULL );
707 status = ca_add_event ( DBR_GR_DOUBLE, 707 status = ca_add_event ( DBR_GR_DOUBLE,
708 pChans[0].channel, noopSubscriptionStateChange, NULL, NULL );708 pChans[0].channel, noopSubscriptionStateChange, NULL, NULL );
709 SEVCHK ( status, NULL );709 SEVCHK ( status, NULL );
710710
@@ -791,7 +791,7 @@ void ctrlDoubleTest ( chid chan, unsigned interestLevel )
791 SEVCHK (status, "ctrlDoubleTest, ca_array_put");791 SEVCHK (status, "ctrlDoubleTest, ca_array_put");
792792
793 size = dbr_size_n(DBR_CTRL_DOUBLE, ca_element_count(chan));793 size = dbr_size_n(DBR_CTRL_DOUBLE, ca_element_count(chan));
794 pCtrlDbl = (struct dbr_ctrl_double *) malloc (size); 794 pCtrlDbl = (struct dbr_ctrl_double *) malloc (size);
795 verify (pCtrlDbl!=NULL);795 verify (pCtrlDbl!=NULL);
796796
797 /*797 /*
@@ -846,7 +846,7 @@ void verifyBlockInPendIO ( chid chan, unsigned interestLevel )
846 else if ( resp != -100 ) {846 else if ( resp != -100 ) {
847 printf ( "CA didnt block for get to return?\n" );847 printf ( "CA didnt block for get to return?\n" );
848 }848 }
849 849
850 req = 1;850 req = 1;
851 resp = -100;851 resp = -100;
852 SEVCHK ( ca_put (DBR_LONG, chan, &req), NULL );852 SEVCHK ( ca_put (DBR_LONG, chan, &req), NULL );
@@ -898,7 +898,7 @@ void floatTest ( chid chan, dbr_float_t beginValue, dbr_float_t increment,
898/*898/*
899 * doubleTest ()899 * doubleTest ()
900 */900 */
901void doubleTest ( chid chan, dbr_double_t beginValue, 901void doubleTest ( chid chan, dbr_double_t beginValue,
902 dbr_double_t increment, dbr_double_t epsilon,902 dbr_double_t increment, dbr_double_t epsilon,
903 unsigned iterations)903 unsigned iterations)
904{904{
@@ -929,7 +929,7 @@ void doubleTest ( chid chan, dbr_double_t beginValue,
929 * Verify that we can write and then read back929 * Verify that we can write and then read back
930 * the same analog value930 * the same analog value
931 */931 */
932void verifyAnalogIO ( chid chan, int dataType, double min, double max, 932void verifyAnalogIO ( chid chan, int dataType, double min, double max,
933 int minExp, int maxExp, double epsilon, unsigned interestLevel )933 int minExp, int maxExp, double epsilon, unsigned interestLevel )
934{934{
935 int i;935 int i;
@@ -962,11 +962,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max,
962 iter = 10u;962 iter = 10u;
963 }963 }
964 if ( dataType == DBR_FLOAT ) {964 if ( dataType == DBR_FLOAT ) {
965 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, 965 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr,
966 (dbr_float_t) epsil, iter );966 (dbr_float_t) epsil, iter );
967 }967 }
968 else if (dataType == DBR_DOUBLE ) {968 else if (dataType == DBR_DOUBLE ) {
969 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, 969 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr,
970 (dbr_double_t) epsil, iter );970 (dbr_double_t) epsil, iter );
971 }971 }
972 else {972 else {
@@ -983,11 +983,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max,
983 iter = 10u;983 iter = 10u;
984 }984 }
985 if ( dataType == DBR_FLOAT ) {985 if ( dataType == DBR_FLOAT ) {
986 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, 986 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr,
987 (dbr_float_t) epsil, iter );987 (dbr_float_t) epsil, iter );
988 }988 }
989 else if (dataType == DBR_DOUBLE ) {989 else if (dataType == DBR_DOUBLE ) {
990 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, 990 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr,
991 (dbr_double_t) epsil, iter );991 (dbr_double_t) epsil, iter );
992 }992 }
993 else {993 else {
@@ -1004,11 +1004,11 @@ void verifyAnalogIO ( chid chan, int dataType, double min, double max,
1004 iter = 10l;1004 iter = 10l;
1005 }1005 }
1006 if ( dataType == DBR_FLOAT ) {1006 if ( dataType == DBR_FLOAT ) {
1007 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr, 1007 floatTest ( chan, (dbr_float_t) base, (dbr_float_t) incr,
1008 (dbr_float_t) epsil, iter );1008 (dbr_float_t) epsil, iter );
1009 }1009 }
1010 else if (dataType == DBR_DOUBLE ) {1010 else if (dataType == DBR_DOUBLE ) {
1011 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr, 1011 doubleTest ( chan, (dbr_double_t) base, (dbr_double_t) incr,
1012 (dbr_double_t) epsil, iter );1012 (dbr_double_t) epsil, iter );
1013 }1013 }
1014 else {1014 else {
@@ -1045,7 +1045,7 @@ void verifyLongIO ( chid chan, unsigned interestLevel )
1045 if ( incr == 0 ) {1045 if ( incr == 0 ) {
1046 incr = 1;1046 incr = 1;
1047 }1047 }
1048 for ( iter = cl.lower_ctrl_limit; 1048 for ( iter = cl.lower_ctrl_limit;
1049 iter <= cl.upper_ctrl_limit; iter+=incr ) {1049 iter <= cl.upper_ctrl_limit; iter+=incr ) {
10501050
1051 ca_put ( DBR_LONG, chan, &iter );1051 ca_put ( DBR_LONG, chan, &iter );
@@ -1089,8 +1089,8 @@ void verifyShortIO ( chid chan, unsigned interestLevel )
1089 if ( incr == 0 ) {1089 if ( incr == 0 ) {
1090 incr = 1;1090 incr = 1;
1091 }1091 }
1092 for ( iter = (dbr_short_t) cl.lower_ctrl_limit; 1092 for ( iter = (dbr_short_t) cl.lower_ctrl_limit;
1093 iter <= (dbr_short_t) cl.upper_ctrl_limit; 1093 iter <= (dbr_short_t) cl.upper_ctrl_limit;
1094 iter = (dbr_short_t) (iter + incr) ) {1094 iter = (dbr_short_t) (iter + incr) ) {
10951095
1096 ca_put ( DBR_SHORT, chan, &iter );1096 ca_put ( DBR_SHORT, chan, &iter );
@@ -1131,7 +1131,7 @@ void verifyHighThroughputRead ( chid chan, unsigned interestLevel )
1131 }1131 }
1132}1132}
11331133
1134void verifyHighThroughputWrite ( chid chan, unsigned interestLevel ) 1134void verifyHighThroughputWrite ( chid chan, unsigned interestLevel )
1135{1135{
1136 int status;1136 int status;
1137 unsigned i;1137 unsigned i;
@@ -1155,12 +1155,12 @@ void verifyHighThroughputWrite ( chid chan, unsigned interestLevel )
1155 * verify we dont jam up on many uninterrupted1155 * verify we dont jam up on many uninterrupted
1156 * get callback requests1156 * get callback requests
1157 */1157 */
1158void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel ) 1158void verifyHighThroughputReadCallback ( chid chan, unsigned interestLevel )
1159{1159{
1160 unsigned i;1160 unsigned i;
1161 int status;1161 int status;
11621162
1163 if ( ca_read_access ( chan ) ) { 1163 if ( ca_read_access ( chan ) ) {
1164 unsigned count = 0u;1164 unsigned count = 0u;
1165 showProgressBegin ( "verifyHighThroughputReadCallback", interestLevel );1165 showProgressBegin ( "verifyHighThroughputReadCallback", interestLevel );
1166 for ( i=0; i<10000; i++ ) {1166 for ( i=0; i<10000; i++ ) {
@@ -1203,10 +1203,10 @@ void verifyHighThroughputWriteCallback ( chid chan, unsigned interestLevel )
1203 SEVCHK ( ca_flush_io (), NULL );1203 SEVCHK ( ca_flush_io (), NULL );
1204 dval = 0.0;1204 dval = 0.0;
1205 status = ca_get ( DBR_DOUBLE, chan, &dval );1205 status = ca_get ( DBR_DOUBLE, chan, &dval );
1206 SEVCHK ( status, 1206 SEVCHK ( status,
1207 "verifyHighThroughputWriteCallback, verification get" );1207 "verifyHighThroughputWriteCallback, verification get" );
1208 status = ca_pend_io ( timeoutToPendIO );1208 status = ca_pend_io ( timeoutToPendIO );
1209 SEVCHK ( status, 1209 SEVCHK ( status,
1210 "verifyHighThroughputWriteCallback, verification get pend" );1210 "verifyHighThroughputWriteCallback, verification get pend" );
1211 verify ( dval == i );1211 verify ( dval == i );
1212 showProgressEnd ( interestLevel );1212 showProgressEnd ( interestLevel );
@@ -1360,9 +1360,9 @@ static void noLateCallbackDetect ( struct event_handler_args args )
1360 verify ( callbackIsOk );1360 verify ( callbackIsOk );
1361}1361}
13621362
1363static void multiSubscrDestroyNoLateCallbackThread ( void * pParm ) 1363static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
1364{1364{
1365 struct MultiSubscrDestroyNoLateCallbackTestData * const pTestData = 1365 struct MultiSubscrDestroyNoLateCallbackTestData * const pTestData =
1366 ( struct MultiSubscrDestroyNoLateCallbackTestData * ) pParm;1366 ( struct MultiSubscrDestroyNoLateCallbackTestData * ) pParm;
1367 unsigned i, j;1367 unsigned i, j;
1368 int status;1368 int status;
@@ -1391,10 +1391,10 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
1391 SEVCHK ( ca_add_event ( DBR_GR_FLOAT, pTestData->m_chan, noLateCallbackDetect,1391 SEVCHK ( ca_add_event ( DBR_GR_FLOAT, pTestData->m_chan, noLateCallbackDetect,
1392 &pTestData->m_eventData[j], &pTestData->m_eventData[j].m_id ) , NULL );1392 &pTestData->m_eventData[j], &pTestData->m_eventData[j].m_id ) , NULL );
1393 }1393 }
1394 SEVCHK ( ca_flush_io(), NULL ); 1394 SEVCHK ( ca_flush_io(), NULL );
13951395
1396 /*1396 /*
1397 * raise the priority of the current thread hoping to improve our 1397 * raise the priority of the current thread hoping to improve our
1398 * likelyhood of detecting a bug1398 * likelyhood of detecting a bug
1399 */1399 */
1400 priorityOfTestThread = epicsThreadGetPrioritySelf ();1400 priorityOfTestThread = epicsThreadGetPrioritySelf ();
@@ -1445,7 +1445,7 @@ static void multiSubscrDestroyNoLateCallbackThread ( void * pParm )
1445}1445}
14461446
1447/*1447/*
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
1449 * comes after the subscription is destroyed1449 * comes after the subscription is destroyed
1450 */1450 */
1451static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel )1451static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned interestLevel )
@@ -1456,13 +1456,13 @@ static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned i
14561456
1457 pTestData = calloc ( 1u, sizeof ( struct MultiSubscrDestroyNoLateCallbackTestData ) );1457 pTestData = calloc ( 1u, sizeof ( struct MultiSubscrDestroyNoLateCallbackTestData ) );
1458 verify ( pTestData );1458 verify ( pTestData );
1459 pTestData->m_mutex = epicsMutexMustCreate (); 1459 pTestData->m_mutex = epicsMutexMustCreate ();
1460 pTestData->m_testDoneEvent = epicsEventMustCreate ( epicsEventEmpty );1460 pTestData->m_testDoneEvent = epicsEventMustCreate ( epicsEventEmpty );
1461 pTestData->m_pChanName = pName;1461 pTestData->m_pChanName = pName;
1462 pTestData->m_interestLevel = interestLevel;1462 pTestData->m_interestLevel = interestLevel;
1463 epicsThreadMustCreate (1463 epicsThreadMustCreate (
1464 "multiSubscrDestroyNoLateCallbackTest",1464 "multiSubscrDestroyNoLateCallbackTest",
1465 epicsThreadPriorityLow, 1465 epicsThreadPriorityLow,
1466 epicsThreadGetStackSize ( epicsThreadStackMedium ),1466 epicsThreadGetStackSize ( epicsThreadStackMedium ),
1467 multiSubscrDestroyNoLateCallbackThread,1467 multiSubscrDestroyNoLateCallbackThread,
1468 pTestData );1468 pTestData );
@@ -1488,7 +1488,7 @@ static void multiSubscrDestroyNoLateCallbackTest ( const char *pName, unsigned i
1488 * 1) verify we can add many monitors at once1488 * 1) verify we can add many monitors at once
1489 * 2) verify that under heavy load the last monitor1489 * 2) verify that under heavy load the last monitor
1490 * returned is the last modification sent1490 * returned is the last modification sent
1491 * 3) attempt to delete monitors while many monitors 1491 * 3) attempt to delete monitors while many monitors
1492 * are running1492 * are running
1493 */1493 */
1494void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )1494void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
@@ -1497,7 +1497,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1497 evid mid[1000];1497 evid mid[1000];
1498 dbr_float_t temp, getResp;1498 dbr_float_t temp, getResp;
1499 unsigned i;1499 unsigned i;
1500 1500
1501 showProgressBegin ( "multiSubscriptionDeleteTest", interestLevel );1501 showProgressBegin ( "multiSubscriptionDeleteTest", interestLevel );
15021502
1503 for ( i=0; i < NELEMENTS (mid); i++ ) {1503 for ( i=0; i < NELEMENTS (mid); i++ ) {
@@ -1510,7 +1510,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1510 * complete1510 * complete
1511 *1511 *
1512 * NOTE: this hopefully demonstrates that when the1512 * NOTE: this hopefully demonstrates that when the
1513 * server is very busy with monitors the client 1513 * server is very busy with monitors the client
1514 * is still able to punch through with a request.1514 * is still able to punch through with a request.
1515 */1515 */
1516 SEVCHK ( ca_get ( DBR_FLOAT,chan,&getResp ), NULL );1516 SEVCHK ( ca_get ( DBR_FLOAT,chan,&getResp ), NULL );
@@ -1521,7 +1521,7 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1521 /*1521 /*
1522 * attempt to generate heavy event traffic before initiating1522 * attempt to generate heavy event traffic before initiating
1523 * the monitor delete1523 * the monitor delete
1524 */ 1524 */
1525 if ( ca_write_access (chan) ) {1525 if ( ca_write_access (chan) ) {
1526 for ( i=0; i < NELEMENTS (mid); i++ ) {1526 for ( i=0; i < NELEMENTS (mid); i++ ) {
1527 temp = (float) i;1527 temp = (float) i;
@@ -1532,12 +1532,12 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1532 showProgress ( interestLevel );1532 showProgress ( interestLevel );
15331533
1534 /*1534 /*
1535 * without pausing begin deleting the event subscriptions 1535 * without pausing begin deleting the event subscriptions
1536 * while the queue is full1536 * while the queue is full
1537 *1537 *
1538 * continue attempting to generate heavy event traffic 1538 * continue attempting to generate heavy event traffic
1539 * while deleting subscriptions with the hope that we will 1539 * while deleting subscriptions with the hope that we will
1540 * deleting an event at the instant that its callback is 1540 * deleting an event at the instant that its callback is
1541 * occurring1541 * occurring
1542 */1542 */
1543 for ( i=0; i < NELEMENTS (mid); i++ ) {1543 for ( i=0; i < NELEMENTS (mid); i++ ) {
@@ -1557,14 +1557,14 @@ void multiSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1557 SEVCHK ( ca_pend_io (timeoutToPendIO), NULL );1557 SEVCHK ( ca_pend_io (timeoutToPendIO), NULL );
15581558
1559 showProgressEnd ( interestLevel );1559 showProgressEnd ( interestLevel );
1560} 1560}
15611561
15621562
1563/*1563/*
1564 * singleSubscriptionDeleteTest1564 * singleSubscriptionDeleteTest
1565 *1565 *
1566 * verify that we dont fail when we repeatedly create 1566 * verify that we dont fail when we repeatedly create
1567 * and delete only one subscription with a high level of 1567 * and delete only one subscription with a high level of
1568 * traffic on it1568 * traffic on it
1569 */1569 */
1570void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )1570void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
@@ -1573,7 +1573,7 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1573 evid sid;1573 evid sid;
1574 dbr_float_t temp, getResp;1574 dbr_float_t temp, getResp;
1575 unsigned i;1575 unsigned i;
1576 1576
1577 showProgressBegin ( "singleSubscriptionDeleteTest", interestLevel );1577 showProgressBegin ( "singleSubscriptionDeleteTest", interestLevel );
15781578
1579 for ( i=0; i < 1000; i++ ){1579 for ( i=0; i < 1000; i++ ){
@@ -1595,14 +1595,14 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1595 * attempt to generate heavy event traffic before initiating1595 * attempt to generate heavy event traffic before initiating
1596 * the monitor delete1596 * the monitor delete
1597 *1597 *
1598 * try to interrupt the recv thread while it is processing 1598 * try to interrupt the recv thread while it is processing
1599 * incoming subscription updates1599 * incoming subscription updates
1600 */ 1600 */
1601 if ( ca_write_access (chan) ) {1601 if ( ca_write_access (chan) ) {
1602 unsigned j = 0;1602 unsigned j = 0;
1603 while ( j < i ) {1603 while ( j < i ) {
1604 temp = (float) j++;1604 temp = (float) j++;
1605 SEVCHK ( ca_put (DBR_FLOAT, chan, &temp), 1605 SEVCHK ( ca_put (DBR_FLOAT, chan, &temp),
1606 "singleSubscriptionDeleteTest - one of multiple puts" );1606 "singleSubscriptionDeleteTest - one of multiple puts" );
1607 }1607 }
1608 ca_flush_io ();1608 ca_flush_io ();
@@ -1612,7 +1612,7 @@ void singleSubscriptionDeleteTest ( chid chan, unsigned interestLevel )
1612 }1612 }
16131613
1614 showProgressEnd ( interestLevel );1614 showProgressEnd ( interestLevel );
1615} 1615}
16161616
1617/*1617/*
1618 * channelClearWithEventTrafficTest1618 * channelClearWithEventTrafficTest
@@ -1626,13 +1626,13 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve
1626 evid sid;1626 evid sid;
1627 dbr_float_t temp, getResp;1627 dbr_float_t temp, getResp;
1628 unsigned i;1628 unsigned i;
1629 1629
1630 showProgressBegin ( "channelClearWithEventTrafficTest", interestLevel );1630 showProgressBegin ( "channelClearWithEventTrafficTest", interestLevel );
16311631
1632 for ( i=0; i < 1000; i++ ) {1632 for ( i=0; i < 1000; i++ ) {
1633 chid chan;1633 chid chan;
16341634
1635 int status = ca_create_channel ( pName, 0, 0, 1635 int status = ca_create_channel ( pName, 0, 0,
1636 CA_PRIORITY_DEFAULT, &chan );1636 CA_PRIORITY_DEFAULT, &chan );
1637 status = ca_pend_io ( timeoutToPendIO );1637 status = ca_pend_io ( timeoutToPendIO );
1638 SEVCHK ( status, "channelClearWithEventTrafficTest: channel connect failed" );1638 SEVCHK ( status, "channelClearWithEventTrafficTest: channel connect failed" );
@@ -1652,9 +1652,9 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve
1652 * attempt to generate heavy event traffic before initiating1652 * attempt to generate heavy event traffic before initiating
1653 * the channel delete1653 * the channel delete
1654 *1654 *
1655 * try to interrupt the recv thread while it is processing 1655 * try to interrupt the recv thread while it is processing
1656 * incoming subscription updates1656 * incoming subscription updates
1657 */ 1657 */
1658 if ( ca_write_access (chan) ) {1658 if ( ca_write_access (chan) ) {
1659 unsigned j = 0;1659 unsigned j = 0;
1660 while ( j < i ) {1660 while ( j < i ) {
@@ -1669,7 +1669,7 @@ void channelClearWithEventTrafficTest ( const char *pName, unsigned interestLeve
1669 }1669 }
16701670
1671 showProgressEnd ( interestLevel );1671 showProgressEnd ( interestLevel );
1672} 1672}
16731673
16741674
16751675
@@ -1679,7 +1679,7 @@ void selfDeleteEvent ( struct event_handler_args args )
1679{1679{
1680 int status;1680 int status;
1681 status = ca_clear_event ( globalEventID );1681 status = ca_clear_event ( globalEventID );
1682 verify ( status == ECA_NORMAL ); 1682 verify ( status == ECA_NORMAL );
1683}1683}
16841684
1685void eventClearTest ( chid chan )1685void eventClearTest ( chid chan )
@@ -1687,29 +1687,29 @@ void eventClearTest ( chid chan )
1687 int status;1687 int status;
1688 evid monix1, monix2, monix3;1688 evid monix1, monix2, monix3;
16891689
1690 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, 1690 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange,
1691 NULL, &monix1 );1691 NULL, &monix1 );
1692 SEVCHK ( status, NULL );1692 SEVCHK ( status, NULL );
16931693
1694 status = ca_clear_event ( monix1 );1694 status = ca_clear_event ( monix1 );
1695 SEVCHK ( status, NULL );1695 SEVCHK ( status, NULL );
16961696
1697 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, 1697 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange,
1698 NULL, &monix1 );1698 NULL, &monix1 );
1699 SEVCHK ( status, NULL );1699 SEVCHK ( status, NULL );
17001700
1701 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, 1701 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange,
1702 NULL, &monix2);1702 NULL, &monix2);
1703 SEVCHK (status, NULL);1703 SEVCHK (status, NULL);
17041704
1705 status = ca_clear_event ( monix2 );1705 status = ca_clear_event ( monix2 );
1706 SEVCHK ( status, NULL);1706 SEVCHK ( status, NULL);
17071707
1708 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, 1708 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange,
1709 NULL, &monix2);1709 NULL, &monix2);
1710 SEVCHK ( status, NULL );1710 SEVCHK ( status, NULL );
17111711
1712 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange, 1712 status = ca_add_event ( DBR_FLOAT, chan, noopSubscriptionStateChange,
1713 NULL, &monix3);1713 NULL, &monix3);
1714 SEVCHK ( status, NULL );1714 SEVCHK ( status, NULL );
17151715
@@ -1722,7 +1722,7 @@ void eventClearTest ( chid chan )
1722 status = ca_clear_event ( monix3 );1722 status = ca_clear_event ( monix3 );
1723 SEVCHK ( status, NULL);1723 SEVCHK ( status, NULL);
17241724
1725 status = ca_add_event ( DBR_FLOAT, chan, selfDeleteEvent, 1725 status = ca_add_event ( DBR_FLOAT, chan, selfDeleteEvent,
1726 0, &globalEventID );1726 0, &globalEventID );
1727 SEVCHK ( status, NULL );1727 SEVCHK ( status, NULL );
1728}1728}
@@ -1739,7 +1739,7 @@ void arrayEventExceptionNotify ( struct event_handler_args args )
1739 if ( args.status == ECA_NORMAL ) {1739 if ( args.status == ECA_NORMAL ) {
1740 printf (1740 printf (
1741 "arrayEventExceptionNotify: expected "1741 "arrayEventExceptionNotify: expected "
1742 "exception but didnt receive one against \"%s\" \n", 1742 "exception but didnt receive one against \"%s\" \n",
1743 ca_name ( args.chid ) );1743 ca_name ( args.chid ) );
1744 }1744 }
1745 else {1745 else {
@@ -1765,8 +1765,8 @@ void exceptionTest ( chid chan, unsigned interestLevel )
17651765
1766 pRS = malloc ( ca_element_count (chan) * sizeof (*pRS) );1766 pRS = malloc ( ca_element_count (chan) * sizeof (*pRS) );
1767 verify ( pRS );1767 verify ( pRS );
1768 status = ca_array_get ( DBR_PUT_ACKT, 1768 status = ca_array_get ( DBR_PUT_ACKT,
1769 ca_element_count (chan), chan, pRS ); 1769 ca_element_count (chan), chan, pRS );
1770 SEVCHK ( status, "array read request failed" );1770 SEVCHK ( status, "array read request failed" );
1771 ca_pend_io ( 1e-5 );1771 ca_pend_io ( 1e-5 );
1772 epicsThreadSleep ( 0.1 );1772 epicsThreadSleep ( 0.1 );
@@ -1787,8 +1787,8 @@ void exceptionTest ( chid chan, unsigned interestLevel )
1787 */1787 */
1788 {1788 {
1789 arrayEventExceptionNotifyComplete = 0u;1789 arrayEventExceptionNotifyComplete = 0u;
1790 status = ca_array_get_callback ( DBR_PUT_ACKT, 1790 status = ca_array_get_callback ( DBR_PUT_ACKT,
1791 ca_element_count (chan), chan, arrayEventExceptionNotify, 0 ); 1791 ca_element_count (chan), chan, arrayEventExceptionNotify, 0 );
1792 if ( status != ECA_NORMAL ) {1792 if ( status != ECA_NORMAL ) {
1793 verify ( status == ECA_BADTYPE || status == ECA_GETFAIL );1793 verify ( status == ECA_BADTYPE || status == ECA_GETFAIL );
1794 arrayEventExceptionNotifyComplete = 1;1794 arrayEventExceptionNotifyComplete = 1;
@@ -1811,8 +1811,8 @@ void exceptionTest ( chid chan, unsigned interestLevel )
1811 evid id;1811 evid id;
18121812
1813 arrayEventExceptionNotifyComplete = 0u;1813 arrayEventExceptionNotifyComplete = 0u;
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 ),
1815 chan, arrayEventExceptionNotify, 0, 0.0, 0.0, 0.0, &id ); 1815 chan, arrayEventExceptionNotify, 0, 0.0, 0.0, 0.0, &id );
1816 if ( status != ECA_NORMAL ) {1816 if ( status != ECA_NORMAL ) {
1817 verify ( status == ECA_BADTYPE || status == ECA_GETFAIL );1817 verify ( status == ECA_BADTYPE || status == ECA_GETFAIL );
1818 arrayEventExceptionNotifyComplete = 1;1818 arrayEventExceptionNotifyComplete = 1;
@@ -1846,8 +1846,8 @@ void exceptionTest ( chid chan, unsigned interestLevel )
1846 for ( i = 0; i < ca_element_count (chan); i++ ) {1846 for ( i = 0; i < ca_element_count (chan); i++ ) {
1847 strcpy ( pWS[i], "@#$%" );1847 strcpy ( pWS[i], "@#$%" );
1848 }1848 }
1849 status = ca_array_put ( DBR_STRING, 1849 status = ca_array_put ( DBR_STRING,
1850 ca_element_count (chan), chan, pWS ); 1850 ca_element_count (chan), chan, pWS );
1851 if ( status != ECA_NORMAL ) {1851 if ( status != ECA_NORMAL ) {
1852 verify ( status == ECA_BADTYPE || status == ECA_PUTFAIL );1852 verify ( status == ECA_BADTYPE || status == ECA_PUTFAIL );
1853 acctstExceptionCount++; /* local PV case */1853 acctstExceptionCount++; /* local PV case */
@@ -1879,9 +1879,9 @@ void exceptionTest ( chid chan, unsigned interestLevel )
1879 strcpy ( pWS[i], "@#$%" );1879 strcpy ( pWS[i], "@#$%" );
1880 }1880 }
1881 arrayEventExceptionNotifyComplete = 0u;1881 arrayEventExceptionNotifyComplete = 0u;
1882 status = ca_array_put_callback ( DBR_STRING, 1882 status = ca_array_put_callback ( DBR_STRING,
1883 ca_element_count (chan), chan, pWS,1883 ca_element_count (chan), chan, pWS,
1884 arrayEventExceptionNotify, 0); 1884 arrayEventExceptionNotify, 0);
1885 if ( status != ECA_NORMAL ) {1885 if ( status != ECA_NORMAL ) {
1886 arrayEventExceptionNotifyComplete = 1;1886 arrayEventExceptionNotifyComplete = 1;
1887 }1887 }
@@ -1924,7 +1924,7 @@ void arrayWriteNotify ( struct event_handler_args args )
1924 arrayWriteNotifyComplete = 1;1924 arrayWriteNotifyComplete = 1;
1925 }1925 }
1926 else {1926 else {
1927 printf ( "arrayWriteNotify: update failed for \"%s\" because \"%s\"", 1927 printf ( "arrayWriteNotify: update failed for \"%s\" because \"%s\"",
1928 ca_name ( args.chid ), ca_message ( args.status ) );1928 ca_name ( args.chid ), ca_message ( args.status ) );
1929 }1929 }
1930}1930}
@@ -1956,15 +1956,15 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
1956 pWF[i] = rand ();1956 pWF[i] = rand ();
1957 pRF[i] = - pWF[i];1957 pRF[i] = - pWF[i];
1958 }1958 }
1959 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), 1959 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ),
1960 chan, pWF ); 1960 chan, pWF );
1961 SEVCHK ( status, "array write request failed" );1961 SEVCHK ( status, "array write request failed" );
19621962
1963 /*1963 /*
1964 * read back the array1964 * read back the array
1965 */1965 */
1966 status = ca_array_get ( DBR_DOUBLE, ca_element_count (chan), 1966 status = ca_array_get ( DBR_DOUBLE, ca_element_count (chan),
1967 chan, pRF ); 1967 chan, pRF );
1968 SEVCHK ( status, "array read request failed" );1968 SEVCHK ( status, "array read request failed" );
1969 status = ca_pend_io ( timeoutToPendIO );1969 status = ca_pend_io ( timeoutToPendIO );
1970 SEVCHK ( status, "array read failed" );1970 SEVCHK ( status, "array read failed" );
@@ -1991,8 +1991,8 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
19911991
1992 pRS = malloc ( ca_element_count (chan) * MAX_STRING_SIZE );1992 pRS = malloc ( ca_element_count (chan) * MAX_STRING_SIZE );
1993 verify ( pRS );1993 verify ( pRS );
1994 status = ca_array_get ( DBR_STRING, 1994 status = ca_array_get ( DBR_STRING,
1995 ca_element_count (chan), chan, pRS ); 1995 ca_element_count (chan), chan, pRS );
1996 SEVCHK ( status, "array read request failed" );1996 SEVCHK ( status, "array read request failed" );
1997 status = ca_pend_io ( timeoutToPendIO );1997 status = ca_pend_io ( timeoutToPendIO );
1998 SEVCHK ( status, "array read failed" );1998 SEVCHK ( status, "array read failed" );
@@ -2010,11 +2010,11 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
2010 pWF[i] = rand ();2010 pWF[i] = rand ();
2011 pRF[i] = - pWF[i];2011 pRF[i] = - pWF[i];
2012 }2012 }
2013 status = ca_array_put_callback ( DBR_DOUBLE, ca_element_count (chan), 2013 status = ca_array_put_callback ( DBR_DOUBLE, ca_element_count (chan),
2014 chan, pWF, arrayWriteNotify, 0 ); 2014 chan, pWF, arrayWriteNotify, 0 );
2015 SEVCHK ( status, "array write notify request failed" );2015 SEVCHK ( status, "array write notify request failed" );
2016 status = ca_array_get_callback ( DBR_DOUBLE, ca_element_count (chan), 2016 status = ca_array_get_callback ( DBR_DOUBLE, ca_element_count (chan),
2017 chan, arrayReadNotify, pWF ); 2017 chan, arrayReadNotify, pWF );
2018 SEVCHK ( status, "array read notify request failed" );2018 SEVCHK ( status, "array read notify request failed" );
2019 ca_flush_io ();2019 ca_flush_io ();
2020 while ( ! arrayWriteNotifyComplete || ! arrayReadNotifyComplete ) {2020 while ( ! arrayWriteNotifyComplete || ! arrayReadNotifyComplete ) {
@@ -2030,11 +2030,11 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
2030 pRF[i] = - pWF[i];2030 pRF[i] = - pWF[i];
2031 }2031 }
2032 arrayReadNotifyComplete = 0;2032 arrayReadNotifyComplete = 0;
2033 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ), 2033 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( chan ),
2034 chan, pWF ); 2034 chan, pWF );
2035 SEVCHK ( status, "array write notify request failed" );2035 SEVCHK ( status, "array write notify request failed" );
2036 status = ca_add_array_event ( DBR_DOUBLE, ca_element_count ( chan ), 2036 status = ca_add_array_event ( DBR_DOUBLE, ca_element_count ( chan ),
2037 chan, arrayReadNotify, pWF, 0.0, 0.0, 0.0, &id ); 2037 chan, arrayReadNotify, pWF, 0.0, 0.0, 0.0, &id );
2038 SEVCHK ( status, "array subscription request failed" );2038 SEVCHK ( status, "array subscription request failed" );
2039 ca_flush_io ();2039 ca_flush_io ();
2040 while ( ! arrayReadNotifyComplete ) {2040 while ( ! arrayReadNotifyComplete ) {
@@ -2052,8 +2052,8 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
2052 acctstExceptionCount = 0u;2052 acctstExceptionCount = 0u;
2053 status = ca_add_exception_event ( acctstExceptionNotify, 0 );2053 status = ca_add_exception_event ( acctstExceptionNotify, 0 );
2054 SEVCHK ( status, "exception notify install failed" );2054 SEVCHK ( status, "exception notify install failed" );
2055 status = ca_array_get ( DBR_DOUBLE, 2055 status = ca_array_get ( DBR_DOUBLE,
2056 ca_element_count (chan)+1, chan, pRF ); 2056 ca_element_count (chan)+1, chan, pRF );
2057 if ( status == ECA_NORMAL ) {2057 if ( status == ECA_NORMAL ) {
2058 ca_poll ();2058 ca_poll ();
2059 while ( acctstExceptionCount < 1u ) {2059 while ( acctstExceptionCount < 1u ) {
@@ -2076,7 +2076,7 @@ void arrayTest ( chid chan, unsigned maxArrayBytes, unsigned interestLevel )
2076 showProgressEnd ( interestLevel );2076 showProgressEnd ( interestLevel );
2077}2077}
20782078
2079/* 2079/*
2080 * verify that unequal send/recv buffer sizes work2080 * verify that unequal send/recv buffer sizes work
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)
2082 *2082 *
@@ -2115,8 +2115,8 @@ void unequalServerBufferSizeTest ( const char * pName, unsigned interestLevel )
2115 pWF = (dbr_double_t *) calloc ( ca_element_count (newChan), sizeof (*pWF) );2115 pWF = (dbr_double_t *) calloc ( ca_element_count (newChan), sizeof (*pWF) );
2116 verify ( pWF != NULL );2116 verify ( pWF != NULL );
21172117
2118 status = ca_array_get ( DBR_DOUBLE, ca_element_count ( newChan ), 2118 status = ca_array_get ( DBR_DOUBLE, ca_element_count ( newChan ),
2119 newChan, pRF ); 2119 newChan, pRF );
2120 status = ca_pend_io ( timeoutToPendIO );2120 status = ca_pend_io ( timeoutToPendIO );
2121 verify ( status == ECA_NORMAL );2121 verify ( status == ECA_NORMAL );
2122 status = ca_clear_channel ( newChan );2122 status = ca_clear_channel ( newChan );
@@ -2131,11 +2131,11 @@ void unequalServerBufferSizeTest ( const char * pName, unsigned interestLevel )
21312131
2132 showProgress ( interestLevel );2132 showProgress ( interestLevel );
21332133
2134 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( newChan ), 2134 status = ca_array_put ( DBR_DOUBLE, ca_element_count ( newChan ),
2135 newChan, pWF ); 2135 newChan, pWF );
2136 verify ( status == ECA_NORMAL );2136 verify ( status == ECA_NORMAL );
2137 status = ca_array_get ( DBR_DOUBLE, 1, 2137 status = ca_array_get ( DBR_DOUBLE, 1,
2138 newChan, pRF ); 2138 newChan, pRF );
2139 verify ( status == ECA_NORMAL );2139 verify ( status == ECA_NORMAL );
2140 status = ca_pend_io ( timeoutToPendIO );2140 status = ca_pend_io ( timeoutToPendIO );
2141 verify ( status == ECA_NORMAL );2141 verify ( status == ECA_NORMAL );
@@ -2205,9 +2205,9 @@ void verifyDataTypeMacros (void)
2205 verify ( dbf_type_is_valid ( DBF_SHORT ) );2205 verify ( dbf_type_is_valid ( DBF_SHORT ) );
2206 {2206 {
2207 int dataType = -1;2207 int dataType = -1;
2208 dbf_text_to_type ( "DBF_SHORT", dataType ); 2208 dbf_text_to_type ( "DBF_SHORT", dataType );
2209 verify ( dataType == DBF_SHORT );2209 verify ( dataType == DBF_SHORT );
2210 dbr_text_to_type ( "DBR_CLASS_NAME", dataType ); 2210 dbr_text_to_type ( "DBR_CLASS_NAME", dataType );
2211 verify ( dataType == DBR_CLASS_NAME );2211 verify ( dataType == DBR_CLASS_NAME );
2212 }2212 }
2213}2213}
@@ -2225,7 +2225,7 @@ void updateTestEvent ( struct event_handler_args args )
2225{2225{
2226 eventTest *pET = (eventTest *) args.usr;2226 eventTest *pET = (eventTest *) args.usr;
2227 struct dbr_gr_float *pGF = (struct dbr_gr_float *) args.dbr;2227 struct dbr_gr_float *pGF = (struct dbr_gr_float *) args.dbr;
2228 pET->lastValue = pGF->value; 2228 pET->lastValue = pGF->value;
2229 pET->count++;2229 pET->count++;
2230}2230}
22312231
@@ -2246,7 +2246,7 @@ void clearChannelInGetCallbackTest ( const char *pName, unsigned level )
2246 unsigned i;2246 unsigned i;
2247 chid chan;2247 chid chan;
2248 int status;2248 int status;
2249 2249
2250 showProgressBegin ( "clearChannelInGetCallbackTest", level );2250 showProgressBegin ( "clearChannelInGetCallbackTest", level );
22512251
2252 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2252 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
@@ -2259,15 +2259,15 @@ void clearChannelInGetCallbackTest ( const char *pName, unsigned level )
22592259
2260 status = ca_pend_io ( timeoutToPendIO );2260 status = ca_pend_io ( timeoutToPendIO );
2261 SEVCHK ( status, "clearChannelInGetCallbackTest connect channel" );2261 SEVCHK ( status, "clearChannelInGetCallbackTest connect channel" );
2262 2262
2263 status = ca_get_callback ( DBR_DOUBLE, chan, callbackClearsChannel, 0 );2263 status = ca_get_callback ( DBR_DOUBLE, chan, callbackClearsChannel, 0 );
2264 SEVCHK ( status, "clearChannelInGetCallbackTest get callback" );2264 SEVCHK ( status, "clearChannelInGetCallbackTest get callback" );
2265 2265
2266 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2266 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
2267 ca_pend_event ( 0.1 );2267 ca_pend_event ( 0.1 );
2268 verify ( i < 100 );2268 verify ( i < 100 );
2269 }2269 }
2270 2270
2271 showProgressEnd ( level );2271 showProgressEnd ( level );
2272}2272}
22732273
@@ -2277,7 +2277,7 @@ void clearChannelInPutCallbackTest ( const char *pName, unsigned level )
2277 const dbr_double_t value = 1.1;2277 const dbr_double_t value = 1.1;
2278 chid chan;2278 chid chan;
2279 int status;2279 int status;
2280 2280
2281 showProgressBegin ( "clearChannelInPutCallbackTest", level );2281 showProgressBegin ( "clearChannelInPutCallbackTest", level );
22822282
2283 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2283 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
@@ -2291,15 +2291,15 @@ void clearChannelInPutCallbackTest ( const char *pName, unsigned level )
2291 status = ca_pend_io ( timeoutToPendIO );2291 status = ca_pend_io ( timeoutToPendIO );
2292 SEVCHK ( status, "clearChannelInPutCallbackTest connect channel" );2292 SEVCHK ( status, "clearChannelInPutCallbackTest connect channel" );
22932293
2294 status = ca_put_callback ( DBR_DOUBLE, chan, & value, 2294 status = ca_put_callback ( DBR_DOUBLE, chan, & value,
2295 callbackClearsChannel, 0 );2295 callbackClearsChannel, 0 );
2296 SEVCHK ( status, "clearChannelInPutCallbackTest get callback" );2296 SEVCHK ( status, "clearChannelInPutCallbackTest get callback" );
2297 2297
2298 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2298 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
2299 ca_pend_event ( 0.1 );2299 ca_pend_event ( 0.1 );
2300 verify ( i < 100 );2300 verify ( i < 100 );
2301 }2301 }
2302 2302
2303 showProgressEnd ( level );2303 showProgressEnd ( level );
2304}2304}
23052305
@@ -2308,7 +2308,7 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level )
2308 unsigned i;2308 unsigned i;
2309 chid chan;2309 chid chan;
2310 int status;2310 int status;
2311 2311
2312 showProgressBegin ( "clearChannelInSubscrCallbackTest", level );2312 showProgressBegin ( "clearChannelInSubscrCallbackTest", level );
23132313
2314 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2314 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
@@ -2321,8 +2321,8 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level )
23212321
2322 status = ca_pend_io ( timeoutToPendIO );2322 status = ca_pend_io ( timeoutToPendIO );
2323 SEVCHK ( status, "clearChannelInSubscrCallbackTest connect channel" );2323 SEVCHK ( status, "clearChannelInSubscrCallbackTest connect channel" );
2324 2324
2325 status = ca_create_subscription ( DBR_DOUBLE, 1, chan, 2325 status = ca_create_subscription ( DBR_DOUBLE, 1, chan,
2326 DBE_VALUE, callbackClearsChannel, 0, 0 );2326 DBE_VALUE, callbackClearsChannel, 0, 0 );
2327 SEVCHK ( status, "clearChannelInSubscrCallbackTest subscribe" );2327 SEVCHK ( status, "clearChannelInSubscrCallbackTest subscribe" );
23282328
@@ -2330,18 +2330,18 @@ void clearChannelInSubscrCallbackTest ( const char *pName, unsigned level )
2330 ca_pend_event ( 0.1 );2330 ca_pend_event ( 0.1 );
2331 verify ( i < 100 );2331 verify ( i < 100 );
2332 }2332 }
2333 2333
2334 showProgressEnd ( level );2334 showProgressEnd ( level );
2335}2335}
23362336
2337void monitorAddConnectionCallback ( struct connection_handler_args args ) 2337void monitorAddConnectionCallback ( struct connection_handler_args args )
2338{2338{
2339 if ( args.op == CA_OP_CONN_UP ) {2339 if ( args.op == CA_OP_CONN_UP ) {
2340 unsigned * pEventCount = ( unsigned * ) ca_puser ( args.chid );2340 unsigned * pEventCount = ( unsigned * ) ca_puser ( args.chid );
2341 int status;2341 int status;
2342 verify ( *pEventCount == 0u );2342 verify ( *pEventCount == 0u );
2343 (*pEventCount)++;2343 (*pEventCount)++;
2344 status = ca_create_subscription ( DBR_DOUBLE, 1, 2344 status = ca_create_subscription ( DBR_DOUBLE, 1,
2345 args.chid, DBE_VALUE, nUpdatesTester, ca_puser ( args.chid ), 0 );2345 args.chid, DBE_VALUE, nUpdatesTester, ca_puser ( args.chid ), 0 );
2346 SEVCHK ( status, "monitorAddConnectionCallback create subscription" );2346 SEVCHK ( status, "monitorAddConnectionCallback create subscription" );
2347 }2347 }
@@ -2363,7 +2363,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve
2363 int status;2363 int status;
2364 unsigned eventCount = 0u;2364 unsigned eventCount = 0u;
2365 unsigned getCallbackCount = 0u;2365 unsigned getCallbackCount = 0u;
2366 2366
2367 showProgressBegin ( "monitorAddConnectionCallbackTest", interestLevel );2367 showProgressBegin ( "monitorAddConnectionCallbackTest", interestLevel );
23682368
2369 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {2369 for ( i = 0; ca_get_ioc_connection_count () > 0 ; i++ ) {
@@ -2371,7 +2371,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve
2371 verify ( i < 100 );2371 verify ( i < 100 );
2372 }2372 }
23732373
2374 status = ca_create_channel ( pName, 2374 status = ca_create_channel ( pName,
2375 monitorAddConnectionCallback, &eventCount, 0, & chan );2375 monitorAddConnectionCallback, &eventCount, 0, & chan );
2376 SEVCHK ( status, "monitorAddConnectionCallbackTest create channel" );2376 SEVCHK ( status, "monitorAddConnectionCallbackTest create channel" );
23772377
@@ -2379,7 +2379,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve
2379 ca_pend_event ( 0.1 );2379 ca_pend_event ( 0.1 );
2380 }2380 }
2381 verify ( eventCount >= 2u );2381 verify ( eventCount >= 2u );
2382 2382
2383 status = ca_get_callback ( DBR_DOUBLE, chan, nUpdatesTester, &getCallbackCount );2383 status = ca_get_callback ( DBR_DOUBLE, chan, nUpdatesTester, &getCallbackCount );
2384 SEVCHK ( status, "monitorAddConnectionCallback get callback" );2384 SEVCHK ( status, "monitorAddConnectionCallback get callback" );
2385 while ( getCallbackCount == 0 ) {2385 while ( getCallbackCount == 0 ) {
@@ -2390,7 +2390,7 @@ void monitorAddConnectionCallbackTest ( const char *pName, unsigned interestLeve
23902390
2391 status = ca_clear_channel ( chan );2391 status = ca_clear_channel ( chan );
2392 SEVCHK ( status, "monitorAddConnectionCallbackTest clear channel" );2392 SEVCHK ( status, "monitorAddConnectionCallbackTest clear channel" );
2393 2393
2394 status = ca_flush_io ();2394 status = ca_flush_io ();
2395 SEVCHK ( status, "monitorAddConnectionCallbackTest flush" );2395 SEVCHK ( status, "monitorAddConnectionCallbackTest flush" );
23962396
@@ -2423,7 +2423,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2423 printf ("skipped monitorUpdateTest test - not an analog type\n");2423 printf ("skipped monitorUpdateTest test - not an analog type\n");
2424 return;2424 return;
2425 }2425 }
2426 2426
2427 showProgressBegin ( "monitorUpdateTest", interestLevel );2427 showProgressBegin ( "monitorUpdateTest", interestLevel );
24282428
2429 /*2429 /*
@@ -2444,12 +2444,12 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2444 * complete2444 * complete
2445 *2445 *
2446 * NOTE: this hopefully demonstrates that when the2446 * NOTE: this hopefully demonstrates that when the
2447 * server is very busy with monitors the client 2447 * server is very busy with monitors the client
2448 * is still able to punch through with a request.2448 * is still able to punch through with a request.
2449 */2449 */
2450 SEVCHK ( ca_get ( DBR_FLOAT, chan, &getResp) ,NULL );2450 SEVCHK ( ca_get ( DBR_FLOAT, chan, &getResp) ,NULL );
2451 SEVCHK ( ca_pend_io ( timeoutToPendIO ) ,NULL );2451 SEVCHK ( ca_pend_io ( timeoutToPendIO ) ,NULL );
2452 2452
2453 showProgress ( interestLevel );2453 showProgress ( interestLevel );
24542454
2455 /*2455 /*
@@ -2483,7 +2483,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2483 /*2483 /*
2484 * attempt to uncover problems where the last event isnt sent2484 * attempt to uncover problems where the last event isnt sent
2485 * and hopefully get into a flow control situation2485 * and hopefully get into a flow control situation
2486 */ 2486 */
2487 prevPassCount = 0u;2487 prevPassCount = 0u;
2488 for ( i = 0; i < 10; i++ ) {2488 for ( i = 0; i < 10; i++ ) {
2489 for ( j = 0; j < NELEMENTS(test); j++ ) {2489 for ( j = 0; j < NELEMENTS(test); j++ ) {
@@ -2492,7 +2492,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2492 test[j].lastValue = -1.0f;2492 test[j].lastValue = -1.0f;
2493 SEVCHK ( ca_add_event ( DBR_GR_FLOAT, chan, updateTestEvent,2493 SEVCHK ( ca_add_event ( DBR_GR_FLOAT, chan, updateTestEvent,
2494 &test[j], &test[j].id ) , NULL );2494 &test[j], &test[j].id ) , NULL );
2495 } 2495 }
24962496
2497 for ( j = 0; j <= i; j++ ) {2497 for ( j = 0; j <= i; j++ ) {
2498 temp = monitorUpdateTestPattern ( j );2498 temp = monitorUpdateTestPattern ( j );
@@ -2522,7 +2522,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2522 ca_poll (); /* emulate typical GUI */2522 ca_poll (); /* emulate typical GUI */
2523 for ( j = 0; j < NELEMENTS ( test ); j++ ) {2523 for ( j = 0; j < NELEMENTS ( test ); j++ ) {
2524 /*2524 /*
2525 * we shouldnt see old monitors because 2525 * we shouldnt see old monitors because
2526 * we resubscribed2526 * we resubscribed
2527 */2527 */
2528 verify ( test[j].count <= i + 2 );2528 verify ( test[j].count <= i + 2 );
@@ -2562,12 +2562,12 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2562 showProgress ( interestLevel );2562 showProgress ( interestLevel );
25632563
2564 /*2564 /*
2565 * delete the event subscriptions 2565 * delete the event subscriptions
2566 */2566 */
2567 for ( i = 0; i < NELEMENTS ( test ); i++ ) {2567 for ( i = 0; i < NELEMENTS ( test ); i++ ) {
2568 SEVCHK ( ca_clear_event ( test[i].id ), NULL );2568 SEVCHK ( ca_clear_event ( test[i].id ), NULL );
2569 }2569 }
2570 2570
2571 /*2571 /*
2572 * force all of the clear event requests to2572 * force all of the clear event requests to
2573 * complete2573 * complete
@@ -2578,7 +2578,7 @@ void monitorUpdateTest ( chid chan, unsigned interestLevel )
2578 /* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */2578 /* printf ( "flow control bypassed %u events\n", flowCtrlCount ); */
25792579
2580 showProgressEnd ( interestLevel );2580 showProgressEnd ( interestLevel );
2581} 2581}
25822582
2583void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel )2583void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel )
2584{2584{
@@ -2594,7 +2594,7 @@ void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel )
2594 ca_beacon_anomaly_count () );2594 ca_beacon_anomaly_count () );
25952595
2596 beaconPeriod = ca_beacon_period ( chan );2596 beaconPeriod = ca_beacon_period ( chan );
2597 printf ( "Estimated beacon period for channel %s = %g sec.\n", 2597 printf ( "Estimated beacon period for channel %s = %g sec.\n",
2598 ca_name ( chan ), beaconPeriod );2598 ca_name ( chan ), beaconPeriod );
25992599
2600 watchDogDelay = ca_receive_watchdog_delay ( chan );2600 watchDogDelay = ca_receive_watchdog_delay ( chan );
@@ -2603,8 +2603,8 @@ void verifyReasonableBeaconPeriod ( chid chan, unsigned interestLevel )
2603 printf ( "busy: receive watchdog for \"%s\" expires in %g sec.\n",2603 printf ( "busy: receive watchdog for \"%s\" expires in %g sec.\n",
2604 ca_name ( chan ), watchDogDelay );2604 ca_name ( chan ), watchDogDelay );
26052605
2606 /* 2606 /*
2607 * let one default connection timeout go by w/o receive activity 2607 * let one default connection timeout go by w/o receive activity
2608 * so we can see if beacons reset the watchdog2608 * so we can see if beacons reset the watchdog
2609 */2609 */
2610 for ( i = 0u; i < 15u; i++ ) {2610 for ( i = 0u; i < 15u; i++ ) {
@@ -2667,18 +2667,18 @@ void verifyTimeStamps ( chid chan, unsigned interestLevel )
2667 status = ca_pend_io ( timeoutToPendIO );2667 status = ca_pend_io ( timeoutToPendIO );
2668 verify ( status == ECA_NORMAL );2668 verify ( status == ECA_NORMAL );
26692669
2670 length = epicsTimeToStrftime ( buf, sizeof ( buf ), 2670 length = epicsTimeToStrftime ( buf, sizeof ( buf ),
2671 "%a %b %d %Y %H:%M:%S.%f", & first.stamp );2671 "%a %b %d %Y %H:%M:%S.%f", & first.stamp );
2672 verify ( length );2672 verify ( length );
2673 printf ("Processing time of channel \"%s\" was \"%s\"\n", 2673 printf ("Processing time of channel \"%s\" was \"%s\"\n",
2674 ca_name ( chan ), buf );2674 ca_name ( chan ), buf );
26752675
2676 diff = epicsTimeDiffInSeconds ( & last.stamp, & first.stamp );2676 diff = epicsTimeDiffInSeconds ( & last.stamp, & first.stamp );
2677 printf ("Time difference between two successive reads was %g sec\n", 2677 printf ("Time difference between two successive reads was %g sec\n",
2678 diff );2678 diff );
26792679
2680 diff = epicsTimeDiffInSeconds ( & first.stamp, & localTime );2680 diff = epicsTimeDiffInSeconds ( & first.stamp, & localTime );
2681 printf ("Time difference between client and server %g sec\n", 2681 printf ("Time difference between client and server %g sec\n",
2682 diff );2682 diff );
26832683
2684 showProgressEnd ( interestLevel );2684 showProgressEnd ( interestLevel );
@@ -2700,7 +2700,7 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel )
2700 double value;2700 double value;
2701 chid chan0, chan1;2701 chid chan0, chan1;
2702 unsigned priority0, priority1;2702 unsigned priority0, priority1;
2703 2703
2704 priority0 = ( i * ( CA_PRIORITY_MAX - CA_PRIORITY_MIN ) ) / nPrio;2704 priority0 = ( i * ( CA_PRIORITY_MAX - CA_PRIORITY_MIN ) ) / nPrio;
2705 priority0 += CA_PRIORITY_MIN;2705 priority0 += CA_PRIORITY_MIN;
2706 if ( priority0 > CA_PRIORITY_MAX ) {2706 if ( priority0 > CA_PRIORITY_MAX ) {
@@ -2713,11 +2713,11 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel )
2713 priority1 = CA_PRIORITY_MAX;2713 priority1 = CA_PRIORITY_MAX;
2714 }2714 }
27152715
2716 status = ca_create_channel ( pName, 0, 0, 2716 status = ca_create_channel ( pName, 0, 0,
2717 priority0, &chan0 );2717 priority0, &chan0 );
2718 SEVCHK ( status, "prioritized channel create failed" );2718 SEVCHK ( status, "prioritized channel create failed" );
27192719
2720 status = ca_create_channel ( pName, 0, 0, 2720 status = ca_create_channel ( pName, 0, 0,
2721 priority1, &chan1 );2721 priority1, &chan1 );
2722 SEVCHK ( status, "prioritized channel create failed" );2722 SEVCHK ( status, "prioritized channel create failed" );
27232723
@@ -2751,8 +2751,8 @@ void verifyChannelPriorities ( const char *pName, unsigned interestLevel )
2751 showProgressEnd ( interestLevel );2751 showProgressEnd ( interestLevel );
2752}2752}
27532753
2754void verifyTearDownWhenChannelConnected ( const char * pName, 2754void verifyTearDownWhenChannelConnected ( const char * pName,
2755 enum ca_preemptive_callback_select select, 2755 enum ca_preemptive_callback_select select,
2756 unsigned interestLevel )2756 unsigned interestLevel )
2757{2757{
2758 static const unsigned chanCount = 20;2758 static const unsigned chanCount = 20;
@@ -2761,15 +2761,15 @@ void verifyTearDownWhenChannelConnected ( const char * pName,
2761 chid * const pChans = (chid * const) calloc ( chanCount, sizeof ( *pChans ) );2761 chid * const pChans = (chid * const) calloc ( chanCount, sizeof ( *pChans ) );
2762 double * const pValues = (double * const) calloc ( chanCount, sizeof ( *pValues ) );2762 double * const pValues = (double * const) calloc ( chanCount, sizeof ( *pValues ) );
2763 unsigned i, j;2763 unsigned i, j;
2764 2764
2765 verify ( pChans && pValues );2765 verify ( pChans && pValues );
2766 2766
2767 showProgressBegin ( "verifyTearDownWhenChannelConnected", interestLevel );2767 showProgressBegin ( "verifyTearDownWhenChannelConnected", interestLevel );
27682768
2769 for ( i = 0u; i < loopCount; i++ ) {2769 for ( i = 0u; i < loopCount; i++ ) {
2770 int status;2770 int status;
2771 ca_context_create ( select );2771 ca_context_create ( select );
2772 2772
2773 for ( j = 0; j < chanCount; j++ ) {2773 for ( j = 0; j < chanCount; j++ ) {
2774 status = ca_create_channel ( pName, 0, 0, 0, & pChans[j] );2774 status = ca_create_channel ( pName, 0, 0, 0, & pChans[j] );
2775 SEVCHK ( status, "immediate tear down channel create failed" );2775 SEVCHK ( status, "immediate tear down channel create failed" );
@@ -2782,11 +2782,11 @@ void verifyTearDownWhenChannelConnected ( const char * pName,
2782 status = ca_get ( DBR_DOUBLE, pChans[j], &pValues[j] );2782 status = ca_get ( DBR_DOUBLE, pChans[j], &pValues[j] );
2783 SEVCHK ( status, "immediate tear down channel get failed" );2783 SEVCHK ( status, "immediate tear down channel get failed" );
2784 }2784 }
2785 2785
2786 status = ca_pend_io ( timeoutToPendIO );2786 status = ca_pend_io ( timeoutToPendIO );
2787 SEVCHK ( status, "immediate tear down get pend io failed" );2787 SEVCHK ( status, "immediate tear down get pend io failed" );
27882788
2789 ca_context_destroy (); 2789 ca_context_destroy ();
2790 }2790 }
27912791
2792 ca_context_create ( select );2792 ca_context_create ( select );
@@ -2798,8 +2798,8 @@ void verifyTearDownWhenChannelConnected ( const char * pName,
2798}2798}
27992799
28002800
2801void verifyImmediateTearDown ( const char * pName, 2801void verifyImmediateTearDown ( const char * pName,
2802 enum ca_preemptive_callback_select select, 2802 enum ca_preemptive_callback_select select,
2803 unsigned interestLevel )2803 unsigned interestLevel )
2804{2804{
2805 int i;2805 int i;
@@ -2817,8 +2817,8 @@ void verifyImmediateTearDown ( const char * pName,
2817 status = ca_pend_io ( timeoutToPendIO );2817 status = ca_pend_io ( timeoutToPendIO );
2818 SEVCHK ( status, "immediate tear down channel connect failed" );2818 SEVCHK ( status, "immediate tear down channel connect failed" );
2819 verify ( status == ECA_NORMAL );2819 verify ( status == ECA_NORMAL );
2820 /* 2820 /*
2821 * verify that puts pending when we call ca_task_exit() 2821 * verify that puts pending when we call ca_task_exit()
2822 * get flushed out2822 * get flushed out
2823 */2823 */
2824 if ( i > 0 ) {2824 if ( i > 0 ) {
@@ -2868,12 +2868,12 @@ void fdRegCB ( void * parg, int fd, int opened )
28682868
2869 fdctx * mgrCtx = ( fdctx * ) parg;2869 fdctx * mgrCtx = ( fdctx * ) parg;
2870 if ( opened ) {2870 if ( opened ) {
2871 status = fdmgr_add_callback ( 2871 status = fdmgr_add_callback (
2872 mgrCtx, fd, fdi_read, fdcb, 0 );2872 mgrCtx, fd, fdi_read, fdcb, 0 );
2873 verify ( status >= 0 );2873 verify ( status >= 0 );
2874 }2874 }
2875 else {2875 else {
2876 status = fdmgr_clear_callback ( 2876 status = fdmgr_clear_callback (
2877 mgrCtx, fd, fdi_read );2877 mgrCtx, fd, fdi_read );
2878 verify ( status >= 0 );2878 verify ( status >= 0 );
2879 }2879 }
@@ -2893,21 +2893,21 @@ typedef struct {
2893 unsigned m_interestLevel;2893 unsigned m_interestLevel;
2894} MultiThreadSubscrTest;2894} MultiThreadSubscrTest;
28952895
2896static void testMultithreadSubscrSubscrCallback 2896static void testMultithreadSubscrSubscrCallback
2897 ( struct event_handler_args eha )2897 ( struct event_handler_args eha )
2898{2898{
2899 const epicsEventId firstUpdateEvent = ( epicsEventId ) eha.usr;2899 const epicsEventId firstUpdateEvent = ( epicsEventId ) eha.usr;
2900 epicsEventSignal ( firstUpdateEvent );2900 epicsEventSignal ( firstUpdateEvent );
2901}2901}
29022902
2903static void testMultithreadSubscrCreateSubscr ( void * pParm ) 2903static void testMultithreadSubscrCreateSubscr ( void * pParm )
2904{2904{
2905 static unsigned nElem = 0;2905 static unsigned nElem = 0;
2906 int testComplete = FALSE;2906 int testComplete = FALSE;
2907 evid id;2907 evid id;
2908 epicsEventId firstUpdateEvent;2908 epicsEventId firstUpdateEvent;
2909 epicsEventWaitStatus eventWaitStatus; 2909 epicsEventWaitStatus eventWaitStatus;
2910 MultiThreadSubscrTest * const pMultiThreadSubscrTest = 2910 MultiThreadSubscrTest * const pMultiThreadSubscrTest =
2911 ( MultiThreadSubscrTest * ) pParm;2911 ( MultiThreadSubscrTest * ) pParm;
29122912
2913 /* this is required for the ca_flush below to work correctly */2913 /* this is required for the ca_flush below to work correctly */
@@ -2915,19 +2915,19 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm )
2915 verify ( status == ECA_NORMAL );2915 verify ( status == ECA_NORMAL );
2916 firstUpdateEvent = epicsEventMustCreate ( epicsEventEmpty );2916 firstUpdateEvent = epicsEventMustCreate ( epicsEventEmpty );
2917 verify ( firstUpdateEvent );2917 verify ( firstUpdateEvent );
2918 status = ca_create_subscription ( 2918 status = ca_create_subscription (
2919 DBR_TIME_LONG, 2919 DBR_TIME_LONG,
2920 nElem, 2920 nElem,
2921 pMultiThreadSubscrTest->m_chan, 2921 pMultiThreadSubscrTest->m_chan,
2922 DBE_VALUE, 2922 DBE_VALUE,
2923 testMultithreadSubscrSubscrCallback, 2923 testMultithreadSubscrSubscrCallback,
2924 firstUpdateEvent, 2924 firstUpdateEvent,
2925 & id );2925 & id );
2926 verify ( status == ECA_NORMAL );2926 verify ( status == ECA_NORMAL );
2927 status = ca_flush_io ();2927 status = ca_flush_io ();
2928 verify ( status == ECA_NORMAL );2928 verify ( status == ECA_NORMAL );
2929 /* wait for first update */2929 /* wait for first update */
2930 eventWaitStatus = epicsEventWaitWithTimeout ( 2930 eventWaitStatus = epicsEventWaitWithTimeout (
2931 firstUpdateEvent, 60.0 * 10 );2931 firstUpdateEvent, 60.0 * 10 );
2932 verify ( eventWaitStatus == epicsEventWaitOK );2932 verify ( eventWaitStatus == epicsEventWaitOK );
2933 epicsEventDestroy ( firstUpdateEvent );2933 epicsEventDestroy ( firstUpdateEvent );
@@ -2935,7 +2935,7 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm )
2935 verify ( status == ECA_NORMAL );2935 verify ( status == ECA_NORMAL );
2936 epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );2936 epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );
2937 pMultiThreadSubscrTest->m_nUpdatesReceived++;2937 pMultiThreadSubscrTest->m_nUpdatesReceived++;
2938 testComplete = ( pMultiThreadSubscrTest->m_nUpdatesReceived == 2938 testComplete = ( pMultiThreadSubscrTest->m_nUpdatesReceived ==
2939 pMultiThreadSubscrTest->m_nUpdatesRequired );2939 pMultiThreadSubscrTest->m_nUpdatesRequired );
2940 pMultiThreadSubscrTest->m_testComplete = testComplete;2940 pMultiThreadSubscrTest->m_testComplete = testComplete;
2941 epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex );2941 epicsMutexUnlock ( pMultiThreadSubscrTest->m_mutex );
@@ -2946,10 +2946,10 @@ static void testMultithreadSubscrCreateSubscr ( void * pParm )
29462946
2947void testMultithreadSubscrConnHandler ( struct connection_handler_args args )2947void testMultithreadSubscrConnHandler ( struct connection_handler_args args )
2948{2948{
2949 MultiThreadSubscrTest * const pMultiThreadSubscrTest = 2949 MultiThreadSubscrTest * const pMultiThreadSubscrTest =
2950 ( MultiThreadSubscrTest * ) ca_puser ( args.chid );2950 ( MultiThreadSubscrTest * ) ca_puser ( args.chid );
2951 epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );2951 epicsMutexMustLock ( pMultiThreadSubscrTest->m_mutex );
2952 if ( !pMultiThreadSubscrTest->m_testInitiated && 2952 if ( !pMultiThreadSubscrTest->m_testInitiated &&
2953 args.op == CA_OP_CONN_UP ) {2953 args.op == CA_OP_CONN_UP ) {
2954 int i;2954 int i;
2955 pMultiThreadSubscrTest->m_testInitiated = TRUE;2955 pMultiThreadSubscrTest->m_testInitiated = TRUE;
@@ -2957,10 +2957,10 @@ void testMultithreadSubscrConnHandler ( struct connection_handler_args args )
2957 char threadname[64];2957 char threadname[64];
2958 epicsThreadId threadId;2958 epicsThreadId threadId;
2959 sprintf(threadname, "testSubscr%06u", i);2959 sprintf(threadname, "testSubscr%06u", i);
2960 threadId = epicsThreadCreate ( threadname, 2960 threadId = epicsThreadCreate ( threadname,
2961 epicsThreadPriorityMedium, 2961 epicsThreadPriorityMedium,
2962 epicsThreadGetStackSize(epicsThreadStackSmall), 2962 epicsThreadGetStackSize(epicsThreadStackSmall),
2963 testMultithreadSubscrCreateSubscr, 2963 testMultithreadSubscrCreateSubscr,
2964 pMultiThreadSubscrTest );2964 pMultiThreadSubscrTest );
2965 verify ( threadId );2965 verify ( threadId );
2966 }2966 }
@@ -2970,7 +2970,7 @@ void testMultithreadSubscrConnHandler ( struct connection_handler_args args )
29702970
2971void testMultithreadSubscr ( void * pParm )2971void testMultithreadSubscr ( void * pParm )
2972{2972{
2973 MultiThreadSubscrTest * const pMultiThreadSubscrTest = 2973 MultiThreadSubscrTest * const pMultiThreadSubscrTest =
2974 ( MultiThreadSubscrTest * ) pParm;2974 ( MultiThreadSubscrTest * ) pParm;
2975 int status;2975 int status;
2976 unsigned i;2976 unsigned i;
@@ -2983,11 +2983,11 @@ void testMultithreadSubscr ( void * pParm )
2983 pMultiThreadSubscrTest->m_chanName,2983 pMultiThreadSubscrTest->m_chanName,
2984 testMultithreadSubscrConnHandler,2984 testMultithreadSubscrConnHandler,
2985 pMultiThreadSubscrTest,2985 pMultiThreadSubscrTest,
2986 CA_PRIORITY_MIN, 2986 CA_PRIORITY_MIN,
2987 & pMultiThreadSubscrTest->m_chan );2987 & pMultiThreadSubscrTest->m_chan );
2988 verify ( status == ECA_NORMAL );2988 verify ( status == ECA_NORMAL );
29892989
2990 showProgressBegin ( "verifyMultithreadSubscr", 2990 showProgressBegin ( "verifyMultithreadSubscr",
2991 pMultiThreadSubscrTest->m_interestLevel );2991 pMultiThreadSubscrTest->m_interestLevel );
2992 i = 0;2992 i = 0;
2993 while ( TRUE ) {2993 while ( TRUE ) {
@@ -2999,11 +2999,11 @@ void testMultithreadSubscr ( void * pParm )
2999 if ( success ) {2999 if ( success ) {
3000 break;3000 break;
3001 }3001 }
3002 eventWaitStatus = epicsEventWaitWithTimeout ( 3002 eventWaitStatus = epicsEventWaitWithTimeout (
3003 pMultiThreadSubscrTest->m_testCompleteEvent, 0.1 );3003 pMultiThreadSubscrTest->m_testCompleteEvent, 0.1 );
3004 verify ( eventWaitStatus == epicsEventWaitOK || 3004 verify ( eventWaitStatus == epicsEventWaitOK ||
3005 eventWaitStatus == epicsEventWaitTimeout );3005 eventWaitStatus == epicsEventWaitTimeout );
3006 if ( i++ % 100 == 0u ) 3006 if ( i++ % 100 == 0u )
3007 showProgress ( pMultiThreadSubscrTest->m_interestLevel );3007 showProgress ( pMultiThreadSubscrTest->m_interestLevel );
3008 verify ( i < 1000 );3008 verify ( i < 1000 );
3009 }3009 }
@@ -3023,33 +3023,33 @@ void verifyMultithreadSubscr ( const char * pName, unsigned interestLevel )
3023{3023{
3024 static unsigned nSubscr = 3000;3024 static unsigned nSubscr = 3000;
3025 epicsThreadId threadId;3025 epicsThreadId threadId;
3026 MultiThreadSubscrTest * const pMultiThreadSubscrTest = 3026 MultiThreadSubscrTest * const pMultiThreadSubscrTest =
3027 (MultiThreadSubscrTest*) calloc ( 1, 3027 (MultiThreadSubscrTest*) calloc ( 1,
3028 sizeof ( MultiThreadSubscrTest ) );3028 sizeof ( MultiThreadSubscrTest ) );
3029 verify ( pMultiThreadSubscrTest);3029 verify ( pMultiThreadSubscrTest);
3030 pMultiThreadSubscrTest->m_mutex = epicsMutexMustCreate ();3030 pMultiThreadSubscrTest->m_mutex = epicsMutexMustCreate ();
3031 verify ( pMultiThreadSubscrTest->m_mutex );3031 verify ( pMultiThreadSubscrTest->m_mutex );
3032 pMultiThreadSubscrTest->m_testCompleteEvent = 3032 pMultiThreadSubscrTest->m_testCompleteEvent =
3033 epicsEventMustCreate ( epicsEventEmpty );3033 epicsEventMustCreate ( epicsEventEmpty );
3034 verify ( pMultiThreadSubscrTest->m_testCompleteEvent );3034 verify ( pMultiThreadSubscrTest->m_testCompleteEvent );
3035 pMultiThreadSubscrTest->m_threadExitEvent = 3035 pMultiThreadSubscrTest->m_threadExitEvent =
3036 epicsEventMustCreate ( epicsEventEmpty );3036 epicsEventMustCreate ( epicsEventEmpty );
3037 verify ( pMultiThreadSubscrTest->m_threadExitEvent );3037 verify ( pMultiThreadSubscrTest->m_threadExitEvent );
3038 strncpy ( pMultiThreadSubscrTest->m_chanName, pName, 3038 strncpy ( pMultiThreadSubscrTest->m_chanName, pName,
3039 sizeof ( pMultiThreadSubscrTest->m_chanName ) );3039 sizeof ( pMultiThreadSubscrTest->m_chanName ) );
3040 pMultiThreadSubscrTest->m_chanName3040 pMultiThreadSubscrTest->m_chanName
3041 [ sizeof ( pMultiThreadSubscrTest->m_chanName ) - 1u ] = '\0';3041 [ sizeof ( pMultiThreadSubscrTest->m_chanName ) - 1u ] = '\0';
3042 pMultiThreadSubscrTest->m_nUpdatesRequired = nSubscr;3042 pMultiThreadSubscrTest->m_nUpdatesRequired = nSubscr;
3043 pMultiThreadSubscrTest->m_interestLevel = interestLevel;3043 pMultiThreadSubscrTest->m_interestLevel = interestLevel;
3044 threadId = epicsThreadCreate ( 3044 threadId = epicsThreadCreate (
3045 "testMultithreadSubscr", 3045 "testMultithreadSubscr",
3046 epicsThreadPriorityMedium, 3046 epicsThreadPriorityMedium,
3047 epicsThreadGetStackSize(epicsThreadStackSmall), 3047 epicsThreadGetStackSize(epicsThreadStackSmall),
3048 testMultithreadSubscr, pMultiThreadSubscrTest );3048 testMultithreadSubscr, pMultiThreadSubscrTest );
3049 verify ( threadId );3049 verify ( threadId );
3050 {3050 {
3051 epicsEventWaitStatus eventWaitStatus;3051 epicsEventWaitStatus eventWaitStatus;
3052 eventWaitStatus = epicsEventWaitWithTimeout ( 3052 eventWaitStatus = epicsEventWaitWithTimeout (
3053 pMultiThreadSubscrTest->m_threadExitEvent, 1000.0 );3053 pMultiThreadSubscrTest->m_threadExitEvent, 1000.0 );
3054 verify ( eventWaitStatus == epicsEventWaitOK );3054 verify ( eventWaitStatus == epicsEventWaitOK );
3055 }3055 }
@@ -3068,7 +3068,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel )
3068 evid subscription;3068 evid subscription;
3069 unsigned eventCount = 0u;3069 unsigned eventCount = 0u;
3070 epicsTimeStamp begin, end;3070 epicsTimeStamp begin, end;
3071 3071
3072 mgrCtx = fdmgr_init ();3072 mgrCtx = fdmgr_init ();
3073 verify ( mgrCtx );3073 verify ( mgrCtx );
30743074
@@ -3089,7 +3089,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel )
30893089
3090 showProgress ( interestLevel );3090 showProgress ( interestLevel );
30913091
3092 status = ca_add_event ( DBR_FLOAT, newChan, 3092 status = ca_add_event ( DBR_FLOAT, newChan,
3093 nUpdatesTester, & eventCount, & subscription );3093 nUpdatesTester, & eventCount, & subscription );
3094 verify ( status == ECA_NORMAL );3094 verify ( status == ECA_NORMAL );
30953095
@@ -3142,7 +3142,7 @@ void fdManagerVerify ( const char * pName, unsigned interestLevel )
3142 showProgressEnd ( interestLevel );3142 showProgressEnd ( interestLevel );
3143}3143}
31443144
3145void verifyConnectWithDisconnectedChannels ( 3145void verifyConnectWithDisconnectedChannels (
3146 const char *pName, unsigned interestLevel )3146 const char *pName, unsigned interestLevel )
3147{3147{
3148 int status;3148 int status;
@@ -3171,11 +3171,11 @@ void verifyConnectWithDisconnectedChannels (
3171 status = ca_create_channel ( pName, 0, 0, 0, & validChan );3171 status = ca_create_channel ( pName, 0, 0, 0, & validChan );
3172 verify ( status == ECA_NORMAL );3172 verify ( status == ECA_NORMAL );
31733173
3174 /* 3174 /*
3175 * we should be able to connect to a valid 3175 * we should be able to connect to a valid
3176 * channel within a reasonable delay even3176 * channel within a reasonable delay even
3177 * though there is one permanently 3177 * though there is one permanently
3178 * diasconnected channel 3178 * diasconnected channel
3179 */3179 */
3180 status = ca_pend_io ( timeoutToPendIO );3180 status = ca_pend_io ( timeoutToPendIO );
3181 verify ( status == ECA_NORMAL );3181 verify ( status == ECA_NORMAL );
@@ -3205,7 +3205,7 @@ void noopExceptionCallback ( struct exception_handler_args args )
3205{3205{
3206}3206}
32073207
3208void verifyDisconnect ( 3208void verifyDisconnect (
3209 const char * pName, unsigned interestLevel )3209 const char * pName, unsigned interestLevel )
3210{3210{
3211 int disconnectFlag = 0;3211 int disconnectFlag = 0;
@@ -3214,8 +3214,8 @@ void verifyDisconnect (
3214 chid chan1;3214 chid chan1;
3215 int status;3215 int status;
32163216
3217 status = ca_create_channel ( 3217 status = ca_create_channel (
3218 pName, verifyClearChannelOnDisconnectCallback, 3218 pName, verifyClearChannelOnDisconnectCallback,
3219 & disconnectFlag, 0, & chan0 );3219 & disconnectFlag, 0, & chan0 );
3220 SEVCHK ( status, NULL );3220 SEVCHK ( status, NULL );
32213221
@@ -3256,7 +3256,7 @@ void verifyDisconnect (
3256 fprintf ( stdout, "confirmed.\n" );3256 fprintf ( stdout, "confirmed.\n" );
3257 /* channel cleared by disconnect handler */3257 /* channel cleared by disconnect handler */
32583258
3259 status = ca_create_channel ( 3259 status = ca_create_channel (
3260 pName, 0, 0, 0, & chan1 );3260 pName, 0, 0, 0, & chan1 );
3261 SEVCHK ( status, NULL );3261 SEVCHK ( status, NULL );
32623262
@@ -3275,11 +3275,11 @@ void verifyDisconnect (
3275 SEVCHK ( status, NULL );3275 SEVCHK ( status, NULL );
3276}3276}
32773277
3278void verifyName ( 3278void verifyName (
3279 const char * pName, unsigned interestLevel )3279 const char * pName, unsigned interestLevel )
3280{3280{
3281 chid chan;3281 chid chan;
3282 int status = ca_create_channel ( 3282 int status = ca_create_channel (
3283 pName, 0, 0, 0, & chan );3283 pName, 0, 0, 0, & chan );
3284 SEVCHK ( status, NULL );3284 SEVCHK ( status, NULL );
3285 if ( strcmp ( pName, ca_name ( chan ) ) != 0 ) {3285 if ( strcmp ( pName, ca_name ( chan ) ) != 0 ) {
@@ -3297,13 +3297,13 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
32973297
3298 for ( i=0u; i < 1000; i++ ) {3298 for ( i=0u; i < 1000; i++ ) {
3299 const dbr_double_t stim = i;3299 const dbr_double_t stim = i;
3300 3300
3301 { 3301 {
3302 chid chan;3302 chid chan;
3303 int status;3303 int status;
3304 status = ca_context_create ( ca_disable_preemptive_callback );3304 status = ca_context_create ( ca_disable_preemptive_callback );
3305 SEVCHK ( status, "context create failed" );3305 SEVCHK ( status, "context create failed" );
3306 3306
3307 status = ca_create_channel ( pName, 0, 0, 0, & chan );3307 status = ca_create_channel ( pName, 0, 0, 0, & chan );
3308 /*3308 /*
3309 * currently in-memory channels cant be used with this test3309 * currently in-memory channels cant be used with this test
@@ -3311,26 +3311,26 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
3311 */3311 */
3312 if ( status != ECA_UNAVAILINSERV ) {3312 if ( status != ECA_UNAVAILINSERV ) {
3313 SEVCHK ( status, NULL );3313 SEVCHK ( status, NULL );
3314 3314
3315 status = ca_pend_io( timeoutToPendIO );3315 status = ca_pend_io( timeoutToPendIO );
3316 SEVCHK ( status, "channel connect failed" );3316 SEVCHK ( status, "channel connect failed" );
3317 3317
3318 status = ca_put ( DBR_DOUBLE, chan, & stim );3318 status = ca_put ( DBR_DOUBLE, chan, & stim );
3319 SEVCHK ( status, "channel put failed" );3319 SEVCHK ( status, "channel put failed" );
3320 3320
3321 status = ca_clear_channel ( chan );3321 status = ca_clear_channel ( chan );
3322 SEVCHK ( status, NULL );3322 SEVCHK ( status, NULL );
3323 }3323 }
3324 ca_context_destroy ();3324 ca_context_destroy ();
3325 }3325 }
3326 3326
3327 {3327 {
3328 chid chan;3328 chid chan;
3329 int status;3329 int status;
3330 dbr_double_t resp;3330 dbr_double_t resp;
3331 status = ca_context_create ( ca_disable_preemptive_callback );3331 status = ca_context_create ( ca_disable_preemptive_callback );
3332 SEVCHK ( status, "context create failed" );3332 SEVCHK ( status, "context create failed" );
3333 3333
3334 status = ca_create_channel ( pName, 0, 0, 0, & chan );3334 status = ca_create_channel ( pName, 0, 0, 0, & chan );
3335 SEVCHK ( status, NULL );3335 SEVCHK ( status, NULL );
3336 /*3336 /*
@@ -3340,15 +3340,15 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
3340 if ( status != ECA_UNAVAILINSERV ) {3340 if ( status != ECA_UNAVAILINSERV ) {
3341 status = ca_pend_io( timeoutToPendIO );3341 status = ca_pend_io( timeoutToPendIO );
3342 SEVCHK ( status, "channel connect failed" );3342 SEVCHK ( status, "channel connect failed" );
3343 3343
3344 status = ca_get ( DBR_DOUBLE, chan, & resp );3344 status = ca_get ( DBR_DOUBLE, chan, & resp );
3345 SEVCHK ( status, "channel get failed" );3345 SEVCHK ( status, "channel get failed" );
3346 3346
3347 status = ca_pend_io ( timeoutToPendIO );3347 status = ca_pend_io ( timeoutToPendIO );
3348 SEVCHK ( status, "get, pend io failed" );3348 SEVCHK ( status, "get, pend io failed" );
3349 3349
3350 verify ( stim == resp );3350 verify ( stim == resp );
3351 3351
3352 status = ca_clear_channel ( chan );3352 status = ca_clear_channel ( chan );
3353 SEVCHK ( status, NULL );3353 SEVCHK ( status, NULL );
3354 }3354 }
@@ -3359,11 +3359,11 @@ void verifyContextRundownFlush ( const char * pName, unsigned interestLevel )
3359 showProgress ( interestLevel );3359 showProgress ( interestLevel );
3360 }3360 }
3361 }3361 }
3362 3362
3363 showProgressEnd ( interestLevel );3363 showProgressEnd ( interestLevel );
3364}3364}
33653365
3366void verifyContextRundownChanStillExist ( 3366void verifyContextRundownChanStillExist (
3367 const char * pName, unsigned interestLevel )3367 const char * pName, unsigned interestLevel )
3368{3368{
3369 chid chan[10000];3369 chid chan[10000];
@@ -3374,7 +3374,7 @@ void verifyContextRundownChanStillExist (
33743374
3375 status = ca_context_create ( ca_disable_preemptive_callback );3375 status = ca_context_create ( ca_disable_preemptive_callback );
3376 SEVCHK ( status, "context create failed" );3376 SEVCHK ( status, "context create failed" );
3377 3377
3378 for ( i = 0; i < NELEMENTS ( chan ); i++ ) {3378 for ( i = 0; i < NELEMENTS ( chan ); i++ ) {
3379 status = ca_create_channel ( pName, 0, 0, 0, & chan[i] );3379 status = ca_create_channel ( pName, 0, 0, 0, & chan[i] );
3380 /*3380 /*
@@ -3386,17 +3386,17 @@ void verifyContextRundownChanStillExist (
3386 }3386 }
3387 SEVCHK ( status, NULL );3387 SEVCHK ( status, NULL );
3388 }3388 }
3389 3389
3390 status = ca_pend_io( timeoutToPendIO );3390 status = ca_pend_io( timeoutToPendIO );
3391 SEVCHK ( status, "channel connect failed" );3391 SEVCHK ( status, "channel connect failed" );
33923392
3393 ca_context_destroy ();3393 ca_context_destroy ();
3394 3394
3395 showProgressEnd ( interestLevel );3395 showProgressEnd ( interestLevel );
3396}3396}
33973397
3398int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount, 3398int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3399 unsigned repetitionCount, enum ca_preemptive_callback_select select )3399 unsigned repetitionCount, enum ca_preemptive_callback_select select )
3400{3400{
3401 chid chan;3401 chid chan;
3402 int status;3402 int status;
@@ -3405,7 +3405,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3405 unsigned connections;3405 unsigned connections;
3406 unsigned maxArrayBytes = 10000000;3406 unsigned maxArrayBytes = 10000000;
34073407
3408 printf ( "CA Client V%s, channel name \"%s\", timeout %g\n", 3408 printf ( "CA Client V%s, channel name \"%s\", timeout %g\n",
3409 ca_version (), pName, timeoutToPendIO );3409 ca_version (), pName, timeoutToPendIO );
3410 if ( select == ca_enable_preemptive_callback ) {3410 if ( select == ca_enable_preemptive_callback ) {
3411 printf ( "Preemptive call back is enabled.\n" );3411 printf ( "Preemptive call back is enabled.\n" );
@@ -3414,7 +3414,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3414 {3414 {
3415 char tmpString[32];3415 char tmpString[32];
3416 sprintf ( tmpString, "%u", maxArrayBytes );3416 sprintf ( tmpString, "%u", maxArrayBytes );
3417 epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString ); 3417 epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", tmpString );
3418 }3418 }
34193419
3420 /*3420 /*
@@ -3447,7 +3447,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3447 showProgressEnd ( interestLevel );3447 showProgressEnd ( interestLevel );
34483448
3449 printf ( "native type was %s, native count was %lu\n",3449 printf ( "native type was %s, native count was %lu\n",
3450 dbf_type_to_text ( ca_field_type ( chan ) ), 3450 dbf_type_to_text ( ca_field_type ( chan ) ),
3451 ca_element_count ( chan ) );3451 ca_element_count ( chan ) );
34523452
3453 connections = ca_get_ioc_connection_count ();3453 connections = ca_get_ioc_connection_count ();
@@ -3464,14 +3464,14 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3464 verifyTimeStamps ( chan, interestLevel );3464 verifyTimeStamps ( chan, interestLevel );
3465 verifyOldPend ( interestLevel );3465 verifyOldPend ( interestLevel );
3466 exceptionTest ( chan, interestLevel );3466 exceptionTest ( chan, interestLevel );
3467 arrayTest ( chan, maxArrayBytes, interestLevel ); 3467 arrayTest ( chan, maxArrayBytes, interestLevel );
3468 verifyMonitorSubscriptionFlushIO ( chan, interestLevel );3468 verifyMonitorSubscriptionFlushIO ( chan, interestLevel );
3469 monitorSubscriptionFirstUpdateTest ( pName, chan, interestLevel );3469 monitorSubscriptionFirstUpdateTest ( pName, chan, interestLevel );
3470 ctrlDoubleTest ( chan, interestLevel );3470 ctrlDoubleTest ( chan, interestLevel );
3471 verifyBlockInPendIO ( chan, interestLevel );3471 verifyBlockInPendIO ( chan, interestLevel );
3472 verifyAnalogIO ( chan, DBR_FLOAT, FLT_MIN, FLT_MAX, 3472 verifyAnalogIO ( chan, DBR_FLOAT, FLT_MIN, FLT_MAX,
3473 FLT_MIN_EXP, FLT_MAX_EXP, FLT_EPSILON, interestLevel );3473 FLT_MIN_EXP, FLT_MAX_EXP, FLT_EPSILON, interestLevel );
3474 verifyAnalogIO ( chan, DBR_DOUBLE, DBL_MIN, DBL_MAX, 3474 verifyAnalogIO ( chan, DBR_DOUBLE, DBL_MIN, DBL_MAX,
3475 DBL_MIN_EXP, DBL_MAX_EXP, DBL_EPSILON, interestLevel );3475 DBL_MIN_EXP, DBL_MAX_EXP, DBL_EPSILON, interestLevel );
3476 verifyLongIO ( chan, interestLevel );3476 verifyLongIO ( chan, interestLevel );
3477 verifyShortIO ( chan, interestLevel );3477 verifyShortIO ( chan, interestLevel );
@@ -3486,7 +3486,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3486 verifyBadString ( chan, interestLevel );3486 verifyBadString ( chan, interestLevel );
3487 verifyMultithreadSubscr ( pName, interestLevel );3487 verifyMultithreadSubscr ( pName, interestLevel );
3488 if ( select != ca_enable_preemptive_callback ) {3488 if ( select != ca_enable_preemptive_callback ) {
3489 fdManagerVerify ( pName, interestLevel ); 3489 fdManagerVerify ( pName, interestLevel );
3490 }3490 }
34913491
3492 /*3492 /*
@@ -3497,7 +3497,7 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3497 printf ( "\n" );3497 printf ( "\n" );
3498 pend_event_delay_test ( 1.0 );3498 pend_event_delay_test ( 1.0 );
3499 pend_event_delay_test ( 0.1 );3499 pend_event_delay_test ( 0.1 );
3500 pend_event_delay_test ( 0.25 ); 3500 pend_event_delay_test ( 0.25 );
35013501
3502 /* ca_channel_status ( 0 ); */3502 /* ca_channel_status ( 0 ); */
3503 ca_client_status ( 0 );3503 ca_client_status ( 0 );
@@ -3539,10 +3539,10 @@ int acctst ( const char * pName, unsigned interestLevel, unsigned channelCount,
3539 /* SEVCHK ( status, NULL ); */3539 /* SEVCHK ( status, NULL ); */
35403540
3541 caTaskExitTest ( interestLevel );3541 caTaskExitTest ( interestLevel );
3542 3542
3543 verifyContextRundownFlush ( pName, interestLevel );3543 verifyContextRundownFlush ( pName, interestLevel );
3544 verifyContextRundownChanStillExist ( pName, interestLevel );3544 verifyContextRundownChanStillExist ( pName, interestLevel );
3545 3545
3546 free ( pChans );3546 free ( pChans );
35473547
3548 printf ( "\nTest Complete\n" );3548 printf ( "\nTest Complete\n" );
diff --git a/modules/ca/src/client/acctstMain.c b/modules/ca/src/client/acctstMain.c
index 4c700a3..5386019 100644
--- a/modules/ca/src/client/acctstMain.c
+++ b/modules/ca/src/client/acctstMain.c
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
@@ -19,15 +19,15 @@ int main ( int argc, char **argv )
19 unsigned progressLoggingLevel;19 unsigned progressLoggingLevel;
20 unsigned channelCount;20 unsigned channelCount;
21 unsigned repetitionCount;21 unsigned repetitionCount;
22 enum ca_preemptive_callback_select preempt;22 enum ca_preemptive_callback_select preempt;
23 int aBoolean;23 int aBoolean;
2424
2525
26 if ( argc < 2 || argc > 6 ) {26 if ( argc < 2 || argc > 6 ) {
27 printf ("usage: %s <PV name> [progress logging level] [channel count] "27 printf ("usage: %s <PV name> [progress logging level] [channel count] "
28 "[repetition count] [enable preemptive callback]\n", 28 "[repetition count] [enable preemptive callback]\n",
29 argv[0] );29 argv[0] );
30 return 1; 30 return 1;
31 }31 }
3232
33 if ( argc >= 3 ) {33 if ( argc >= 3 ) {
@@ -57,12 +57,12 @@ int main ( int argc, char **argv )
57 else {57 else {
58 aBoolean = 0;58 aBoolean = 0;
59 }59 }
60 if ( aBoolean ) {60 if ( aBoolean ) {
61 preempt = ca_enable_preemptive_callback;61 preempt = ca_enable_preemptive_callback;
62 }62 }
63 else {63 else {
64 preempt = ca_disable_preemptive_callback;64 preempt = ca_disable_preemptive_callback;
65 }65 }
6666
67 acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt );67 acctst ( argv[1], progressLoggingLevel, channelCount, repetitionCount, preempt );
6868
diff --git a/modules/ca/src/client/acctstRegister.cpp b/modules/ca/src/client/acctstRegister.cpp
index e75ed7f..5ddc5af 100644
--- a/modules/ca/src/client/acctstRegister.cpp
+++ b/modules/ca/src/client/acctstRegister.cpp
@@ -60,7 +60,7 @@ struct AutoInit {
60 AutoInit ();60 AutoInit ();
61};61};
6262
63AutoInit :: AutoInit () 63AutoInit :: AutoInit ()
64{64{
65 iocshRegister ( &acctstFuncDef, acctstCallFunc );65 iocshRegister ( &acctstFuncDef, acctstCallFunc );
66}66}
diff --git a/modules/ca/src/client/addrList.h b/modules/ca/src/client/addrList.h
index c06c8b2..9d51e0c 100644
--- a/modules/ca/src/client/addrList.h
+++ b/modules/ca/src/client/addrList.h
@@ -5,28 +5,28 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#ifndef addrListh11#ifndef addrListh
12#define addrListh12#define addrListh
1313
14#include "shareLib.h"14#include "shareLib.h"
15#include "envDefs.h" 15#include "envDefs.h"
16#include "osiSock.h"16#include "osiSock.h"
1717
18#ifdef __cplusplus18#ifdef __cplusplus
19extern "C" {19extern "C" {
20#endif20#endif
2121
22epicsShareFunc void epicsShareAPI configureChannelAccessAddressList 22epicsShareFunc void epicsShareAPI configureChannelAccessAddressList
23 ( struct ELLLIST *pList, SOCKET sock, unsigned short port );23 ( struct ELLLIST *pList, SOCKET sock, unsigned short port );
2424
25epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList25epicsShareFunc int epicsShareAPI addAddrToChannelAccessAddressList
26 ( struct ELLLIST *pList, const ENV_PARAM *pEnv, 26 ( struct ELLLIST *pList, const ENV_PARAM *pEnv,
27 unsigned short port, int ignoreNonDefaultPort );27 unsigned short port, int ignoreNonDefaultPort );
2828
29epicsShareFunc void epicsShareAPI printChannelAccessAddressList 29epicsShareFunc void epicsShareAPI printChannelAccessAddressList
30 ( const struct ELLLIST *pList );30 ( const struct ELLLIST *pList );
3131
32epicsShareFunc void epicsShareAPI removeDuplicateAddresses32epicsShareFunc void epicsShareAPI removeDuplicateAddresses
diff --git a/modules/ca/src/client/autoPtrFreeList.h b/modules/ca/src/client/autoPtrFreeList.h
index 7dc7360..9c1d967 100644
--- a/modules/ca/src/client/autoPtrFreeList.h
+++ b/modules/ca/src/client/autoPtrFreeList.h
@@ -5,22 +5,22 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *
12 *13 *
13 *
14 * L O S A L A M O S14 * L O S A L A M O S
15 * Los Alamos National Laboratory15 * Los Alamos National Laboratory
16 * Los Alamos, New Mexico 8754516 * Los Alamos, New Mexico 87545
17 * 17 *
18 * Copyright, The Regents of the University of California.18 * Copyright, The Regents of the University of California.
19 * 19 *
20 * 20 *
21 * Author Jeffrey O. Hill21 * Author Jeffrey O. Hill
22 * johill@lanl.gov22 * johill@lanl.gov
23 * 505 665 183123 * 505 665 1831
24 */24 */
2525
26#ifndef autoPtrFreeListh26#ifndef autoPtrFreeListh
@@ -56,7 +56,7 @@ private:
56};56};
5757
58template < class T, unsigned N, class MUTEX >58template < class T, unsigned N, class MUTEX >
59inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList ( 59inline autoPtrFreeList < T, N, MUTEX >::autoPtrFreeList (
60 tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) :60 tsFreeList < T, N, MUTEX > & freeListIn, T * pIn ) :
61 p ( pIn ), freeList ( freeListIn ) {}61 p ( pIn ), freeList ( freeListIn ) {}
6262
diff --git a/modules/ca/src/client/autoPtrRecycle.h b/modules/ca/src/client/autoPtrRecycle.h
index 173e148..600bb5a 100644
--- a/modules/ca/src/client/autoPtrRecycle.h
+++ b/modules/ca/src/client/autoPtrRecycle.h
@@ -5,22 +5,22 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *
12 *13 *
13 *
14 * L O S A L A M O S14 * L O S A L A M O S
15 * Los Alamos National Laboratory15 * Los Alamos National Laboratory
16 * Los Alamos, New Mexico 8754516 * Los Alamos, New Mexico 87545
17 * 17 *
18 * Copyright, The Regents of the University of California.18 * Copyright, The Regents of the University of California.
19 * 19 *
20 * 20 *
21 * Author Jeffrey O. Hill21 * Author Jeffrey O. Hill
22 * johill@lanl.gov22 * johill@lanl.gov
23 * 505 665 183123 * 505 665 1831
24 */24 */
2525
26#ifndef autoPtrRecycleh26#ifndef autoPtrRecycleh
@@ -29,7 +29,7 @@
29template < class T >29template < class T >
30class autoPtrRecycle {30class autoPtrRecycle {
31public:31public:
32 autoPtrRecycle ( 32 autoPtrRecycle (
33 epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &,33 epicsGuard < epicsMutex > &, chronIntIdResTable < baseNMIU > &,
34 cacRecycle &, T * );34 cacRecycle &, T * );
35 ~autoPtrRecycle ();35 ~autoPtrRecycle ();
@@ -43,12 +43,12 @@ private:
43 chronIntIdResTable < baseNMIU > & ioTable;43 chronIntIdResTable < baseNMIU > & ioTable;
44 epicsGuard < epicsMutex > & guard;44 epicsGuard < epicsMutex > & guard;
45 // not implemented45 // not implemented
46 autoPtrRecycle ( const autoPtrRecycle & );46 autoPtrRecycle ( const autoPtrRecycle & );
47 autoPtrRecycle & operator = ( const autoPtrRecycle & );47 autoPtrRecycle & operator = ( const autoPtrRecycle & );
48};48};
4949
50template < class T >50template < class T >
51inline autoPtrRecycle<T>::autoPtrRecycle ( 51inline autoPtrRecycle<T>::autoPtrRecycle (
52 epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl,52 epicsGuard < epicsMutex > & guardIn, chronIntIdResTable < baseNMIU > & tbl,
53 cacRecycle & rIn, T * pIn ) :53 cacRecycle & rIn, T * pIn ) :
54 p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {}54 p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {}
diff --git a/modules/ca/src/client/baseNMIU.cpp b/modules/ca/src/client/baseNMIU.cpp
index 20f153b..8d444c1 100644
--- a/modules/ca/src/client/baseNMIU.cpp
+++ b/modules/ca/src/client/baseNMIU.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
diff --git a/modules/ca/src/client/bhe.cpp b/modules/ca/src/client/bhe.cpp
index d6f1796..4fac257 100644
--- a/modules/ca/src/client/bhe.cpp
+++ b/modules/ca/src/client/bhe.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10 10
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
@@ -42,12 +42,12 @@
42 * start up42 * start up
43 *43 *
44 * if creating this in response to a search reply44 * if creating this in response to a search reply
45 * and not in response to a beacon then 45 * and not in response to a beacon then
46 * we set the beacon time stamp to46 * we set the beacon time stamp to
47 * zero (so we can correctly compute the period47 * zero (so we can correctly compute the period
48 * between the 1st and 2nd beacons)48 * between the 1st and 2nd beacons)
49 */49 */
50bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp, 50bhe::bhe ( epicsMutex & mutexIn, const epicsTime & initialTimeStamp,
51 unsigned initialBeaconNumber, const inetAddrID & addr ) :51 unsigned initialBeaconNumber, const inetAddrID & addr ) :
52 inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ),52 inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ),
53 mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber )53 mutex ( mutexIn ), pIIU ( 0 ), lastBeaconNumber ( initialBeaconNumber )
@@ -74,7 +74,7 @@ void bhe::beaconAnomalyNotify ( epicsGuard < epicsMutex > & guard )
74}74}
7575
76#ifdef DEBUG76#ifdef DEBUG
77void bhe::logBeacon ( const char * pDiagnostic, 77void bhe::logBeacon ( const char * pDiagnostic,
78 const double & currentPeriod,78 const double & currentPeriod,
79 const epicsTime & currentTime )79 const epicsTime & currentTime )
80{80{
@@ -82,10 +82,10 @@ void bhe::logBeacon ( const char * pDiagnostic,
82 char name[64];82 char name[64];
83 this->name ( name, sizeof ( name ) );83 this->name ( name, sizeof ( name ) );
84 char date[64];84 char date[64];
85 currentTime.strftime ( date, sizeof ( date ), 85 currentTime.strftime ( date, sizeof ( date ),
86 "%a %b %d %Y %H:%M:%S.%f");86 "%a %b %d %Y %H:%M:%S.%f");
87 ::printf ( "%s cp=%g ap=%g %s %s\n",87 ::printf ( "%s cp=%g ap=%g %s %s\n",
88 pDiagnostic, currentPeriod, 88 pDiagnostic, currentPeriod,
89 this->averagePeriod, name, date );89 this->averagePeriod, name, date );
90 }90 }
91}91}
@@ -105,7 +105,7 @@ void bhe::logBeaconDiscard ( unsigned beaconAdvance,
105 char name[64];105 char name[64];
106 this->name ( name, sizeof ( name ) );106 this->name ( name, sizeof ( name ) );
107 char date[64];107 char date[64];
108 currentTime.strftime ( date, sizeof ( date ), 108 currentTime.strftime ( date, sizeof ( date ),
109 "%a %b %d %Y %H:%M:%S.%f");109 "%a %b %d %Y %H:%M:%S.%f");
110 ::printf ( "bb %u %s %s\n",110 ::printf ( "bb %u %s %s\n",
111 beaconAdvance, name, date );111 beaconAdvance, name, date );
@@ -123,16 +123,16 @@ void bhe::logBeaconDiscard ( unsigned /* beaconAdvance */,
123 *123 *
124 * updates beacon period, and looks for beacon anomalies124 * updates beacon period, and looks for beacon anomalies
125 */125 */
126bool bhe::updatePeriod ( 126bool bhe::updatePeriod (
127 epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime, 127 epicsGuard < epicsMutex > & guard, const epicsTime & programBeginTime,
128 const epicsTime & currentTime, ca_uint32_t beaconNumber, 128 const epicsTime & currentTime, ca_uint32_t beaconNumber,
129 unsigned protocolRevision )129 unsigned protocolRevision )
130{130{
131 guard.assertIdenticalMutex ( this->mutex );131 guard.assertIdenticalMutex ( this->mutex );
132132
133 //133 //
134 // this block is enetered if the beacon was created as a side effect of134 // this block is enetered if the beacon was created as a side effect of
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
136 // and sequence number136 // and sequence number
137 //137 //
138 if ( this->timeStamp == epicsTime () ) {138 if ( this->timeStamp == epicsTime () ) {
@@ -142,7 +142,7 @@ bool bhe::updatePeriod (
142142
143 this->beaconAnomalyNotify ( guard );143 this->beaconAnomalyNotify ( guard );
144144
145 /* 145 /*
146 * this is the 1st beacon seen - the beacon time stamp146 * this is the 1st beacon seen - the beacon time stamp
147 * was not initialized during BHE create because147 * was not initialized during BHE create because
148 * a TCP/IP connection created the beacon.148 * a TCP/IP connection created the beacon.
@@ -167,15 +167,15 @@ bool bhe::updatePeriod (
167 }167 }
168 this->lastBeaconNumber = beaconNumber;168 this->lastBeaconNumber = beaconNumber;
169169
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
171 // (this situation is probably caused by a temporary duplicate route )171 // (this situation is probably caused by a temporary duplicate route )
172 if ( beaconSeqAdvance == 0 || beaconSeqAdvance > ca_uint32_max - 256 ) {172 if ( beaconSeqAdvance == 0 || beaconSeqAdvance > ca_uint32_max - 256 ) {
173 logBeaconDiscard ( beaconSeqAdvance, currentTime );173 logBeaconDiscard ( beaconSeqAdvance, currentTime );
174 return false;174 return false;
175 }175 }
176176
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
178 // (this situation is probably caused by a duplicate route 178 // (this situation is probably caused by a duplicate route
179 // or a beacon due to input queue overun)179 // or a beacon due to input queue overun)
180 if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) {180 if ( beaconSeqAdvance > 1 && beaconSeqAdvance < 4 ) {
181 logBeaconDiscard ( beaconSeqAdvance, currentTime );181 logBeaconDiscard ( beaconSeqAdvance, currentTime );
@@ -205,7 +205,7 @@ bool bhe::updatePeriod (
205 /*205 /*
206 * ignore beacons seen for the first time shortly after206 * ignore beacons seen for the first time shortly after
207 * init, but do not ignore beacons arriving with a short207 * init, but do not ignore beacons arriving with a short
208 * period because the IOC was rebooted soon after the 208 * period because the IOC was rebooted soon after the
209 * client starts up.209 * client starts up.
210 */210 */
211 totalRunningTime = this->timeStamp - programBeginTime;211 totalRunningTime = this->timeStamp - programBeginTime;
@@ -217,24 +217,24 @@ bool bhe::updatePeriod (
217217
218 /*218 /*
219 * Is this an IOC seen because of a restored219 * Is this an IOC seen because of a restored
220 * network segment? 220 * network segment?
221 *221 *
222 * It may be possible to get false triggers here 222 * It may be possible to get false triggers here
223 * if the client is busy, but this does not cause223 * if the client is busy, but this does not cause
224 * problems because the echo response will tell us 224 * problems because the echo response will tell us
225 * that the server is available225 * that the server is available
226 */226 */
227 if ( currentPeriod >= this->averagePeriod * 1.25 ) {227 if ( currentPeriod >= this->averagePeriod * 1.25 ) {
228228
229 /* 229 /*
230 * trigger on any missing beacon 230 * trigger on any missing beacon
231 * if connected to this server231 * if connected to this server
232 */ 232 */
233 this->beaconAnomalyNotify ( guard );233 this->beaconAnomalyNotify ( guard );
234234
235 if ( currentPeriod >= this->averagePeriod * 3.25 ) {235 if ( currentPeriod >= this->averagePeriod * 3.25 ) {
236 /* 236 /*
237 * trigger on any 3 contiguous missing beacons 237 * trigger on any 3 contiguous missing beacons
238 * if not connected to this server238 * if not connected to this server
239 */239 */
240 netChange = true;240 netChange = true;
@@ -248,9 +248,9 @@ bool bhe::updatePeriod (
248 * IOC reboots). Lower tolarance here because we248 * IOC reboots). Lower tolarance here because we
249 * dont have to worry about lost beacons.249 * dont have to worry about lost beacons.
250 *250 *
251 * It may be possible to get false triggers here 251 * It may be possible to get false triggers here
252 * if the client is busy, but this does not cause252 * if the client is busy, but this does not cause
253 * problems because the echo response will tell us 253 * problems because the echo response will tell us
254 * that the server is available254 * that the server is available
255 */255 */
256 else if ( currentPeriod <= this->averagePeriod * 0.80 ) {256 else if ( currentPeriod <= this->averagePeriod * 0.80 ) {
@@ -259,14 +259,14 @@ bool bhe::updatePeriod (
259 logBeacon ( "bal", currentPeriod, currentTime );259 logBeacon ( "bal", currentPeriod, currentTime );
260 }260 }
261 else if ( this->pIIU ) {261 else if ( this->pIIU ) {
262 // update state of health for active virtual circuits 262 // update state of health for active virtual circuits
263 // if the beacon looks ok263 // if the beacon looks ok
264 this->pIIU->beaconArrivalNotify ( guard );264 this->pIIU->beaconArrivalNotify ( guard );
265 logBeacon ( "vb", currentPeriod, currentTime );265 logBeacon ( "vb", currentPeriod, currentTime );
266 }266 }
267267
268 // update a running average period268 // update a running average period
269 this->averagePeriod = currentPeriod * 0.125 + 269 this->averagePeriod = currentPeriod * 0.125 +
270 this->averagePeriod * 0.875;270 this->averagePeriod * 0.875;
271 }271 }
272272
@@ -286,22 +286,22 @@ void bhe::show ( epicsGuard < epicsMutex > &, unsigned level ) const
286 char host [64];286 char host [64];
287 this->name ( host, sizeof ( host ) );287 this->name ( host, sizeof ( host ) );
288 if ( this->averagePeriod == -DBL_MAX ) {288 if ( this->averagePeriod == -DBL_MAX ) {
289 ::printf ( "CA beacon hash entry for %s <no period estimate>\n", 289 ::printf ( "CA beacon hash entry for %s <no period estimate>\n",
290 host );290 host );
291 }291 }
292 else {292 else {
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",
294 host, this->averagePeriod );294 host, this->averagePeriod );
295 }295 }
296 if ( level > 0u ) {296 if ( level > 0u ) {
297 char date[64];297 char date[64];
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");
299 ::printf ( "\tbeacon number %u, on %s\n", 299 ::printf ( "\tbeacon number %u, on %s\n",
300 this->lastBeaconNumber, date );300 this->lastBeaconNumber, date );
301 }301 }
302}302}
303303
304double bhe::period ( epicsGuard < epicsMutex > & guard ) const 304double bhe::period ( epicsGuard < epicsMutex > & guard ) const
305{305{
306 guard.assertIdenticalMutex ( this->mutex );306 guard.assertIdenticalMutex ( this->mutex );
307 return this->averagePeriod;307 return this->averagePeriod;
@@ -313,14 +313,14 @@ epicsTime bhe::updateTime ( epicsGuard < epicsMutex > & guard ) const
313 return this->timeStamp;313 return this->timeStamp;
314}314}
315315
316void bhe::registerIIU ( 316void bhe::registerIIU (
317 epicsGuard < epicsMutex > & guard, tcpiiu & iiu )317 epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
318{318{
319 guard.assertIdenticalMutex ( this->mutex );319 guard.assertIdenticalMutex ( this->mutex );
320 this->pIIU = & iiu;320 this->pIIU = & iiu;
321}321}
322322
323void bhe::unregisterIIU ( 323void bhe::unregisterIIU (
324 epicsGuard < epicsMutex > & guard, tcpiiu & iiu )324 epicsGuard < epicsMutex > & guard, tcpiiu & iiu )
325{325{
326 guard.assertIdenticalMutex ( this->mutex );326 guard.assertIdenticalMutex ( this->mutex );
diff --git a/modules/ca/src/client/bhe.h b/modules/ca/src/client/bhe.h
index 4da9520..b1be35f 100644
--- a/modules/ca/src/client/bhe.h
+++ b/modules/ca/src/client/bhe.h
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
@@ -54,14 +54,14 @@ public:
5454
55class bhe : public tsSLNode < bhe >, public inetAddrID {55class bhe : public tsSLNode < bhe >, public inetAddrID {
56public:56public:
57 epicsShareFunc bhe ( 57 epicsShareFunc bhe (
58 epicsMutex &, const epicsTime & initialTimeStamp, 58 epicsMutex &, const epicsTime & initialTimeStamp,
59 unsigned initialBeaconNumber, const inetAddrID & addr );59 unsigned initialBeaconNumber, const inetAddrID & addr );
60 epicsShareFunc ~bhe (); 60 epicsShareFunc ~bhe ();
61 epicsShareFunc bool updatePeriod ( 61 epicsShareFunc bool updatePeriod (
62 epicsGuard < epicsMutex > &,62 epicsGuard < epicsMutex > &,
63 const epicsTime & programBeginTime, 63 const epicsTime & programBeginTime,
64 const epicsTime & currentTime, ca_uint32_t beaconNumber, 64 const epicsTime & currentTime, ca_uint32_t beaconNumber,
65 unsigned protocolRevision );65 unsigned protocolRevision );
66 epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const;66 epicsShareFunc double period ( epicsGuard < epicsMutex > & ) const;
67 epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const;67 epicsShareFunc epicsTime updateTime ( epicsGuard < epicsMutex > & ) const;
@@ -80,13 +80,13 @@ private:
80 tcpiiu * pIIU;80 tcpiiu * pIIU;
81 ca_uint32_t lastBeaconNumber;81 ca_uint32_t lastBeaconNumber;
82 void beaconAnomalyNotify ( epicsGuard < epicsMutex > & );82 void beaconAnomalyNotify ( epicsGuard < epicsMutex > & );
83 void logBeacon ( const char * pDiagnostic, 83 void logBeacon ( const char * pDiagnostic,
84 const double & currentPeriod,84 const double & currentPeriod,
85 const epicsTime & currentTime );85 const epicsTime & currentTime );
86 void logBeaconDiscard ( unsigned beaconAdvance,86 void logBeaconDiscard ( unsigned beaconAdvance,
87 const epicsTime & currentTime );87 const epicsTime & currentTime );
88 bhe ( const bhe & );88 bhe ( const bhe & );
89 bhe & operator = ( const bhe & );89 bhe & operator = ( const bhe & );
90 epicsShareFunc void operator delete ( void * );90 epicsShareFunc void operator delete ( void * );
91};91};
9292
@@ -99,20 +99,20 @@ public:
99 void release ( void * );99 void release ( void * );
100private:100private:
101 tsFreeList < bhe, 0x100 > freeList;101 tsFreeList < bhe, 0x100 > freeList;
102 bheFreeStore ( const bheFreeStore & );102 bheFreeStore ( const bheFreeStore & );
103 bheFreeStore & operator = ( const bheFreeStore & );103 bheFreeStore & operator = ( const bheFreeStore & );
104};104};
105105
106inline void * bhe::operator new ( size_t size, 106inline void * bhe::operator new ( size_t size,
107 bheMemoryManager & mgr )107 bheMemoryManager & mgr )
108{ 108{
109 return mgr.allocate ( size );109 return mgr.allocate ( size );
110}110}
111111
112#ifdef CXX_PLACEMENT_DELETE112#ifdef CXX_PLACEMENT_DELETE
113inline void bhe::operator delete ( void * pCadaver, 113inline void bhe::operator delete ( void * pCadaver,
114 bheMemoryManager & mgr )114 bheMemoryManager & mgr )
115{ 115{
116 mgr.release ( pCadaver );116 mgr.release ( pCadaver );
117}117}
118#endif118#endif
diff --git a/modules/ca/src/client/caConnTest.cpp b/modules/ca/src/client/caConnTest.cpp
index 2107739..bd479e6 100644
--- a/modules/ca/src/client/caConnTest.cpp
+++ b/modules/ca/src/client/caConnTest.cpp
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
@@ -60,50 +60,50 @@ void caConnTest ( const char *pNameIn, unsigned channelCountIn, double delayIn )
60{60{
61 unsigned iteration = 0u;61 unsigned iteration = 0u;
62 int status;62 int status;
63 unsigned i;63 unsigned i;
64 chid *pChans;64 chid *pChans;
6565
66 channelCount = channelCountIn;66 channelCount = channelCountIn;
6767
68 pChans = new chid [channelCount];68 pChans = new chid [channelCount];
69 69
70 while ( 1 ) {70 while ( 1 ) {
71 connCount = 0u;71 connCount = 0u;
72 subsequentConnect = false;72 subsequentConnect = false;
73 begin = epicsTime::getCurrent ();73 begin = epicsTime::getCurrent ();
7474
75 printf ( "initializing CA client library\n" );75 printf ( "initializing CA client library\n" );
7676
77 status = ca_task_initialize();77 status = ca_task_initialize();
78 SEVCHK ( status, "CA init failed" );78 SEVCHK ( status, "CA init failed" );
7979
80 printf ( "creating channels\n" );80 printf ( "creating channels\n" );
8181
82 for ( i = 0u; i < channelCount; i++ ) {82 for ( i = 0u; i < channelCount; i++ ) {
83 status = ca_search_and_connect ( pNameIn, 83 status = ca_search_and_connect ( pNameIn,
84 &pChans[i], caConnTestConnHandler, 0 );84 &pChans[i], caConnTestConnHandler, 0 );
85 SEVCHK ( status, "CA search problems" );85 SEVCHK ( status, "CA search problems" );
86 }86 }
8787
88 printf ( "all channels were created\n" );88 printf ( "all channels were created\n" );
8989
90 ca_pend_event ( delayIn );90 ca_pend_event ( delayIn );
9191
92 if ( iteration & 1 ) {92 if ( iteration & 1 ) {
93 for ( i = 0u; i < channelCount; i++ ) {93 for ( i = 0u; i < channelCount; i++ ) {
94 status = ca_clear_channel ( pChans[i] );94 status = ca_clear_channel ( pChans[i] );
95 SEVCHK ( status, "ca_clear_channel() problems" );95 SEVCHK ( status, "ca_clear_channel() problems" );
96 }96 }
97 printf ( "all channels were destroyed\n" );97 printf ( "all channels were destroyed\n" );
98 }98 }
9999
100 printf ( "shutting down CA client library\n" );100 printf ( "shutting down CA client library\n" );
101101
102 status = ca_task_exit ();102 status = ca_task_exit ();
103 SEVCHK ( status, "task exit problems" );103 SEVCHK ( status, "task exit problems" );
104104
105 iteration++;105 iteration++;
106 }106 }
107107
108 //delete [] pChans;108 //delete [] pChans;
109}109}
diff --git a/modules/ca/src/client/caConnTestMain.cpp b/modules/ca/src/client/caConnTestMain.cpp
index f398580..b5e921c 100644
--- a/modules/ca/src/client/caConnTestMain.cpp
+++ b/modules/ca/src/client/caConnTestMain.cpp
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
diff --git a/modules/ca/src/client/caDiagnostics.h b/modules/ca/src/client/caDiagnostics.h
index 90221e1..87029ce 100644
--- a/modules/ca/src/client/caDiagnostics.h
+++ b/modules/ca/src/client/caDiagnostics.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#ifndef caDiagnosticsh11#ifndef caDiagnosticsh
@@ -20,8 +20,8 @@ extern "C" {
20enum appendNumberFlag {appendNumber, dontAppendNumber};20enum appendNumberFlag {appendNumber, dontAppendNumber};
21int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF );21int catime ( const char *channelName, unsigned channelCount, enum appendNumberFlag appNF );
2222
23int acctst ( const char *pname, unsigned logggingInterestLevel, 23int acctst ( const char *pname, unsigned logggingInterestLevel,
24 unsigned channelCount, unsigned repetitionCount, 24 unsigned channelCount, unsigned repetitionCount,
25 enum ca_preemptive_callback_select select );25 enum ca_preemptive_callback_select select );
2626
27#define CATIME_OK 027#define CATIME_OK 0
diff --git a/modules/ca/src/client/caEventRate.cpp b/modules/ca/src/client/caEventRate.cpp
index 8beb163..efb6dc7 100644
--- a/modules/ca/src/client/caEventRate.cpp
+++ b/modules/ca/src/client/caEventRate.cpp
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
@@ -38,50 +38,50 @@ void caEventRate ( const char *pName, unsigned count )
38 chid * pChidTable = new chid [ count ];38 chid * pChidTable = new chid [ count ];
3939
40 {40 {
41 printf ( "Connecting to CA Channel \"%s\" %u times.", 41 printf ( "Connecting to CA Channel \"%s\" %u times.",
42 pName, count );42 pName, count );
43 fflush ( stdout );43 fflush ( stdout );
44 44
45 epicsTime begin = epicsTime::getCurrent ();45 epicsTime begin = epicsTime::getCurrent ();
46 for ( unsigned i = 0u; i < count; i++ ) {46 for ( unsigned i = 0u; i < count; i++ ) {
47 int status = ca_search ( pName, & pChidTable[i] );47 int status = ca_search ( pName, & pChidTable[i] );
48 SEVCHK ( status, NULL );48 SEVCHK ( status, NULL );
49 }49 }
50 50
51 int status = ca_pend_io ( 10000.0 );51 int status = ca_pend_io ( 10000.0 );
52 if ( status != ECA_NORMAL ) {52 if ( status != ECA_NORMAL ) {
53 fprintf ( stderr, " not found.\n" );53 fprintf ( stderr, " not found.\n" );
54 return;54 return;
55 }55 }
56 epicsTime end = epicsTime::getCurrent ();56 epicsTime end = epicsTime::getCurrent ();
57 57
58 printf ( " done(%f sec).\n", end - begin );58 printf ( " done(%f sec).\n", end - begin );
59 }59 }
6060
61 {61 {
62 printf ( "Subscribing %u times.", count );62 printf ( "Subscribing %u times.", count );
63 fflush ( stdout );63 fflush ( stdout );
64 64
65 epicsTime begin = epicsTime::getCurrent ();65 epicsTime begin = epicsTime::getCurrent ();
66 for ( unsigned i = 0u; i < count; i++ ) {66 for ( unsigned i = 0u; i < count; i++ ) {
67 int addEventStatus = ca_add_event ( DBR_FLOAT, 67 int addEventStatus = ca_add_event ( DBR_FLOAT,
68 pChidTable[i], eventCallBack, &eventCount, NULL);68 pChidTable[i], eventCallBack, &eventCount, NULL);
69 SEVCHK ( addEventStatus, __FILE__ );69 SEVCHK ( addEventStatus, __FILE__ );
70 }70 }
71 71
72 int status = ca_flush_io ();72 int status = ca_flush_io ();
73 SEVCHK ( status, __FILE__ );73 SEVCHK ( status, __FILE__ );
74 74
75 epicsTime end = epicsTime::getCurrent ();75 epicsTime end = epicsTime::getCurrent ();
76 76
77 printf ( " done(%f sec).\n", end - begin );77 printf ( " done(%f sec).\n", end - begin );
78 }78 }
79 79
80 {80 {
81 printf ( "Waiting for initial value events." );81 printf ( "Waiting for initial value events." );
82 fflush ( stdout );82 fflush ( stdout );
83 83
84 // let the first one go by 84 // let the first one go by
85 epicsTime begin = epicsTime::getCurrent ();85 epicsTime begin = epicsTime::getCurrent ();
86 while ( eventCount < count ) {86 while ( eventCount < count ) {
87 int status = ca_pend_event ( 0.01 );87 int status = ca_pend_event ( 0.01 );
@@ -90,7 +90,7 @@ void caEventRate ( const char *pName, unsigned count )
90 }90 }
91 }91 }
92 epicsTime end = epicsTime::getCurrent ();92 epicsTime end = epicsTime::getCurrent ();
93 93
94 printf ( " done(%f sec).\n", end - begin );94 printf ( " done(%f sec).\n", end - begin );
95 }95 }
9696
@@ -128,7 +128,7 @@ void caEventRate ( const char *pName, unsigned count )
128 double mean = X / N;128 double mean = X / N;
129 double stdDev = sqrt ( XX / N - mean * mean );129 double stdDev = sqrt ( XX / N - mean * mean );
130130
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",
132 Hz, mean, stdDev );132 Hz, mean, stdDev );
133133
134 if ( samplePeriod < maxSamplePeriod ) {134 if ( samplePeriod < maxSamplePeriod ) {
diff --git a/modules/ca/src/client/caEventRateMain.cpp b/modules/ca/src/client/caEventRateMain.cpp
index 725e661..7ace11d 100644
--- a/modules/ca/src/client/caEventRateMain.cpp
+++ b/modules/ca/src/client/caEventRateMain.cpp
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
diff --git a/modules/ca/src/client/caProto.h b/modules/ca/src/client/caProto.h
index 781c89b..dd59fd4 100644
--- a/modules/ca/src/client/caProto.h
+++ b/modules/ca/src/client/caProto.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
@@ -15,14 +15,14 @@
15 */15 */
1616
17#ifndef __CAPROTO__17#ifndef __CAPROTO__
18#define __CAPROTO__ 18#define __CAPROTO__
1919
20#define capStrOf(A) #A20#define capStrOf(A) #A
21#define capStrOfX(A) capStrOf ( A )21#define capStrOfX(A) capStrOf ( A )
2222
23/* 23/*
24 * CA protocol revision24 * CA protocol revision
25 * TCP/UDP port number (bumped each major protocol change) 25 * TCP/UDP port number (bumped each major protocol change)
26 */26 */
27#define CA_MAJOR_PROTOCOL_REVISION 427#define CA_MAJOR_PROTOCOL_REVISION 4
28#define CA_VERSION_STRING( MINOR_REVISION ) \28#define CA_VERSION_STRING( MINOR_REVISION ) \
@@ -30,7 +30,7 @@
30#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */30#define CA_UKN_MINOR_VERSION 0u /* unknown minor version */
31#define CA_MINIMUM_SUPPORTED_VERSION 4u31#define CA_MINIMUM_SUPPORTED_VERSION 4u
32# define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION)32# define CA_VSUPPORTED(MINOR) ((MINOR)>=CA_MINIMUM_SUPPORTED_VERSION)
33# define CA_V41(MINOR) ((MINOR)>=1u) 33# define CA_V41(MINOR) ((MINOR)>=1u)
34# define CA_V42(MINOR) ((MINOR)>=2u)34# define CA_V42(MINOR) ((MINOR)>=2u)
35# define CA_V43(MINOR) ((MINOR)>=3u)35# define CA_V43(MINOR) ((MINOR)>=3u)
36# define CA_V44(MINOR) ((MINOR)>=4u)36# define CA_V44(MINOR) ((MINOR)>=4u)
@@ -45,8 +45,8 @@
45# define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */45# define CA_V413(MINOR) ((MINOR)>=13u) /* Allow zero length in requests. */
4646
47/*47/*
48 * These port numbers are only used if the CA repeater and 48 * These port numbers are only used if the CA repeater and
49 * CA server port numbers cant be obtained from the EPICS 49 * CA server port numbers cant be obtained from the EPICS
50 * environment variables "EPICS_CA_REPEATER_PORT" and50 * environment variables "EPICS_CA_REPEATER_PORT" and
51 * "EPICS_CA_SERVER_PORT"51 * "EPICS_CA_SERVER_PORT"
52 */52 */
@@ -54,8 +54,8 @@
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)
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)
5656
57/* 57/*
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)
59 * (the MTU of Ethernet is currently independent of its speed varient)59 * (the MTU of Ethernet is currently independent of its speed varient)
60 */60 */
61#define ETHERNET_MAX_UDP ( 1500u - 20u - 8u )61#define ETHERNET_MAX_UDP ( 1500u - 20u - 8u )
@@ -89,10 +89,10 @@ typedef ca_uint32_t caResId;
89#define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */89#define CA_PROTO_SNAPSHOT 5u /* snapshot of the system */
90#define CA_PROTO_SEARCH 6u /* IOC channel search */90#define CA_PROTO_SEARCH 6u /* IOC channel search */
91#define CA_PROTO_BUILD 7u /* build - obsolete */91#define CA_PROTO_BUILD 7u /* build - obsolete */
92#define CA_PROTO_EVENTS_OFF 8u /* flow control */ 92#define CA_PROTO_EVENTS_OFF 8u /* flow control */
93#define CA_PROTO_EVENTS_ON 9u /* flow control */ 93#define CA_PROTO_EVENTS_ON 9u /* flow control */
94#define CA_PROTO_READ_SYNC 10u /* purge old reads */ 94#define CA_PROTO_READ_SYNC 10u /* purge old reads */
95#define CA_PROTO_ERROR 11u /* an operation failed */ 95#define CA_PROTO_ERROR 11u /* an operation failed */
96#define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */96#define CA_PROTO_CLEAR_CHANNEL 12u /* free chan resources */
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 */
98#define CA_PROTO_NOT_FOUND 14u /* channel not found */98#define CA_PROTO_NOT_FOUND 14u /* channel not found */
@@ -172,7 +172,7 @@ typedef struct ca_hdr {
172 */172 */
173struct mon_info {173struct mon_info {
174 ca_float32_t m_lval; /* low delta */174 ca_float32_t m_lval; /* low delta */
175 ca_float32_t m_hval; /* high delta */ 175 ca_float32_t m_hval; /* high delta */
176 ca_float32_t m_toval; /* period btween samples */176 ca_float32_t m_toval; /* period btween samples */
177 ca_uint16_t m_mask; /* event select mask */177 ca_uint16_t m_mask; /* event select mask */
178 ca_uint16_t m_pad; /* extend to 32 bits */178 ca_uint16_t m_pad; /* extend to 32 bits */
diff --git a/modules/ca/src/client/caRepeater.cpp b/modules/ca/src/client/caRepeater.cpp
index 2561223..634a2bc 100644
--- a/modules/ca/src/client/caRepeater.cpp
+++ b/modules/ca/src/client/caRepeater.cpp
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
diff --git a/modules/ca/src/client/caServerID.h b/modules/ca/src/client/caServerID.h
index 08bfdd5..430f314 100644
--- a/modules/ca/src/client/caServerID.h
+++ b/modules/ca/src/client/caServerID.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
@@ -37,7 +37,7 @@ private:
37 ca_uint8_t pri;37 ca_uint8_t pri;
38};38};
3939
40inline caServerID::caServerID ( 40inline caServerID::caServerID (
41 const struct sockaddr_in & addrIn, unsigned priorityIn ) :41 const struct sockaddr_in & addrIn, unsigned priorityIn ) :
42 addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) )42 addr ( addrIn ), pri ( static_cast <ca_uint8_t> ( priorityIn ) )
43{43{
@@ -46,7 +46,7 @@ inline caServerID::caServerID (
4646
47inline bool caServerID::operator == ( const caServerID & rhs ) const47inline bool caServerID::operator == ( const caServerID & rhs ) const
48{48{
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 &&
50 this->addr.sin_port == rhs.addr.sin_port &&50 this->addr.sin_port == rhs.addr.sin_port &&
51 this->pri == rhs.pri ) {51 this->pri == rhs.pri ) {
52 return true;52 return true;
@@ -67,7 +67,7 @@ inline resTableIndex caServerID::hash () const
67 index ^= this->addr.sin_port;67 index ^= this->addr.sin_port;
68 index ^= this->addr.sin_port >> 8u;68 index ^= this->addr.sin_port >> 8u;
69 index ^= this->pri;69 index ^= this->pri;
70 return integerHash ( caServerMinIndexBitWidth, 70 return integerHash ( caServerMinIndexBitWidth,
71 caServerMaxIndexBitWidth, index );71 caServerMaxIndexBitWidth, index );
72}72}
7373
diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp
index 3fd0512..44d6427 100644
--- a/modules/ca/src/client/ca_client_context.cpp
+++ b/modules/ca/src/client/ca_client_context.cpp
@@ -17,9 +17,9 @@
17 * Copyright, 1986, The Regents of the University of California.17 * Copyright, 1986, The Regents of the University of California.
18 *18 *
19 *19 *
20 * Author Jeffrey O. Hill20 * Author Jeffrey O. Hill
21 * johill@lanl.gov21 * johill@lanl.gov
22 * 505 665 183122 * 505 665 1831
23 */23 */
2424
25#ifdef _MSC_VER25#ifdef _MSC_VER
diff --git a/modules/ca/src/client/cac.cpp b/modules/ca/src/client/cac.cpp
index 476d1c3..e335e6e 100644
--- a/modules/ca/src/client/cac.cpp
+++ b/modules/ca/src/client/cac.cpp
@@ -155,7 +155,7 @@ cac::cac (
155 }155 }
156156
157 try {157 try {
158 long status;158 long status;
159159
160 /*160 /*
161 * Certain os, such as HPUX, do not unblock a socket system call161 * Certain os, such as HPUX, do not unblock a socket system call
diff --git a/modules/ca/src/client/cac.h b/modules/ca/src/client/cac.h
index 7db5c6d..c98f05d 100644
--- a/modules/ca/src/client/cac.h
+++ b/modules/ca/src/client/cac.h
@@ -81,8 +81,8 @@ public:
81 void release ( void * );81 void release ( void * );
82private:82private:
83 tsFreeList < comBuf, 0x20 > freeList;83 tsFreeList < comBuf, 0x20 > freeList;
84 cacComBufMemoryManager ( const cacComBufMemoryManager & );84 cacComBufMemoryManager ( const cacComBufMemoryManager & );
85 cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );85 cacComBufMemoryManager & operator = ( const cacComBufMemoryManager & );
86};86};
8787
88class notifyGuard {88class notifyGuard {
@@ -348,8 +348,8 @@ private:
348 const char *pCtx, unsigned status );348 const char *pCtx, unsigned status );
349 static const pExcepProtoStubTCP tcpExcepJumpTableCAC [];349 static const pExcepProtoStubTCP tcpExcepJumpTableCAC [];
350350
351 cac ( const cac & );351 cac ( const cac & );
352 cac & operator = ( const cac & );352 cac & operator = ( const cac & );
353353
354 friend class tcpiiu;354 friend class tcpiiu;
355};355};
diff --git a/modules/ca/src/client/cacChannel.cpp b/modules/ca/src/client/cacChannel.cpp
index c1a52a0..80f622f 100644
--- a/modules/ca/src/client/cacChannel.cpp
+++ b/modules/ca/src/client/cacChannel.cpp
@@ -5,11 +5,11 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
1111
12/* 12/*
13 *13 *
14 * L O S A L A M O S14 * L O S A L A M O S
15 * Los Alamos National Laboratory15 * Los Alamos National Laboratory
@@ -41,7 +41,7 @@ private:
41 epicsSingleton < localHostName > :: reference41 epicsSingleton < localHostName > :: reference
42 _refLocalHostName;42 _refLocalHostName;
43};43};
44 44
45static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT;45static epicsThreadOnceId cacChannelIdOnce = EPICS_THREAD_ONCE_INIT;
4646
47const cacChannel::priLev cacChannel::priorityMax = 99u;47const cacChannel::priLev cacChannel::priorityMax = 99u;
@@ -55,63 +55,63 @@ cacChannel::~cacChannel ()
55{55{
56}56}
5757
58caAccessRights cacChannel::accessRights ( 58caAccessRights cacChannel::accessRights (
59 epicsGuard < epicsMutex > & ) const 59 epicsGuard < epicsMutex > & ) const
60{60{
61 static caAccessRights ar ( true, true );61 static caAccessRights ar ( true, true );
62 return ar;62 return ar;
63}63}
6464
65unsigned cacChannel::searchAttempts ( 65unsigned cacChannel::searchAttempts (
66 epicsGuard < epicsMutex > & ) const 66 epicsGuard < epicsMutex > & ) const
67{67{
68 return 0u;68 return 0u;
69}69}
7070
71double cacChannel::beaconPeriod ( 71double cacChannel::beaconPeriod (
72 epicsGuard < epicsMutex > & ) const 72 epicsGuard < epicsMutex > & ) const
73{73{
74 return - DBL_MAX;74 return - DBL_MAX;
75}75}
7676
77double cacChannel::receiveWatchdogDelay ( 77double cacChannel::receiveWatchdogDelay (
78 epicsGuard < epicsMutex > & ) const78 epicsGuard < epicsMutex > & ) const
79{79{
80 return - DBL_MAX;80 return - DBL_MAX;
81}81}
8282
83bool cacChannel::ca_v42_ok (83bool cacChannel::ca_v42_ok (
84 epicsGuard < epicsMutex > & ) const 84 epicsGuard < epicsMutex > & ) const
85{85{
86 return true;86 return true;
87}87}
8888
89bool cacChannel::connected (89bool cacChannel::connected (
90 epicsGuard < epicsMutex > & ) const 90 epicsGuard < epicsMutex > & ) const
91{91{
92 return true;92 return true;
93}93}
9494
95CACChannelPrivate :: 95CACChannelPrivate ::
96 CACChannelPrivate() :96 CACChannelPrivate() :
97 _refLocalHostName ( localHostNameCache.getReference () )97 _refLocalHostName ( localHostNameCache.getReference () )
98{98{
99}99}
100100
101inline unsigned CACChannelPrivate :: 101inline unsigned CACChannelPrivate ::
102 getHostName ( char * pBuf, unsigned bufLength )102 getHostName ( char * pBuf, unsigned bufLength )
103{103{
104 return _refLocalHostName->getName ( pBuf, bufLength );104 return _refLocalHostName->getName ( pBuf, bufLength );
105}105}
106 106
107inline const char * CACChannelPrivate :: 107inline const char * CACChannelPrivate ::
108 pHostName ()108 pHostName ()
109{109{
110 return _refLocalHostName->pointer ();110 return _refLocalHostName->pointer ();
111}111}
112112
113static CACChannelPrivate * pCACChannelPrivate = 0;113static CACChannelPrivate * pCACChannelPrivate = 0;
114 114
115// runs once only for each process115// runs once only for each process
116extern "C" void cacChannelSetup ( void * )116extern "C" void cacChannelSetup ( void * )
117{117{
@@ -119,7 +119,7 @@ extern "C" void cacChannelSetup ( void * )
119}119}
120120
121// the default is to assume that it is a locally hosted channel121// the default is to assume that it is a locally hosted channel
122unsigned cacChannel::getHostName ( 122unsigned cacChannel::getHostName (
123 epicsGuard < epicsMutex > &,123 epicsGuard < epicsMutex > &,
124 char * pBuf, unsigned bufLength ) const throw ()124 char * pBuf, unsigned bufLength ) const throw ()
125{125{
diff --git a/modules/ca/src/client/cacChannelNotify.cpp b/modules/ca/src/client/cacChannelNotify.cpp
index 08d2cab..5819b6b 100644
--- a/modules/ca/src/client/cacChannelNotify.cpp
+++ b/modules/ca/src/client/cacChannelNotify.cpp
@@ -5,21 +5,21 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/* 10/*
11 *
11 *12 *
12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
15 * Los Alamos, New Mexico 8754515 * Los Alamos, New Mexico 87545
16 * 16 *
17 * Copyright, 1986, The Regents of the University of California.17 * Copyright, 1986, The Regents of the University of California.
18 * 18 *
19 * 19 *
20 * Author Jeffrey O. Hill20 * Author Jeffrey O. Hill
21 * johill@lanl.gov21 * johill@lanl.gov
22 * 505 665 183122 * 505 665 1831
23 */23 */
2424
25#include "iocinf.h"25#include "iocinf.h"
@@ -28,7 +28,7 @@
28#include "cacIO.h"28#include "cacIO.h"
29#undef epicsExportSharedSymbols29#undef epicsExportSharedSymbols
3030
31cacChannelNotify::~cacChannelNotify () 31cacChannelNotify::~cacChannelNotify ()
32{32{
33}33}
3434
diff --git a/modules/ca/src/client/cacContextNotify.cpp b/modules/ca/src/client/cacContextNotify.cpp
index a4498ac..b7d96ac 100644
--- a/modules/ca/src/client/cacContextNotify.cpp
+++ b/modules/ca/src/client/cacContextNotify.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
@@ -31,11 +31,11 @@ cacContextNotify::~cacContextNotify ()
31{31{
32}32}
3333
34void cacContextNotify::callbackProcessingInitiateNotify () 34void cacContextNotify::callbackProcessingInitiateNotify ()
35{35{
36}36}
3737
38void cacContextNotify::callbackProcessingCompleteNotify () 38void cacContextNotify::callbackProcessingCompleteNotify ()
39{39{
40}40}
4141
diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h
index 4e8af4a..426ba02 100644
--- a/modules/ca/src/client/cacIO.h
+++ b/modules/ca/src/client/cacIO.h
@@ -17,9 +17,9 @@
17 * Copyright, 1986, The Regents of the University of California.17 * Copyright, 1986, The Regents of the University of California.
18 *18 *
19 *19 *
20 * Author Jeffrey O. Hill20 * Author Jeffrey O. Hill
21 * johill@lanl.gov21 * johill@lanl.gov
22 * 505 665 183122 * 505 665 1831
23 */23 */
2424
25#ifndef cacIOh25#ifndef cacIOh
@@ -273,8 +273,8 @@ protected:
273273
274private:274private:
275 cacChannelNotify & callback;275 cacChannelNotify & callback;
276 cacChannel ( const cacChannel & );276 cacChannel ( const cacChannel & );
277 cacChannel & operator = ( const cacChannel & );277 cacChannel & operator = ( const cacChannel & );
278};278};
279279
280class epicsShareClass cacContext {280class epicsShareClass cacContext {
diff --git a/modules/ca/src/client/cacReadNotify.cpp b/modules/ca/src/client/cacReadNotify.cpp
index 23284c8..3d3d5a7 100644
--- a/modules/ca/src/client/cacReadNotify.cpp
+++ b/modules/ca/src/client/cacReadNotify.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
diff --git a/modules/ca/src/client/cacStateNotify.cpp b/modules/ca/src/client/cacStateNotify.cpp
index 0885248..ba5575f 100644
--- a/modules/ca/src/client/cacStateNotify.cpp
+++ b/modules/ca/src/client/cacStateNotify.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
diff --git a/modules/ca/src/client/cacWriteNotify.cpp b/modules/ca/src/client/cacWriteNotify.cpp
index 13d47cd..2bd2221 100644
--- a/modules/ca/src/client/cacWriteNotify.cpp
+++ b/modules/ca/src/client/cacWriteNotify.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h
index e62dd72..7e34b38 100644
--- a/modules/ca/src/client/cadef.h
+++ b/modules/ca/src/client/cadef.h
@@ -5,9 +5,9 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/* 10/*
11 *11 *
12 * L O S A L A M O S12 * L O S A L A M O S
13 * Los Alamos National Laboratory13 * Los Alamos National Laboratory
@@ -83,8 +83,8 @@ typedef void caArh (struct access_rights_handler_args args);
83/* The conversion routine to call for each type */83/* The conversion routine to call for each type */
84#define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE)84#define VALID_TYPE(TYPE) (((unsigned short)TYPE)<=LAST_BUFFER_TYPE)
8585
86/* 86/*
87 * Arguments passed to event handlers and get/put call back handlers. 87 * Arguments passed to event handlers and get/put call back handlers.
88 *88 *
89 * The status field below is the CA ECA_XXX status of the requested89 * The status field below is the CA ECA_XXX status of the requested
90 * operation which is saved from when the operation was attempted in the90 * operation which is saved from when the operation was attempted in the
@@ -95,7 +95,7 @@ typedef void caArh (struct access_rights_handler_args args);
95typedef struct event_handler_args {95typedef struct event_handler_args {
96 void *usr; /* user argument supplied with request */96 void *usr; /* user argument supplied with request */
97 chanId chid; /* channel id */97 chanId chid; /* channel id */
98 long type; /* the type of the item returned */ 98 long type; /* the type of the item returned */
99 long count; /* the element count of the item returned */99 long count; /* the element count of the item returned */
100 const void *dbr; /* a pointer to the item returned */100 const void *dbr; /* a pointer to the item returned */
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 */
@@ -133,8 +133,8 @@ typedef unsigned CA_SYNC_GID;
133#define CA_OP_CLEAR_EVENT 4133#define CA_OP_CLEAR_EVENT 4
134#define CA_OP_OTHER 5134#define CA_OP_OTHER 5
135135
136/* 136/*
137 * used with connection_handler_args 137 * used with connection_handler_args
138 */138 */
139#define CA_OP_CONN_UP 6139#define CA_OP_CONN_UP 6
140#define CA_OP_CONN_DOWN 7140#define CA_OP_CONN_DOWN 7
@@ -167,8 +167,8 @@ epicsShareFunc unsigned epicsShareAPI ca_read_access (chid chan);
167epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan);167epicsShareFunc unsigned epicsShareAPI ca_write_access (chid chan);
168168
169/*169/*
170 * cs_ - `channel state' 170 * cs_ - `channel state'
171 * 171 *
172 * cs_never_conn valid chid, IOC not found172 * cs_never_conn valid chid, IOC not found
173 * cs_prev_conn valid chid, IOC was found, but unavailable173 * cs_prev_conn valid chid, IOC was found, but unavailable
174 * cs_conn valid chid, IOC was found, still available174 * cs_conn valid chid, IOC was found, still available
@@ -183,11 +183,11 @@ epicsShareFunc enum channel_state epicsShareAPI ca_state (chid chan);
183/* Must be called once before calling any of the other routines */183/* Must be called once before calling any of the other routines */
184/************************************************************************/184/************************************************************************/
185epicsShareFunc int epicsShareAPI ca_task_initialize (void);185epicsShareFunc int epicsShareAPI ca_task_initialize (void);
186enum ca_preemptive_callback_select 186enum ca_preemptive_callback_select
187{ ca_disable_preemptive_callback, ca_enable_preemptive_callback };187{ ca_disable_preemptive_callback, ca_enable_preemptive_callback };
188epicsShareFunc int epicsShareAPI 188epicsShareFunc int epicsShareAPI
189 ca_context_create (enum ca_preemptive_callback_select select);189 ca_context_create (enum ca_preemptive_callback_select select);
190epicsShareFunc void epicsShareAPI ca_detach_context (); 190epicsShareFunc void epicsShareAPI ca_detach_context ();
191191
192/************************************************************************/192/************************************************************************/
193/* Remove CA facility from your task */193/* Remove CA facility from your task */
@@ -197,7 +197,7 @@ epicsShareFunc void epicsShareAPI ca_detach_context ();
197epicsShareFunc int epicsShareAPI ca_task_exit (void);197epicsShareFunc int epicsShareAPI ca_task_exit (void);
198epicsShareFunc void epicsShareAPI ca_context_destroy (void);198epicsShareFunc void epicsShareAPI ca_context_destroy (void);
199199
200typedef unsigned capri; 200typedef unsigned capri;
201#define CA_PRIORITY_MAX 99201#define CA_PRIORITY_MAX 99
202#define CA_PRIORITY_MIN 0202#define CA_PRIORITY_MIN 0
203#define CA_PRIORITY_DEFAULT CA_PRIORITY_MIN203#define CA_PRIORITY_DEFAULT CA_PRIORITY_MIN
@@ -210,7 +210,7 @@ typedef unsigned capri;
210 * ca_create_channel ()210 * ca_create_channel ()
211 *211 *
212 * pChanName R channel name string212 * pChanName R channel name string
213 * pConnStateCallback R address of connection state change 213 * pConnStateCallback R address of connection state change
214 * callback function214 * callback function
215 * pUserPrivate R placed in the channel's user private field215 * pUserPrivate R placed in the channel's user private field
216 * o can be fetched later by ca_puser(CHID)216 * o can be fetched later by ca_puser(CHID)
@@ -220,8 +220,8 @@ typedef unsigned capri;
220 */220 */
221epicsShareFunc int epicsShareAPI ca_create_channel221epicsShareFunc int epicsShareAPI ca_create_channel
222(222(
223 const char *pChanName, 223 const char *pChanName,
224 caCh *pConnStateCallback, 224 caCh *pConnStateCallback,
225 void *pUserPrivate,225 void *pUserPrivate,
226 capri priority,226 capri priority,
227 chid *pChanID227 chid *pChanID
@@ -230,7 +230,7 @@ epicsShareFunc int epicsShareAPI ca_create_channel
230/*230/*
231 * ca_change_connection_event()231 * ca_change_connection_event()
232 *232 *
233 * chan R channel identifier 233 * chan R channel identifier
234 * pfunc R address of connection call-back function234 * pfunc R address of connection call-back function
235 */235 */
236epicsShareFunc int epicsShareAPI ca_change_connection_event236epicsShareFunc int epicsShareAPI ca_change_connection_event
@@ -242,7 +242,7 @@ epicsShareFunc int epicsShareAPI ca_change_connection_event
242/*242/*
243 * ca_replace_access_rights_event ()243 * ca_replace_access_rights_event ()
244 *244 *
245 * chan R channel identifier 245 * chan R channel identifier
246 * pfunc R address of access rights call-back function246 * pfunc R address of access rights call-back function
247 */247 */
248epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (248epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (
@@ -256,7 +256,7 @@ epicsShareFunc int epicsShareAPI ca_replace_access_rights_event (
256 * replace the default exception handler256 * replace the default exception handler
257 *257 *
258 * pfunc R address of exception call-back function258 * pfunc R address of exception call-back function
259 * pArg R copy of this pointer passed to exception 259 * pArg R copy of this pointer passed to exception
260 * call-back function260 * call-back function
261 */261 */
262typedef void caExceptionHandler (struct exception_handler_args);262typedef void caExceptionHandler (struct exception_handler_args);
@@ -283,10 +283,10 @@ epicsShareFunc int epicsShareAPI ca_clear_channel
283/*283/*
284 * ca_bput()284 * ca_bput()
285 *285 *
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)
287 * (and not as an integer)287 * (and not as an integer)
288 *288 *
289 * chan R channel identifier 289 * chan R channel identifier
290 * pValue R new channel value string copied from this location290 * pValue R new channel value string copied from this location
291 */291 */
292#define ca_bput(chan, pValue) \292#define ca_bput(chan, pValue) \
@@ -295,9 +295,9 @@ ca_array_put(DBR_STRING, 1u, chan, (const dbr_string_t *) (pValue))
295/*295/*
296 * ca_rput()296 * ca_rput()
297 *297 *
298 * WARNING: this copies the new value from a dbr_float_t 298 * WARNING: this copies the new value from a dbr_float_t
299 *299 *
300 * chan R channel identifier 300 * chan R channel identifier
301 * pValue R new channel value copied from this location301 * pValue R new channel value copied from this location
302 */302 */
303#define ca_rput(chan,pValue) \303#define ca_rput(chan,pValue) \
@@ -307,7 +307,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue)
307 * ca_put()307 * ca_put()
308 *308 *
309 * type R data type from db_access.h309 * type R data type from db_access.h
310 * chan R channel identifier 310 * chan R channel identifier
311 * pValue R new channel value copied from this location311 * pValue R new channel value copied from this location
312 */312 */
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)
@@ -317,13 +317,13 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue)
317 *317 *
318 * type R data type from db_access.h318 * type R data type from db_access.h
319 * count R array element count319 * count R array element count
320 * chan R channel identifier 320 * chan R channel identifier
321 * pValue R new channel value copied from this location321 * pValue R new channel value copied from this location
322 */322 */
323epicsShareFunc int epicsShareAPI ca_array_put323epicsShareFunc int epicsShareAPI ca_array_put
324(324(
325 chtype type, 325 chtype type,
326 unsigned long count, 326 unsigned long count,
327 chid chanId,327 chid chanId,
328 const void * pValue328 const void * pValue
329);329);
@@ -331,8 +331,8 @@ epicsShareFunc int epicsShareAPI ca_array_put
331/*331/*
332 * ca_array_put_callback()332 * ca_array_put_callback()
333 *333 *
334 * This routine functions identically to the original ca put request 334 * This routine functions identically to the original ca put request
335 * with the addition of a callback to the user supplied function 335 * with the addition of a callback to the user supplied function
336 * after recod processing completes in the IOC. The arguments336 * after recod processing completes in the IOC. The arguments
337 * to the user supplied callback function are declared in337 * to the user supplied callback function are declared in
338 * the structure event_handler_args and include the pointer338 * the structure event_handler_args and include the pointer
@@ -340,15 +340,15 @@ epicsShareFunc int epicsShareAPI ca_array_put
340 *340 *
341 * type R data type from db_access.h341 * type R data type from db_access.h
342 * count R array element count342 * count R array element count
343 * chan R channel identifier 343 * chan R channel identifier
344 * pValue R new channel value copied from this location344 * pValue R new channel value copied from this location
345 * pFunc R pointer to call-back function345 * pFunc R pointer to call-back function
346 * pArg R copy of this pointer passed to pFunc346 * pArg R copy of this pointer passed to pFunc
347 */347 */
348epicsShareFunc int epicsShareAPI ca_array_put_callback348epicsShareFunc int epicsShareAPI ca_array_put_callback
349(349(
350 chtype type, 350 chtype type,
351 unsigned long count, 351 unsigned long count,
352 chid chanId,352 chid chanId,
353 const void * pValue,353 const void * pValue,
354 caEventCallBackFunc * pFunc,354 caEventCallBackFunc * pFunc,
@@ -365,10 +365,10 @@ epicsShareFunc int epicsShareAPI ca_array_put_callback
365/*365/*
366 * ca_bget()366 * ca_bget()
367 *367 *
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)
369 * (and not into an integer)369 * (and not into an integer)
370 *370 *
371 * chan R channel identifier 371 * chan R channel identifier
372 * pValue W channel value copied to this location372 * pValue W channel value copied to this location
373 */373 */
374#define ca_bget(chan, pValue) \374#define ca_bget(chan, pValue) \
@@ -377,9 +377,9 @@ ca_array_get(DBR_STRING, 1u, chan, (dbr_string_t *)(pValue))
377/*377/*
378 * ca_rget()378 * ca_rget()
379 *379 *
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)
381 *381 *
382 * chan R channel identifier 382 * chan R channel identifier
383 * pValue W channel value copied to this location383 * pValue W channel value copied to this location
384 */384 */
385#define ca_rget(chan, pValue) \385#define ca_rget(chan, pValue) \
@@ -389,7 +389,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue))
389 * ca_rget()389 * ca_rget()
390 *390 *
391 * type R data type from db_access.h391 * type R data type from db_access.h
392 * chan R channel identifier 392 * chan R channel identifier
393 * pValue W channel value copied to this location393 * pValue W channel value copied to this location
394 */394 */
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)
@@ -399,13 +399,13 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue))
399 *399 *
400 * type R data type from db_access.h400 * type R data type from db_access.h
401 * count R array element count401 * count R array element count
402 * chan R channel identifier 402 * chan R channel identifier
403 * pValue W channel value copied to this location403 * pValue W channel value copied to this location
404 */404 */
405epicsShareFunc int epicsShareAPI ca_array_get405epicsShareFunc int epicsShareAPI ca_array_get
406(406(
407 chtype type, 407 chtype type,
408 unsigned long count, 408 unsigned long count,
409 chid chanId,409 chid chanId,
410 void * pValue410 void * pValue
411);411);
@@ -419,10 +419,10 @@ epicsShareFunc int epicsShareAPI ca_array_get
419/*419/*
420 * ca_bget_callback()420 * ca_bget_callback()
421 *421 *
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)
423 * (and not as an integer)423 * (and not as an integer)
424 *424 *
425 * chan R channel identifier 425 * chan R channel identifier
426 * pFunc R pointer to call-back function426 * pFunc R pointer to call-back function
427 * pArg R copy of this pointer passed to pFunc427 * pArg R copy of this pointer passed to pFunc
428 */428 */
@@ -432,9 +432,9 @@ ca_array_get_callback (DBR_STRING, 1u, chan, pFunc, pArg)
432/*432/*
433 * ca_rget_callback()433 * ca_rget_callback()
434 *434 *
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)
436 *436 *
437 * chan R channel identifier 437 * chan R channel identifier
438 * pFunc R pointer to call-back function438 * pFunc R pointer to call-back function
439 * pArg R copy of this pointer passed to pFunc439 * pArg R copy of this pointer passed to pFunc
440 */440 */
@@ -445,7 +445,7 @@ ca_array_get_callback (DBR_FLOAT, 1u, chan, pFunc, pArg)
445 * ca_get_callback()445 * ca_get_callback()
446 *446 *
447 * type R data type from db_access.h447 * type R data type from db_access.h
448 * chan R channel identifier 448 * chan R channel identifier
449 * pFunc R pointer to call-back function449 * pFunc R pointer to call-back function
450 * pArg R copy of this pointer passed to pFunc450 * pArg R copy of this pointer passed to pFunc
451 */451 */
@@ -457,14 +457,14 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg)
457 *457 *
458 * type R data type from db_access.h458 * type R data type from db_access.h
459 * count R array element count459 * count R array element count
460 * chan R channel identifier 460 * chan R channel identifier
461 * pFunc R pointer to call-back function461 * pFunc R pointer to call-back function
462 * pArg R copy of this pointer passed to pFunc462 * pArg R copy of this pointer passed to pFunc
463 */463 */
464epicsShareFunc int epicsShareAPI ca_array_get_callback464epicsShareFunc int epicsShareAPI ca_array_get_callback
465(465(
466 chtype type, 466 chtype type,
467 unsigned long count, 467 unsigned long count,
468 chid chanId,468 chid chanId,
469 caEventCallBackFunc * pFunc,469 caEventCallBackFunc * pFunc,
470 void * pArg470 void * pArg
@@ -476,7 +476,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback
476/* NOTES: */476/* NOTES: */
477/* 1) Evid may be omited by passing a NULL pointer */477/* 1) Evid may be omited by passing a NULL pointer */
478/* */478/* */
479/* 2) An array count of zero specifies the native db count */ 479/* 2) An array count of zero specifies the native db count */
480/* */480/* */
481/************************************************************************/481/************************************************************************/
482482
@@ -485,7 +485,7 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback
485 *485 *
486 * type R data type from db_access.h486 * type R data type from db_access.h
487 * count R array element count487 * count R array element count
488 * chan R channel identifier 488 * chan R channel identifier
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}
490 * pFunc R pointer to call-back function490 * pFunc R pointer to call-back function
491 * pArg R copy of this pointer passed to pFunc491 * pArg R copy of this pointer passed to pFunc
@@ -493,8 +493,8 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback
493 */493 */
494epicsShareFunc int epicsShareAPI ca_create_subscription494epicsShareFunc int epicsShareAPI ca_create_subscription
495(495(
496 chtype type, 496 chtype type,
497 unsigned long count, 497 unsigned long count,
498 chid chanId,498 chid chanId,
499 long mask,499 long mask,
500 caEventCallBackFunc * pFunc,500 caEventCallBackFunc * pFunc,
@@ -535,24 +535,24 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
535/* FLOW OF TYPICAL APPLICATION */535/* FLOW OF TYPICAL APPLICATION */
536/* */536/* */
537/* search() ! Obtain Channel ids */537/* search() ! Obtain Channel ids */
538/* . ! " */538/* . ! " */
539/* . ! " */539/* . ! " */
540/* pend_io ! wait for channels to connect */540/* pend_io ! wait for channels to connect */
541/* */541/* */
542/* get() ! several requests for remote info */542/* get() ! several requests for remote info */
543/* get() ! " */543/* get() ! " */
544/* add_event() ! " */ 544/* add_event() ! " */
545/* get() ! " */545/* get() ! " */
546/* . */546/* . */
547/* . */547/* . */
548/* . */548/* . */
549/* flush_io() ! send get requests */549/* flush_io() ! send get requests */
550/* ! optional parallel processing */550/* ! optional parallel processing */
551/* . ! " */551/* . ! " */
552/* . ! " */552/* . ! " */
553/* pend_io() ! wait for replies from get requests */553/* pend_io() ! wait for replies from get requests */
554/* . ! access to requested data */554/* . ! access to requested data */
555/* . ! " */555/* . ! " */
556/* pend_event() ! wait for requested events */556/* pend_event() ! wait for requested events */
557/* */557/* */
558/************************************************************************/558/************************************************************************/
@@ -562,7 +562,7 @@ epicsShareFunc chid epicsShareAPI ca_evid_to_chid ( evid id );
562/* functions specified with add_event when events occur. If the */562/* functions specified with add_event when events occur. If the */
563/* timeout is specified as 0 an infinite timeout is assumed. */563/* timeout is specified as 0 an infinite timeout is assumed. */
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 () */
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 */
566/* without processing. */566/* without processing. */
567/************************************************************************/567/************************************************************************/
568568
@@ -577,8 +577,8 @@ epicsShareFunc int epicsShareAPI ca_pend_event (ca_real timeOut);
577/*577/*
578 * ca_pend_io()578 * ca_pend_io()
579 *579 *
580 * timeOut R wait for this delay in seconds but return early 580 * timeOut R wait for this delay in seconds but return early
581 * if all get requests (or search requests with null 581 * if all get requests (or search requests with null
582 * connection handler pointer have completed)582 * connection handler pointer have completed)
583 */583 */
584epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut);584epicsShareFunc int epicsShareAPI ca_pend_io (ca_real timeOut);
@@ -589,7 +589,7 @@ epicsShareFunc int epicsShareAPI ca_pend (ca_real timeout, int early);
589/*589/*
590 * ca_test_io()590 * ca_test_io()
591 *591 *
592 * returns TRUE when get requests (or search requests with null 592 * returns TRUE when get requests (or search requests with null
593 * connection handler pointer) are outstanding593 * connection handler pointer) are outstanding
594 */594 */
595epicsShareFunc int epicsShareAPI ca_test_io (void);595epicsShareFunc int epicsShareAPI ca_test_io (void);
@@ -611,8 +611,8 @@ epicsShareFunc int epicsShareAPI ca_flush_io (void);
611 */611 */
612epicsShareFunc void epicsShareAPI ca_signal612epicsShareFunc void epicsShareAPI ca_signal
613(613(
614 long errorCode, 614 long errorCode,
615 const char *pCtxStr 615 const char *pCtxStr
616);616);
617617
618/*618/*
@@ -625,10 +625,10 @@ epicsShareFunc void epicsShareAPI ca_signal
625 */625 */
626epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno626epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno
627(627(
628 long errorCode, 628 long errorCode,
629 const char *pCtxStr, 629 const char *pCtxStr,
630 const char *pFileStr, 630 const char *pFileStr,
631 int lineNo 631 int lineNo
632);632);
633633
634/*634/*
@@ -639,7 +639,7 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno
639 * pFormat R printf dtyle format string (and optional arguments)639 * pFormat R printf dtyle format string (and optional arguments)
640 *640 *
641 */641 */
642epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, 642epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm,
643 int lineno, const char *pFormat, ...);643 int lineno, const char *pFormat, ...);
644644
645/*645/*
@@ -651,13 +651,13 @@ epicsShareFunc void epicsShareAPI ca_signal_formated (long ca_status, const char
651 */651 */
652epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel);652epicsShareFunc const char * epicsShareAPI ca_host_name (chid channel);
653/* thread safe version */653/* thread safe version */
654epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan, 654epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan,
655 char *pBuf, unsigned bufLength );655 char *pBuf, unsigned bufLength );
656656
657/*657/*
658 * CA_ADD_FD_REGISTRATION658 * CA_ADD_FD_REGISTRATION
659 *659 *
660 * call their function with their argument whenever 660 * call their function with their argument whenever
661 * a new fd is added or removed661 * a new fd is added or removed
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)
663 *663 *
@@ -665,7 +665,7 @@ epicsShareFunc unsigned epicsShareAPI ca_get_host_name ( chid pChan,
665 * if (!opened) then fd was deleted665 * if (!opened) then fd was deleted
666 *666 *
667 */667 */
668typedef void CAFDHANDLER (void *parg, int fd, int opened); 668typedef void CAFDHANDLER (void *parg, int fd, int opened);
669669
670/*670/*
671 * ca_add_fd_registration()671 * ca_add_fd_registration()
@@ -696,7 +696,7 @@ epicsShareFunc int epicsShareAPI ca_add_fd_registration
696 *696 *
697 * create a sync group697 * create a sync group
698 *698 *
699 * pgid W pointer to sync group id that will be written 699 * pgid W pointer to sync group id that will be written
700 */700 */
701epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid);701epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid);
702702
@@ -705,16 +705,16 @@ epicsShareFunc int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid);
705 *705 *
706 * delete a sync group706 * delete a sync group
707 *707 *
708 * gid R sync group id 708 * gid R sync group id
709 */709 */
710epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid);710epicsShareFunc int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid);
711711
712/*712/*
713 * ca_sg_block()713 * ca_sg_block()
714 *714 *
715 * block for IO performed within a sync group to complete 715 * block for IO performed within a sync group to complete
716 *716 *
717 * gid R sync group id 717 * gid R sync group id
718 * timeout R wait for this duration prior to timing out718 * timeout R wait for this duration prior to timing out
719 * and returning ECA_TIMEOUT719 * and returning ECA_TIMEOUT
720 */720 */
@@ -726,7 +726,7 @@ epicsShareFunc int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real tim
726 * test for sync group IO operations in progress726 * test for sync group IO operations in progress
727 *727 *
728 * gid R sync group id728 * gid R sync group id
729 * 729 *
730 * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE730 * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE
731 */731 */
732epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid);732epicsShareFunc int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid);
@@ -747,16 +747,16 @@ epicsShareFunc int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid);
747 * gid R sync group id747 * gid R sync group id
748 * type R data type from db_access.h748 * type R data type from db_access.h
749 * count R array element count749 * count R array element count
750 * chan R channel identifier 750 * chan R channel identifier
751 * pValue W channel value copied to this location751 * pValue W channel value copied to this location
752 */752 */
753epicsShareFunc int epicsShareAPI ca_sg_array_get753epicsShareFunc int epicsShareAPI ca_sg_array_get
754(754(
755 const CA_SYNC_GID gid,755 const CA_SYNC_GID gid,
756 chtype type, 756 chtype type,
757 unsigned long count,757 unsigned long count,
758 chid chan,758 chid chan,
759 void *pValue 759 void *pValue
760);760);
761761
762#define ca_sg_get(gid, type, chan, pValue) \762#define ca_sg_get(gid, type, chan, pValue) \
@@ -771,16 +771,16 @@ ca_sg_array_get (gid, type, 1u, chan, pValue)
771 * gid R sync group id771 * gid R sync group id
772 * type R data type from db_access.h772 * type R data type from db_access.h
773 * count R array element count773 * count R array element count
774 * chan R channel identifier 774 * chan R channel identifier
775 * pValue R new channel value copied from this location775 * pValue R new channel value copied from this location
776 */776 */
777epicsShareFunc int epicsShareAPI ca_sg_array_put777epicsShareFunc int epicsShareAPI ca_sg_array_put
778(778(
779 const CA_SYNC_GID gid,779 const CA_SYNC_GID gid,
780 chtype type, 780 chtype type,
781 unsigned long count,781 unsigned long count,
782 chid chan,782 chid chan,
783 const void *pValue 783 const void *pValue
784);784);
785785
786#define ca_sg_put(gid, type, chan, pValue) \786#define ca_sg_put(gid, type, chan, pValue) \
@@ -801,11 +801,11 @@ epicsShareFunc void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, cons
801/*801/*
802 * ca_v42_ok()802 * ca_v42_ok()
803 *803 *
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
805 * or higher.805 * or higher.
806 *806 *
807 * chan R channel identifier807 * chan R channel identifier
808 * 808 *
809 * (returns true or false)809 * (returns true or false)
810 */810 */
811epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan);811epicsShareFunc int epicsShareAPI ca_v42_ok (chid chan);
@@ -865,12 +865,12 @@ ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0)
865#define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\865#define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\
866ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0)866ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0)
867epicsShareFunc int epicsShareAPI ca_build_and_connect867epicsShareFunc int epicsShareAPI ca_build_and_connect
868 ( const char *pChanName, chtype, unsigned long, 868 ( const char *pChanName, chtype, unsigned long,
869 chid * pChanID, void *, caCh * pFunc, void * pArg );869 chid * pChanID, void *, caCh * pFunc, void * pArg );
870#define ca_search(pChanName, pChanID)\870#define ca_search(pChanName, pChanID)\
871ca_search_and_connect (pChanName, pChanID, 0, 0)871ca_search_and_connect (pChanName, pChanID, 0, 0)
872epicsShareFunc int epicsShareAPI ca_search_and_connect872epicsShareFunc int epicsShareAPI ca_search_and_connect
873 ( const char * pChanName, chid * pChanID, 873 ( const char * pChanName, chid * pChanID,
874 caCh *pFunc, void * pArg );874 caCh *pFunc, void * pArg );
875epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid);875epicsShareFunc int epicsShareAPI ca_channel_status (epicsThreadId tid);
876epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID );876epicsShareFunc int epicsShareAPI ca_clear_event ( evid eventID );
diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h
index 5393096..fd67a5f 100644
--- a/modules/ca/src/client/caerr.h
+++ b/modules/ca/src/client/caerr.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
@@ -17,7 +17,7 @@
17 *17 *
18 * Author: Jeffrey O. Hill18 * Author: Jeffrey O. Hill
19 *19 *
20 */ 20 */
2121
2222
23#ifndef INCLcaerrh23#ifndef INCLcaerrh
@@ -78,9 +78,9 @@
78(CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY))78(CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY))
7979
80/*80/*
81 * In the lines below "defunct" indicates that current release 81 * In the lines below "defunct" indicates that current release
82 * servers and client library will not return this error code, but82 * servers and client library will not return this error code, but
83 * servers on earlier releases that communicate with current clients 83 * servers on earlier releases that communicate with current clients
84 * might still generate exceptions with these error constants84 * might still generate exceptions with these error constants
85 */85 */
86#define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */86#define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */
@@ -89,10 +89,10 @@
89#define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */89#define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */
90#define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */90#define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */
91#define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */91#define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */
92#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6) 92#define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6)
93#define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */93#define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */
94#define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */94#define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */
95#define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9) 95#define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9)
96#define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10)96#define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10)
97#define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */97#define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */
98#define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */98#define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */
diff --git a/modules/ca/src/client/caeventmask.h b/modules/ca/src/client/caeventmask.h
index 5f09145..4f0f2ec 100644
--- a/modules/ca/src/client/caeventmask.h
+++ b/modules/ca/src/client/caeventmask.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#ifndef INCLcaeventmaskh11#ifndef INCLcaeventmaskh
@@ -13,12 +13,12 @@
1313
14/*14/*
15 event selections15 event selections
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
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
18 unsigned char to unsigned short)18 unsigned char to unsigned short)
1919
2020
21 DBE_VALUE 21 DBE_VALUE
22 Trigger an event when a significant change in the channel's value22 Trigger an event when a significant change in the channel's value
23 occurs. Relies on the monitor deadband field under DCT.23 occurs. Relies on the monitor deadband field under DCT.
2424
diff --git a/modules/ca/src/client/casw.cpp b/modules/ca/src/client/casw.cpp
index ed17660..e527a3c 100644
--- a/modules/ca/src/client/casw.cpp
+++ b/modules/ca/src/client/casw.cpp
@@ -5,10 +5,10 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
@@ -23,7 +23,7 @@
2323
24#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"24#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
2525
26#include "envDefs.h" 26#include "envDefs.h"
27#include "errlog.h"27#include "errlog.h"
28#include "osiWireFormat.h"28#include "osiWireFormat.h"
2929
@@ -40,8 +40,8 @@ public:
40 void release ( void * );40 void release ( void * );
41private:41private:
42 tsFreeList < class bhe, 0x100 > freeList;42 tsFreeList < class bhe, 0x100 > freeList;
43 bheFreeStoreMgr ( const bheFreeStoreMgr & );43 bheFreeStoreMgr ( const bheFreeStoreMgr & );
44 bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & );44 bheFreeStoreMgr & operator = ( const bheFreeStoreMgr & );
45};45};
4646
47void * bheFreeStoreMgr::allocate ( size_t size )47void * bheFreeStoreMgr::allocate ( size_t size )
@@ -108,7 +108,7 @@ int main ( int argc, char ** argv )
108 sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );108 sock = epicsSocketCreate ( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
109 if ( sock == INVALID_SOCKET ) {109 if ( sock == INVALID_SOCKET ) {
110 char sockErrBuf[64];110 char sockErrBuf[64];
111 epicsSocketConvertErrnoToString ( 111 epicsSocketConvertErrnoToString (
112 sockErrBuf, sizeof ( sockErrBuf ) );112 sockErrBuf, sizeof ( sockErrBuf ) );
113 errlogPrintf ("casw: unable to create datagram socket because = \"%s\"\n",113 errlogPrintf ("casw: unable to create datagram socket because = \"%s\"\n",
114 sockErrBuf );114 sockErrBuf );
@@ -122,7 +122,7 @@ int main ( int argc, char ** argv )
122 status = bind ( sock, &addr.sa, sizeof (addr) );122 status = bind ( sock, &addr.sa, sizeof (addr) );
123 if ( status < 0 ) {123 if ( status < 0 ) {
124 char sockErrBuf[64];124 char sockErrBuf[64];
125 epicsSocketConvertErrnoToString ( 125 epicsSocketConvertErrnoToString (
126 sockErrBuf, sizeof ( sockErrBuf ) );126 sockErrBuf, sizeof ( sockErrBuf ) );
127 epicsSocketDestroy ( sock );127 epicsSocketDestroy ( sock );
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",
@@ -134,7 +134,7 @@ int main ( int argc, char ** argv )
134 status = socket_ioctl ( sock, FIONBIO, &yes );134 status = socket_ioctl ( sock, FIONBIO, &yes );
135 if ( status < 0 ) {135 if ( status < 0 ) {
136 char sockErrBuf[64];136 char sockErrBuf[64];
137 epicsSocketConvertErrnoToString ( 137 epicsSocketConvertErrnoToString (
138 sockErrBuf, sizeof ( sockErrBuf ) );138 sockErrBuf, sizeof ( sockErrBuf ) );
139 epicsSocketDestroy ( sock );139 epicsSocketDestroy ( sock );
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",
@@ -169,7 +169,7 @@ int main ( int argc, char ** argv )
169 status = socket_ioctl ( sock, FIONBIO, &no );169 status = socket_ioctl ( sock, FIONBIO, &no );
170 if ( status < 0 ) {170 if ( status < 0 ) {
171 char sockErrBuf[64];171 char sockErrBuf[64];
172 epicsSocketConvertErrnoToString ( 172 epicsSocketConvertErrnoToString (
173 sockErrBuf, sizeof ( sockErrBuf ) );173 sockErrBuf, sizeof ( sockErrBuf ) );
174 epicsSocketDestroy ( sock );174 epicsSocketDestroy ( sock );
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",
@@ -185,7 +185,7 @@ int main ( int argc, char ** argv )
185 &addr.sa, &addrSize );185 &addr.sa, &addrSize );
186 if ( status <= 0 ) {186 if ( status <= 0 ) {
187 char sockErrBuf[64];187 char sockErrBuf[64];
188 epicsSocketConvertErrnoToString ( 188 epicsSocketConvertErrnoToString (
189 sockErrBuf, sizeof ( sockErrBuf ) );189 sockErrBuf, sizeof ( sockErrBuf ) );
190 epicsSocketDestroy ( sock );190 epicsSocketDestroy ( sock );
191 errlogPrintf ("casw: error from recv was = \"%s\"\n",191 errlogPrintf ("casw: error from recv was = \"%s\"\n",
@@ -196,7 +196,7 @@ int main ( int argc, char ** argv )
196 if ( addr.sa.sa_family != AF_INET ) {196 if ( addr.sa.sa_family != AF_INET ) {
197 continue;197 continue;
198 }198 }
199 199
200 unsigned byteCount = static_cast <unsigned> ( status );200 unsigned byteCount = static_cast <unsigned> ( status );
201 pCurMsg = reinterpret_cast < const caHdr * > ( ( pCurBuf = buf ) );201 pCurMsg = reinterpret_cast < const caHdr * > ( ( pCurBuf = buf ) );
202 while ( byteCount ) {202 while ( byteCount ) {
@@ -213,9 +213,9 @@ int main ( int argc, char ** argv )
213 epicsTime previousTime;213 epicsTime previousTime;
214 struct sockaddr_in ina;214 struct sockaddr_in ina;
215215
216 /* 216 /*
217 * this allows a fan-out server to potentially217 * this allows a fan-out server to potentially
218 * insert the true address of the CA server 218 * insert the true address of the CA server
219 *219 *
220 * old servers:220 * old servers:
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_
@@ -252,8 +252,8 @@ int main ( int argc, char ** argv )
252 bhe *pBHE = beaconTable.lookup ( ina );252 bhe *pBHE = beaconTable.lookup ( ina );
253 if ( pBHE ) {253 if ( pBHE ) {
254 previousTime = pBHE->updateTime ( guard );254 previousTime = pBHE->updateTime ( guard );
255 anomaly = pBHE->updatePeriod ( 255 anomaly = pBHE->updatePeriod (
256 guard, programBeginTime, 256 guard, programBeginTime,
257 currentTime, beaconNumber, protocolRevision );257 currentTime, beaconNumber, protocolRevision );
258 }258 }
259 else {259 else {
@@ -264,7 +264,7 @@ int main ( int argc, char ** argv )
264 * time that we have seen a server's beacon264 * time that we have seen a server's beacon
265 * shortly after the program started up)265 * shortly after the program started up)
266 */266 */
267 pBHE = new ( bheFreeList ) 267 pBHE = new ( bheFreeList )
268 bhe ( mutex, currentTime, beaconNumber, ina );268 bhe ( mutex, currentTime, beaconNumber, ina );
269 if ( pBHE ) {269 if ( pBHE ) {
270 if ( beaconTable.add ( *pBHE ) < 0 ) {270 if ( beaconTable.add ( *pBHE ) < 0 ) {
@@ -275,7 +275,7 @@ int main ( int argc, char ** argv )
275 }275 }
276 if ( anomaly || interest > 1 ) {276 if ( anomaly || interest > 1 ) {
277 char date[64];277 char date[64];
278 currentTime.strftime ( date, sizeof ( date ), 278 currentTime.strftime ( date, sizeof ( date ),
279 "%Y-%m-%d %H:%M:%S.%09f");279 "%Y-%m-%d %H:%M:%S.%09f");
280 char host[64];280 char host[64];
281 ipAddrToA ( &ina, host, sizeof ( host ) );281 ipAddrToA ( &ina, host, sizeof ( host ) );
@@ -288,11 +288,11 @@ int main ( int argc, char ** argv )
288 pPrefix = " ";288 pPrefix = " ";
289 }289 }
290 }290 }
291 printf ( "%s%-40s %s\n", 291 printf ( "%s%-40s %s\n",
292 pPrefix, host, date );292 pPrefix, host, date );
293 if ( anomaly && interest > 0 ) {293 if ( anomaly && interest > 0 ) {
294 printf ( "\testimate=%f current=%f\n", 294 printf ( "\testimate=%f current=%f\n",
295 pBHE->period ( guard ), 295 pBHE->period ( guard ),
296 currentTime - previousTime );296 currentTime - previousTime );
297 }297 }
298 fflush(stdout);298 fflush(stdout);
diff --git a/modules/ca/src/client/catime.c b/modules/ca/src/client/catime.c
index cccd940..ab758d3 100644
--- a/modules/ca/src/client/catime.c
+++ b/modules/ca/src/client/catime.c
@@ -5,17 +5,17 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
12 * CA performance test 12 * CA performance test
13 *13 *
14 * History 14 * History
15 * joh 09-12-89 Initial release15 * joh 09-12-89 Initial release
16 * joh 12-20-94 portability16 * joh 12-20-94 portability
17 *17 *
18 * 18 *
19 */19 */
2020
21#include <stdio.h>21#include <stdio.h>
@@ -45,7 +45,7 @@ typedef struct testItem {
45 char name[128];45 char name[128];
46 int type;46 int type;
47 int count;47 int count;
48 void * pValue; 48 void * pValue;
49} ti;49} ti;
5050
51typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter );51typedef void tf ( ti *pItems, unsigned iterations, unsigned *pInlineIter );
@@ -144,7 +144,7 @@ unsigned *pInlineIter
144{144{
145 int status;145 int status;
146 unsigned i;146 unsigned i;
147 147
148 for (i=0u; i<iterations; i++) {148 for (i=0u; i<iterations; i++) {
149 status = ca_clear_channel (pItems[i].chix);149 status = ca_clear_channel (pItems[i].chix);
150 SEVCHK (status, NULL);150 SEVCHK (status, NULL);
@@ -166,7 +166,7 @@ unsigned *pInlineIter
166 ti *pi;166 ti *pi;
167 int status;167 int status;
168 dbr_int_t val;168 dbr_int_t val;
169 169
170 for (pi=pItems; pi < &pItems[iterations]; pi++) {170 for (pi=pItems; pi < &pItems[iterations]; pi++) {
171 status = ca_array_put(171 status = ca_array_put(
172 pi->type,172 pi->type,
@@ -257,7 +257,7 @@ unsigned *pInlineIter
257{257{
258 ti *pi;258 ti *pi;
259 int status;259 int status;
260 260
261 for (pi=pItems; pi<&pItems[iterations]; pi++) {261 for (pi=pItems; pi<&pItems[iterations]; pi++) {
262 status = ca_array_get(262 status = ca_array_get(
263 pi->type,263 pi->type,
@@ -337,7 +337,7 @@ unsigned *pInlineIter
337{337{
338 ti *pi;338 ti *pi;
339 int status;339 int status;
340 340
341 for (pi=pItems; pi<&pItems[iterations]; pi++) {341 for (pi=pItems; pi<&pItems[iterations]; pi++) {
342 status = ca_array_get(342 status = ca_array_get(
343 pi->type,343 pi->type,
@@ -361,9 +361,9 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
361 epicsTimeStamp start_time;361 epicsTimeStamp start_time;
362 double delay;362 double delay;
363 double X = 0u;363 double X = 0u;
364 double XX = 0u; 364 double XX = 0u;
365 double max = DBL_MIN; 365 double max = DBL_MIN;
366 double min = DBL_MAX; 366 double min = DBL_MAX;
367 double mean;367 double mean;
368 double stdDev;368 double stdDev;
369 ti *pi;369 ti *pi;
@@ -371,7 +371,7 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
371371
372 for ( pi = pItems; pi < &pItems[iterations]; pi++ ) {372 for ( pi = pItems; pi < &pItems[iterations]; pi++ ) {
373 epicsTimeGetCurrent ( &start_time );373 epicsTimeGetCurrent ( &start_time );
374 status = ca_array_get ( pi->type, pi->count, 374 status = ca_array_get ( pi->type, pi->count,
375 pi->chix, pi->pValue );375 pi->chix, pi->pValue );
376 SEVCHK ( status, NULL );376 SEVCHK ( status, NULL );
377 status = ca_pend_io ( 100.0 );377 status = ca_pend_io ( 100.0 );
@@ -395,13 +395,13 @@ static void measure_get_latency (ti *pItems, unsigned iterations)
395395
396 mean = X/iterations;396 mean = X/iterations;
397 stdDev = sqrt ( XX/iterations - mean*mean );397 stdDev = sqrt ( XX/iterations - mean*mean );
398 printf ( 398 printf (
399 "Get Latency - "399 "Get Latency - "
400 "mean = %3.1f uS, "400 "mean = %3.1f uS, "
401 "std dev = %3.1f uS, "401 "std dev = %3.1f uS, "
402 "min = %3.1f uS "402 "min = %3.1f uS "
403 "max = %3.1f uS\n",403 "max = %3.1f uS\n",
404 mean * 1e6, stdDev * 1e6, 404 mean * 1e6, stdDev * 1e6,
405 min * 1e6, max * 1e6 );405 min * 1e6, max * 1e6 );
406}406}
407407
@@ -412,9 +412,9 @@ static void printSearchStat ( const ti * pi, unsigned iterations )
412{412{
413 unsigned i;413 unsigned i;
414 double X = 0u;414 double X = 0u;
415 double XX = 0u; 415 double XX = 0u;
416 double max = DBL_MIN; 416 double max = DBL_MIN;
417 double min = DBL_MAX; 417 double min = DBL_MAX;
418 double mean;418 double mean;
419 double stdDev;419 double stdDev;
420420
@@ -432,7 +432,7 @@ static void printSearchStat ( const ti * pi, unsigned iterations )
432432
433 mean = X / iterations;433 mean = X / iterations;
434 stdDev = sqrt( XX / iterations - mean * mean );434 stdDev = sqrt( XX / iterations - mean * mean );
435 printf ( 435 printf (
436 "Search tries per chan - "436 "Search tries per chan - "
437 "mean = %3.1f "437 "mean = %3.1f "
438 "std dev = %3.1f "438 "std dev = %3.1f "
@@ -458,10 +458,10 @@ void timeIt ( tf *pfunc, ti *pItems, unsigned iterations,
458 delay = epicsTimeDiffInSeconds ( &end_time, &start_time );458 delay = epicsTimeDiffInSeconds ( &end_time, &start_time );
459 if ( delay > 0.0 ) {459 if ( delay > 0.0 ) {
460 double freq = ( iterations * inlineIter ) / delay;460 double freq = ( iterations * inlineIter ) / delay;
461 printf ( "Per Op, %8.4f uS ( %8.4f MHz )", 461 printf ( "Per Op, %8.4f uS ( %8.4f MHz )",
462 1e6 / freq, freq / 1e6 );462 1e6 / freq, freq / 1e6 );
463 if ( pItems != NULL ) {463 if ( pItems != NULL ) {
464 printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n", 464 printf(", %8.4f snd Mbps, %8.4f rcv Mbps\n",
465 (inlineIter*nBytesSent*CHAR_BIT)/(delay*1e6),465 (inlineIter*nBytesSent*CHAR_BIT)/(delay*1e6),
466 (inlineIter*nBytesRecv*CHAR_BIT)/(delay*1e6) );466 (inlineIter*nBytesRecv*CHAR_BIT)/(delay*1e6) );
467 }467 }
@@ -479,13 +479,13 @@ static void test ( ti *pItems, unsigned iterations )
479 unsigned payloadSize, dblPayloadSize;479 unsigned payloadSize, dblPayloadSize;
480 unsigned nBytesSent, nBytesRecv;480 unsigned nBytesSent, nBytesRecv;
481481
482 payloadSize = 482 payloadSize =
483 dbr_size_n ( pItems[0].type, pItems[0].count );483 dbr_size_n ( pItems[0].type, pItems[0].count );
484 payloadSize = CA_MESSAGE_ALIGN ( payloadSize );484 payloadSize = CA_MESSAGE_ALIGN ( payloadSize );
485485
486 dblPayloadSize = dbr_size [ DBR_DOUBLE ];486 dblPayloadSize = dbr_size [ DBR_DOUBLE ];
487 dblPayloadSize = CA_MESSAGE_ALIGN ( dblPayloadSize );487 dblPayloadSize = CA_MESSAGE_ALIGN ( dblPayloadSize );
488 488
489 if ( payloadSize > dblPayloadSize ) {489 if ( payloadSize > dblPayloadSize ) {
490 unsigned factor = payloadSize / dblPayloadSize;490 unsigned factor = payloadSize / dblPayloadSize;
491 while ( factor ) {491 while ( factor ) {
@@ -500,15 +500,15 @@ static void test ( ti *pItems, unsigned iterations )
500 printf ( "\t### async put test ###\n");500 printf ( "\t### async put test ###\n");
501 nBytesSent = sizeof ( caHdr ) + CA_MESSAGE_ALIGN( payloadSize );501 nBytesSent = sizeof ( caHdr ) + CA_MESSAGE_ALIGN( payloadSize );
502 nBytesRecv = 0u;502 nBytesRecv = 0u;
503 timeIt ( test_put, pItems, iterations, 503 timeIt ( test_put, pItems, iterations,
504 nBytesSent * iterations, 504 nBytesSent * iterations,
505 nBytesRecv * iterations );505 nBytesRecv * iterations );
506506
507 printf ( "\t### async get test ###\n");507 printf ( "\t### async get test ###\n");
508 nBytesSent = sizeof ( caHdr );508 nBytesSent = sizeof ( caHdr );
509 nBytesRecv = sizeof ( caHdr ) + CA_MESSAGE_ALIGN ( payloadSize );509 nBytesRecv = sizeof ( caHdr ) + CA_MESSAGE_ALIGN ( payloadSize );
510 timeIt ( test_get, pItems, iterations, 510 timeIt ( test_get, pItems, iterations,
511 nBytesSent * ( iterations ), 511 nBytesSent * ( iterations ),
512 nBytesRecv * ( iterations ) );512 nBytesRecv * ( iterations ) );
513513
514 printf ("\t### synch get test ###\n");514 printf ("\t### synch get test ###\n");
@@ -520,7 +520,7 @@ static void test ( ti *pItems, unsigned iterations )
520 else if ( iterations > 10 ) {520 else if ( iterations > 10 ) {
521 iterations /= 10;521 iterations /= 10;
522 }522 }
523 timeIt ( test_wait, pItems, iterations, 523 timeIt ( test_wait, pItems, iterations,
524 nBytesSent * iterations,524 nBytesSent * iterations,
525 nBytesRecv * iterations );525 nBytesRecv * iterations );
526}526}
@@ -528,7 +528,7 @@ static void test ( ti *pItems, unsigned iterations )
528/*528/*
529 * catime ()529 * catime ()
530 */530 */
531int catime ( const char * channelName, 531int catime ( const char * channelName,
532 unsigned channelCount, enum appendNumberFlag appNF )532 unsigned channelCount, enum appendNumberFlag appNF )
533{533{
534 unsigned i;534 unsigned i;
@@ -536,7 +536,7 @@ int catime ( const char * channelName,
536 unsigned strsize;536 unsigned strsize;
537 unsigned nBytesSent, nBytesRecv;537 unsigned nBytesSent, nBytesRecv;
538 ti *pItemList;538 ti *pItemList;
539 539
540 if ( channelCount == 0 ) {540 if ( channelCount == 0 ) {
541 printf ( "channel count was zero\n" );541 printf ( "channel count was zero\n" );
542 return 0;542 return 0;
@@ -547,15 +547,15 @@ int catime ( const char * channelName,
547 return -1;547 return -1;
548 }548 }
549549
550 SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ), 550 SEVCHK ( ca_context_create ( ca_disable_preemptive_callback ),
551 "Unable to initialize" );551 "Unable to initialize" );
552552
553 if ( appNF == appendNumber ) {553 if ( appNF == appendNumber ) {
554 printf ( "Testing with %u channels named %snnn\n", 554 printf ( "Testing with %u channels named %snnn\n",
555 channelCount, channelName );555 channelCount, channelName );
556 }556 }
557 else {557 else {
558 printf ( "Testing with %u channels named %s\n", 558 printf ( "Testing with %u channels named %s\n",
559 channelCount, channelName );559 channelCount, channelName );
560 }560 }
561561
@@ -573,7 +573,7 @@ int catime ( const char * channelName,
573 pItemList[i].name[strsize]= '\0';573 pItemList[i].name[strsize]= '\0';
574 pItemList[i].count = 0;574 pItemList[i].count = 0;
575 pItemList[i].pValue = 0;575 pItemList[i].pValue = 0;
576 nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) ) 576 nBytesSent += 2 * ( CA_MESSAGE_ALIGN ( strlen ( pItemList[i].name ) )
577 + sizeof (caHdr) );577 + sizeof (caHdr) );
578 nBytesRecv += 2 * sizeof (caHdr);578 nBytesRecv += 2 * sizeof (caHdr);
579 }579 }
@@ -582,7 +582,7 @@ int catime ( const char * channelName,
582 printf ( "--------------------\n" );582 printf ( "--------------------\n" );
583 timeIt ( test_search, pItemList, channelCount, nBytesSent, nBytesRecv );583 timeIt ( test_search, pItemList, channelCount, nBytesSent, nBytesRecv );
584 printSearchStat ( pItemList, channelCount );584 printSearchStat ( pItemList, channelCount );
585 585
586 for ( i = 0; i < channelCount; i++ ) {586 for ( i = 0; i < channelCount; i++ ) {
587 size_t count = ca_element_count ( pItemList[i].chix );587 size_t count = ca_element_count ( pItemList[i].chix );
588 size_t size = sizeof ( dbr_string_t ) * count;588 size_t size = sizeof ( dbr_string_t ) * count;
@@ -608,7 +608,7 @@ int catime ( const char * channelName,
608 for ( j = 0; j < pItemList[i].count; j++ ) {608 for ( j = 0; j < pItemList[i].count; j++ ) {
609 pFltVal[j] = (dbr_float_t) val;609 pFltVal[j] = (dbr_float_t) val;
610 }610 }
611 pItemList[i].type = DBR_FLOAT; 611 pItemList[i].type = DBR_FLOAT;
612 }612 }
613 printf ( "DBR_FLOAT Test\n" );613 printf ( "DBR_FLOAT Test\n" );
614 printf ( "--------------\n" );614 printf ( "--------------\n" );
@@ -621,13 +621,13 @@ int catime ( const char * channelName,
621 for ( j = 0; j < pItemList[i].count; j++ ) {621 for ( j = 0; j < pItemList[i].count; j++ ) {
622 pDblVal[j] = (dbr_double_t) val;622 pDblVal[j] = (dbr_double_t) val;
623 }623 }
624 pItemList[i].type = DBR_DOUBLE; 624 pItemList[i].type = DBR_DOUBLE;
625 }625 }
626 printf ( "DBR_DOUBLE Test\n" );626 printf ( "DBR_DOUBLE Test\n" );
627 printf ( "---------------\n" );627 printf ( "---------------\n" );
628 test ( pItemList, channelCount );628 test ( pItemList, channelCount );
629629
630 630
631 for ( i = 0; i < channelCount; i++ ) {631 for ( i = 0; i < channelCount; i++ ) {
632 dbr_string_t * pStrVal = ( dbr_string_t * ) pItemList[i].pValue;632 dbr_string_t * pStrVal = ( dbr_string_t * ) pItemList[i].pValue;
633 double val = i;633 double val = i;
@@ -635,7 +635,7 @@ int catime ( const char * channelName,
635 for ( j = 0; j < pItemList[i].count; j++ ) {635 for ( j = 0; j < pItemList[i].count; j++ ) {
636 sprintf ( pStrVal[j], "%f", val );636 sprintf ( pStrVal[j], "%f", val );
637 }637 }
638 pItemList[i].type = DBR_STRING; 638 pItemList[i].type = DBR_STRING;
639 }639 }
640 printf ( "DBR_STRING Test\n" );640 printf ( "DBR_STRING Test\n" );
641 printf ( "---------------\n" );641 printf ( "---------------\n" );
@@ -648,7 +648,7 @@ int catime ( const char * channelName,
648 for ( j = 0; j < pItemList[i].count; j++ ) {648 for ( j = 0; j < pItemList[i].count; j++ ) {
649 pIntVal[j] = (dbr_int_t) val;649 pIntVal[j] = (dbr_int_t) val;
650 }650 }
651 pItemList[i].type = DBR_INT; 651 pItemList[i].type = DBR_INT;
652 }652 }
653 printf ( "DBR_INT Test\n" );653 printf ( "DBR_INT Test\n" );
654 printf ( "------------\n" );654 printf ( "------------\n" );
@@ -661,8 +661,8 @@ int catime ( const char * channelName,
661 for ( j = 0; j < pItemList[i].count; j++ ) {661 for ( j = 0; j < pItemList[i].count; j++ ) {
662 pDblVal[j] = 0;662 pDblVal[j] = 0;
663 }663 }
664 pItemList[i].type = DBR_DOUBLE; 664 pItemList[i].type = DBR_DOUBLE;
665 } 665 }
666 measure_get_latency ( pItemList, channelCount );666 measure_get_latency ( pItemList, channelCount );
667667
668 printf ( "Free Channel Test\n" );668 printf ( "Free Channel Test\n" );
@@ -670,10 +670,10 @@ int catime ( const char * channelName,
670 timeIt ( test_free, pItemList, channelCount, 0, 0 );670 timeIt ( test_free, pItemList, channelCount, 0, 0 );
671671
672 SEVCHK ( ca_task_exit (), "Unable to free resources at exit" );672 SEVCHK ( ca_task_exit (), "Unable to free resources at exit" );
673 673
674 for ( i = 0; i < channelCount; i++ ) {674 for ( i = 0; i < channelCount; i++ ) {
675 free ( pItemList[i].pValue );675 free ( pItemList[i].pValue );
676 } 676 }
677677
678 free ( pItemList );678 free ( pItemList );
679679
diff --git a/modules/ca/src/client/catimeMain.c b/modules/ca/src/client/catimeMain.c
index 598ec45..cc9ec83 100644
--- a/modules/ca/src/client/catimeMain.c
+++ b/modules/ca/src/client/catimeMain.c
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11#include <stdio.h>11#include <stdio.h>
diff --git a/modules/ca/src/client/comBuf.cpp b/modules/ca/src/client/comBuf.cpp
index 94245d3..ec99ad0 100644
--- a/modules/ca/src/client/comBuf.cpp
+++ b/modules/ca/src/client/comBuf.cpp
@@ -5,20 +5,20 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/* 10/*
11 *
11 *12 *
12 *
13 * L O S A L A M O S13 * L O S A L A M O S
14 * Los Alamos National Laboratory14 * Los Alamos National Laboratory
15 * Los Alamos, New Mexico 8754515 * Los Alamos, New Mexico 87545
16 * 16 *
17 * Copyright, 1986, The Regents of the University of California.17 * Copyright, 1986, The Regents of the University of California.
18 * 18 *
19 * 19 *
20 * Author Jeffrey O. Hill20 * Author Jeffrey O. Hill
21 * johill@lanl.gov21 * johill@lanl.gov
22 */22 */
2323
24#include <stdexcept>24#include <stdexcept>
@@ -33,7 +33,7 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime
33 unsigned index = this->nextReadIndex;33 unsigned index = this->nextReadIndex;
34 unsigned finalIndex = this->commitIndex;34 unsigned finalIndex = this->commitIndex;
35 while ( index < finalIndex ) {35 while ( index < finalIndex ) {
36 unsigned nBytes = wire.sendBytes ( 36 unsigned nBytes = wire.sendBytes (
37 &this->buf[index], finalIndex - index, currentTime );37 &this->buf[index], finalIndex - index, currentTime );
38 if ( nBytes == 0u ) {38 if ( nBytes == 0u ) {
39 this->nextReadIndex = index;39 this->nextReadIndex = index;
@@ -45,9 +45,9 @@ bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime
45 return true;45 return true;
46}46}
4747
48// throwing the exception from a function that isnt inline 48// throwing the exception from a function that isnt inline
49// shrinks the GNU compiled object code49// shrinks the GNU compiled object code
50void comBuf::throwInsufficentBytesException () 50void comBuf::throwInsufficentBytesException ()
51{51{
52 throw comBuf::insufficentBytesAvailable ();52 throw comBuf::insufficentBytesAvailable ();
53}53}
diff --git a/modules/ca/src/client/comBuf.h b/modules/ca/src/client/comBuf.h
index 59e3878..3425bb3 100644
--- a/modules/ca/src/client/comBuf.h
+++ b/modules/ca/src/client/comBuf.h
@@ -5,7 +5,7 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/*10/*
11 *11 *
@@ -17,8 +17,8 @@
17 * Copyright, 1986, The Regents of the University of California.17 * Copyright, 1986, The Regents of the University of California.
18 *18 *
19 *19 *
20 * Author Jeffrey O. Hill20 * Author Jeffrey O. Hill
21 * johill@lanl.gov21 * johill@lanl.gov
22 */22 */
2323
24#ifndef comBufh24#ifndef comBufh
@@ -40,23 +40,23 @@ static const unsigned comBufSize = 0x4000;
40class comBufMemoryManager {40class comBufMemoryManager {
41public:41public:
42 virtual ~comBufMemoryManager ();42 virtual ~comBufMemoryManager ();
43 virtual void * allocate ( size_t ) = 0; 43 virtual void * allocate ( size_t ) = 0;
44 virtual void release ( void * ) = 0; 44 virtual void release ( void * ) = 0;
45};45};
4646
47class wireSendAdapter {47class wireSendAdapter {
48public:48public:
49 virtual unsigned sendBytes ( const void * pBuf, 49 virtual unsigned sendBytes ( const void * pBuf,
50 unsigned nBytesInBuf, 50 unsigned nBytesInBuf,
51 const class epicsTime & currentTime ) = 0;51 const class epicsTime & currentTime ) = 0;
52protected:52protected:
53 virtual ~wireSendAdapter() {}53 virtual ~wireSendAdapter() {}
54};54};
5555
56enum swioCircuitState { 56enum swioCircuitState {
57 swioConnected, 57 swioConnected,
58 swioPeerHangup, 58 swioPeerHangup,
59 swioPeerAbort, 59 swioPeerAbort,
60 swioLinkFailure,60 swioLinkFailure,
61 swioLocalAbort61 swioLocalAbort
62};62};
@@ -67,7 +67,7 @@ struct statusWireIO {
6767
68class wireRecvAdapter {68class wireRecvAdapter {
69public:69public:
70 virtual void recvBytes ( void * pBuf, 70 virtual void recvBytes ( void * pBuf,
71 unsigned nBytesInBuf, statusWireIO & ) = 0;71 unsigned nBytesInBuf, statusWireIO & ) = 0;
72protected:72protected:
73 virtual ~wireRecvAdapter() {}73 virtual ~wireRecvAdapter() {}
@@ -106,7 +106,7 @@ public:
106 template < class T >106 template < class T >
107 popStatus pop ( T & );107 popStatus pop ( T & );
108 static void throwInsufficentBytesException ();108 static void throwInsufficentBytesException ();
109 void * operator new ( size_t size, 109 void * operator new ( size_t size,
110 comBufMemoryManager & );110 comBufMemoryManager & );
111 epicsPlacementDeleteOperator (( void *, comBufMemoryManager & ))111 epicsPlacementDeleteOperator (( void *, comBufMemoryManager & ))
112private:112private:
@@ -119,14 +119,14 @@ private:
119 bool push ( const T * ); // disabled119 bool push ( const T * ); // disabled
120};120};
121121
122inline void * comBuf::operator new ( size_t size, 122inline void * comBuf::operator new ( size_t size,
123 comBufMemoryManager & mgr )123 comBufMemoryManager & mgr )
124{124{
125 return mgr.allocate ( size );125 return mgr.allocate ( size );
126}126}
127 127
128#ifdef CXX_PLACEMENT_DELETE128#ifdef CXX_PLACEMENT_DELETE
129inline void comBuf::operator delete ( void * pCadaver, 129inline void comBuf::operator delete ( void * pCadaver,
130 comBufMemoryManager & mgr )130 comBufMemoryManager & mgr )
131{131{
132 mgr.release ( pCadaver );132 mgr.release ( pCadaver );
@@ -162,8 +162,8 @@ inline unsigned comBuf :: uncommittedBytes () const
162162
163inline unsigned comBuf :: push ( comBuf & bufIn )163inline unsigned comBuf :: push ( comBuf & bufIn )
164{164{
165 unsigned nBytes = this->copyInBytes ( 165 unsigned nBytes = this->copyInBytes (
166 & bufIn.buf[ bufIn.nextReadIndex ], 166 & bufIn.buf[ bufIn.nextReadIndex ],
167 bufIn.commitIndex - bufIn.nextReadIndex );167 bufIn.commitIndex - bufIn.nextReadIndex );
168 bufIn.nextReadIndex += nBytes;168 bufIn.nextReadIndex += nBytes;
169 return nBytes;169 return nBytes;
@@ -174,11 +174,11 @@ inline unsigned comBuf :: capacityBytes ()
174 return comBufSize;174 return comBufSize;
175}175}
176176
177inline void comBuf :: fillFromWire ( 177inline void comBuf :: fillFromWire (
178 wireRecvAdapter & wire, statusWireIO & stat )178 wireRecvAdapter & wire, statusWireIO & stat )
179{179{
180 wire.recvBytes ( 180 wire.recvBytes (
181 & this->buf[this->nextWriteIndex], 181 & this->buf[this->nextWriteIndex],
182 sizeof ( this->buf ) - this->nextWriteIndex, stat );182 sizeof ( this->buf ) - this->nextWriteIndex, stat );
183 if ( stat.circuitState == swioConnected ) {183 if ( stat.circuitState == swioConnected ) {
184 this->nextWriteIndex += stat.bytesCopied;184 this->nextWriteIndex += stat.bytesCopied;
diff --git a/modules/ca/src/client/comQueRecv.cpp b/modules/ca/src/client/comQueRecv.cpp
index 8826354..4fe7d09 100644
--- a/modules/ca/src/client/comQueRecv.cpp
+++ b/modules/ca/src/client/comQueRecv.cpp
@@ -5,9 +5,9 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
10/* 10/*
11 *11 *
12 *12 *
13 * L O S A L A M O S13 * L O S A L A M O S
@@ -26,8 +26,8 @@
26#include "iocinf.h"26#include "iocinf.h"
27#include "virtualCircuit.h"27#include "virtualCircuit.h"
2828
29comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ): 29comQueRecv::comQueRecv ( comBufMemoryManager & comBufMemoryManagerIn ):
30 comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u ) 30 comBufMemMgr ( comBufMemoryManagerIn ), nBytesPending ( 0u )
31{31{
32}32}
3333
@@ -101,7 +101,7 @@ void comQueRecv::popString ( epicsOldString *pStr )
101}101}
102102
103void comQueRecv::pushLastComBufReceived ( comBuf & bufIn )103void comQueRecv::pushLastComBufReceived ( comBuf & bufIn )
104 104
105{105{
106 bufIn.commitIncomming ();106 bufIn.commitIncomming ();
107 comBuf * pComBuf = this->bufs.last ();107 comBuf * pComBuf = this->bufs.last ();
@@ -172,7 +172,7 @@ void comQueRecv::removeAndDestroyBuf ( comBuf & buf )
172 this->comBufMemMgr.release ( & buf );172 this->comBufMemMgr.release ( & buf );
173}173}
174174
175epicsUInt8 comQueRecv::popUInt8 () 175epicsUInt8 comQueRecv::popUInt8 ()
176{176{
177 comBuf * pComBuf = this->bufs.first ();177 comBuf * pComBuf = this->bufs.first ();
178 if ( ! pComBuf ) {178 if ( ! pComBuf ) {
diff --git a/modules/ca/src/client/comQueRecv.h b/modules/ca/src/client/comQueRecv.h
index 7f3153d..2e71478 100644
--- a/modules/ca/src/client/comQueRecv.h
+++ b/modules/ca/src/client/comQueRecv.h
@@ -5,25 +5,25 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *
12 *13 *
13 *
14 * L O S A L A M O S14 * L O S A L A M O S
15 * Los Alamos National Laboratory15 * Los Alamos National Laboratory
16 * Los Alamos, New Mexico 8754516 * Los Alamos, New Mexico 87545
17 * 17 *
18 * Copyright, 1986, The Regents of the University of California.18 * Copyright, 1986, The Regents of the University of California.
19 * 19 *
20 * 20 *
21 * Author Jeffrey O. Hill21 * Author Jeffrey O. Hill
22 * johill@lanl.gov22 * johill@lanl.gov
23 * 505 665 183123 * 505 665 1831
24 */24 */
2525
26#ifndef comQueRecvh 26#ifndef comQueRecvh
27#define comQueRecvh27#define comQueRecvh
2828
29#include "comBuf.h"29#include "comBuf.h"
@@ -54,8 +54,8 @@ private:
54 epicsUInt16 multiBufferPopUInt16 ();54 epicsUInt16 multiBufferPopUInt16 ();
55 epicsUInt32 multiBufferPopUInt32 ();55 epicsUInt32 multiBufferPopUInt32 ();
56 void removeAndDestroyBuf ( comBuf & );56 void removeAndDestroyBuf ( comBuf & );
57 comQueRecv ( const comQueRecv & );57 comQueRecv ( const comQueRecv & );
58 comQueRecv & operator = ( const comQueRecv & );58 comQueRecv & operator = ( const comQueRecv & );
59};59};
6060
61inline unsigned comQueRecv::occupiedBytes () const61inline unsigned comQueRecv::occupiedBytes () const
diff --git a/modules/ca/src/client/comQueSend.cpp b/modules/ca/src/client/comQueSend.cpp
index 6ed516b..7bf75c7 100644
--- a/modules/ca/src/client/comQueSend.cpp
+++ b/modules/ca/src/client/comQueSend.cpp
@@ -5,21 +5,21 @@
5* Operator of Los Alamos National Laboratory.5* Operator of Los Alamos National Laboratory.
6* EPICS BASE Versions 3.13.76* EPICS BASE Versions 3.13.7
7* and higher are distributed subject to a Software License Agreement found7* and higher are distributed subject to a Software License Agreement found
8* in file LICENSE that is included with this distribution. 8* in file LICENSE that is included with this distribution.
9\*************************************************************************/9\*************************************************************************/
1010
11/* 11/*
12 *
12 *13 *
13 *
14 * L O S A L A M O S14 * L O S A L A M O S
15 * Los Alamos National Laboratory15 * Los Alamos National Laboratory
16 * Los Alamos, New Mexico 8754516 * Los Alamos, New Mexico 87545
17 * 17 *
18 * Copyright, 1986, The Regents of the University of California.18 * Copyright, 1986, The Regents of the University of California.
19 * 19 *
20 * 20 *
21 * Author Jeffrey O. Hill21 * Author Jeffrey O. Hill
22 * johill@lanl.gov22 * johill@lanl.gov
23 */23 */
2424
25//25//
@@ -35,7 +35,7 @@
35// a connection dropped.35// a connection dropped.
36// 4) Do not allocate too much memory in exception situatons (such as36// 4) Do not allocate too much memory in exception situatons (such as
37// after a circuit disconnect).37// after a circuit disconnect).
38// 5) Avoid allocating more memory than is absolutely necessary to meet 38// 5) Avoid allocating more memory than is absolutely necessary to meet
39// the above requirements.39// the above requirements.
40// 6) Message fragments must never be sent to the IOC when there isnt40// 6) Message fragments must never be sent to the IOC when there isnt
41// enough memory to queue part of a message (we also must not force41// enough memory to queue part of a message (we also must not force
@@ -44,7 +44,7 @@
44// protocol stream.44// protocol stream.
45//45//
46// Implementation:46// Implementation:
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
48// required. If it is a receive thread scheduals the flush with the48// required. If it is a receive thread scheduals the flush with the
49// send thread, and otherwise directly execute the system call. The49// send thread, and otherwise directly execute the system call. The
50// send thread must run at a higher priority than the receive thread50// send thread must run at a higher priority than the receive thread
@@ -52,14 +52,14 @@
52// 2) Preallocate space for the entire message prior to copying in the52// 2) Preallocate space for the entire message prior to copying in the
53// message so that message fragments are not flushed out just prior53// message so that message fragments are not flushed out just prior
54// to detecting that memory is unavailable.54// to detecting that memory is unavailable.
55// 3) Return a special error constant when the following situations 55// 3) Return a special error constant when the following situations
56// are detected when the user is attempting to queue a request56// are detected when the user is attempting to queue a request
57// from within a user callback executed by a receive thread:57// from within a user callback executed by a receive thread:
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
59// callback than are removed by the response that initiated the59// callback than are removed by the response that initiated the
60// callback, and this situation persists for many callbacks until60// callback, and this situation persists for many callbacks until
61// all buffering in the system is exausted.61// all buffering in the system is exausted.
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
63// callback until all buffering in the system is exausted.63// callback until all buffering in the system is exausted.
64// c) Some combination of both (a) nad (b).64// c) Some combination of both (a) nad (b).
65//65//
@@ -73,15 +73,15 @@
73#include "db_access.h" // for dbr_short_t etc73#include "db_access.h" // for dbr_short_t etc
7474
75// nill message alignment pad bytes75// nill message alignment pad bytes
76const char cacNillBytes [] = 76const char cacNillBytes [] =
77{ 77{
78 0, 0, 0, 0,78 0, 0, 0, 0,
79 0, 0, 0, 079 0, 0, 0, 0
80};80};
8181
82comQueSend::comQueSend ( wireSendAdapter & wireIn, 82comQueSend::comQueSend ( wireSendAdapter & wireIn,
83 comBufMemoryManager & comBufMemMgrIn ):83 comBufMemoryManager & comBufMemMgrIn ):
84 comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ), 84 comBufMemMgr ( comBufMemMgrIn ), wire ( wireIn ),
85 nBytesPending ( 0u )85 nBytesPending ( 0u )
86{86{
87}87}
@@ -91,7 +91,7 @@ comQueSend::~comQueSend ()
91 this->clear ();91 this->clear ();
92}92}
9393
94void comQueSend::clear () 94void comQueSend::clear ()
95{95{
96 comBuf *pBuf;96 comBuf *pBuf;
9797
@@ -181,32 +181,32 @@ const comQueSend::copyScalarFunc_t comQueSend::dbrCopyScalar [39] = {
181 &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME181 &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME
182};182};
183183
184void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem ) 184void comQueSend::copy_dbr_string ( const void *pValue, unsigned nElem )
185{185{
186 this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );186 this->push ( static_cast < const char * > ( pValue ), nElem * MAX_STRING_SIZE );
187}187}
188188
189void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem ) 189void comQueSend::copy_dbr_short ( const void *pValue, unsigned nElem )
190{190{
191 this->push ( static_cast <const dbr_short_t *> ( pValue ), nElem );191 this->push ( static_cast <const dbr_short_t *> ( pValue ), nElem );
192}192}
193193
194void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem ) 194void comQueSend::copy_dbr_float ( const void *pValue, unsigned nElem )
195{195{
196 this->push ( static_cast <const dbr_float_t *> ( pValue ), nElem );196 this->push ( static_cast <const dbr_float_t *> ( pValue ), nElem );
197}197}
198198
199void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem ) 199void comQueSend::copy_dbr_char ( const void *pValue, unsigned nElem )
200{200{
201 this->push ( static_cast <const dbr_char_t *> ( pValue ), nElem );201 this->push ( static_cast <const dbr_char_t *> ( pValue ), nElem );
202}202}
203203
204void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem ) 204void comQueSend::copy_dbr_long ( const void *pValue, unsigned nElem )
205{205{
206 this->push ( static_cast <const dbr_long_t *> ( pValue ), nElem );206 this->push ( static_cast <const dbr_long_t *> ( pValue ), nElem );
207}207}
208208
209void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem ) 209void comQueSend::copy_dbr_double ( const void *pValue, unsigned nElem )
210{210{
211 this->push ( static_cast <const dbr_double_t *> ( pValue ), nElem );211 this->push ( static_cast <const dbr_double_t *> ( pValue ), nElem );
212}212}
@@ -258,7 +258,7 @@ const comQueSend::copyVectorFunc_t comQueSend::dbrCopyVector [39] = {
258 &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME258 &comQueSend::copy_dbr_invalid // DBR_CLASS_NAME
259};259};
260260
261comBuf * comQueSend::popNextComBufToSend () 261comBuf * comQueSend::popNextComBufToSend ()
262{262{
263 comBuf *pBuf = this->bufs.get ();263 comBuf *pBuf = this->bufs.get ();
264 if ( pBuf ) {264 if ( pBuf ) {
@@ -279,9 +279,9 @@ comBuf * comQueSend::popNextComBufToSend ()
279}279}
280280
281void comQueSend::insertRequestHeader (281void comQueSend::insertRequestHeader (
282 ca_uint16_t request, ca_uint32_t payloadSize, 282 ca_uint16_t request, ca_uint32_t payloadSize,
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,
284 ca_uint32_t requestDependent, bool v49Ok ) 284 ca_uint32_t requestDependent, bool v49Ok )
285{285{
286 if ( payloadSize < 0xffff && nElem < 0xffff ) {286 if ( payloadSize < 0xffff && nElem < 0xffff ) {
287 comBuf * pComBuf = this->bufs.last ();287 comBuf * pComBuf = this->bufs.last ();
@@ -289,12 +289,12 @@ void comQueSend::insertRequestHeader (
289 pComBuf = newComBuf ();289 pComBuf = newComBuf ();
290 this->pushComBuf ( *pComBuf );290 this->pushComBuf ( *pComBuf );
291 }291 }
292 pComBuf->push ( request ); 292 pComBuf->push ( request );
293 pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) ); 293 pComBuf->push ( static_cast < ca_uint16_t > ( payloadSize ) );
294 pComBuf->push ( dataType ); 294 pComBuf->push ( dataType );
295 pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) ); 295 pComBuf->push ( static_cast < ca_uint16_t > ( nElem ) );
296 pComBuf->push ( cid ); 296 pComBuf->push ( cid );
297 pComBuf->push ( requestDependent ); 297 pComBuf->push ( requestDependent );
298 }298 }
299 else if ( v49Ok ) {299 else if ( v49Ok ) {
300 comBuf * pComBuf = this->bufs.last ();300 comBuf * pComBuf = this->bufs.last ();
@@ -302,14 +302,14 @@ void comQueSend::insertRequestHeader (
302 pComBuf = newComBuf ();302 pComBuf = newComBuf ();
303 this->pushComBuf ( *pComBuf );303 this->pushComBuf ( *pComBuf );
304 }304 }
305 pComBuf->push ( request ); 305 pComBuf->push ( request );
306 pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) ); 306 pComBuf->push ( static_cast < ca_uint16_t > ( 0xffff ) );
307 pComBuf->push ( dataType ); 307 pComBuf->push ( dataType );
308 pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) ); 308 pComBuf->push ( static_cast < ca_uint16_t > ( 0u ) );
309 pComBuf->push ( cid ); 309 pComBuf->push ( cid );
310 pComBuf->push ( requestDependent ); 310 pComBuf->push ( requestDependent );
311 pComBuf->push ( payloadSize ); 311 pComBuf->push ( payloadSize );
312 pComBuf->push ( nElem ); 312 pComBuf->push ( nElem );
313 }313 }
314 else {314 else {
315 throw cacChannel::outOfBounds ();315 throw cacChannel::outOfBounds ();
@@ -317,9 +317,9 @@ void comQueSend::insertRequestHeader (
317}317}
318318
319void comQueSend::insertRequestWithPayLoad (319void comQueSend::insertRequestWithPayLoad (
320 ca_uint16_t request, unsigned dataType, arrayElementCount nElem, 320 ca_uint16_t request, unsigned dataType, arrayElementCount nElem,
321 ca_uint32_t cid, ca_uint32_t requestDependent, 321 ca_uint32_t cid, ca_uint32_t requestDependent,
322 const void * pPayload, bool v49Ok ) 322 const void * pPayload, bool v49Ok )
323{323{
324 if ( INVALID_DB_REQ ( dataType ) ) {324 if ( INVALID_DB_REQ ( dataType ) ) {
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches