21 Commits

Author SHA1 Message Date
Ralph Lange
6ba32b5c3b Prepare release 4.13.3; SONAME = 4.13.0 (unchanged) 2021-12-09 18:22:13 +01:00
Ralph Lange
c119ed57ad doc: add badges and links to README 2021-12-08 19:44:27 +01:00
Ralph Lange
442bf81809 ci: use flat Base clone (w/o submodules) 2021-12-08 19:23:55 +01:00
Ralph Lange
7f7d249e0e ci: add configuration for GitHub Actions
Based on the example-full from ci-scripts
 - no RTEMS
 - limited set of old-gcc builds
2021-12-08 19:22:29 +01:00
Ralph Lange
a4bdcfcd19 ci: remove Travis-CI configuration 2021-12-08 19:22:29 +01:00
Ralph Lange
2cf356f3f9 ci: update .ci submodule to v3.3.0 2021-12-08 18:10:50 +01:00
Ralph Lange
3252364e9f Fix gdd string to double conversion
This is an alternative fix for the issue described in
https://github.com/epics-modules/pcas/issues/4 and
https://github.com/epics-extensions/ca-gateway/issues/37
that keeps the call to epicsScanDouble() before trying
sscanf() first with "%lf" (ignoring extra characters)
then with "%x" (to catch hex numbers).
(same commit as "upstream" commit 7c168f20 in base 3.15; fixes #4)
2021-12-08 17:10:19 +01:00
Ralph Lange
56403e8e47 Fix scope of tsDLList when used in other classes
Use ::tsDLList to avoid resolving to privately inherited name
(which was breaking builds on newer clang compilers)
(cherry-picked from EPICS Base 3.15)
2020-12-07 11:36:01 +01:00
Ralph Lange
6198ad4529 ci: update .ci submodule; adapt .travis.yml 2019-10-05 12:02:34 -04:00
Ralph Lange
ee9df66168 ci: update .ci submodule 2019-10-03 15:58:02 -04:00
Ralph Lange
49c4882f73 travis-ci: add OSX build 2019-05-27 13:45:50 +02:00
Ralph Lange
1f84f411e9 travis-ci: clean up, add gcc-6 and gcc-7 2019-05-27 10:32:06 +02:00
Ralph Lange
908ea87e2d Add travis-ci configuration 2018-12-14 14:50:53 +01:00
Ralph Lange
7e3e7b5327 pcas: fix misleading error message (TCP name resolution) 2018-11-30 17:17:00 +01:00
Ralph Lange
b8df787acc Merge pull request #2 from xiaoqiangwang/master
include RELEASE.$(EPICS_HOST_ARCH).local
2018-10-29 13:04:52 +01:00
Xiaoqiang Wang
ac5ff32255 include RELEASE.$(EPICS_HOST_ARCH).local
Just like other modules bundled in epics base. Because this file
is automatcally created, it eases the conventional build of PCAS
as part of epics base.
2018-10-29 12:31:52 +01:00
Ralph Lange
23e8b20be7 example: fix library order for static builds 2018-10-17 13:57:22 +02:00
Ralph Lange
1cae25fd8d Step version to 4.13.3-DEV for development 2018-09-14 13:18:26 +02:00
Ralph Lange
297fa347a9 Prepare release 4.13.2; SONAME = 4.13.0 (unchanged) 2018-09-14 11:56:43 +02:00
Ralph Lange
0556439fa7 Fix spinning on zero length search request (lp:1743321; from 3.14) 2018-09-14 11:52:23 +02:00
Ralph Lange
3bf4e95de8 Step version to 4.13.2-DEV for development 2018-09-11 09:53:37 +02:00
13 changed files with 206 additions and 31 deletions

1
.ci Submodule

Submodule .ci added at 5764601630

149
.github/workflows/ci-scripts-build.yml vendored Normal file
View File

@@ -0,0 +1,149 @@
# .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:
build-pcas:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
# Set environment variables from matrix parameters
env:
CMP: ${{ matrix.cmp }}
BCFG: ${{ matrix.configuration }}
WINE: ${{ matrix.wine }}
EXTRA: ${{ matrix.extra }}
TEST: ${{ matrix.test }}
strategy:
fail-fast: false
matrix:
# Job names also name artifacts, character limitations apply
include:
- os: ubuntu-20.04
cmp: gcc
configuration: default
wine: "64"
name: "Ub-20 gcc-9 + MinGW"
- os: ubuntu-20.04
cmp: gcc
configuration: static
wine: "64"
name: "Ub-20 gcc-9 + MinGW, static"
- os: ubuntu-20.04
cmp: gcc
configuration: static
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 gcc-9 C++11, static"
- os: ubuntu-20.04
cmp: clang
configuration: default
name: "Ub-20 clang-10"
- os: ubuntu-20.04
cmp: clang
configuration: default
extra: "CMD_CXXFLAGS=-std=c++11"
name: "Ub-20 clang-10 C++11"
- os: ubuntu-18.04
cmp: gcc
configuration: default
name: "Ub-18 gcc-7"
- os: ubuntu-18.04
cmp: gcc-8
utoolchain: true
utoolchain-install: "gcc-8 g++-8"
configuration: default
name: "Ub-18 gcc-8"
- os: ubuntu-20.04
cmp: gcc-8
utoolchain: true
utoolchain-install: "gcc-8 g++-8"
configuration: default
name: "Ub-20 gcc-8"
- os: macos-latest
cmp: clang
configuration: default
name: "MacOS clang-12"
- os: windows-2019
cmp: gcc
configuration: default
name: "Win2019 MinGW"
- os: windows-2019
cmp: vs2019
configuration: default
name: "Win2019 MSC-19"
- os: windows-2019
cmp: vs2019
configuration: static
name: "Win2019 MSC-19, static"
- os: windows-2019
cmp: vs2019
configuration: debug
name: "Win2019 MSC-19, debug"
steps:
- uses: actions/checkout@v2
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: "apt-get install ${{ matrix.cmp }}"
run: |
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install ${{ matrix.utoolchain-install }}
if: matrix.utoolchain
- 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 20M test
- name: Upload tapfiles Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
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

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule ".ci"]
path = .ci
url = https://github.com/epics-base/ci-scripts.git

