Compare commits
36 Commits
v4.13.0
...
fix_compil
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fa17e0f15 | |||
| ace5da0dfd | |||
| edcbf03505 | |||
| b1f8777606 | |||
|
|
e075fd450a | ||
|
|
4f60f2d9a6 | ||
|
|
2a948ff459 | ||
|
|
5e228fe15a | ||
|
|
f979b2d162 | ||
|
|
a8ba939c33 | ||
|
|
849e873dd7 | ||
|
|
6ba32b5c3b | ||
|
|
c119ed57ad | ||
|
|
442bf81809 | ||
|
|
7f7d249e0e | ||
|
|
a4bdcfcd19 | ||
|
|
2cf356f3f9 | ||
|
|
3252364e9f | ||
|
|
56403e8e47 | ||
|
|
6198ad4529 | ||
|
|
ee9df66168 | ||
|
|
49c4882f73 | ||
|
|
1f84f411e9 | ||
|
|
908ea87e2d | ||
|
|
7e3e7b5327 | ||
|
|
b8df787acc | ||
|
|
ac5ff32255 | ||
|
|
23e8b20be7 | ||
|
|
1cae25fd8d | ||
|
|
297fa347a9 | ||
|
|
0556439fa7 | ||
|
|
3bf4e95de8 | ||
|
|
46b839c3ce | ||
|
|
55a20fb4d9 | ||
|
|
6544bc0ae5 | ||
|
|
8e93f8ce69 |
1
.ci
Submodule
1
.ci
Submodule
Submodule .ci added at 20f8e05393
336
.github/workflows/ci-scripts-build.yml
vendored
Normal file
336
.github/workflows/ci-scripts-build.yml
vendored
Normal file
@@ -0,0 +1,336 @@
|
||||
# .github/workflows/ci-scripts-build.yml for use with EPICS Base ci-scripts
|
||||
# (see: https://github.com/epics-base/ci-scripts)
|
||||
|
||||
# This is YAML - indentation levels are crucial
|
||||
|
||||
# Workflow name, shared by all branches
|
||||
|
||||
name: PCAS
|
||||
|
||||
# Trigger on pushes and PRs to any branch
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.gitattributes'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.gitattributes'
|
||||
- '**/*.html'
|
||||
- '**/*.md'
|
||||
|
||||
env:
|
||||
SETUP_PATH: .ci-local:.ci
|
||||
BASE_RECURSIVE: NO
|
||||
|
||||
jobs:
|
||||
native:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Set environment variables from matrix parameters
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
CI_CROSS_TARGETS: ${{ matrix.cross }}
|
||||
EXTRA: ${{ matrix.extra }}
|
||||
TEST: ${{ matrix.test }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Job names also name artifacts, character limitations apply
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
cmp: gcc
|
||||
name: "Ub-24 gcc-13 c++20 Werror"
|
||||
# Turn all warnings into errors,
|
||||
# except for those we could not fix (yet).
|
||||
# Remove respective -Wno-error=... flag once it is fixed.
|
||||
extra: "CMD_CXXFLAGS=-std=c++20
|
||||
CMD_CPPFLAGS='-fdiagnostics-color
|
||||
-fstack-protector-strong
|
||||
-Wformat
|
||||
-Werror
|
||||
-Werror=format-security
|
||||
-Wno-error=deprecated-declarations
|
||||
-Wno-error=stringop-truncation
|
||||
-Wno-error=restrict
|
||||
-Wno-error=sizeof-pointer-memaccess
|
||||
-Wno-error=nonnull
|
||||
-Wno-error=dangling-pointer
|
||||
-Wno-error=format-overflow
|
||||
-Wno-error=stringop-overread
|
||||
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
|
||||
CMD_LDFLAGS=-Wl,-z,relro"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
cross: "windows-x64-mingw"
|
||||
name: "Ub-22 gcc + MinGW"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
cross: "windows-x64-mingw"
|
||||
name: "Ub-22 gcc + MinGW, static"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||
name: "Ub-22 gcc C++11, static"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: static
|
||||
extra: "CMD_CFLAGS=-funsigned-char CMD_CXXFLAGS=-funsigned-char"
|
||||
name: "Ub-22 gcc unsigned char"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
name: "Ub-22 clang"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: clang
|
||||
configuration: default
|
||||
extra: "CMD_CXXFLAGS=-std=c++11"
|
||||
name: "Ub-22 clang C++11"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
cross: "RTEMS-pc686-qemu@5"
|
||||
name: "Ub-22 gcc + RT-5.1 pc686"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
cross: "RTEMS-beatnik@5"
|
||||
test: NO
|
||||
name: "Ub-22 gcc + RT-5.1 beatnik"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
cross: "RTEMS-xilinx_zynq_a9_qemu@5"
|
||||
test: NO
|
||||
name: "Ub-22 gcc + RT-5.1 xilinx_zynq_a9_qemu"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
cross: "RTEMS-uC5282@5"
|
||||
test: NO
|
||||
name: "Ub-22 gcc + RT-5.1 uC5282"
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Ub-22 gcc + RT-4.10"
|
||||
cross: "RTEMS-pc386-qemu@4.10"
|
||||
test: NO
|
||||
|
||||
- os: ubuntu-22.04
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Ub-22 gcc + RT-4.9"
|
||||
cross: "RTEMS-pc386-qemu@4.9"
|
||||
|
||||
- os: macos-latest
|
||||
cmp: clang
|
||||
configuration: default
|
||||
name: "MacOS clang"
|
||||
|
||||
- os: windows-2022
|
||||
cmp: vs2022
|
||||
configuration: debug
|
||||
name: "Win-22 MSC-22"
|
||||
extra: "CMD_CXXFLAGS=-analysis"
|
||||
|
||||
- os: windows-2022
|
||||
cmp: vs2022
|
||||
configuration: static-debug
|
||||
name: "Win-22 MSC-22, static"
|
||||
extra: "CMD_CXXFLAGS=-analysis"
|
||||
|
||||
- os: windows-2022
|
||||
cmp: vs2022
|
||||
configuration: debug
|
||||
name: "Win-22 MSC-22, debug"
|
||||
|
||||
- os: windows-2022
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Win-22 mingw"
|
||||
|
||||
# Cross builds
|
||||
|
||||
- os: ubuntu-latest
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Cross linux-aarch64"
|
||||
cross: linux-aarch64
|
||||
|
||||
- os: ubuntu-latest
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Cross linux-arm gnueabi"
|
||||
cross: linux-arm@arm-linux-gnueabi
|
||||
|
||||
- os: ubuntu-latest
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
name: "Cross linux-arm gnueabihf"
|
||||
cross: linux-arm@arm-linux-gnueabihf
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@master
|
||||
- name: "apt-get install"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install qemu-system-x86 g++-mingw-w64-x86-64 gdb
|
||||
if: runner.os == 'Linux'
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python .ci/cue.py -T 60M test
|
||||
- name: Upload tapfiles Artifact
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: tapfiles ${{ matrix.name }}
|
||||
path: '**/O.*/*.tap'
|
||||
if-no-files-found: ignore
|
||||
- name: Collect and show test results
|
||||
if: ${{ always() }}
|
||||
run: python .ci/cue.py -T 5M test-results
|
||||
|
||||
docker:
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ matrix.image }}
|
||||
# Set environment variables from matrix parameters
|
||||
env:
|
||||
CMP: ${{ matrix.cmp }}
|
||||
BCFG: ${{ matrix.configuration }}
|
||||
EXTRA: ${{ matrix.extra }}
|
||||
TEST: ${{ matrix.test }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Job names also name artifacts, character limitations apply
|
||||
include:
|
||||
- name: "CentOS-8"
|
||||
image: centos:8
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
|
||||
- name: "Rocky-9"
|
||||
image: rockylinux:9
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
|
||||
- name: "Fedora-33"
|
||||
image: fedora:33
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
|
||||
- name: "Fedora-latest"
|
||||
image: fedora:latest
|
||||
cmp: gcc
|
||||
configuration: default
|
||||
|
||||
steps:
|
||||
- name: "Fix repo URLs on CentOS-8"
|
||||
# centos:8 is frozen, repos are in the vault
|
||||
if: matrix.image=='centos:8'
|
||||
run: |
|
||||
sed -i -e "s|mirrorlist=|#mirrorlist=|" \
|
||||
-e "s|#baseurl=http://mirror|baseurl=http://vault|" \
|
||||
/etc/yum.repos.d/CentOS-Linux-{BaseOS,AppStream,Extras,Plus}.repo
|
||||
- name: "Redhat setup"
|
||||
run: |
|
||||
dnf -y install python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel perl-Test-Simple
|
||||
git --version || dnf -y install git
|
||||
python3 --version
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@master
|
||||
- name: Prepare and compile dependencies
|
||||
run: python3 .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
run: python3 .ci/cue.py build
|
||||
- name: Run main module tests
|
||||
run: python3 .ci/cue.py -T 20M test
|
||||
- name: Upload tapfiles Artifact
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: tapfiles ${{ matrix.name }}
|
||||
path: '**/O.*/*.tap'
|
||||
if-no-files-found: ignore
|
||||
- name: Collect and show test results
|
||||
if: ${{ always() }}
|
||||
run: python3 .ci/cue.py -T 5M test-results
|
||||
|
||||
build-docker:
|
||||
name: Docker CentOS-7
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CMP: gcc
|
||||
BCFG: default
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Run...
|
||||
run: |
|
||||
env > env.list
|
||||
cat <<EOF > runit.sh
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
cd /io
|
||||
id
|
||||
|
||||
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
|
||||
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
|
||||
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
|
||||
yum -y install epel-release
|
||||
yum -y install \
|
||||
curl make gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker \
|
||||
python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel perl-Test-Simple \
|
||||
libevent-devel sudo re2c perl-version
|
||||
[ -e /usr/bin/python ] || ln -sf /usr/bin/python3 /usr/bin/python
|
||||
|
||||
# fake out cue.py
|
||||
ln -s /bin/true /usr/bin/apt-get
|
||||
|
||||
# quiet warnings spam from perl
|
||||
export LANG=C
|
||||
|
||||
python --version
|
||||
python .ci/cue.py prepare
|
||||
python .ci/cue.py build
|
||||
python .ci/cue.py -T 15M test
|
||||
python .ci/cue.py test-results
|
||||
EOF
|
||||
chmod +x runit.sh
|
||||
docker run --rm --quiet \
|
||||
--pull=always \
|
||||
--env-file env.list \
|
||||
-v `pwd`:/io \
|
||||
centos:7 \
|
||||
/io/runit.sh
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule ".ci"]
|
||||
path = .ci
|
||||
url = https://github.com/epics-base/ci-scripts.git
|
||||
27
README.md
27
README.md
@@ -1,8 +1,13 @@
|
||||
<a target="_blank" href="https://github.com/epics-modules/pcas/actions/workflows/ci-scripts-build.yml">![GitHub Actions status][badge.gha]</a>
|
||||
<a target="_blank" href="https://www.codacy.com/gh/epics-modules/pcas">![Codacy grade][badge.codacy]</a>
|
||||
|
||||
# PCAS - Portable Channel Access Server
|
||||
|
||||
Portable Channel Access Server and Generic Data Descriptor C++ libraries,
|
||||
split off [EPICS Base 3.16.1](http://www.aps.anl.gov/epics/base/R3-16/1.php)
|
||||
as a separate module for EPICS 7.
|
||||
[EPICS](https://epics-controls.org/) Portable Channel Access Server
|
||||
and Generic Data Descriptor C++ libraries, split off from
|
||||
[EPICS Base 3.16.1](https://epics-controls.org/resources-and-support/base/series-3-16/3-16-1/)
|
||||
as a separate module for
|
||||
[EPICS 7](https://epics-controls.org/resources-and-support/base/epics-7/).
|
||||
|
||||
The repository keeps the complete history of the code, i.e. it is a clone
|
||||
of the EPICS Base repository, which explains its size.
|
||||
@@ -19,6 +24,18 @@ manually export the CA client library header file `net_convert.h`:
|
||||
|
||||
cp <EPICS_BASE>/src/ca/client/net_convert.h <EPICS_BASE>/include/
|
||||
|
||||
## CI and Static Code Analysis
|
||||
|
||||
Continuous Integration services are provided by / running on GitHub Actions. PCAS uses the ci-scripts module.
|
||||
|
||||
Static Code Analysis provided by Codacy.
|
||||
|
||||
## References
|
||||
|
||||
Additional information and documentation:
|
||||
* [Base 3.16.1 home page](http://www.aps.anl.gov/epics/base/R3-16/1.php)
|
||||
* [CA Reference Manual](http://www.aps.anl.gov/epics/base/R3-16/1-docs/CAref.html)
|
||||
* [Base 3.16.1 home page](https://epics-controls.org/resources-and-support/base/series-3-16/3-16-1/)
|
||||
* [CA 4.13.1 Reference Manual](https://epics.anl.gov/base/R7-0/1-docs/CAref.html)
|
||||
|
||||
<!-- Links -->
|
||||
[badge.gha]: https://github.com/epics-modules/pcas/actions/workflows/ci-scripts-build.yml/badge.svg
|
||||
[badge.codacy]: https://app.codacy.com/project/badge/Grade/ce85722ee615429089661a874cc21557
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
EPICS_PCAS_MAJOR_VERSION = 4
|
||||
EPICS_PCAS_MINOR_VERSION = 13
|
||||
EPICS_PCAS_MAINTENANCE_VERSION = 0
|
||||
EPICS_PCAS_DEVELOPMENT_FLAG = 0
|
||||
EPICS_PCAS_MAINTENANCE_VERSION = 4
|
||||
EPICS_PCAS_DEVELOPMENT_FLAG = 1
|
||||
|
||||
EXPANDVARS += EPICS_PCAS_MAJOR_VERSION
|
||||
EXPANDVARS += EPICS_PCAS_MINOR_VERSION
|
||||
|
||||
@@ -39,4 +39,5 @@ EPICS_BASE = /home/ralph/work/EPICS/V3/3.16
|
||||
# These allow developers to override the RELEASE variable settings
|
||||
# without having to modify the configure/RELEASE file itself.
|
||||
-include $(TOP)/../RELEASE.local
|
||||
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
|
||||
-include $(TOP)/configure/RELEASE.local
|
||||
|
||||
@@ -50,14 +50,16 @@ bool getStringAsDouble ( const char * pString,
|
||||
ftmp = itmp;
|
||||
}
|
||||
else {
|
||||
int j = epicsScanDouble( pString, &ftmp );
|
||||
if ( j != 1 ) {
|
||||
j = sscanf ( pString,"%x", &itmp );
|
||||
if ( j == 1 ) {
|
||||
ftmp = itmp;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
int j = epicsScanDouble ( pString, &ftmp );
|
||||
if ( j != 1 ) {
|
||||
j = sscanf ( pString, "%lf", &ftmp );
|
||||
if ( j != 1 ) {
|
||||
j = sscanf ( pString, "%x", &itmp );
|
||||
if ( j == 1 ) {
|
||||
ftmp = itmp;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,11 @@ inline void gdd::setStatSevr(aitInt16 stat, aitInt16 sevr)
|
||||
{ status.s.aitStat = stat; status.s.aitSevr = sevr; }
|
||||
|
||||
inline gdd& gdd::operator=(const gdd& v)
|
||||
#if __cplusplus >= 201103L
|
||||
= default;
|
||||
#else
|
||||
{ memcpy(this,&v,sizeof(gdd)); return *this; }
|
||||
#endif
|
||||
|
||||
inline int gdd::isScalar(void) const { return dimension()==0?1:0; }
|
||||
inline int gdd::isContainer(void) const
|
||||
|
||||
@@ -307,7 +307,6 @@ void gdd::test()
|
||||
pdd->convertAddressToOffsets();
|
||||
pdd->convertOffsetsToAddress();
|
||||
pdd->dump();
|
||||
pdd->unreference();
|
||||
delete [] buf;
|
||||
}
|
||||
#endif
|
||||
@@ -509,7 +508,6 @@ void gddContainer::test(void)
|
||||
cdd1->dump();
|
||||
fprintf(stderr,"=====RE-DUMP OF ORIGINAL CONTAINER:\n");
|
||||
dump();
|
||||
cdd1->unreference();
|
||||
delete [] buf;
|
||||
|
||||
// test copy(), Dup(), copyInfo()
|
||||
|
||||
@@ -11,7 +11,7 @@ TOP=../../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD_LIBS += $(EPICS_BASE_HOST_LIBS) cas gdd
|
||||
PROD_LIBS += cas gdd $(EPICS_BASE_HOST_LIBS)
|
||||
|
||||
SRC_DIRS += $(TOP)/src/template/top/caServerApp
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ public:
|
||||
private:
|
||||
clientBufMemoryManager clientBufMemMgr;
|
||||
tsFreeList < casMonitor, 1024 > casMonitorFreeList;
|
||||
tsDLList < casStrmClient > clientList;
|
||||
tsDLList < casIntfOS > intfList;
|
||||
::tsDLList < casStrmClient > clientList;
|
||||
::tsDLList < casIntfOS > intfList;
|
||||
mutable epicsMutex mutex;
|
||||
mutable epicsMutex diagnosticCountersMutex;
|
||||
caServer & adapter;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
casCoreClient::casCoreClient ( caServerI & serverInternal ) :
|
||||
eventSys ( *this )
|
||||
{
|
||||
assert ( & serverInternal );
|
||||
ctx.setServer ( & serverInternal );
|
||||
ctx.setClient ( this );
|
||||
}
|
||||
|
||||
@@ -665,6 +665,10 @@ caStatus casDGClient::processDG ()
|
||||
if ( status != S_cas_success ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( this->in.bytesPresent () > 0 && dgInBytesConsumed == 0 ) {
|
||||
this->in.removeMsg ( this->in.bytesPresent() );
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
#include "casAsyncIOI.h"
|
||||
#include "casMonitor.h"
|
||||
|
||||
|
||||
// Use casErrMessage instead of errMessage to show PV name
|
||||
#define casErrMessage(S, PM) \
|
||||
errPrintf(S, __FILE__, __LINE__, ", %s, %s", getName(), PM)
|
||||
|
||||
casPVI::casPVI ( casPV & intf ) :
|
||||
pCAS ( NULL ), pPV ( & intf ), nMonAttached ( 0u ),
|
||||
nIOAttached ( 0u ), deletePending ( false ) {}
|
||||
@@ -146,7 +151,7 @@ caStatus casPVI::updateEnumStringTable ( casCtx & ctxIn )
|
||||
// gddArray(int app, aitEnum prim, int dimen, ...);
|
||||
gdd * pTmp = new gddScalar ( gddAppType_enums );
|
||||
if ( pTmp == NULL ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
casErrMessage ( S_cas_noMemory,
|
||||
"unable to create gdd for read of application type \"enums\" string"
|
||||
" conversion table for enumerated PV" );
|
||||
return S_cas_noMemory;
|
||||
@@ -156,8 +161,8 @@ caStatus casPVI::updateEnumStringTable ( casCtx & ctxIn )
|
||||
gddAppType_enums, MAX_ENUM_STATES );
|
||||
if ( status != S_cas_success ) {
|
||||
pTmp->unreference ();
|
||||
errMessage ( status,
|
||||
"unable to to config gdd for read of application type \"enums\" string"
|
||||
casErrMessage ( status,
|
||||
"unable to config gdd for read of application type \"enums\" string"
|
||||
" conversion table for enumerated PV");
|
||||
return status;
|
||||
}
|
||||
@@ -187,9 +192,9 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp )
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
|
||||
if ( resp.isContainer() ) {
|
||||
errMessage ( S_cas_badType,
|
||||
"application type \"enums\" string conversion table for"
|
||||
" enumerated PV was a container (expected vector of strings)" );
|
||||
casErrMessage ( S_cas_badType,
|
||||
"Invalid \"enums\" string conversion table for"
|
||||
" enumerated PV (container instead of vector of strings)" );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -197,14 +202,14 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp )
|
||||
if ( resp.primitiveType() == aitEnumString ) {
|
||||
aitString *pStr = (aitString *) resp.dataVoid ();
|
||||
if ( ! this->enumStrTbl.setString ( 0, pStr->string() ) ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
casErrMessage ( S_cas_noMemory,
|
||||
"no memory to set enumerated PV string cache" );
|
||||
}
|
||||
}
|
||||
else if ( resp.primitiveType() == aitEnumFixedString ) {
|
||||
aitFixedString *pStr = (aitFixedString *) resp.dataVoid ();
|
||||
if ( ! this->enumStrTbl.setString ( 0, pStr->fixed_string ) ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
casErrMessage ( S_cas_noMemory,
|
||||
"no memory to set enumerated PV string cache" );
|
||||
}
|
||||
}
|
||||
@@ -232,7 +237,7 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp )
|
||||
aitString *pStr = (aitString *) resp.dataVoid ();
|
||||
for ( index = 0; index<count; index++ ) {
|
||||
if ( ! this->enumStrTbl.setString ( index, pStr[index].string() ) ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
casErrMessage ( S_cas_noMemory,
|
||||
"no memory to set enumerated PV string cache" );
|
||||
}
|
||||
}
|
||||
@@ -241,19 +246,18 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp )
|
||||
aitFixedString *pStr = (aitFixedString *) resp.dataVoid ();
|
||||
for ( index = 0; index < count; index++ ) {
|
||||
if ( ! this->enumStrTbl.setString ( index, pStr[index].fixed_string ) ) {
|
||||
errMessage ( S_cas_noMemory,
|
||||
casErrMessage ( S_cas_noMemory,
|
||||
"no memory to set enumerated PV string cache" );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
errMessage ( S_cas_badType,
|
||||
"application type \"enums\" string conversion"
|
||||
" table for enumerated PV isnt a string type?" );
|
||||
casErrMessage( S_cas_badType,
|
||||
"bad \"enums\" string conversion table for enumerated PV" );
|
||||
}
|
||||
}
|
||||
else {
|
||||
errMessage ( S_cas_badType,
|
||||
casErrMessage ( S_cas_badType,
|
||||
"application type \"enums\" string conversion table"
|
||||
" for enumerated PV was multi-dimensional"
|
||||
" (expected vector of strings)" );
|
||||
@@ -288,7 +292,7 @@ void casPVI::postEvent ( const casEventMask & select, const gdd & event )
|
||||
}
|
||||
|
||||
caStatus casPVI::installMonitor (
|
||||
casMonitor & mon, tsDLList < casMonitor > & monitorList )
|
||||
casMonitor & mon, ::tsDLList < casMonitor > & monitorList )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
assert ( this->nMonAttached < UINT_MAX );
|
||||
@@ -304,7 +308,7 @@ caStatus casPVI::installMonitor (
|
||||
}
|
||||
|
||||
casMonitor * casPVI::removeMonitor (
|
||||
tsDLList < casMonitor > & list, ca_uint32_t clientIdIn )
|
||||
::tsDLList < casMonitor > & list, ca_uint32_t clientIdIn )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
casMonitor * pMon = 0;
|
||||
@@ -361,8 +365,8 @@ void casPVI::installChannel ( chanIntfForPV & chan )
|
||||
}
|
||||
|
||||
void casPVI::removeChannel (
|
||||
chanIntfForPV & chan, tsDLList < casMonitor > & src,
|
||||
tsDLList < casMonitor > & dest )
|
||||
chanIntfForPV & chan, ::tsDLList < casMonitor > & src,
|
||||
::tsDLList < casMonitor > & dest )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
src.removeAll ( dest );
|
||||
@@ -376,7 +380,7 @@ void casPVI::removeChannel (
|
||||
}
|
||||
}
|
||||
|
||||
void casPVI::clearOutstandingReads ( tsDLList < casAsyncIOI > & ioList )
|
||||
void casPVI::clearOutstandingReads ( ::tsDLList < casAsyncIOI > & ioList )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
|
||||
@@ -396,7 +400,7 @@ void casPVI::clearOutstandingReads ( tsDLList < casAsyncIOI > & ioList )
|
||||
}
|
||||
}
|
||||
|
||||
void casPVI::destroyAllIO ( tsDLList < casAsyncIOI > & ioList )
|
||||
void casPVI::destroyAllIO ( ::tsDLList < casAsyncIOI > & ioList )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
while ( casAsyncIOI * pIO = ioList.get() ) {
|
||||
@@ -408,7 +412,7 @@ void casPVI::destroyAllIO ( tsDLList < casAsyncIOI > & ioList )
|
||||
}
|
||||
|
||||
void casPVI::installIO (
|
||||
tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
|
||||
::tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
ioList.add ( io );
|
||||
@@ -417,7 +421,7 @@ void casPVI::installIO (
|
||||
}
|
||||
|
||||
void casPVI::uninstallIO (
|
||||
tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
|
||||
::tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
|
||||
{
|
||||
{
|
||||
epicsGuard < epicsMutex > guard ( this->mutex );
|
||||
|
||||
@@ -49,21 +49,21 @@ public:
|
||||
caStatus attachToServer ( caServerI & cas );
|
||||
aitIndex nativeCount ();
|
||||
bool ioIsPending () const;
|
||||
void clearOutstandingReads ( tsDLList < class casAsyncIOI > &);
|
||||
void clearOutstandingReads ( ::tsDLList < class casAsyncIOI > &);
|
||||
void destroyAllIO (
|
||||
tsDLList < casAsyncIOI > & );
|
||||
::tsDLList < casAsyncIOI > & );
|
||||
void installIO (
|
||||
tsDLList < casAsyncIOI > &, casAsyncIOI & );
|
||||
::tsDLList < casAsyncIOI > &, casAsyncIOI & );
|
||||
void uninstallIO (
|
||||
tsDLList < casAsyncIOI > &, casAsyncIOI & );
|
||||
::tsDLList < casAsyncIOI > &, casAsyncIOI & );
|
||||
void installChannel ( chanIntfForPV & chan );
|
||||
void removeChannel (
|
||||
chanIntfForPV & chan, tsDLList < casMonitor > & src,
|
||||
tsDLList < casMonitor > & dest );
|
||||
chanIntfForPV & chan, ::tsDLList < casMonitor > & src,
|
||||
::tsDLList < casMonitor > & dest );
|
||||
caStatus installMonitor (
|
||||
casMonitor & mon, tsDLList < casMonitor > & monitorList );
|
||||
casMonitor & mon, ::tsDLList < casMonitor > & monitorList );
|
||||
casMonitor * removeMonitor (
|
||||
tsDLList < casMonitor > & list, ca_uint32_t clientIdIn );
|
||||
::tsDLList < casMonitor > & list, ca_uint32_t clientIdIn );
|
||||
void deleteSignal ();
|
||||
void postEvent ( const casEventMask & select, const gdd & event );
|
||||
caServer * getExtServer () const;
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
private:
|
||||
mutable epicsMutex mutex;
|
||||
tsDLList < chanIntfForPV > chanList;
|
||||
::tsDLList < chanIntfForPV > chanList;
|
||||
gddEnumStringTable enumStrTbl;
|
||||
caServerI * pCAS;
|
||||
casPV * pPV;
|
||||
|
||||
@@ -1401,7 +1401,7 @@ caStatus casStrmClient :: searchAction ( epicsGuard < casClientMutex > & guard )
|
||||
|
||||
if ( pChanName[0] == '\0' ) {
|
||||
caServerI::dumpMsg ( this->pHostName, "?", mp, this->ctx.getData(),
|
||||
"zero length PV name in UDP search request?\n" );
|
||||
"zero length PV name in TCP search request?\n" );
|
||||
return S_cas_success;
|
||||
}
|
||||
|
||||
@@ -1411,7 +1411,7 @@ caStatus casStrmClient :: searchAction ( epicsGuard < casClientMutex > & guard )
|
||||
for ( unsigned i = mp->m_postsize-1; pChanName[i] != '\0'; i-- ) {
|
||||
if ( i <= 1 ) {
|
||||
caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(),
|
||||
"unterminated PV name in UDP search request?\n" );
|
||||
"unterminated PV name in TCP search request?\n" );
|
||||
return S_cas_success;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,12 +151,18 @@ casDGIntfIO::casDGIntfIO ( caServerI & serverIn, clientBufMemoryManager & memMgr
|
||||
epicsSocketDestroy (this->sock);
|
||||
throw S_cas_bindFail;
|
||||
}
|
||||
|
||||
if ( addConfigBeaconAddr ) {
|
||||
addAddrToChannelAccessAddressList (
|
||||
& BCastAddrList, &EPICS_CAS_BEACON_ADDR_LIST, beaconPort, 0 );
|
||||
|
||||
if (addConfigBeaconAddr) {
|
||||
if (envGetConfigParamPtr ( & EPICS_CAS_BEACON_ADDR_LIST ) ) {
|
||||
addAddrToChannelAccessAddressList (
|
||||
& BCastAddrList, & EPICS_CAS_BEACON_ADDR_LIST, beaconPort, 0 );
|
||||
}
|
||||
else {
|
||||
addAddrToChannelAccessAddressList (
|
||||
& BCastAddrList, & EPICS_CA_ADDR_LIST, beaconPort, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
removeDuplicateAddresses ( & this->beaconAddrList, & BCastAddrList, 0 );
|
||||
|
||||
{
|
||||
@@ -417,7 +423,7 @@ void casDGIntfIO::sendBeaconIO ( char & msg, unsigned length,
|
||||
osiSockAddrNode *pAddr = reinterpret_cast<osiSockAddrNode *>(pNode);
|
||||
|
||||
ssize_t status = sendto(this->beaconSock, &msg, length, 0, &pAddr->addr.sa, sizeof(pAddr->addr.ia));
|
||||
if ( status != length ) {
|
||||
if ( status != static_cast<ssize_t>(length) ) {
|
||||
char sockErrBuf[64], buf[64];
|
||||
epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
|
||||
ipAddrToA ( &pAddr->addr.ia, buf, sizeof(buf) );
|
||||
|
||||
Reference in New Issue
Block a user