rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
rlfifo.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlfifo.h - description
3  -------------------
4  begin : Tue Jan 02 2001
5  copyright : (C) 2001 by R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
16 #ifndef _RL_FIFO_H_
17 #define _RL_FIFO_H_
18 
19 #include "rldefine.h"
20 #include "rlthread.h"
21 
25 class rlFifo
26 {
27 private:
28  typedef struct _MessageList_
29  {
30  char *mes;
31  int len;
33  }MessageList;
34 
35 public:
36  rlFifo(int maxmessages=0);
37  virtual ~rlFifo();
38 
39  enum FifoEnum {
41  };
42 
43  int read(void *buf, int maxlen);
44  int poll();
45  int write(const void *buf, int len);
46  int printf(const char *format, ...);
47 
48 private:
49  int maxmes;
50  int nmes;
54 };
55 
56 #endif