View File

@@ -1,3 +1,6 @@
<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
[EPICS](https://epics-controls.org/) Portable Channel Access Server
@@ -21,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](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

View File

@@ -1,6 +1,6 @@
EPICS_PCAS_MAJOR_VERSION = 4
EPICS_PCAS_MINOR_VERSION = 13
EPICS_PCAS_MAINTENANCE_VERSION = 1
EPICS_PCAS_MAINTENANCE_VERSION = 3
EPICS_PCAS_DEVELOPMENT_FLAG = 0
EXPANDVARS += EPICS_PCAS_MAJOR_VERSION

View File

@@ -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

View File

@@ -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;
}
}
}
}

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -292,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 );
@@ -308,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;
@@ -365,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 );
@@ -380,7 +380,7 @@ void casPVI::removeChannel (
}
}
void casPVI::clearOutstandingReads ( tsDLList < casAsyncIOI > & ioList )
void casPVI::clearOutstandingReads ( ::tsDLList < casAsyncIOI > & ioList )
{
epicsGuard < epicsMutex > guard ( this->mutex );
@@ -400,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() ) {
@@ -412,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 );
@@ -421,7 +421,7 @@ void casPVI::installIO (
}
void casPVI::uninstallIO (
tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
::tsDLList < casAsyncIOI > & ioList, casAsyncIOI & io )
{
{
epicsGuard < epicsMutex > guard ( this->mutex );

View File

@@ -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;

View File

@@ -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;
}
}