comparison docs/extension-virtualports.txt @ 6:3a4c972c92ec

Add non-variable packet READ option It is clear that variable packets are inconvenient on high speed bitbanger implementations of the lwwire protocol. This update provides an alternative to the variable length READ option that does not require the use of variable length packets.
author William Astle <lost@l-w.ca>
date Sat, 11 Jun 2016 11:13:49 -0600
parents bef2801ac83e
children
comparison
equal deleted inserted replaced
5:422f5e8fff85 6:3a4c972c92ec
163 less than the requested number, it means some bytes were not written for 163 less than the requested number, it means some bytes were not written for
164 whatever reason and the client must deal with queueing or buffering as 164 whatever reason and the client must deal with queueing or buffering as
165 appropriate. 165 appropriate.
166 166
167 167
168 06 VPORT_READFIXED
169
170 This request reads bytes from a virtual port. The request looks as follows:
171
172 Octet Meaning
173 ----- -------
174 0-2 F3 00 04
175 3 port number
176 4 size to read in octets (N)
177
178 The response is looks as follows:
179
180 Octet Meaning
181 ----- -------
182 0 status
183 1 number of bytes returned (n)
184 2-... returned data
185
186 In all cases, there will be exactly N octets in the returned data. Any bytes
187 not filled by actual data are undefined but should be zero.
188
189 If status is nonzero, then the read failed. This will usually be due to a
190 lack of data (1) OR the port not being open (2). In this case, any
191 subsequent octets in the packet can be ignored.
192
193 If (n) is less than (N), then there will be extra octets in the returned
194 data section which must be ignored.
195
196 This option is provided as an alternative to the VPORT_READ call for systems
197 which cannot easily handle a variable length packet safely. In particular, a
198 115k "bitbanger" implementation on the Coco itself might choose to use this
199 option to adding another 500+ bytes to its lwwire client driver. Ohter
200 communication channels that do not have this limitation should prefer the
201 variable length packet option with larger request sizes to minimize
202 transaction count.
203