File: Channel.H

package info (click to toggle)
dxpc 3.8.0-5
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 672 kB
  • ctags: 780
  • sloc: cpp: 10,145; sh: 173; makefile: 87
file content (28 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef Channel_H
#define Channel_H

class EncodeBuffer;

class Channel
{
  public:
  Channel():framingBitsOut_(0)
  {
  }
  virtual ~ Channel()
  {
  }

  virtual int doRead(EncodeBuffer &) = 0;
  virtual int doWrite(const unsigned char *message, unsigned int length) = 0;

  void recordFramingBits(unsigned int numBits)
  {
    framingBitsOut_ += numBits;
  }

  protected:
  unsigned int framingBitsOut_;
};

#endif /* Channel_H */