File: k2.h

package info (click to toggle)
marote 2.4-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 556 kB
  • ctags: 224
  • sloc: cpp: 1,925; makefile: 46
file content (53 lines) | stat: -rw-r--r-- 735 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// k2.h
//
// Written by Mike Studer AB6CV
// 9 April 2003
//
#ifndef K2_H
#define K2_H

// OS includes
#include <unistd.h>
#include <termios.h>
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
#include <strings.h>
#include <stdlib.h>
#include <sys/ioctl.h>

// Qt includes
#include <qstring.h>
#include <qmutex.h>

using namespace std;

class k2
{
 private:
    int fd;
    int erno;
    int status;
    struct termios newtio;
    char buf[3];
    QString qbuf;
    QString qbuf2;
    QMutex mutex;
   
 public:

// open up serial port
   void init_k2(int);
 
// read K2 data
   QString read_k2(void);
   
// write data to K2
   void cmd_k2(char *);
  
};

#endif