File: pcp.h-source.html

package info (click to toggle)
icomlib 1.0.1-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,652 kB
  • ctags: 1,363
  • sloc: cpp: 4,849; makefile: 536; sh: 181; ansic: 145
file content (138 lines) | stat: -rw-r--r-- 9,489 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<title>pcp.h Source 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:27 2000 -->
<center>
<a class="qindex"href="index.html">Main Page</a> &nbsp; <a class="qindex"href="annotated.html">Compound List</a> &nbsp; <a class="qindex"href="files.html">File List</a> &nbsp; <a class="qindex"href="headers.html">Header Files</a> &nbsp; <a class="qindex"href="sources.html">Sources</a> &nbsp; <a class="qindex"href="functions.html">Compound Members</a> &nbsp; <a class="qindex"href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>pcp.h</h1><div class="fragment"><pre>00001 #ifndef PCP_H_
00002 #define PCP_H_
00003 /* 
00004    Copyright (C) 1999 PolyWog and Javaman for Ghetto.Org
00005    This file is part of the PCR-1000 API Library.
00006 
00007    The PCR-1000 API Library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Library General Public License as
00009    published by the Free Software Foundation; either version 2 of the
00010    License, or (at your option) any later version.
00011 
00012    The PCR-1000 API Library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Library General Public License for more details.
00016 
00017    You should have received a copy of the GNU Library General Public
00018    License along with the PCR-1000 API Library; see the file LICENSE.  If not,
00019    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020    Boston, MA 02111-1307, USA.  
00021  */
00022 
00023 
00024 #include &lt;pcrdef.h&gt;
00025 #include &lt;pcomm.h&gt;
00026 #include &lt;sys/termios.h&gt; /* for tcflag_t */
00027 
<a name="l00029"><a class="code" href="pcp.h.html#a0">00029</a></a> #define PCPDefaultPort "/dev/pcr1000"
<a name="l00031"><a class="code" href="pcp.h.html#a1">00031</a></a> #define PCPDefaultSpeed B9600
00032 
00034 
<a name="l00038"><a class="code" href="class_pradinf.html">00038</a></a> struct <a class="code" href="class_pradinf.html">PRadInf</a> {
<a name="l00040"><a class="code" href="class_pradinf.html#a0">00040</a></a>         char        PCPPort[64];
<a name="l00042"><a class="code" href="class_pradinf.html#a1">00042</a></a>         tcflag_t    PCPSpeed;
<a name="l00044"><a class="code" href="class_pradinf.html#a2">00044</a></a>         char        PCPInitSpeed[8];
<a name="l00046"><a class="code" href="class_pradinf.html#a3">00046</a></a>         int         PCPVolume;
<a name="l00048"><a class="code" href="class_pradinf.html#a4">00048</a></a>         int         PCPSquelch;
00050 
<a name="l00051"><a class="code" href="class_pradinf.html#a5">00051</a></a>         pcrfreq_t   PCPFreq;
00053 
<a name="l00054"><a class="code" href="class_pradinf.html#a6">00054</a></a>         pcrcmd_t    PCPMode[128];
00056 
<a name="l00057"><a class="code" href="class_pradinf.html#a7">00057</a></a>         pcrcmd_t    PCPFilter[128];
<a name="l00059"><a class="code" href="class_pradinf.html#a8">00059</a></a>         bool            PCPAutoUpdate;
00060 
<a name="l00062"><a class="code" href="class_pradinf.html#a9">00062</a></a>         const char      *PCPToneSq;
<a name="l00064"><a class="code" href="class_pradinf.html#a10">00064</a></a>         float       PCPToneSqFloat;
<a name="l00066"><a class="code" href="class_pradinf.html#a11">00066</a></a>         bool            PCPAutoGain;
<a name="l00068"><a class="code" href="class_pradinf.html#a12">00068</a></a>         bool            PCPNoiseBlank;
<a name="l00070"><a class="code" href="class_pradinf.html#a13">00070</a></a>         bool            PCPRFAttenuator;
00071 };
00072 
00074 
<a name="l00082"><a class="code" href="class_pcp.html">00082</a></a> class <a class="code" href="class_pcp.html">PCP</a> { 
00083     public:
00084         <a class="code" href="class_pcp.html#a0">PCP</a>(char *port=PCPDefaultPort, tcflag_t speed=PCPDefaultSpeed,
00085             const char *name=0);
00086         <a class="code" href="class_pcp.html#a1">~PCP</a>();
00087 
00088         bool <a class="code" href="class_pcp.html#a2">PCPInit</a>(bool autoUpdate=false);
00089         bool <a class="code" href="class_pcp.html#a3">PCPPowerUp</a>();
00090         bool <a class="code" href="class_pcp.html#a4">PCPPowerDown</a>();
00091 
00092         // basic radio methods
00093         bool <a class="code" href="class_pcp.html#a5">PCPSetSpeed</a>(tcflag_t);
00094         bool <a class="code" href="class_pcp.html#a6">PCPSetPort</a>(const char *);
00095         bool <a class="code" href="class_pcp.html#a7">PCPSetVolume</a>(int);
00096         bool <a class="code" href="class_pcp.html#a8">PCPSetSquelch</a>(int);
00097         bool <a class="code" href="class_pcp.html#a9">PCPSetFreq</a>(pcrfreq_t);
00098         bool <a class="code" href="class_pcp.html#a10">PCPSetMode</a>(const char *);
00099         bool <a class="code" href="class_pcp.html#a11">PCPSetFilter</a>(const char *);
00100         int  <a class="code" href="class_pcp.html#a12">PCPSigStrength</a>();
00101         const char *<a class="code" href="class_pcp.html#a13">PCPSigStrengthStr</a>();
00102 
00103         // advanced radio methods
00104         bool <a class="code" href="class_pcp.html#a14">PCPSetToneSq</a>(const char*);
00105         bool <a class="code" href="class_pcp.html#a14">PCPSetToneSq</a>(float);
00106         bool <a class="code" href="class_pcp.html#a16">PCPSetAutoGain</a>(bool);
00107         bool <a class="code" href="class_pcp.html#a17">PCPSetNB</a>(bool);
00108         bool <a class="code" href="class_pcp.html#a18">PCPSetRFAttenuator</a>(bool);
00109 
00110         bool             <a class="code" href="class_pcp.html#a19">PCPIsOn</a>();
00111         bool             <a class="code" href="class_pcp.html#a20">PCPQueryOn</a>();
00112         bool             <a class="code" href="class_pcp.html#a21">PCPQuerySquelch</a>();
00113         const char      *<a class="code" href="class_pcp.html#a22">PCPGetPort</a>();
00114         tcflag_t         <a class="code" href="class_pcp.html#a23">PCPGetSpeed_t</a>();
00115         const char      *<a class="code" href="class_pcp.html#a24">PCPGetSpeed</a>();
00116         int              <a class="code" href="class_pcp.html#a25">PCPGetVolume</a>();
00117         const char      *<a class="code" href="class_pcp.html#a26">PCPGetVolumeStr</a>();
00118         int              <a class="code" href="class_pcp.html#a27">PCPGetSquelch</a>();
00119         const char      *<a class="code" href="class_pcp.html#a28">PCPGetSquelchStr</a>();
00120         pcrfreq_t        <a class="code" href="class_pcp.html#a29">PCPGetFreq</a>();
00121         const char      *<a class="code" href="class_pcp.html#a30">PCPGetFreqStr</a>();
00122         const pcrcmd_t  *<a class="code" href="class_pcp.html#a31">PCPGetMode</a>();
00123         const char      *<a class="code" href="class_pcp.html#a32">PCPGetModeStr</a>();
00124         const pcrcmd_t  *<a class="code" href="class_pcp.html#a33">PCPGetFilter</a>();
00125         const char      *<a class="code" href="class_pcp.html#a34">PCPGetFilterStr</a>();
00126 
00127         const char  *<a class="code" href="class_pcp.html#a35">PCPGetToneSq</a>();
00128         const char  *<a class="code" href="class_pcp.html#a36">PCPGetToneSqStr</a>();
00129         bool             <a class="code" href="class_pcp.html#a37">PCPGetAutoGain</a>();
00130         const char  *<a class="code" href="class_pcp.html#a38">PCPGetAutoGainStr</a>();
00131         bool             <a class="code" href="class_pcp.html#a39">PCPGetNB</a>();
00132         const char  *<a class="code" href="class_pcp.html#a40">PCPGetNBStr</a>();
00133         bool             <a class="code" href="class_pcp.html#a41">PCPGetRFAttenuator</a>();
00134         const char  *<a class="code" href="class_pcp.html#a42">PCPGetRFAttenuatorStr</a>();
00135 
00137 
00144         const <a class="code" href="class_pradinf.html">PRadInf</a> <a class="code" href="class_pcp.html#a43">PCPGetRadioInfo</a>();
00145 
00146     private:
00147         bool            <a class="code" href="class_pcp.html#c0">PCPCheckResponse</a>();
00148 
<a name="l00150"><a class="code" href="class_pcp.html#c1">00150</a></a>         <a class="code" href="class_pcomm.html">PComm</a>           *PCPComm;
<a name="l00152"><a class="code" href="class_pcp.html#c2">00152</a></a>         bool        PCPStatus;
<a name="l00154"><a class="code" href="class_pcp.html#c3">00154</a></a>         bool            PCPErrRead;
<a name="l00156"><a class="code" href="class_pcp.html#c4">00156</a></a>         char            PCPTemp[256];
00157 
<a name="l00159"><a class="code" href="class_pcp.html#c5">00159</a></a>         struct <a class="code" href="class_pradinf.html">PRadInf</a> *PCPRadio;
00160 };
00161 
00162 
00163 #endif /* PCP_H_ */
</div></pre><hr><address><small>Generated at Mon Jan 17 00:45:27 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>,
 &copy; 1997-1999</small></address>
</body>
</html>