/[H7]/trunk/H7 Server/SlipSerial.h
ViewVC logotype

Annotation of /trunk/H7 Server/SlipSerial.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (hide annotations) (download)
Wed Jan 31 08:41:26 2007 UTC (17 years, 4 months ago) by torben
File MIME type: text/plain
File size: 559 byte(s)
Added:
 CSerial - abstraction of a serial port,
 CSlipSerial - (Inherits from CSerial) abstraction of the SLIP datalink protocol
 CH7Serial - (Inherits from CSlipSerial) abstraction of our own protocol
1 torben 23 /*
2     * SlipSerial.h & SlipSerial.cpp - (C) 2007 by Torben H. Nielsen
3     *
4     * Class for implementing the slip data-link protocol on top of a serial port.
5     */
6    
7     #pragma once
8     #include "serial.h"
9    
10     #include <vector>
11    
12     class CSlipSerial :
13     public CSerial
14     {
15     public:
16     CSlipSerial(char* port, int bitrate);
17     CSlipSerial();
18     virtual ~CSlipSerial(void);
19    
20     std::vector<unsigned char> readFrame();
21     void writeFrame(std::vector<unsigned char> data);
22     void writeFrame(unsigned char buf[], int len);
23     protected:
24     void writeSlipByte(unsigned char out);
25     };

  ViewVC Help
Powered by ViewVC 1.1.20