K
karthik
Hi,
I need to do parallel port programming in one of my Java applications.
The requirement is that I need to write a byte very frequently to the
port triggered by some events, which will be used by an Event
Acquisition hardware hooked onto this parallel port. I went through
the javax.comm documentation for doing this. I found that it was
treating the port as if a printer was connected to the port. I don't
know how to use this package to my requirements. If some one has some
sample code it would be great.
Also, I've thought about few alternatives. I am thinking of using JNI
to do this. I'll have all the parallel port access routines in a C
routine and I can call this from my Java module using JNI. Else, as an
alternate choice, I can use sockets to communicate with these C
routines instead of JNI, if JNI is not the right choice. I am not sure
which one would be better. If one of you can direct me onto a right
track I would greatly appreciate it.
So, if you could let me know which is better: javax.comm or TCP/IP or
JNI ti would be great!
TIA,
karthik
I need to do parallel port programming in one of my Java applications.
The requirement is that I need to write a byte very frequently to the
port triggered by some events, which will be used by an Event
Acquisition hardware hooked onto this parallel port. I went through
the javax.comm documentation for doing this. I found that it was
treating the port as if a printer was connected to the port. I don't
know how to use this package to my requirements. If some one has some
sample code it would be great.
Also, I've thought about few alternatives. I am thinking of using JNI
to do this. I'll have all the parallel port access routines in a C
routine and I can call this from my Java module using JNI. Else, as an
alternate choice, I can use sockets to communicate with these C
routines instead of JNI, if JNI is not the right choice. I am not sure
which one would be better. If one of you can direct me onto a right
track I would greatly appreciate it.
So, if you could let me know which is better: javax.comm or TCP/IP or
JNI ti would be great!
TIA,
karthik