Accessing DataSocket Server with Python

William Ray Wing wrw at mac.com
Fri May 29 09:37:15 EDT 2015


> On May 28, 2015, at 6:17 PM, Dan Stromberg <drsalists at gmail.com> wrote:
> 
> I have no idea about the protocol used by NI DataSockets, but you
> might be able to reverse engineer the protocol by using the official
> client with a sniffer.
> 
> Also, be aware that TCP/IP guarantees that you get the correct data in
> the correct order, but it doesn't guarantee anything about the sizes
> of the chunks in which that data arrives.  So you could send 100
> bytes, 100 bytes, 100 bytes, but on the other end receive 100 bytes,
> 50 bytes, 75 bytes, 75 bytes.  When you catenate them all together,
> it's still the same data though.
> 
> HTH.
> 
> On Wed, May 27, 2015 at 4:30 AM, Garrone, Corrado

While that’s certainly possible in a routed network (and even then can be overridden with the “do not fragment” bit), it won’t happen in a LAN or self-contained instrument set-up.  These days, even routed networks tend to deliver anything less than a 1500 byte packet as a single entity.  With fiber backbones and high-speed LANs, it is more work for a router to fragment a packet then to simply pass it on.  The days of 480 byte packets pretty much went away with dial-up modems.

Bill



> <corrado.garrone at roche.com> wrote:
>> Dear Python Team,
>> 
>> currently I am working on a research project for my bachelor degree. A
>> LabVIEW application is used for current and power measurements, whereas the
>> measured data are sent to DataSocket Server, a technology by National
>> Instruments used for data exchange between computers and applications.
>> DataSocket is based on TCP/IP and thus requesting data from DataSocket
>> should be similar to an internet request.
>> I know with the socket library in Python it is possible with to establish
>> sockets, send internet requests and communicate between clients and servers.
>> Is there a possibility to access NI DataSocket and get measurement data with
>> Python on the same computer where Python is installed and the codes are
>> executed? Can you maybe send me an example code where such a connection with
>> DataSocket is established?
>> 
>> If you got any queries, please do not hesitate to contact me.
>> 
>> Thank you very much for your efforts.
>> 
>> Kind regards,
>> 
>> Corrado Garrone
>> DH-Student Fachrichtung Elektrotechnik / Co-op Student B.Eng. Electrical
>> Engineering
>> 
>> Roche Diagnostics GmbH
>> DFGHMV8Y6164
>> Sandhofer Strasse 116
>> 68305 Mannheim / Germany
>> 
>> Phone: apprentice
>> mailto:corrado.garrone at roche.com
>> 
>> Roche Diagnostics GmbH
>> Sandhofer Straße 116; D‑68305 Mannheim; Telefon +49‑621‑759‑0; Telefax
>> +49‑621‑759‑2890
>> Sitz der Gesellschaft: Mannheim - Registergericht: AG Mannheim HRB 3962 -
>> Geschäftsführung: Dr. Ursula Redeker, Sprecherin; Edgar Vieth -
>> Aufsichtsratsvorsitzender: Dr. Severin Schwan
>> 
>> Confidentiality Note
>> This message is intended only for the use of the named recipient(s) and may
>> contain confidential and/or privileged information. If you are not the
>> intended recipient, please contact the sender and delete the message. Any
>> unauthorized use of the information contained in this message is prohibited.
>> 
>> 
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list