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.
25 /** PEI16 / BCU1 kernel driver backend */
26 class BCU1DriverLowLevelDriver
:public LowLevelDriverInterface
, private Thread
28 /** file descriptor */
32 /** semaphore for inqueue */
34 /** semaphore for outqueue */
37 Queue
< CArray
> inqueue
;
39 Queue
< CArray
* >outqueue
;
40 /** event to wait for outqueue */
42 /** semaphore to signal empty sendqueue */
44 /** event to wait for send finished */
45 pth_event_t send_done
;
47 void Run (pth_sem_t
* stop
);
49 BCU1DriverLowLevelDriver (const char *device
, Trace
* tr
);
50 ~BCU1DriverLowLevelDriver ();
53 void Send_Packet (CArray l
);
54 bool Send_Queue_Empty ();
55 pth_sem_t
*Send_Queue_Empty_Cond ();
56 CArray
*Get_Packet (pth_event_t stop
);
58 bool Connection_Lost ();