# Re: Connecting SANE and Java?

Guido Muesch (odiug@faho.rwth-aachen.de)
Tue, 22 Apr 1997 15:38:06 +0200 (MET DST)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: David Mosberger-Tang: "Re: sane-0.54 now available!"
- Previous message: Reimond Rombey: "Re: sane-0.54 now available!"
- In reply to: Gordon Matzigkeit: "Re: PINT driver patches"
- Next in thread: David Mosberger-Tang: "Re: PINT driver patches"

On 21 Apr, David Mosberger-Tang wrote:
> [..]
> Assume PTR is of type Simple and points to a structure whose NAME
> member points to the string "This is an Example" and whose CAP member
> has a value of 7. Then encoding PTR according to Sections 4.4.1-4.4.3
> would give you the following values on the wire:
>
>
> 00000001 # PTR is not a NULL
> # next follows the value that PTR points to
> # a structure is represented by the sequence of it's members
> # first, we have the NAME member, which is a pointer itself
> 00000001 # NAME is not a NULL pointer
> 00000013 # the string NAME points to is 19 bytes long
> This is an Example\000 # the value of the string
> # next, we have the value of the CAP member:
> 00000007
>
> So, as you can see, no pointers at all. Now, there are a few places
> where the SANE C API makes use of NULL pointers (e.g., to terminate
> the device-list, for example). In Java, you'd not do this. Instead,
> you'd probably create an array of device records whose length is
> specified explicitly. I'm not familiar enough with Java to give you a
> concrete type, but the point is that SANE does not depend on pointers
> per se (the C API does, however).
Ah yes, this makes it perfectly clear. I must admit I only read over
the docs ones (and too fast).

> [..]
> No, the net-protocol is language-independent. The description of it
> is oriented to C and that may be what's confusing you. If the above
> example doesn't clarify things, let me know and I'll try to do better.
No, I think I got it now. So the first thing would be to write a
'parser' for the sane net-protocol and the datastructures. One good
thing is that datastructures like 'byte' and 'int' always have the same
size in Java (unlike C), so this mapping should be easy. Well, I have to
think a little more about that.

BTW, I have problems to run latex over sane.tex:
first:
(/usr/lib/texmf/texmf/tex/latex/misc/changebar.sty) (html.sty)
! Undefined control sequence.
l.5 \driver
{DVIPS} % tell changebar.sty how to draw bars
?

I get two more error messages concerning changebar, but get a .dvi file
in the end.

Do I need to install an additional package?

Ciao
Guido

    --
    Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
    To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com

- Next message: David Mosberger-Tang: "Re: sane-0.54 now available!"
- Previous message: Reimond Rombey: "Re: sane-0.54 now available!"
- In reply to: Gordon Matzigkeit: "Re: PINT driver patches"
- Next in thread: David Mosberger-Tang: "Re: PINT driver patches"