Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15356 > unrolled thread

Can MathLink write binary data to and read binary data from a TCP or

Started bysibir <martin.rommel@gmail.com>
First post2013-08-29 05:35 +0000
Last post2013-08-31 12:17 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Can MathLink write binary data to and read binary data from a TCP or sibir <martin.rommel@gmail.com> - 2013-08-29 05:35 +0000
    Re: Can MathLink write binary data to and read binary data from a David Bailey <dave@removedbailey.co.uk> - 2013-08-31 12:09 +0000
    Re: Can MathLink write binary data to and read binary data from a TCP or sibir <martin.rommel@gmail.com> - 2013-08-31 12:17 +0000

#15356 — Can MathLink write binary data to and read binary data from a TCP or

Fromsibir <martin.rommel@gmail.com>
Date2013-08-29 05:35 +0000
SubjectCan MathLink write binary data to and read binary data from a TCP or
Message-ID<kvmmjd$4k4$1@smc.vnet.net>
I have a data acquisition system (which runs a UDP server on a point to point ethernet connection) which I want to control from Mathematica by sending it a bunch of bytes as commands and reading back binary data.
Is MathLink all I need or do I need some auxiliary code?

Not my hometurf :-( 

Thanks for any advice!

[toc] | [next] | [standalone]


#15358 — Re: Can MathLink write binary data to and read binary data from a

FromDavid Bailey <dave@removedbailey.co.uk>
Date2013-08-31 12:09 +0000
SubjectRe: Can MathLink write binary data to and read binary data from a
Message-ID<kvsmeg$gtt$1@smc.vnet.net>
In reply to#15356
On 29/08/2013 06:35, sibir wrote:
> I have a data acquisition system (which runs a UDP server on a point to point ethernet connection) which I want to control from Mathematica by sending it a bunch of bytes as commands and reading back binary data.
> Is MathLink all I need or do I need some auxiliary code?
>
> Not my hometurf :-(
>
> Thanks for any advice!
>
Your best bet is  to use J/Link and use the relevant classes from there.

J/Link uses Mathlink internally, but it is much easier to use than 
MathLink. If you need more than a few lines of code, I'd write a Java 
class and compile it, rather than making lots of J/Link calls.

Another option, since version 8, is to link directly to a DLL library 
written in C/C++. This is a direct call without a process switch, and 
doesn't use MathLink.

David Bailey
http://www.dbaileyconsultancy.co.uk

[toc] | [prev] | [next] | [standalone]


#15359

Fromsibir <martin.rommel@gmail.com>
Date2013-08-31 12:17 +0000
Message-ID<kvsmsq$h9j$1@smc.vnet.net>
In reply to#15356
After reading through a lot of documentation I have the feeling I would be better off with JLink. Then I found a relevant post on Stack Overflow:

http://stackoverflow.com/questions/5837588/connecting-to-a-udp-data-stream-with-mathematica

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web