From 9b282a6b53eabd97cf362b2b1eeb5fb831bf07b8 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Tue, 9 Jun 2009 09:16:30 +0200 Subject: [PATCH] Implement connectionless management connection in the client library Signed-off-by: Martin Koegler --- eibd/client/c/Makefile.am | 2 +- eibd/client/def/all.lst | 1 + eibd/client/def/mcindividual.inc | 41 ++++++++++++++++++++++++++++++++++++++++ eibd/include/eibclient.h | 14 ++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 eibd/client/def/mcindividual.inc diff --git a/eibd/client/c/Makefile.am b/eibd/client/c/Makefile.am index 88825a2..8aee2b7 100644 --- a/eibd/client/c/Makefile.am +++ b/eibd/client/c/Makefile.am @@ -13,7 +13,7 @@ FUNCS= \ gen/groupcacheread.c gen/mcprogmodestatus.c gen/mcwrite.c gen/openbusmonitortext.c gen/sendapdu.c \ gen/groupcachereadsync.c gen/mcprogmodetoggle.c gen/mcwriteplain.c gen/opengroupsocket.c gen/sendgroup.c \ gen/groupcacheremove.c gen/mcpropertydesc.c gen/mgetmaskversion.c gen/opentbroadcast.c gen/sendtpdu.c \ - gen/gettpdu.c + gen/gettpdu.c gen/mcindividual.c BUILT_SOURCES=$(FUNCS) CLEANFILES=$(FUNCS) diff --git a/eibd/client/def/all.lst b/eibd/client/def/all.lst index 56f001f..6c4e6cc 100644 --- a/eibd/client/def/all.lst +++ b/eibd/client/def/all.lst @@ -41,6 +41,7 @@ EIBC_LICENSE( #include "loadimage.inc" #include "mcauthorize.inc" #include "mcconnect.inc" +#include "mcindividual.inc" #include "mcgetmaskversion.inc" #include "mcgetpeitype.inc" #include "mcprogmodeoff.inc" diff --git a/eibd/client/def/mcindividual.inc b/eibd/client/def/mcindividual.inc new file mode 100644 index 0000000..3210934 --- /dev/null +++ b/eibd/client/def/mcindividual.inc @@ -0,0 +1,41 @@ +EIBC_LICENSE( +/* + EIBD client library + Copyright (C) 2005-2009 Martin Koegler + + 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. + + 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.) + + 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +) + +EIBC_COMPLETE (EIB_MC_Individual_Open, + EIBC_GETREQUEST + EIBC_CHECKRESULT (EIB_MC_INDIVIDUAL, 2) + EIBC_RETURN_OK +) + +EIBC_ASYNC (EIB_MC_Individual_Open, ARG_ADDR (dest, ARG_NONE), + EIBC_INIT_SEND (4) + EIBC_SETADDR (dest, 2) + EIBC_SEND (EIB_MC_INDIVIDUAL) + EIBC_INIT_COMPLETE (EIB_MC_Individual_Open) +) diff --git a/eibd/include/eibclient.h b/eibd/include/eibclient.h index 289e62e..5ca404e 100644 --- a/eibd/include/eibclient.h +++ b/eibd/include/eibclient.h @@ -433,6 +433,20 @@ int EIB_MC_Connect (EIBConnection * con, eibaddr_t dest); */ int EIB_MC_Connect_async (EIBConnection * con, eibaddr_t dest); +/** Opens a connectionless management connection. + * \param con eibd connection + * \param dest destionation address + * \return 0 if successful, -1 if error + */ +int EIB_MC_Individual_Open (EIBConnection * con, eibaddr_t dest); + +/** Opens a connectionless management connection - asynchronous. + * \param con eibd connection + * \param dest destionation address + * \return 0 if started, -1 if error + */ +int EIB_MC_Individual_Open_async (EIBConnection * con, eibaddr_t dest); + /** Read BAU memory (over a management connection). * \param con eibd connection * \param addr memory address -- 2.11.4.GIT