[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] solving my problem, helping others. JNI vs Boost
From: |
Brian Tiffin |
Subject: |
Re: [open-cobol-list] solving my problem, helping others. JNI vs Boost |
Date: |
Fri, 15 Mar 2013 18:41:02 -0400 |
User-agent: |
Opera Mail/12.14 (Linux) |
On Fri, 15 Mar 2013 17:57:25 -0400, Patrick
<address@hidden> wrote:
So my primary focus is controlling scientific instruments and processing
data from them.
I have struggled with my project, I probably should just do the whole
thing in C/C++, like almost everyone that does this sort of thing does
but I don't really like these languages and love the clearer layout of
Cobol, Ada, Pascal, Fortran etc.
It's kinda weird, but you can almost think of OC programming as C
programming when you want to.
As a quick for instance. This is the Makefile I used to test out FastCGI
on Cygwin a few days ago.
myfcgi: myfcgi.cob
cobc -x -C myfcgi.cob
sed -i 's/#include <stdio.h>/#include <fcgi_stdio.h>/' myfcgi.c
cobc -x myfcgi.c -lfcgi
cobc accepts .c filenames likka da butter
Plus, being built up around autotools, we win on that side of the
development fence too.
With OC moving over to generating C++ code soon I am thinking about C++
again.
Ummm, don't expect cobc to be generating any C++ in the near future. It's
a possibility, but it'll have implications that haven't been studied yet.
The underlying communication protocols I need to work with are Ethernet,
RS232 and GPIB and I want to do this in a cross platform way which is an
extremely tall order.
Boost has cross platform support for both sockets and serial ports.
There won't be cross platform GPIB and I will need two or more separate
libraries for this.
Java also has libraries for sockets and Serial ports as does QT.
Does anyone have any feedback on the best approach for me and also what
would be best for the greater community?
For Java, I think straight up JNI integration is the way to go, and the
intermediate tool of choice may well be SWIG.
www.swig.org
For ethernet and TCP/IP start with POSIX and work out from there. Then,
find a common denominator for Windows. (Then cry that you can't because
Microsoft is special and plays so well with others. Kidding, LCD library
code can usually be found.)
For RS232 take a look at socat. http://www.dest-unreach.org/socat/ And a
sample hint page for serial ports at
http://technostuff.blogspot.ca/2008/10/some-useful-socat-commands.html
(that was just the first one I found that mentioned socat and serial
For GPIB take a look at, ummm wait, what is GPIB? ;-)
Cheers,
Brian
-Patrick
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list