Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | <html> | |
3 | <head> | |
4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> | |
5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> | |
6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> | |
7 | <link rel="first" href="lib.html" title='Python Library Reference' /> | |
8 | <link rel='contents' href='contents.html' title="Contents" /> | |
9 | <link rel='index' href='genindex.html' title='Index' /> | |
10 | <link rel='last' href='about.html' title='About this document...' /> | |
11 | <link rel='help' href='about.html' title='About this document...' /> | |
12 | <link rel="prev" href="al-config-objects.html" /> | |
13 | <link rel="parent" href="module-al.html" /> | |
14 | <link rel="next" href="module-al-constants.html" /> | |
15 | <meta name='aesop' content='information' /> | |
16 | <title>20.1.2 Port Objects </title> | |
17 | </head> | |
18 | <body> | |
19 | <DIV CLASS="navigation"> | |
20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> | |
21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
22 | <tr> | |
23 | <td class='online-navigation'><a rel="prev" title="20.1.1 Configuration Objects" | |
24 | href="al-config-objects.html"><img src='../icons/previous.png' | |
25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
26 | <td class='online-navigation'><a rel="parent" title="20.1 al " | |
27 | href="module-al.html"><img src='../icons/up.png' | |
28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
29 | <td class='online-navigation'><a rel="next" title="20.2 AL " | |
30 | href="module-al-constants.html"><img src='../icons/next.png' | |
31 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
32 | <td align="center" width="100%">Python Library Reference</td> | |
33 | <td class='online-navigation'><a rel="contents" title="Table of Contents" | |
34 | href="contents.html"><img src='../icons/contents.png' | |
35 | border='0' height='32' alt='Contents' width='32' /></A></td> | |
36 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
37 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
38 | <td class='online-navigation'><a rel="index" title="Index" | |
39 | href="genindex.html"><img src='../icons/index.png' | |
40 | border='0' height='32' alt='Index' width='32' /></A></td> | |
41 | </tr></table> | |
42 | <div class='online-navigation'> | |
43 | <b class="navlabel">Previous:</b> | |
44 | <a class="sectref" rel="prev" href="al-config-objects.html">20.1.1 Configuration Objects</A> | |
45 | <b class="navlabel">Up:</b> | |
46 | <a class="sectref" rel="parent" href="module-al.html">20.1 al </A> | |
47 | <b class="navlabel">Next:</b> | |
48 | <a class="sectref" rel="next" href="module-al-constants.html">20.2 AL </A> | |
49 | </div> | |
50 | <hr /></div> | |
51 | </DIV> | |
52 | <!--End of Navigation Panel--> | |
53 | ||
54 | <H2><A NAME="SECTION0022120000000000000000"></A><A NAME="al-port-objects"></A> | |
55 | <BR> | |
56 | 20.1.2 Port Objects | |
57 | </H2> | |
58 | ||
59 | <P> | |
60 | Port objects, as returned by <tt class="function">openport()</tt>, have the following | |
61 | methods: | |
62 | ||
63 | <P> | |
64 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
65 | <td><nobr><b><tt id='l2h-5054' xml:id='l2h-5054' class="method">closeport</tt></b>(</nobr></td> | |
66 | <td><var></var>)</td></tr></table></dt> | |
67 | <dd> | |
68 | Close the port. | |
69 | </dl> | |
70 | ||
71 | <P> | |
72 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
73 | <td><nobr><b><tt id='l2h-5055' xml:id='l2h-5055' class="method">getfd</tt></b>(</nobr></td> | |
74 | <td><var></var>)</td></tr></table></dt> | |
75 | <dd> | |
76 | Return the file descriptor as an int. | |
77 | </dl> | |
78 | ||
79 | <P> | |
80 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
81 | <td><nobr><b><tt id='l2h-5056' xml:id='l2h-5056' class="method">getfilled</tt></b>(</nobr></td> | |
82 | <td><var></var>)</td></tr></table></dt> | |
83 | <dd> | |
84 | Return the number of filled samples. | |
85 | </dl> | |
86 | ||
87 | <P> | |
88 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
89 | <td><nobr><b><tt id='l2h-5057' xml:id='l2h-5057' class="method">getfillable</tt></b>(</nobr></td> | |
90 | <td><var></var>)</td></tr></table></dt> | |
91 | <dd> | |
92 | Return the number of fillable samples. | |
93 | </dl> | |
94 | ||
95 | <P> | |
96 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
97 | <td><nobr><b><tt id='l2h-5058' xml:id='l2h-5058' class="method">readsamps</tt></b>(</nobr></td> | |
98 | <td><var>nsamples</var>)</td></tr></table></dt> | |
99 | <dd> | |
100 | Read a number of samples from the queue, blocking if necessary. | |
101 | Return the data as a string containing the raw data, (e.g., 2 bytes per | |
102 | sample in big-endian byte order (high byte, low byte) if you have set | |
103 | the sample width to 2 bytes). | |
104 | </dl> | |
105 | ||
106 | <P> | |
107 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
108 | <td><nobr><b><tt id='l2h-5059' xml:id='l2h-5059' class="method">writesamps</tt></b>(</nobr></td> | |
109 | <td><var>samples</var>)</td></tr></table></dt> | |
110 | <dd> | |
111 | Write samples into the queue, blocking if necessary. The samples are | |
112 | encoded as described for the <tt class="method">readsamps()</tt> return value. | |
113 | </dl> | |
114 | ||
115 | <P> | |
116 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
117 | <td><nobr><b><tt id='l2h-5060' xml:id='l2h-5060' class="method">getfillpoint</tt></b>(</nobr></td> | |
118 | <td><var></var>)</td></tr></table></dt> | |
119 | <dd> | |
120 | Return the `fill point'. | |
121 | </dl> | |
122 | ||
123 | <P> | |
124 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
125 | <td><nobr><b><tt id='l2h-5061' xml:id='l2h-5061' class="method">setfillpoint</tt></b>(</nobr></td> | |
126 | <td><var>fillpoint</var>)</td></tr></table></dt> | |
127 | <dd> | |
128 | Set the `fill point'. | |
129 | </dl> | |
130 | ||
131 | <P> | |
132 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
133 | <td><nobr><b><tt id='l2h-5062' xml:id='l2h-5062' class="method">getconfig</tt></b>(</nobr></td> | |
134 | <td><var></var>)</td></tr></table></dt> | |
135 | <dd> | |
136 | Return a configuration object containing the current configuration of | |
137 | the port. | |
138 | </dl> | |
139 | ||
140 | <P> | |
141 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
142 | <td><nobr><b><tt id='l2h-5063' xml:id='l2h-5063' class="method">setconfig</tt></b>(</nobr></td> | |
143 | <td><var>config</var>)</td></tr></table></dt> | |
144 | <dd> | |
145 | Set the configuration from the argument, a configuration object. | |
146 | </dl> | |
147 | ||
148 | <P> | |
149 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
150 | <td><nobr><b><tt id='l2h-5064' xml:id='l2h-5064' class="method">getstatus</tt></b>(</nobr></td> | |
151 | <td><var>list</var>)</td></tr></table></dt> | |
152 | <dd> | |
153 | Get status information on last error. | |
154 | </dl> | |
155 | ||
156 | <P> | |
157 | ||
158 | <DIV CLASS="navigation"> | |
159 | <div class='online-navigation'> | |
160 | <p></p><hr /> | |
161 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
162 | <tr> | |
163 | <td class='online-navigation'><a rel="prev" title="20.1.1 Configuration Objects" | |
164 | href="al-config-objects.html"><img src='../icons/previous.png' | |
165 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
166 | <td class='online-navigation'><a rel="parent" title="20.1 al " | |
167 | href="module-al.html"><img src='../icons/up.png' | |
168 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
169 | <td class='online-navigation'><a rel="next" title="20.2 AL " | |
170 | href="module-al-constants.html"><img src='../icons/next.png' | |
171 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
172 | <td align="center" width="100%">Python Library Reference</td> | |
173 | <td class='online-navigation'><a rel="contents" title="Table of Contents" | |
174 | href="contents.html"><img src='../icons/contents.png' | |
175 | border='0' height='32' alt='Contents' width='32' /></A></td> | |
176 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
177 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
178 | <td class='online-navigation'><a rel="index" title="Index" | |
179 | href="genindex.html"><img src='../icons/index.png' | |
180 | border='0' height='32' alt='Index' width='32' /></A></td> | |
181 | </tr></table> | |
182 | <div class='online-navigation'> | |
183 | <b class="navlabel">Previous:</b> | |
184 | <a class="sectref" rel="prev" href="al-config-objects.html">20.1.1 Configuration Objects</A> | |
185 | <b class="navlabel">Up:</b> | |
186 | <a class="sectref" rel="parent" href="module-al.html">20.1 al </A> | |
187 | <b class="navlabel">Next:</b> | |
188 | <a class="sectref" rel="next" href="module-al-constants.html">20.2 AL </A> | |
189 | </div> | |
190 | </div> | |
191 | <hr /> | |
192 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> | |
193 | </DIV> | |
194 | <!--End of Navigation Panel--> | |
195 | <ADDRESS> | |
196 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. | |
197 | </ADDRESS> | |
198 | </BODY> | |
199 | </HTML> |