Commit 213df27a authored by killenb's avatar killenb
Browse files

Tag 1.0.1

First officially working version which was shipped as debian packages.
Includes bug fix that caused indicating Rb Lock as "not locked"  with
respect to tag 1.0.0


git-svn-id: https://svnsrv.desy.de/desy/doocs-gpsdo-server/tags/1.0.1@28 08ab6154-852d-4107-8b81-bae270adde9c
parents 0ce37356 68a7ca2d
......@@ -48,6 +48,7 @@ public:
*/
private:
boost::shared_ptr<TcpCtrl> tcpController;
void trimString(std::string &toTrim); ///< Removes newline characters from the end of the string.
};
#endif /* GPSDODEVICE_H */
......
......@@ -26,7 +26,8 @@ std::string GpsdoDevice::getREV() {
tcpController->sendData("REV\n");
tcpController->receiveSingleLine(revResponse);
revResponse = this->extractValueFromResponse(revResponse);
trimString(revResponse);
return revResponse;
}
std::vector<int> GpsdoDevice::getSAT() {
......@@ -64,7 +65,8 @@ std::vector<bool> GpsdoDevice::getSTS() {
tcpController->receiveMultipleLines(sStsResponse, 2);
for(unsigned int i=0; i<sStsResponse.size(); ++i) {
sStsResponse.at(i) = this->extractValueFromResponse(sStsResponse.at(i));
if (sStsResponse.at(i) == "Locked") bStsResponse.push_back(true);
trimString(sStsResponse.at(i));
if (sStsResponse.at(i) == "Locked") bStsResponse.push_back(true);
else bStsResponse.push_back(false);
}
return bStsResponse;
......@@ -93,3 +95,9 @@ std::string GpsdoDevice::extractValueFromResponse(std::string response, bool uni
}
return extractedValue;
}
void GpsdoDevice::trimString(std::string &toTrim) {
while ((toTrim.back() == '\r') || (toTrim.back() == '\n')) {
toTrim.erase(toTrim.size()-1, 1);
}
}
doocs-gpsdo-server (1.0.1) unstable; urgency=low
* fix of a bug that caused indicating Rb Lock as "not locked" - fixed by trimming newline characters from incoming data
-- Adam Dworzanski <Adam.Dworzanski@desy.de> Mon, 29 Aug 2016 02:05:32 +0200
doocs-gpsdo-server (1.0.0) unstable; urgency=low
* initial debian version.
-- Adam Dworzanski <Adam.Dworzanski@desy.de> Fri, 05 Aug 2016 00:36:31 +0200
Local variables:
mode: debian-changelog
End:
Source: doocs-gpsdo-server
Section: devel
Priority: optional
Maintainer: Adam Dworzanski <Adam.Dworzanski@desy.de>
Standards-Version: 3.1.2
Package: doocs-gpsdo-server
Section: net
Architecture: any
Depends: doocs-dirs | doocs-dirs-min, doocs-watchdog-server (>=4.0.30), ${shlibs:Depends}
Description: DESY FLASH-Controls package, DOOCS gpsdo server.
DOOCS gpsdo server for the DESY FLASH/XFEL project.
<add server specific descriptions>
This is Debian/GNU Linux's version of the DOOCS gpsdo server
Copyright (C) 1994-2005 Adam Dworzanski Adam.Dworzanski@desy.de
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General
Public License as published by the Free Software
Foundation; either version 2 of the License, or (at
your option) any later version.
You should have received a copy of the GNU General Public
License. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
doocs-gpsdo-server_1.0.1-precise1_amd64.deb net optional
#!/bin/sh
# post install script for the Debian GNU/Linux doocs-gpsdo-server package
set -e
case "$1" in
configure)
# continue as normal
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0;
;;
*)
echo "postinst called with unknown argument \`$1'" >&2;
exit 0;
;;
esac
########## make the /export/<nodename> linl ######################
NODENAME=`uname -n`
UNODENAME=`uname -n | sed -e "y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/" `
#
# RPC_LIBNO
#
if [ -f /export/doocs/server/gpsdo_server/RPC_LIBNO ] ; then
RPC_LIBNO=`cat /export/doocs/server/gpsdo_server/RPC_LIBNO`
export RPC_LIBNO
else
echo 2>&1 "File: /export/doocs/server/gpsdo_server/RPC_LIBNO is missing"
exit 1
fi
#
# check of old style conf file and then add SVR.RPC_NUMBER to con
#
if [ -f /export/doocs/server/gpsdo_server/gpsdo.conf ] ; then # old style
mv /export/doocs/server/gpsdo_server/gpsdo.conf /export/doocs/server/gpsdo_server/gpsdo_server.conf
echo "SVR.RPC_NUMBER: $RPC_LIBNO" > /export/doocs/server/gpsdo_server/RPC_NUMBER.conf
ex /export/doocs/server/gpsdo_server/gpsdo_server.conf $<< EX_end > /dev/null
g/SVR.HOST_NAME
:r /export/doocs/server/gpsdo_server/RPC_NUMBER.conf
wq
EX_end
cat /export/doocs/server/gpsdo_server/gpsdo_server.conf | \
sed -e "s/gpsdo.conf/gpsdo_server.conf/g" > \
/export/doocs/server/gpsdo_server/gpsdo_server.conf.new
mv /export/doocs/server/gpsdo_server/gpsdo_server.conf.new /export/doocs/server/gpsdo_server/gpsdo_server.conf
chown doocsadm.doocsadm /export/doocs/server/gpsdo_server/gpsdo_server.conf
rm /export/doocs/server/gpsdo_server/RPC_NUMBER.conf
fi
if [ ! -f /export/doocs/server/gpsdo_server/gpsdo_server.conf ] ; then
if [ -f /export/doocs/server/gpsdo_server/gpsdo_CONF.TEMPLATE ] ; then
cat /export/doocs/server/gpsdo_server/gpsdo_CONF.TEMPLATE | \
sed -e "s/NODENAME/$UNODENAME/g" | sed -e "s/nodename/$NODENAME/g" > \
/export/doocs/server/gpsdo_server/gpsdo_server.conf
chown doocsadm.doocsadm /export/doocs/server/gpsdo_server/gpsdo_server.conf
else
echo "!!! no gpsdo template !!! "
fi
fi
###
### watchdog template
###
if [ -f /export/doocs/server/watchdog_server/WATCHDOG_CONF_ENTRY.TEMPLATE ] ; then
cat /export/doocs/server/watchdog_server/WATCHDOG_CONF_ENTRY.TEMPLATE | \
sed -e "s/NODENAME/$UNODENAME/g" | sed -e "s/nodename/$NODENAME/g" | \
sed -e "s/servername/gpsdo_server/g" | \
sed -e "s/SERVERNAME/GPSDO/g" | \
sed -e "s/SERVERLIBNO/$RPC_LIBNO/g" > \
/export/doocs/server/watchdog_server/WATCHDOG_CONF_ENTRY.gpsdo
fi
###
### ens
###
echo "add server to ens "
echo "RPC_LIBNO = $RPC_LIBNO"
#
# move the running server to old
if [ -f /export/doocs/server/gpsdo_server/gpsdo_server ] ; then
if [ -f /export/doocs/server/gpsdo_server/gpsdo_server.OLD ] ; then
rm /export/doocs/server/gpsdo_server/gpsdo_server.OLD
fi
mv /export/doocs/server/gpsdo_server/gpsdo_server /export/doocs/server/gpsdo_server/gpsdo_server.OLD
fi
#
# install the new server
cp -a /export/doocs/server/gpsdo_server/gpsdo_server.dist \
/export/doocs/server/gpsdo_server/gpsdo_server
#
# check if this server is already in the watchdog
INWD=`grep "/server/gpsdo_server/" /export/doocs/server/watchdog_server/watchdog_server.conf || true`
if [ -z "${INWD}" ] ; then
/export/doocs/server/doocs add gpsdo_server || true
fi
#
# kill the server if there is a valid PID file and
# a AUTORESTART flag in the server dir
if [ -f /export/doocs/server/gpsdo_server/gpsdo_server.PID -a \
-f /export/doocs/server/gpsdo_server/AUTORESTART ] ; then
SPID=`cat /export/doocs/server/gpsdo_server/gpsdo_server.PID`
if [ -d /proc/${SPID} ] ; then
kill ${SPID} || true
else
echo "gpsdo_server: postinstall remove not valid PID file"
rm /export/doocs/server/gpsdo_server/gpsdo_server.PID
fi
fi
#!/bin/sh
# post remove script for the Debian GNU/Linux doocs-gpsdo-server package
if [ "purge" = "$1" -o "remove" = "$1" ] ; then
# check if this server is already in the watchdog
INWD=`grep "/server/gpsdo_server/" /export/doocs/server/watchdog_server/watchdog_server.conf || true`
if [ -n "${INWD}" ] ; then
/export/doocs/server/doocs delete gpsdo_server || true
fi
/export/doocs/server/doocs stop gpsdo_server || true
fi
if [ "purge" = "$1" ] ; then
rm -rf /export/doocs/server/gpsdo_server
fi
#!/usr/bin/make -f
#
# File: debian/rules
#
# Author: Gerhard Schleßelmann <gerhard.schlesselmann@desy.de>
# Copyright 1999-2012 by Gerhard Schleßelmann
#
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself. (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified
#
SERVER_NAME = gpsdo_server
package=doocs-gpsdo-server
# for dpkg-buildpackage
# uploaddir=..
uploaddir=..
build:
$(checkdir)
#$(MAKE) -f Makefile clean
$(MAKE) -f Makefile
touch build
clean: checkroot
rm -f build
-$(MAKE) -f Makefile clean
rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
binary-indep: checkroot
# There are no architecture-independent files to be uploaded
# generated by this package. If there were any they would be
# made here.
binary-arch: binary-gpsdo-server
binary-gpsdo-server: build checkroot
-rm -rf debian/tmp
install -d debian/tmp/DEBIAN \
-d debian/tmp/usr/doc/$(package) \
-d debian/tmp/export/doocs/server/gpsdo_server
install -m 755 debian/postinst debian/tmp/DEBIAN
install -m 755 debian/postrm debian/tmp/DEBIAN
cp debian/copyright debian/tmp/usr/doc/$(package)/.
cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
cd debian/tmp/usr/doc/$(package) && gzip -9v changelog.Debian
cp ~/doocs-wd/$(DOOCSARCH)/obj/server/xfel/$(SERVER_NAME)/gpsdo_server \
debian/tmp/export/doocs/server/gpsdo_server/gpsdo_server.dist
cp gpsdo_CONF.TEMPLATE RPC_LIBNO \
debian/tmp/export/doocs/server/gpsdo_server
dpkg-shlibdeps debian/tmp/export/doocs/server/gpsdo_server/gpsdo_server.dist
dpkg-gencontrol -pdoocs-gpsdo-server
chown -R root.root debian/tmp
chown -R doocsadm.doocsadm debian/tmp/export/doocs
chown -R doocsadm.doocsadm \
debian/tmp/export/doocs/server/gpsdo_server
chmod 0775 debian/tmp/export/doocs/server/gpsdo_server
chmod 0755 debian/tmp/export/doocs/server/gpsdo_server/gpsdo_server.dist
-mkdir -p $(uploaddir)
dpkg --build debian/tmp $(uploaddir)
binary: binary-indep binary-arch
define checkdir
test -f gpsdo_rpc_server.cc -a -f debian/rules
endef
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean
shlibs:Depends=doocs-clientlib-18-10-9-precise1 (= 18.10.9-precise1), doocs-serverlib-18-10-9-precise1 (= 18.10.9-precise1), libboost-system1.46.1 (>= 1.46.1-1), libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libldap-2.4-2 (>= 2.4.7), libstdc++6 (>= 4.6)
# Conf file created at 21:58.49 26. Apr. 2016
# eq_fct_type's are defined in eq_fct_code.h
eq_conf:
oper_uid: -1
oper_gid: 405
xpert_uid: 0
xpert_gid: 0
ring_buffer: 50000
memory_buffer: 500
eq_fct_name: "NODENAME._SVR"
eq_fct_type: 1
{
SVR.NAME: "NODENAME._SVR"
STS: 0x8
STS.ERROR: 0
STS.NEWERROR: 0
STS.ERRORMASK: 0
STS.ONLINE: 1
ERROR.STR: 0 0 0 1079536720 "ok"
SYS_MASK: 0
FCT_CODE: 1
FCT_PANEL: ""
X_POS: 0
Z_POS: 0
Z_POS.STRING: ""
DEVICE.INFO: 0 0 0 0 "Device OK"
MESSAGE: ""
LAST_UPDATE: 1091026544 233 0 0
LAST_USR1: 0 0 0 0
SVR.ALIAS: 0
SVR.ARCFLUSH: 0
SVR.ARCFLUSH_B: 0
SVR.UPDATE: 1461700726
SVR.RATE: 4 0 0 0
SVR.RESIZE: 200
SVR.FILE: "gpsdo_server.conf"
SVR.DESC: ""
SVR.PROGRAMMER: "adworz"
SVR.XMLFILE: ""
SVR.ERRORLOG: "error.log"
SVR.STORE.RATE: 10
SVR.STORE.AUTO: 5
SVR.HOST_NAME: "nodename"
SVR.PROCESSNAME: "gpsdo_server"
SVR.RPC_NUMBER: 610499879
SVR.STARTTIME: 1461662931
SVR.LIBINFO: "18.10.5-trusty1"
SVR.LIBDATE: "Feb 11 10:18"
SVR.WDADDR: ""
SVR.CONTR: 0x0
SVR.MUST_RUN: 0
SVR.STOP_SVR: 0
SVR.START_CMD: ""
SVR.RPC_CALL_TIME.COMMENT: "RPC-Call-Time"
SVR.RPC_CALL_TIME.EGU: 1 1 100000 0 "Counts"
SVR.RPC_CALL_TIME.XEGU: 0 0 20 0 "ms"
SVR.UPDATE_TIME.COMMENT: "update time"
SVR.UPDATE_TIME.EGU: 1 1 1e+06 0 "counts"
SVR.UPDATE_TIME.XEGU: 0 0 100 0 "ms"
SVR.USR1_TIME.COMMENT: "run time of SIGUSR1"
SVR.USR1_TIME.EGU: 1 1 1e+06 1440155922 "counts"
SVR.USR1_TIME.XEGU: 0 0 100 1440155922 "ms"
SVR.USR1_PERIOD.COMMENT: "time between SIGUSR1"
SVR.USR1_PERIOD.EGU: 1 1 1e+06 1440155922 "counts"
SVR.USR1_PERIOD.XEGU: 0 0 500 1440155922 "ms"
SVR.ARCH_GET_TIME.COMMENT: "time per archiver get"
SVR.ARCH_GET_TIME.EGU: 1 1 1e+06 1461632791 "counts"
SVR.ARCH_GET_TIME.XEGU: 0 0 100 1461632791 "ms"
SVR.LAFL: 104857600
SVR.ERROR_COUNT: 1
DEVICE.ONLINE: 0
DEVICE.OFFLINE: 1
SVR.DEVMAX: 0
SVR.TINERUN: 0
SVR.TINEVERS: "4.05.0008"
SVR.TINEPREF: ""
SVR.TINESUFF: ""
SVR.TINE_DBG: 0
SVR.TINE_LOG: 0
SVR.TINE_FEC: 0 0 0 0 ""
SVR.TINE_PORT: 0
SVR.TINE_MTU: 1472
SVR.TINE_CTSZ: 32
SVR.TINE_MCTTL: 16
SVR.TINE_BLIM: 1000
SVR.TINE_CDLY: 20
SVR.TINE_GROUP: 0
SVR.FACILITY: ""
SVR.DEVICE: ""
T_ZERO: 700
SVR.BPN: 0
SVR.SPR: 0
}
eq_fct_name: "GPSDO"
eq_fct_type: 500
{
NAME: "GPSDO"
STS: 0x6
STS.ERROR: 1
STS.NEWERROR: 1
STS.ERRORMASK: 0
STS.ONLINE: 0
ERROR.STR: 28 1 981 1461632795 ""
SYS_MASK: 0
FCT_CODE: 500
FCT_PANEL: ""
X_POS: 0
Z_POS: 0
Z_POS.STRING: ""
DEVICE.INFO: 0 0 0 0 "None"
MESSAGE: ""
LAST_UPDATE: 0 0 0 0
LAST_USR1: 0 0 0 0
ENET.IP_ADDR: "192.168.115.114"
ENET.PORT: 23
USER: "admin"
PASS: "gps10er"
REV: "R3.52 "
SAT.VIEW: 0
SAT.USED: 0
GPS.LOCK: 0
RB.LOCK: 0
GPSDO.ERR: 1
GPSDO.CONNECTED: 0
VIN: 11.81999969
VIN.LIM: 11.4 12.6
VIN.HIGH: 0
VIN.LOW: 0
VIN.FILT: 10 0.001 0.002 60
VIN.EGU: 0 0 0 0 "V"
VIN.DESC: "VIN"
VIN._FILT: 0 0.05 0 0
V3_3: 3.200000048
V3_3.LIM: 3 3.6
V3_3.HIGH: 0
V3_3.LOW: 0
V3_3.FILT: 10 0.001 0.002 60
V3_3.EGU: 0 0 0 0 "V"
V3_3.DESC: "V3.3"
V3_3._FILT: 0 0.05 0 0
V5: 4.949999809
V5.LIM: 4.4 5.6
V5.HIGH: 0
V5.LOW: 0
V5.FILT: 10 0.001 0.002 60
V5.EGU: 0 0 0 0 "V"
V5.DESC: "V5"
V5._FILT: 0 0.05 0 0
VN12: -11.93999958
VN12.LIM: -12.2 -11.8
VN12.HIGH: 0
VN12.LOW: 0
VN12.FILT: 10 0.001 0.002 60
VN12.EGU: 0 0 0 0 "V"
VN12.DESC: "V-12"
VN12._FILT: 0 0.05 0 0
TEMP: 28
TEMP.LIM: 29.4 30.6
TEMP.HIGH: 0
TEMP.LOW: 1
TEMP.FILT: 10 0.001 0.002 60
TEMP.EGU: 0 0 0 0 "oC"
TEMP.DESC: "TEMP"
TEMP._FILT: 0 0.05 0 0
PROC.NAME: "gpsdo_server"
PROC.PATH: "/export/doocs/server/gpsdo_server/"
LOG.TAIL: ""
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment