[Gambas-devel] Parallel port

Rob sourceforge-raindog2 at ...19...
Mon Jun 2 15:37:30 CEST 2003


You would need to write a parallel port component in C or C++.  Since someone 
was just asking about the serial port, maybe one of you should write a 
generalized Unix device component with support for ioctl functions and maybe 
stty for the serial stuff.  (I have no serial devices at all and my only 
parallel port devices have undocumented interfaces, so I won't be of much 
help writing or testing such a thing.)

Further discussion about such a component would probably be appropriate to 
keep talking about on gambas-devel, but further discussion about workarounds 
like using helper apps from your Gambas project (though I know of no parallel 
port helper apps like cu is for the serial port) should go to gambas-user.  
For example, if what you really want to do is drive a printer, there's 
already a printer component in Gambas.

If you do want to learn how to write a component, there's an example one in 
src/lib/example from the Gambas source tarball.  It looks like it's included 
in the Gambas build by default, so if you go into Project Properties and 
check off gb.example under Components, you can then use the component 
explorer to see how its methods and properties show up to Gambas.  It's not 
documented, but at least the source is heavily commented.  Notice that the 
example is GPL'ed so make sure to share your source with all of us if you 
base a component on it ;)

Rob





More information about the Devel mailing list