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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>PComm Include File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.0.0 on Mon Jan 17 00:45:29 2000 -->
<center>
<a class="qindex"href="index.html">Main Page</a> <a class="qindex"href="annotated.html">Compound List</a> <a class="qindex"href="files.html">File List</a> <a class="qindex"href="headers.html">Header Files</a> <a class="qindex"href="sources.html">Sources</a> <a class="qindex"href="functions.html">Compound Members</a> <a class="qindex"href="globals.html">File Members</a> </center>
<hr><h1>pcomm.h</h1>This is the verbatim text of the pcomm.h include file.<div class="fragment"><pre>#ifndef PCOMM_H_
#define PCOMM_H_
/*
Copyright (C) 1999 PolyWog and Javaman for Ghetto.Org
This file is part of the PCR-1000 API Library.
The PCR-1000 API Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The PCR-1000 API Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the PCR-1000 API Library; see the file LICENSE. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/termios.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
#include "pcrdef.h"
#define BAUDRATE B9600
#define PCRDEV "/dev/ttyS0"
#define _POSIX_SOURCE 1 /* POSIX compliant source */
typedef int size_pc; /* i/o count confirmation */
class <a class="code" href="class_pcomm.html">PComm</a> {
public:
<a class="code" href="class_pcomm.html#a0">PComm</a>(char *pcrDev, tcflag_t baudRate=B9600, const char *name=0);
<a class="code" href="class_pcomm.html#a1">~PComm</a>();
bool <a class="code" href="class_pcomm.html#a2">PCOpen</a>(const char *pcrDev=PCRDEV, tcflag_t baudRate=B9600);
void <a class="code" href="class_pcomm.html#a3">PCClose</a>();
size_pc <a class="code" href="class_pcomm.html#a4">PCTell</a>(char *);
size_pc <a class="code" href="class_pcomm.html#a5">PCAsk</a>(char *);
size_pc <a class="code" href="class_pcomm.html#a6">PCHear</a>(char *);
size_pc <a class="code" href="class_pcomm.html#a7">PCRawWrite</a>(char *);
size_pc <a class="code" href="class_pcomm.html#a8">PCRawRead</a>(char *);
private:
size_pc <a class="code" href="class_pcomm.html#c0">Write</a>(char *);
size_pc <a class="code" href="class_pcomm.html#c1">Read</a>(char *);
void <a class="code" href="class_pcomm.html#c2">resetCall</a>();
void <a class="code" href="class_pcomm.html#c3">countCall</a>();
int callCount;
char callBuf[256];
struct timeval *timeOut;
fd_set *FDSet;
int retVal;
struct termios *oldtio;
struct termios *newtio;
int fd;
char pcrDevice[256];
tcflag_t pcrSpeed;
bool errRead;
bool errWrite;
char askBuf[256];
char hearBuf[256];
char writeBuf[256];
char readBuf[256];
char int_name[256];
size_pc writeCtr;
size_pc readCtr;
size_pc askCtr;
size_pc tellCtr;
size_pc hearCtr;
};
#endif /* PCOMM_H_ */
</div></pre><hr><address><small>Generated at Mon Jan 17 00:45:29 2000 for Icom PCR-1000 Library by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align=center border=0
width=118 height=53></a> 1.0.0 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-1999</small></address>
</body>
</html>
|