Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-31 Thread cfo
On Mon, 30 Jan 2012 19:23:10 +, cfo wrote:

 I just got my Prologix GPIB-ETH
 
 I am 90% Linux Ubuntu based , and would like to get 99% based. So i am
 looking for some C code examples, implementing the linux networking
 part.
 

Thanx for all the suggestions , i'll have a look at porting winsock apps 
to sockets.

But i really like PHK's pylt , and will prob. give a prologic-eth driver 
a try. 
I have never tried python , but i hope i can ask for help on the net. 

After all i do have PHK's USB py driver as a nice skeleton.

CFO



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-31 Thread Jim Lux

On 1/31/12 12:34 PM, cfo wrote:

On Mon, 30 Jan 2012 19:23:10 +, cfo wrote:


I just got my Prologix GPIB-ETH

I am 90% Linux Ubuntu based , and would like to get 99% based. So i am
looking for some C code examples, implementing the linux networking
part.



Thanx for all the suggestions , i'll have a look at porting winsock apps
to sockets.

But i really like PHK's pylt , and will prob. give a prologic-eth driver
a try.
I have never tried python , but i hope i can ask for help on the net.

After all i do have PHK's USB py driver as a nice skeleton.

CFO



Python is easy, once you get past the indenting for block structure 
thing..


It's a great way to do scripting.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-30 Thread cfo
I just got my Prologix GPIB-ETH

I am 90% Linux Ubuntu based , and would like to get 99% based.
So i am looking for some C code examples, implementing the linux 
networking part.

I have sen the Prologix example C/C+ , but it's WINSOCK.

I was thinking ... There must be someone out there using a Prologix GPIB-
ETH with linux , that might want to share some code/lib.

I saw a ref. for some Prologix stuff in the TimeLab source (win32 i 
think) , but i can't seem to find the source.

CFO


___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-30 Thread Poul-Henning Kamp
In message jg6qmu$itq$3...@dough.gmane.org, cfo writes:

I just got my Prologix GPIB-ETH

I am 90% Linux Ubuntu based , and would like to get 99% based.
So i am looking for some C code examples, implementing the linux 
networking part.

Look at this stuff:

https://github.com/bsdphk/pylt

As far as I know the GPIB-ETH is just like the GPIB-USB, except you
open a socket in stead of as (usb-) serial port.

I switched from C to python for stuff like this.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-30 Thread Orin Eman
On Mon, Jan 30, 2012 at 11:23 AM, cfo xne...@luna.kyed.com wrote:

 I just got my Prologix GPIB-ETH

 I am 90% Linux Ubuntu based , and would like to get 99% based.
 So i am looking for some C code examples, implementing the linux
 networking part.

 I have sen the Prologix example C/C+ , but it's WINSOCK.



There's hardly any difference between Linux sockets and WINSOCK as far as
that example code goes.

Remove the WSAStartup/WSACleanup calls, change sprintf_s to sprintf,
WSAGetLastError() to errno, SOCKET to int and you should be done.  That's
the easy part.

The hard part is handling timeouts as the Prologix doesn't give any
indication if a ++read timed out.

Orin.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-30 Thread Azelio Boriani
Interesting, I've downloaded and taken a look at the example and noted how
the Prologix doesn't use the Remote Procedure Call (RPC) method but a
simple telnet-like connection. Follow Orin's directions to convert from
WINSOCK to Linux-style socket calls. Maybe you should first take a look how
to open a simple TCP connection under Linux and you'll find the system
calls pointed out by Orin.

On Mon, Jan 30, 2012 at 9:28 PM, Orin Eman orin.e...@gmail.com wrote:

 On Mon, Jan 30, 2012 at 11:23 AM, cfo xne...@luna.kyed.com wrote:

  I just got my Prologix GPIB-ETH
 
  I am 90% Linux Ubuntu based , and would like to get 99% based.
  So i am looking for some C code examples, implementing the linux
  networking part.
 
  I have sen the Prologix example C/C+ , but it's WINSOCK.



 There's hardly any difference between Linux sockets and WINSOCK as far as
 that example code goes.

 Remove the WSAStartup/WSACleanup calls, change sprintf_s to sprintf,
 WSAGetLastError() to errno, SOCKET to int and you should be done.  That's
 the easy part.

 The hard part is handling timeouts as the Prologix doesn't give any
 indication if a ++read timed out.

 Orin.
 ___
 time-nuts mailing list -- time-nuts@febo.com
 To unsubscribe, go to
 https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
 and follow the instructions there.

___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Prologix GPIB-ETH - Linux examples ?

2012-01-30 Thread John Miles
 I was thinking ... There must be someone out there using a Prologix GPIB-
 ETH with linux , that might want to share some code/lib.
 
 I saw a ref. for some Prologix stuff in the TimeLab source (win32 i
 think) , but i can't seem to find the source.

Sorry, I should've been more specific -- when you run the (Windows) setup
from http://www.miles.io/timelab/readme.htm it will give you a near-complete
copy of my development directory at the time that version was built.  

By default, most of the program's .cpp/.h source code ends up in c:\program
files\miles design\timelab alongside the 32-bit and 64-bit executables, and
in various directories underneath it.  This includes all of the data
importers and TIC/frequency counter drivers, as well as the TSC
5115/5120/5125 drivers... basically everything is there but the TimePod
driver source. 

For GPIB-LAN example code, you could look at the TCPBLOCK class in
drivers\shared\comblock.cpp, as well as the module that abstracts the
various GPIB providers (gpibport.cpp).  .  

As Orin says the differences between Winsock and *nix/BSD sockets are not
large, at least for trivial applications like this one.  Higher-performance
code will tend to use more OS-specific calls to set up overlapped I/O
operations and such, but there's no need for that here.  TCPBLOCK is a
rather low-performance chunk of code, being structured to read one byte at a
time.  It's fine for GPIB work but you wouldn't want to write a browser with
it.

-- john



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.