2 EIBD eib bus access and management daemon
3 Copyright (C) 2005-2011 Martin Koegler <mkoegler@auto.tuwien.ac.at>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef EIBNET_ROUTER_H
21 #define EIBNET_ROUTER_H
26 /** EIBnet/IP routing backend */
27 class EIBNetIPRouter
:public Layer2Interface
, private Thread
31 /** default address */
33 /** EIBnet/IP socket */
39 /** semaphore for outqueue */
42 Queue
< LPDU
* >outqueue
;
43 /** event to wait for outqueue */
46 void Run (pth_sem_t
* stop
);
48 EIBNetIPRouter (const char *multicastaddr
, int port
, eibaddr_t a
,
50 virtual ~ EIBNetIPRouter ();
53 void Send_L_Data (LPDU
* l
);
54 LPDU
*Get_L_Data (pth_event_t stop
);
56 bool addAddress (eibaddr_t addr
);
57 bool addGroupAddress (eibaddr_t addr
);
58 bool removeAddress (eibaddr_t addr
);
59 bool removeGroupAddress (eibaddr_t addr
);
61 bool enterBusmonitor ();
62 bool leaveBusmonitor ();
63 bool openVBusmonitor ();
64 bool closeVBusmonitor ();
68 eibaddr_t
getDefaultAddr ();
69 bool Connection_Lost ();
70 bool Send_Queue_Empty ();