|
From: <ma...@us...> - 2013-01-12 17:12:35
|
Revision: 1321
http://openautomation.svn.sourceforge.net/openautomation/?rev=1321&view=rev
Author: makki1
Date: 2013-01-12 17:12:21 +0000 (Sat, 12 Jan 2013)
Log Message:
-----------
Initial commit of non-upstream eibd-clients and customized debian-packaging for bcusdk/eibd - this is just to track changes on these files
Modified Paths:
--------------
tools/ets4tools/ets4parser.pl
Added Paths:
-----------
tools/bcusdk/
tools/bcusdk/README
tools/bcusdk/debian/
tools/bcusdk/debian/Makefile.am
tools/bcusdk/debian/Makefile.in
tools/bcusdk/debian/bcusdk-build.dirs
tools/bcusdk/debian/bcusdk-build.install
tools/bcusdk/debian/changelog
tools/bcusdk/debian/compat
tools/bcusdk/debian/control
tools/bcusdk/debian/copyright
tools/bcusdk/debian/eibd-client-sources.dirs
tools/bcusdk/debian/eibd-client-sources.install
tools/bcusdk/debian/eibd-clients.dirs
tools/bcusdk/debian/eibd-clients.install
tools/bcusdk/debian/eibd-server.dirs
tools/bcusdk/debian/eibd-server.install
tools/bcusdk/debian/eibd-server.postinst
tools/bcusdk/debian/libeibclient-dev.dirs
tools/bcusdk/debian/libeibclient-dev.install
tools/bcusdk/debian/libeibclient0.dirs
tools/bcusdk/debian/libeibclient0.install
tools/bcusdk/debian/rules
tools/bcusdk/eibd/
tools/bcusdk/eibd/examples/
tools/bcusdk/eibd/examples/README
tools/bcusdk/eibd/examples/eibread-cgi.c
tools/bcusdk/eibd/examples/eibwrite-cgi.c
Added: tools/bcusdk/README
===================================================================
--- tools/bcusdk/README (rev 0)
+++ tools/bcusdk/README 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+Directory to track changes of bcusdk/eibd which aren't upstream
Added: tools/bcusdk/debian/Makefile.am
===================================================================
--- tools/bcusdk/debian/Makefile.am (rev 0)
+++ tools/bcusdk/debian/Makefile.am 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,5 @@
+EXTRA_DIST= bcusdk-build.dirs compat eibd-clients.dirs eibd-client-sources.install libeibclient-dev.dirs \
+ bcusdk-build.install control eibd-clients.install eibd-server.dirs libeibclient-dev.install \
+ changelog copyright eibd-client-sources.dirs eibd-server.install rules libeibclient0.dirs \
+ libeibclient0.install
+
Added: tools/bcusdk/debian/Makefile.in
===================================================================
--- tools/bcusdk/debian/Makefile.in (rev 0)
+++ tools/bcusdk/debian/Makefile.in 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,359 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = debian
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ccbuild.m4 \
+ $(top_srcdir)/m4/ccforbuild.m4 \
+ $(top_srcdir)/m4/compileroption.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+CPP_FOR_BUILD = @CPP_FOR_BUILD@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+INDENT = @INDENT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JAR = @JAR@
+JAVAC = @JAVAC@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTH_CFLAGS = @PTH_CFLAGS@
+PTH_CPPFLAGS = @PTH_CPPFLAGS@
+PTH_LDFLAGS = @PTH_LDFLAGS@
+PTH_LIBS = @PTH_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+TAS = @TAS@
+TGCC = @TGCC@
+TLD = @TLD@
+TRANLIB = @TRANLIB@
+VERSION = @VERSION@
+XML2_CONFIG = @XML2_CONFIG@
+XML_CPPFLAGS = @XML_CPPFLAGS@
+XML_LIBS = @XML_LIBS@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = bcusdk-build.dirs compat eibd-clients.dirs eibd-client-sources.install libeibclient-dev.dirs \
+ bcusdk-build.install control eibd-clients.install eibd-server.dirs libeibclient-dev.install \
+ changelog copyright eibd-client-sources.dirs eibd-server.install rules libeibclient0.dirs \
+ libeibclient0.install
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign debian/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign debian/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ distclean distclean-generic distclean-libtool distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: tools/bcusdk/debian/bcusdk-build.dirs
===================================================================
--- tools/bcusdk/debian/bcusdk-build.dirs (rev 0)
+++ tools/bcusdk/debian/bcusdk-build.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,7 @@
+usr/bin
+usr/lib/bcusdk/lib
+usr/share/bcusdk/include
+usr/share/bcusdk/examples
+usr/share/bcusdk/ldscripts
+usr/share/bcusdk/xml
+
Added: tools/bcusdk/debian/bcusdk-build.install
===================================================================
--- tools/bcusdk/debian/bcusdk-build.install (rev 0)
+++ tools/bcusdk/debian/bcusdk-build.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,17 @@
+usr/share/bcusdk/include
+usr/share/bcusdk/ldscripts
+usr/share/bcusdk/xml
+usr/lib/bcusdk/lib
+usr/bin/build.ai
+usr/bin/build.img
+usr/bin/build.dev
+usr/bin/bcugen1
+usr/bin/bcugen2
+usr/bin/bcugen3
+usr/bin/embedprogid
+usr/bin/extractprogid
+usr/bin/gencitemplate
+usr/bin/viewimage
+usr/bin/loadimage
+usr/bin/imageedit
+usr/share/bcusdk/examples/*.xml
Added: tools/bcusdk/debian/changelog
===================================================================
--- tools/bcusdk/debian/changelog (rev 0)
+++ tools/bcusdk/debian/changelog 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,88 @@
+bcusdk (0.0.4+nmu18) unstable; urgency=low
+
+ * add delay in backend/usbif
+ * eibd on wg
+
+ -- Michael Markstaller <markstaller@elab18> Fri, 14 Oct 2011 18:40:16 +0200
+
+bcusdk (0.0.4+nmu17) unstable; urgency=low
+
+ * fix 16bit GA's in eibread-cgi
+
+ -- Michael Markstaller <markstaller@elab18> Sun, 27 Feb 2011 23:47:24 +0100
+
+bcusdk (0.0.4+nmu16) unstable; urgency=low
+
+ * current pu from git
+
+ -- Michael Markstaller <markstaller@elab18> Thu, 10 Feb 2011 12:52:43 +0100
+
+bcusdk (0.0.4+nmu15) unstable; urgency=low
+
+ * current pu from git (various small changes since Mar)
+
+ -- Michael Markstaller <markstaller@elab18> Tue, 28 Dec 2010 20:29:18 +0100
+
+bcusdk (0.0.4+nmu14) unstable; urgency=low
+
+ * eibread/write cgidie with json
+ * write with dpt0=raw
+
+ -- Michael Markstaller <markstaller@elab18> Thu, 26 Aug 2010 19:26:15 +0200
+
+bcusdk (0.0.4+nmu13) unstable; urgency=low
+
+ * changed eibread/write to new api
+
+ -- Michael Markstaller <markstaller@elab18> Wed, 04 Aug 2010 18:44:52 +0200
+
+bcusdk (0.0.4+nmu12) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * current pu - patch usb memleak
+
+ -- Michael Markstaller <markstaller@elab18> Tue, 16 Mar 2010 13:29:07 +0100
+
+bcusdk (0.0.4+nmu11) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Current git version with path for dups
+
+ -- Michael Markstaller <de...@wi...> Thu, 11 Mar 2010 15:36:45 +0100
+
+bcusdk (0.0.4) unstable; urgency=low
+
+ * Next release
+
+ -- Martin Koegler <mko...@au...> Wed, 17 Dec 2008 08:26:01 +0100
+
+bcusdk (0.0.3) unstable; urgency=low
+
+ * Next release
+
+ -- Martin Koegler <mko...@au...> Sat, 3 Nov 2007 21:35:12 +0100
+
+bcusdk (0.0.2.1) unstable; urgency=low
+
+ * Sync Version
+
+ -- Martin Koegler <mko...@au...> Mon, 4 Dec 2006 22:23:47 +0100
+
+bcusdk (0.0.2) unstable; urgency=low
+
+ * New version.
+
+ -- Martin Koegler <mko...@au...> Thu, 31 Oct 2006 12:00:00 +0100
+
+bcusdk (0.0.1) unstable; urgency=low
+
+ * New version.
+
+ -- Martin Koegler <mko...@au...> Sat, 10 Dec 2005 18:44:25 +0100
+
+bcusdk (0.0.0-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Martin Koegler <mko...@au...> Tue, 10 May 2005 18:42:21 +0200
+
Property changes on: tools/bcusdk/debian/changelog
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/debian/compat
===================================================================
--- tools/bcusdk/debian/compat (rev 0)
+++ tools/bcusdk/debian/compat 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+7
Added: tools/bcusdk/debian/control
===================================================================
--- tools/bcusdk/debian/control (rev 0)
+++ tools/bcusdk/debian/control 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,61 @@
+Source: bcusdk
+Section: devel
+Priority: extra
+Maintainer: Martin Koegler <mko...@au...>
+Build-Depends: debhelper (>= 7), cdbs, bzip2, bison, flex, libxml2-dev (>= 2.6.16), libpthsem-dev (>=2.0.8), indent
+Standards-Version: 3.8.3
+Homepage: http://www.auto.tuwien.ac.at/~mkoegler/index.php/bcusdk
+Vcs-Git: http://www.auto.tuwien.ac.at/~mkoegler/git/bcusdk.git
+
+Package: eibd-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: eibd-clients
+Description: eibd server
+ eibd is a daemon which supports connection to an EIB (KNX) network over various
+ interfaces. It provides its services over TCP/IP or Unix domain sockets.
+ It can also act as an EIBnet/IP server.
+ Note: Some backends may crash Linux 2.6 kernels before 2.6.11.
+
+Package: eibd-clients
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: eibd-server
+Description: eibd clients
+ Simple example programs to perform management tasks on a EIB system.
+
+Package: libeibclient0
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: eibd client library
+ A client library written in C to access the EIB bus over eibd.
+
+Package: libeibclient-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}, libeibclient0 (= ${binary:Version})
+Suggests: eibd-server
+Description: eibd client library
+ A client library written in C to access the EIB bus over eibd.
+
+Package: eibd-client-sources
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: libeibclient-dev
+Description: Sources of the eibd client programs
+ Provides the source of the eibd client programs as examples how to use
+ the eibd client library.
+
+
+Package: bcusdk
+Architecture: all
+Depends: ${misc:Depends}, eibd-server, eibd-clients, eibd-client-sources, libeibclient-dev, bcusdk-build
+Description: BCU SDK
+ Installs the complete BCU SDK (metapackage)
+
+Package: eibd-dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: eibd binaries with debug-symbols
+ Binaries with debug-symbols
+
Property changes on: tools/bcusdk/debian/control
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/debian/copyright
===================================================================
--- tools/bcusdk/debian/copyright (rev 0)
+++ tools/bcusdk/debian/copyright 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,49 @@
+This is a debian pakcage of a free BCU SDK for EIB.
+ This package is available at:
+
+ http://www.auto.tuwien.ac.at/~mkoegler/index.php/bcus
+
+Copyright: GNU General Public License
+Copyright (C) 2005-2010 Martin Koegler <mko...@au...>
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+The eibd client library as well as the header and include files
+for the BCU operation system have the following exception:
+
+ In addition to the permissions in the GNU General Public License,
+ you may link the compiled version of this file into combinations
+ with other programs, and distribute those combinations without any
+ restriction coming from the use of this file. (The General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked into
+ a combine executable.)
+
+XML Schema files as well as DTD have the requirement:
+
+ Modified version of this specification must change the namespace.
+
+This means, that derived version must use a different the the
+namespace as the original version. It does not limit, that
+different derived versions may use the same (not original)
+namespace/version.
+
+The USB backend uses a heavily, modified version of libusb. It is
+under the GNU Lesser General Public License. On Debian GNU/Linux
+systems, the complete text can be found in
+`/usr/share/common-licenses/LGPL-2.1'.
+
+The official web site of libusb is:
+ http://libusb.sourceforge.net/
+
+--------------------------------------------------------------------
+In order to justify continuing development, it is helpful to have
+an idea of how many people are using this software. To contribute,
+please send a short mail to bc...@au... whether you
+find this software useful.
+
+Please note, that this is not requirement to use/modify/distribute the
+software.
+
+Martin Koegler <mko...@au...>
Added: tools/bcusdk/debian/eibd-client-sources.dirs
===================================================================
--- tools/bcusdk/debian/eibd-client-sources.dirs (rev 0)
+++ tools/bcusdk/debian/eibd-client-sources.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+usr/share/bcusdk/examples
Added: tools/bcusdk/debian/eibd-client-sources.install
===================================================================
--- tools/bcusdk/debian/eibd-client-sources.install (rev 0)
+++ tools/bcusdk/debian/eibd-client-sources.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,3 @@
+usr/share/bcusdk/examples/*.c
+usr/share/bcusdk/examples/*.h
+
Added: tools/bcusdk/debian/eibd-clients.dirs
===================================================================
--- tools/bcusdk/debian/eibd-clients.dirs (rev 0)
+++ tools/bcusdk/debian/eibd-clients.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+usr/bin
Added: tools/bcusdk/debian/eibd-clients.install
===================================================================
--- tools/bcusdk/debian/eibd-clients.install (rev 0)
+++ tools/bcusdk/debian/eibd-clients.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,52 @@
+usr/bin/busmonitor1
+usr/bin/busmonitor2
+usr/bin/vbusmonitor1
+usr/bin/vbusmonitor1poll
+usr/bin/vbusmonitor2
+usr/bin/groupread
+usr/bin/groupswrite
+usr/bin/groupwrite
+usr/bin/groupsresponse
+usr/bin/groupresponse
+usr/bin/grouplisten
+usr/bin/madcread
+usr/bin/maskver
+usr/bin/mmaskver
+usr/bin/mread
+usr/bin/mwrite
+usr/bin/mprogmodeon
+usr/bin/mprogmodeoff
+usr/bin/mprogmodestatus
+usr/bin/mprogmodetoggle
+usr/bin/progmodeon
+usr/bin/progmodeoff
+usr/bin/progmodestatus
+usr/bin/progmodetoggle
+usr/bin/mpropdesc
+usr/bin/mpropread
+usr/bin/mpropwrite
+usr/bin/mpropscan
+usr/bin/mpropscanpoll
+usr/bin/readindividual
+usr/bin/writeaddress
+usr/bin/mpeitype
+usr/bin/msetkey
+usr/bin/groupsocketlisten
+usr/bin/groupsocketread
+usr/bin/groupsocketwrite
+usr/bin/groupsocketswrite
+usr/bin/groupreadresponse
+usr/bin/groupcacheenable
+usr/bin/groupcachedisable
+usr/bin/groupcacheclear
+usr/bin/groupcacheremove
+usr/bin/groupcachereadsync
+usr/bin/groupcacheread
+usr/bin/groupcachelastupdates
+usr/bin/mrestart
+usr/bin/mwriteplain
+usr/bin/knxtool
+usr/bin/xpropread
+usr/bin/xpropwrite
+usr/bin/eibread-cgi
+usr/bin/eibwrite-cgi
Property changes on: tools/bcusdk/debian/eibd-clients.install
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/debian/eibd-server.dirs
===================================================================
--- tools/bcusdk/debian/eibd-server.dirs (rev 0)
+++ tools/bcusdk/debian/eibd-server.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+usr/bin
Added: tools/bcusdk/debian/eibd-server.install
===================================================================
--- tools/bcusdk/debian/eibd-server.install (rev 0)
+++ tools/bcusdk/debian/eibd-server.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,6 @@
+usr/bin/eibd
+usr/bin/bcuaddrtab
+usr/bin/bcuread
+usr/bin/eibnetdescribe
+usr/bin/eibnetsearch
+usr/bin/findknxusb
Added: tools/bcusdk/debian/eibd-server.postinst
===================================================================
--- tools/bcusdk/debian/eibd-server.postinst (rev 0)
+++ tools/bcusdk/debian/eibd-server.postinst 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,6 @@
+#! /bin/sh
+# postinst script for eibd-server
+
+if [ -e /etc/init.d/eibd ]; then
+ /etc/init.d/eibd restart
+fi
Property changes on: tools/bcusdk/debian/eibd-server.postinst
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/debian/libeibclient-dev.dirs
===================================================================
--- tools/bcusdk/debian/libeibclient-dev.dirs (rev 0)
+++ tools/bcusdk/debian/libeibclient-dev.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,4 @@
+usr/include
+usr/lib
+usr/share/bcusdk
+usr/share/java
Added: tools/bcusdk/debian/libeibclient-dev.install
===================================================================
--- tools/bcusdk/debian/libeibclient-dev.install (rev 0)
+++ tools/bcusdk/debian/libeibclient-dev.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,9 @@
+usr/include
+usr/lib/libeibclient.la
+usr/lib/libeibclient.a
+usr/lib/libeibclient.so
+usr/share/bcusdk/eibclient.php
+usr/share/bcusdk/EIBConnection.cs
+usr/share/bcusdk/EIBConnection.pm
+usr/share/bcusdk/EIBConnection.py
+usr/share/bcusdk/EIBD.pas
Property changes on: tools/bcusdk/debian/libeibclient-dev.install
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/debian/libeibclient0.dirs
===================================================================
--- tools/bcusdk/debian/libeibclient0.dirs (rev 0)
+++ tools/bcusdk/debian/libeibclient0.dirs 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+usr/lib
Added: tools/bcusdk/debian/libeibclient0.install
===================================================================
--- tools/bcusdk/debian/libeibclient0.install (rev 0)
+++ tools/bcusdk/debian/libeibclient0.install 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1 @@
+usr/lib/libeibclient.so.*
Added: tools/bcusdk/debian/rules
===================================================================
--- tools/bcusdk/debian/rules (rev 0)
+++ tools/bcusdk/debian/rules 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/utils.mk
+
+DEB_CONFIGURE_EXTRA_FLAGS := \
+ --enable-ft12 \
+ --enable-pei16 \
+ --enable-tpuart \
+ --enable-pei16s \
+ --enable-tpuarts \
+ --enable-eibnetip \
+ --enable-eibnetipserver \
+ --enable-groupcache \
+ --enable-usb \
+ --enable-eibnetiptunnel \
+ --enable-onlyeibd
+
+DEB_DH_STRIP_ARGS := -Xusr/lib/bcusdk/lib -Xusr/lib64/bcusdk/lib --dbg-package=eibd-dbg
+DEB_DH_INSTALL_SOURCEDIR := debian/tmp
+DEB_INSTALL_DOCS_ALL := README
+
+clean::
+ find -type l -exec rm {} \;
+ autoreconf -i
Property changes on: tools/bcusdk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/eibd/examples/README
===================================================================
--- tools/bcusdk/eibd/examples/README (rev 0)
+++ tools/bcusdk/eibd/examples/README 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,12 @@
+Additional eibd-clients for CV-Backend (eibread/write-cgi)
+
+Mini-Howto:
+* Checkout into bcusdk/eibd/examples
+
+* Adjust Makefile.am:
+-xpropread xpropwrite groupcachelastupdates
++xpropread xpropwrite groupcachelastupdates eibread-cgi eibwrite-cgi
+
+-xpropread.c xpropwrite.c groupcachelastupdates.c
++xpropread.c xpropwrite.c groupcachelastupdates.c eibread-cgi.c eibwrite-cgi.c
+
Added: tools/bcusdk/eibd/examples/eibread-cgi.c
===================================================================
--- tools/bcusdk/eibd/examples/eibread-cgi.c (rev 0)
+++ tools/bcusdk/eibd/examples/eibread-cgi.c 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,403 @@
+/*
+ cgi for webserver to read groupcachelastupdates from comet/ajax client
+
+ Parameters:
+ url= (ip:host:port or local:/tmp/eib - local is default)
+ p=position
+ t=timeout (10000)
+ g=GA&g=GA... - groupadresses as x/y/z or integer
+
+ Copyright (C) 2010 Michael Markstaller <mm...@el...>
+ Copyright (C) 2005-2010 Martin Koegler <mko...@au...>
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include "common.h"
+#include <ctype.h>
+#include <time.h>
+
+#include <string.h>
+#define MAX_POSTSIZE 4096 /* max post-size */
+#define MAX_GA 1024 /* max number of GAs */
+#define BUFSIZE 512 /* max buffer of cfgfile-line */
+#define UINT16 65535
+
+char *eiburl[256];
+int lastpos = 0;
+int timeout = 300;
+int subscribedGA[UINT16];
+int gaDPT[UINT16];
+
+//struct gaconfig_s {
+// int ga;
+// int dpt;
+//};
+
+
+
+/*
+char *decodeDPT(const char *data, const int dpt)
+{
+ unsigned int ival;
+ switch (dpt)
+ {
+ case 5:
+ sscanf(data,"%X",&ival);
+ return sprintf("%.1f", ival * 100 / 255);
+ }
+return;
+}
+*/
+
+void
+cgidie (const char *msg)
+{
+ printf ("{'error': '%s'}\n", msg);
+ exit (1);
+}
+
+char *parseRequest ()
+{
+ unsigned long size;
+ char *buffer = NULL;
+ char *request = getenv("REQUEST_METHOD");
+ char *contentlen;
+ char *cgi_str;
+
+ // check METHOD
+ if( NULL == request )
+ return NULL;
+ else if( strcmp(request, "GET") == 0 )
+ {
+ cgi_str = getenv("QUERY_STRING");
+ if( NULL == cgi_str )
+ return NULL;
+ else
+ {
+ buffer =(char *) strdup(cgi_str);
+ return buffer;
+ }
+ }
+ else if( strcmp(request, "POST") == 0 )
+ {
+ contentlen = getenv("CONTENT_LENGTH");
+ if( NULL == contentlen )
+ return NULL;
+ else
+ {
+ size = (unsigned long) atoi(contentlen);
+ if(size <= 0 && size > MAX_POSTSIZE) //avoid insane
+ return NULL;
+ }
+ buffer =(char *) malloc(size+1);
+ if( NULL == buffer )
+ return NULL;
+ else
+ {
+ if( NULL == fgets(buffer, size+1, stdin) )
+ {
+ free(buffer);
+ return NULL;
+ }
+ else
+ return buffer;
+ }
+ }
+ else /* no GET or POST */
+ return NULL;
+}
+
+/* 2xHex to char */
+char convHtoA(char *hex)
+{
+ char ascii;
+ ascii =
+ (hex[0] >= 'A' ? ((hex[0] & 0xdf) - 'A')+10 : (hex[0] - '0'));
+ ascii <<= 4;
+ ascii +=
+ (hex[1] >= 'A' ? ((hex[1] & 0xdf) - 'A')+10 : (hex[1] - '0'));
+ return ascii;
+}
+
+/* urlized Hex (%xx) to ASCII */
+void hex2ascii(char *str)
+{
+ int x,y;
+ for(x=0,y=0; str[y] != '\0'; ++x,++y)
+ {
+ str[x] = str[y];
+ if(str[x] == '%')
+ {
+ str[x] = convHtoA(&str[y+1]);
+ y+=2;
+ }
+ else if( str[x] == '+')
+ str[x]=' ';
+ }
+ str[x] = '\0';
+}
+
+int isNumeric(char *str)
+{
+ while(*str)
+ {
+ if(!isdigit(*str))
+ return 0;
+ str++;
+ }
+ return 1;
+}
+
+#ifdef BETA
+void readConfig()
+{
+ char fname[] = "/etc/wiregate/eibga.conf";
+ FILE* fp; /*Declare file pointer variable*/
+ char *buf[BUFSIZE], *tok;
+ //char *buf, *tok;
+ int hg,mg,ga;
+ int currentga=0,ptr;
+ if ((fp = fopen(fname,"r")) == NULL)
+ {
+ printf("Error openening cfg\n");
+ return;
+ }
+ while(fgets(buf, BUFSIZE, fp) != NULL)
+ {
+ for(tok = strtok(buf,"\n");tok;tok=strtok(0,"\n"))
+ {
+ if (sscanf(tok,"[%d/%d/%d]",&hg,&mg,&ga) == 3)
+ {
+ currentga=((hg & 0x01f) << 11) | ((mg & 0x07) << 8) | ((ga & 0xff));
+ }
+ else if (currentga && (ptr=strstr(tok,"DPTId")) )
+ {
+ sscanf(tok,"%*s = %d",&gaDPT[currentga]);
+ }
+ }
+ }/*until EOF*/
+ fclose(fp);
+}
+#endif
+
+
+// read parameters
+void readParseCGI()
+{
+ char* params;
+ char* value;
+ char *valuepairs[MAX_GA];
+ char *cgistr;
+ int i=0,j=0,k=0;
+ cgistr = parseRequest();
+ if(cgistr == NULL)
+ cgidie ("No data");
+ hex2ascii(cgistr);
+ params=strtok(cgistr,"&");
+ while( params != NULL && i < MAX_GA)
+ {
+ valuepairs[i] = (char *)malloc(strlen(params)+1);
+ if(valuepairs[i] == NULL)
+ return;
+ valuepairs[i] = params;
+ params=strtok(NULL,"&");
+ i++;
+ }
+ while (i > j)
+ {
+ value=strtok(valuepairs[j],"=");
+ if ( value != NULL )
+ {
+ if (strcmp (value,"url") == 0)
+ {
+ value=strtok(NULL,"=");
+#ifdef BETA
+ if ( value != NULL )
+ *eiburl = (char *) strdup(value);
+/* FIXME: Security - define url from ENV - Parameter only for devel */
+#endif
+ }
+ else if (strcmp (value,"i") == 0)
+ {
+ value=strtok(NULL,"=");
+ lastpos=atoi(value);
+ }
+ else if (strcmp (value,"t") == 0)
+ {
+ value=strtok(NULL,"=");
+ timeout=atoi(value);
+ if (timeout==0) {
+ lastpos=0;
+ timeout=1;
+ }
+ }
+ else if (strcmp (value,"a") == 0)
+ {
+ value=strtok(NULL,"=");
+ if (value==NULL)
+ break;
+ if (isNumeric(value))
+ {
+ subscribedGA[atoi(value)]=1;
+ }
+ else if (strcmp (value,"all") == 0)
+ {
+ subscribedGA[0] = -1;
+ } else {
+ subscribedGA[readgaddr(value)] = 1;
+ }
+ k++;
+ }
+ //FIXME: Session,filter?
+ else
+ {
+ //printf ("Unknown param %s\n",value); //debug
+ }
+
+ }
+ j++;
+ }
+}
+
+
+int
+main ()
+{
+ int len,len_gread;
+ EIBConnection *con;
+ int i,j;
+ eibaddr_t dest;
+ eibaddr_t src;
+ uint16_t end;
+ uchar buf[300];
+ uchar buf_gread[200];
+ int written = 0;
+ char outbuf[10000];
+ char tmpbuf[50];
+ time_t tstart;
+ tstart = time(NULL);
+ //strcat(outbuf,"Content-Type: application/json\n\n");
+ //printf("Content-Type: application/json\n\n");
+ printf("Content-Type: text/plain\r\n\r\n"); //workaround for uhttpd
+
+ readParseCGI();
+ //readConfig();
+ if (*eiburl == NULL)
+ *eiburl = "local:/tmp/eib";
+
+ con = EIBSocketURL (*eiburl);
+ if (!con)
+ cgidie ("Open failed");
+
+ strcat(outbuf,"{\"d\": {");
+ if (lastpos==0) //initial read
+ {
+ for (i = 0; i < UINT16; i++)
+ {
+ if (subscribedGA[i] || subscribedGA[0] == -1) //this is HEAVY g=all reads ALL this will take LONG!
+ {
+ dest = i;
+ len_gread = EIB_Cache_Read_Sync (con, dest, &src, sizeof (buf_gread), buf_gread, 0);
+ //printf("%d/%d/%d",(dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff); //debug
+ //printf(" %d len %d %c",dest,len_gread,buf_gread[1]); //debug
+ if (len_gread != -1)
+ {
+ if (buf_gread[1] & 0xC0)
+ {
+ if (written)
+ strcat(outbuf,",");
+ written=1;
+
+ if (len_gread == 2)
+ {
+ sprintf (tmpbuf,"\"%d/%d/%d\":\"%02X", (dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff, buf_gread[1] & 0x3F);
+ strcat(outbuf,tmpbuf);
+ }
+ else
+ {
+ sprintf (tmpbuf,"\"%d/%d/%d\":\"", (dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff);
+ strcat(outbuf,tmpbuf);
+ for (j = 0; j < len_gread-2; j++)
+ {
+ sprintf (tmpbuf,"%02X", buf_gread[j+2]);
+ strcat(outbuf,tmpbuf);
+ }
+ }
+ strcat(outbuf,"\"");
+ }
+ } else {
+ //printf ("read failed!\n");
+ }
+ }
+ }
+ }
+
+ while ((!written || lastpos <1) && difftime(time(NULL), tstart) < timeout)
+ {
+ len = EIB_Cache_LastUpdates (con, lastpos, timeout, sizeof (buf), buf, &end);
+ if (len == -1)
+ cgidie ("Read failed");
+
+ if (end < lastpos) //counter wrap
+ lastpos = 1;
+ else
+ lastpos = end;
+
+ for (i = 0; i < len; i += 2)
+ {
+ dest = (buf[i] << 8) | buf[i + 1];
+ // and output only one if changed multiple times to save the planet
+ sprintf(tmpbuf,"\"%d/%d/%d\":",(dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff);
+ if ((subscribedGA[dest] || subscribedGA[0] == -1) && !strstr(outbuf,tmpbuf))
+ {
+ if (written)
+ strcat(outbuf,",");
+ written=1;
+ // read value from cache
+ len_gread = EIB_Cache_Read (con, dest, &src, sizeof(buf_gread), buf_gread);
+ if (len_gread != -1)
+ {
+ if (buf_gread[1] & 0xC0)
+ {
+ //sprintf (tmpbuf,"%d,\"%s",dest, decodeDPT(buf_gread[j+2],gaDPT[dest]));
+ //sprintf (tmpbuf,"%d,\"YES %02X", dest, buf_gread[1] & 0x3F);
+ if (len_gread == 2)
+ {
+ sprintf (tmpbuf,"\"%d/%d/%d\":\"%02X", (dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff, buf_gread[1] & 0x3F);
+ strcat(outbuf,tmpbuf);
+ }
+ else
+ {
+ sprintf (tmpbuf,"\"%d/%d/%d\":\"", (dest >> 11) & 0x1f, (dest >> 8) & 0x07, dest & 0xff);
+ strcat(outbuf,tmpbuf);
+ for (j = 0; j < len_gread-2; j++)
+ {
+ sprintf (tmpbuf,"%02X", buf_gread[j+2]);
+ strcat(outbuf,tmpbuf);
+ }
+ //printHex (len_gread - 2, buf_gread + 2);
+ }
+ strcat(outbuf,"\"");
+ }
+ }
+ }
+ }
+ if (written)
+ printf ("%s},\"i\":%d}\n",outbuf,end);
+ }
+ EIBClose (con);
+ return 0;
+}
Property changes on: tools/bcusdk/eibd/examples/eibread-cgi.c
___________________________________________________________________
Added: svn:executable
+ *
Added: tools/bcusdk/eibd/examples/eibwrite-cgi.c
===================================================================
--- tools/bcusdk/eibd/examples/eibwrite-cgi.c (rev 0)
+++ tools/bcusdk/eibd/examples/eibwrite-cgi.c 2013-01-12 17:12:21 UTC (rev 1321)
@@ -0,0 +1,306 @@
+/*
+ cgi for webserver to write from comet/ajax client
+
+ Parameters:
+ url= (ip:host:port or local:/tmp/eib - local is default)
+ t=timeout (10000)
+ g=GA - groupadress as x/y/z or integer
+ v=cleartext value
+ d=DPT (number)
+
+ Copyright (C) 2010 Michael Markstaller <mm...@el...>
+ Copyright (C) 2005-2010 Martin Koegler <mko...@au...>
+
+ 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+#include "common.h"
+#include <ctype.h>
+
+#include <string.h>
+#define MAX_POSTSIZE 4096 /* max post-size */
+#define MAX_GA 1024 /* max number of GAs */
+
+char *eiburl[256];
+char data[50];
+int gadest,dpt=0;
+
+void
+cgidie (const char *msg)
+{
+ printf ("{'error': '%s'}\n", msg);
+ exit (1);
+}
+
+char *parseRequest ()
+{
+ unsigned long size;
+ char *buffer = NULL;
+ char *request = getenv("REQUEST_METHOD");
+ char *contentlen;
+ char *cgi_str;
+
+ // check METHOD
+ if( NULL == request )
+ return NULL;
+ else if( strcmp(request, "GET") == 0 )
+ {
+ cgi_str = getenv("QUERY_STRING");
+ if( NULL == cgi_str )
+ return NULL;
+ else
+ {
+ buffer =(char *) strdup(cgi_str);
+ return buffer;
+ }
+ }
+ else if( strcmp(request, "POST") == 0 )
+ {
+ contentlen = getenv("CONTENT_LENGTH");
+ if( NULL == contentlen )
+ return NULL;
+ else
+ {
+ size = (unsigned long) atoi(contentlen);
+ if(size <= 0 && size > MAX_POSTSIZE) //avoid insane
+ return NULL;
+ }
+ buffer =(char *) malloc(size+1);
+ if( NULL == buffer )
+ return NULL;
+ else
+ {
+ if( NULL == fgets(buffer, size+1, stdin) )
+ {
+ free(buffer);
+ return NULL;
+ }
+ else
+ return buffer;
+ }
+ }
+ else /* no GET or POST */
+ return NULL;
+}
+
+/* convert 2xHex to char */
+char convHtoA(char *hex)
+{
+ char ascii;
+ ascii =
+ (hex[0] >= 'A' ? ((hex[0] & 0xdf) - 'A')+10 : (hex[0] - '0'));
+ ascii <<= 4;
+ ascii +=
+ (hex[1] >= 'A' ? ((hex[1] & 0xdf) - 'A')+10 : (hex[1] - '0'));
+ return ascii;
+}
+/* FIXME: better handling non-hex chars ? */
+
+/* conv urlized Hex (%xx) to ASCII */
+void hex2ascii(char *str)
+{
+ int x,y;
+ for(x=0,y=0; str[y] != '\0'; ++x,++y)
+ {
+ str[x] = str[y];
+ if(str[x] == '%')
+ {
+ str[x] = convHtoA(&str[y+1]);
+ y+=2;
+/* FIXME: Buffer overflow */
+ }
+ else if( str[x] == '+')
+ str[x]=' ';
+ }
+ str[x] = '\0';
+}
+
+int isNumeric(char *str)
+{
+ while(*str)
+ {
+ if(!isdigit(*str))
+ return 0;
+ str++;
+ }
+ return 1;
+}
+
+// read parameters
+void readParseCGI()
+{
+ char* params;
+ char* value;
+ char *valuepairs[MAX_GA];
+ char *cgistr;
+ int i=0,j=0;
+ cgistr = parseRequest();
+ if(cgistr == NULL)
+ cgidie ("No data");
+ hex2ascii(cgistr);
+ params=strtok(cgistr,"&");
+ while( params != NULL && i < MAX_GA)
+ {
+ valuepairs[i] = (char *)malloc(strlen(params)+1);
+ if(valuepairs[i] == NULL)
+ return;
+ valuepairs[i] = params;
+ params=strtok(NULL,"&");
+ i++;
+ }
+ while (i > j)
+ {
+ value=strtok(valuepairs[j],"=");
+ if ( value != NULL )
+ {
+ if (strcmp (value,"url") == 0)
+ {
+ value=strtok(NULL,"=");
+#ifdef BETA
+ if ( value != NULL )
+ *eiburl = (char *) strdup(value);
+/* FIXME: Security - define url from ENV - Parameter only for devel */
+#endif
+ }
+ else if (strcmp (value,"a") == 0)
+ {
+ value=strtok(NULL,"=");
+ if (value==NULL)
+ break;
+ if (isNumeric(value))
+ gadest=atoi(value);
+ else
+ gadest=readgaddr(value);
+ }
+ else if (strcmp (value,"d") == 0)
+ {
+ value=strtok(NULL,"=");
+ if (isNumeric(value))
+ {
+ dpt=atoi(value);
+ }
+ }
+ else if (strcmp (value,"v") == 0)
+ {
+ value=strtok(NULL,"=");
+ if ( value != NULL && strlen(value)<50 )
+ strcpy(data,value);
+ }
+ else
+ {
+ //printf ("Unknown param %s\n",value); //debug
+ }
+
+ }
+ j++;
+ }
+}
+
+
+int
+main ()
+{
+ int len=0;
+ EIBConnection *con;
+ int i,j;
+ double fval;
+ int sign=0,exp=0,mant=0;
+ eibaddr_t dest;
+ uchar buf[255] = { 0, 0x80 };
+ char tmpbuf[255];
+ printf("Content-Type: text/plain\r\n\r\n");
+
+ readParseCGI();
+ if (*eiburl == NULL)
+ *eiburl = "local:/tmp/eib";
+
+ con = EIBSocketURL (*eiburl);
+ if (!con)
+ cgidie ("Open failed");
+
+ dest=gadest;
+ if (EIBOpenT_Group (con, dest, 1) == -1)
+ cgidie ("Connect failed");
+
+ if (!gadest || !strlen(data)>0)
+ cgidie ("Need ga(g),value(v)");
+ switch (dpt)
+ {
+ case 0:
+ len=1;
+ for(i = 0; i < strlen(data)/2; i++)
+ {
+ tmpbuf[0] = data[i*2];
+ tmpbuf[1] = data[(i*2)+1];
+ sscanf(tmpbuf, "%x", &j);
+ buf[i+1] = j;
+ len++;
+ }
+ // only allow A_GroupValue_Write
+ if ((buf[1] &0x80) != 0x80)
+ cgidie ("Only A_GroupValue_Write allowed");
+ break;
+ case 1:
+ buf[1] |= atoi(data) & 0x3f;
+ len=2;
+ break;
+ case 3:
+ // EIS2/DPT3 4bit dim
+ buf[1] |= atoi(data) & 0x3f;
+ len=2;
+ break;
+ case 5:
+ buf[2] = atoi(data)*255/100;
+ len=3;
+ break;
+ case 51:
+ case 5001:
+ buf[2] = atoi(data);
+ len=3;
+ break;
+ case 9:
+ fval=atof(data);
+ if (fval<0)
+ sign = 0x8000;
+ mant = (int)(fval * 100.0);
+ while (abs(mant) > 2047) {
+ mant = mant >> 1;
+ exp++;
+ }
+ i = sign | (exp << 11) | (mant & 0x07ff);
+ buf[2] = i >> 8;
+ buf[3] = i & 0xff;
+ //return $data >> 8, $data & 0xff;
+ len=4;
+ break;
+ case 16:
+ len=2;
+ for (i=0;i<strlen(data); i++)
+ {
+ buf[i+2] = (int)(data[i]);
+ len++;
+ }
+ }
+
+ len = EIBSendAPDU (con, len, buf);
+ if (len == -1)
+ cgidie ("Request failed");
+ printf ("{'success':%d}\n",len-1); //don't confuse client with leading 0x00
+
+ //printf("size %d %d\n",sizeof(buf),strlen(buf));
+ //printf("buf 0x%02X 0x%02X 0x%02X 0x%02X v:%s l:%d\n" ,buf[1],buf[2],buf[3],buf[4],data,strlen(data));
+ EIBClose (con);
+ return 0;
+}
Property changes on: tools/bcusdk/eibd/examples/eibwrite-cgi.c
___________________________________________________________________
Added: svn:executable
+ *
Modified: tools/ets4tools/ets4parser.pl
===================================================================
--- tools/ets4tools/ets4parser.pl 2013-01-12 14:41:48 UTC (rev 1320)
+++ tools/ets4tools/ets4parser.pl 2013-01-12 17:12:21 UTC (rev 1321)
@@ -18,6 +18,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# FIXME:
+# - dump config for https://sites.google.com/site/knxcontroller/project-import
+
use XML::Simple;
use Data::Dumper;
use POSIX;
@@ -120,8 +123,8 @@
#Version-check 4.0.1387.12605
my @etsversion = split(/\./, $proj->{ToolVersion});
# changed from 4.0 to 4.1 > 4.1.2 (Build 3013)
-if ($etsversion[1] < 1) {
- print "error ETS " . $proj->{ToolVersion} . " too old - must be 4.1 or higher\n";
+if ($etsversion[2] < 1387 and $etsversion[1] < 1) {
+ print "error ETS " . $proj->{ToolVersion} . " too old - must be 4.0.3 or higher\n";
exit;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|