summaryrefslogtreecommitdiff
path: root/trunk/darwin/firmware/PIC/tools/snap.h
blob: 9ca19c9509fca87bf12701fd6034d8bbc0da46eb (plain)
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
29
30
// -*- c++ -*-

#ifndef _snap_h
#define _snap_h

// Simplified SNAP representation. This will done properly in the Java version.
// Very simple blocking version.

#include "snap_packet.h"

class SNAP
{
public:
  SNAP(const char *device, int sourceAddress, bool verbose);
  ~SNAP();

  /// Read a single byte
  byte readbyte();

  /// Send a single byte
  void sendbyte(byte c);
  SNAPPacket createPacket(int destAddr, int length = 0);

private:
  int fd;
  int localAddress;
  bool verbose;
};

#endif