sane-project-website/old-archive/1997-02/0074.html

94 wiersze
4.7 KiB
HTML

<!-- received="Tue Apr 22 06:46:01 1997 MST" -->
<!-- sent="Tue, 22 Apr 1997 15:38:06 +0200 (MET DST)" -->
<!-- name="Guido Muesch" -->
<!-- email="odiug@faho.rwth-aachen.de" -->
<!-- subject="Re: Connecting SANE and Java?" -->
<!-- id="199704221338.PAA01934@darkstar.faho.rwth-aachen.de" -->
<!-- inreplyto="199704212233.PAA04519@panda.mosberger" -->
<title>sane-devel: Re: Connecting SANE and Java?</title>
<h1>Re: Connecting SANE and Java?</h1>
<b>Guido Muesch</b> (<a href="mailto:odiug@faho.rwth-aachen.de"><i>odiug@faho.rwth-aachen.de</i></a>)<br>
<i>Tue, 22 Apr 1997 15:38:06 +0200 (MET DST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#74">[ date ]</a><a href="index.html#74">[ thread ]</a><a href="subject.html#74">[ subject ]</a><a href="author.html#74">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0075.html">David Mosberger-Tang: "Re: sane-0.54 now available!"</a>
<li> <b>Previous message:</b> <a href="0073.html">Reimond Rombey: "Re: sane-0.54 now available!"</a>
<li> <b>In reply to:</b> <a href="0070.html">Gordon Matzigkeit: "Re: PINT driver patches"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0071.html">David Mosberger-Tang: "Re: PINT driver patches"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On 21 Apr, David Mosberger-Tang wrote:<br>
<i>&gt; [..]</i><br>
<i>&gt; Assume PTR is of type Simple and points to a structure whose NAME</i><br>
<i>&gt; member points to the string "This is an Example" and whose CAP member</i><br>
<i>&gt; has a value of 7. Then encoding PTR according to Sections 4.4.1-4.4.3</i><br>
<i>&gt; would give you the following values on the wire:</i><br>
<i>&gt; </i><br>
<i>&gt; </i><br>
<i>&gt; 00000001 # PTR is not a NULL</i><br>
<i>&gt; # next follows the value that PTR points to</i><br>
<i>&gt; # a structure is represented by the sequence of it's members</i><br>
<i>&gt; # first, we have the NAME member, which is a pointer itself</i><br>
<i>&gt; 00000001 # NAME is not a NULL pointer</i><br>
<i>&gt; 00000013 # the string NAME points to is 19 bytes long</i><br>
<i>&gt; This is an Example\000 # the value of the string</i><br>
<i>&gt; # next, we have the value of the CAP member:</i><br>
<i>&gt; 00000007</i><br>
<i>&gt; </i><br>
<i>&gt; So, as you can see, no pointers at all. Now, there are a few places</i><br>
<i>&gt; where the SANE C API makes use of NULL pointers (e.g., to terminate</i><br>
<i>&gt; the device-list, for example). In Java, you'd not do this. Instead,</i><br>
<i>&gt; you'd probably create an array of device records whose length is</i><br>
<i>&gt; specified explicitly. I'm not familiar enough with Java to give you a</i><br>
<i>&gt; concrete type, but the point is that SANE does not depend on pointers</i><br>
<i>&gt; per se (the C API does, however).</i><br>
Ah yes, this makes it perfectly clear. I must admit I only read over<br>
the docs ones (and too fast).<br>
<p>
<i>&gt; [..]</i><br>
<i>&gt; No, the net-protocol is language-independent. The description of it</i><br>
<i>&gt; is oriented to C and that may be what's confusing you. If the above</i><br>
<i>&gt; example doesn't clarify things, let me know and I'll try to do better.</i><br>
No, I think I got it now. So the first thing would be to write a<br>
'parser' for the sane net-protocol and the datastructures. One good<br>
thing is that datastructures like 'byte' and 'int' always have the same<br>
size in Java (unlike C), so this mapping should be easy. Well, I have to<br>
think a little more about that.<br>
<p>
BTW, I have problems to run latex over sane.tex:<br>
first:<br>
(/usr/lib/texmf/texmf/tex/latex/misc/changebar.sty) (html.sty)<br>
! Undefined control sequence.<br>
l.5 \driver<br>
{DVIPS} % tell changebar.sty how to draw bars<br>
? <br>
<p>
I get two more error messages concerning changebar, but get a .dvi file<br>
in the end.<br>
<p>
Do I need to install an additional package?<br>
<p>
Ciao<br>
Guido<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0075.html">David Mosberger-Tang: "Re: sane-0.54 now available!"</a>
<li> <b>Previous message:</b> <a href="0073.html">Reimond Rombey: "Re: sane-0.54 now available!"</a>
<li> <b>In reply to:</b> <a href="0070.html">Gordon Matzigkeit: "Re: PINT driver patches"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0071.html">David Mosberger-Tang: "Re: PINT driver patches"</a>
<!-- reply="end" -->
</ul>