Initial commit on github.

This commit is contained in:
Roland Jax
2013-11-14 21:15:14 +01:00
parent 36fc9f23c2
commit 916ec20456
37 changed files with 8561 additions and 2 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: ebusd
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start EBUS daemon
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
DAEMON=/root/ebusd/src/ebusd
PIDFILE=/var/run/ebusd.pid
test -x $DAEMON || exit 5
case $1 in
start)
log_daemon_msg "Starting EBUS server" "ebusd"
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -P $PIDFILE
status=$?
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping EBUS server" "ebusd"
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
log_end_msg $?
rm -f $PIDFILE
;;
restart|force-reload)
$0 stop && sleep 2 && $0 start
;;
status)
status_of_proc $DAEMON "EBUS server"
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
;;
esac
+3
View File
@@ -0,0 +1,3 @@
# type;class;cmd;comment;msg type: 1=BROAD, 2=MM, 3=MS;ZZ;PBSB;NN;D1D2D3;elements;sub;part;position;datatype;factor;unit;valid;comment;sub;part;position;datatype;factor;unit;valid;comment;sub;part;position;datatype;factor;unit;valid;comment;sub;part;position;datatype;factor;unit;valid;comment
cyc;broad;date_time_temp;Datum, Uhrzeit und Aussentempertur;1;FE;0700;9;-;4;temp;md;1,2;d2b;1.0;°C;-;Temperatur;day;md;8;bdy;-;-;-;Wochentag;date;md;6,7,9;bda;-;-;-;Datum;time;md;5,4,3;bti;-;-;-;Uhrzeit
1 # type class cmd comment msg type: 1=BROAD, 2=MM, 3=MS ZZ PBSB NN D1D2D3 elements sub part position datatype factor unit valid comment sub part position datatype factor unit valid comment sub part position datatype factor unit valid comment sub part position datatype factor unit valid comment
2 cyc broad date_time_temp Datum, Uhrzeit und Aussentempertur 1 FE 0700 9 - 4 temp md 1,2 d2b 1.0 °C - Temperatur day md 8 bdy - - - Wochentag date md 6,7,9 bda - - - Datum time md 5,4,3 bti - - - Uhrzeit
+58
View File
@@ -0,0 +1,58 @@
# configuration file for ebusd
# bus address (FF)
#address=FF
# configuration directory of command files (/etc/ebusd)
#cfgdir=/etc/ebusd
# serial device (/dev/ttyUSB0)
#device=/dev/ttyUSB0
# extension of command files (csv)
#extension=csv
# run in foreground (NO | YES/NO)
#foreground=YES
# log level (INF | INF, NOT, WAR, ERR, DBG, EBH, EBS, NET, ALL)
#loglevel=ALL
# log file (/var/log/ebusd.log)
#logfile=/var/log/ebusd.log
# pid file (/var/run/ebusd.pid)
#pidfile=/var/run/ebusd.pid
# port (8888)
#port=8888
# dump raw ebus data to file (NO | YES/NO)
#rawdump=YES
# raw file (/tmp/ebusd.bin)
#rawfile=/tmp/ebusd.bin
# print raw data (NO | YES/NO)
#showraw=YES
# print daemon settings (NO | YES/NO)
#settings=YES
# allow only connection from localhost
#localhost=YES
# retry getting bus (3 | max: 10)
#get_retry=3
# skipped ACK bytes after get-bus error (1)
#skip_ack=1
# wait time for QQ compare (4000 uesc)
#max_wait=4000
# retry sending msg (2 | max: 10)
#send_retry=2
# number of printed hex bytes (30)
#print_size=30
+10
View File
@@ -0,0 +1,10 @@
# ebusd.log
/var/log/ebusd.log {
rotate 5
size=100k
sharedscripts
postrotate
[ -f /var/run/ebusd.pid ] && /bin/kill -INT `cat /var/run/ebusd.pid`
endscript
}
+6
View File
@@ -0,0 +1,6 @@
# /etc/conf.d/ebusd: config file for /etc/init.d/ebusd
# Options to pass to the ebusd daemon.
# See the ebusd -h for more info.
EBUSD_ARGS=""
+21
View File
@@ -0,0 +1,21 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#extra_started_commands="reload"
command="/usr/sbin/ebusd"
command_args="${EBUSD_ARGS}"
start_stop_daemon_args="--quiet"
description="Daemon for ebus Communication"
depend() {
need localmount
use logger
}
#reload() {
# ebegin "Reloading ebusd configuration"
# start-stop-daemon --exec $command --signal HUP
# eend $?
#}