Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.064 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'subject:Python': 0.05; 'bytes.': 0.07; 'hrb': 0.07; 'socket': 0.07; 'bytes,': 0.09; 'chunks': 0.09; 'tcp/ip': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'wed,': 0.15; 'server,': 0.15; 'cc:name:python list': 0.16; 'degree.': 0.16; 'measured': 0.16; 'measurement': 0.16; 'subject:Accessing': 0.16; 'wrote:': 0.16; 'skip:+ 20': 0.18; 'team,': 0.18; 'library': 0.20; 'student': 0.20; 'gmbh': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'to:2**1': 0.22; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'thus': 0.24; 'example': 0.25; 'idea': 0.26; 'installed': 0.26; 'requests': 0.26; 'germany': 0.27; 'possibility': 0.27; 'message- id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'guarantees': 0.29; 'servers.': 0.29; 'correct': 0.29; 'connection': 0.30; 'maybe': 0.31; 'url:mailman': 0.31; 'code': 0.31; 'phone:': 0.32; 'similar': 0.32; 'url:python': 0.33; 'though.': 0.33; 'message.': 0.34; 'received:google.com': 0.34; 'url:listinfo': 0.35; 'could': 0.35; 'protocol': 0.35; 'but': 0.36; 'url:org': 0.36; 'project': 0.36; 'there': 0.36; 'possible': 0.36; 'should': 0.37; 'client': 0.37; 'subject:: ': 0.37; 'delete': 0.37; 'end': 0.39; 'thank': 0.39; 'application': 0.39; 'engineering': 0.39; 'data': 0.40; 'where': 0.40; 'subject:with': 0.40; 'clients': 0.60; 'your': 0.60; 'research': 0.62; 'information': 0.62; 'efforts.': 0.63; 'national': 0.63; 'between': 0.65; 'unauthorized': 0.65; 'request.': 0.66; 'bachelor': 0.66; 'instruments': 0.66; 'reverse': 0.66; 'contact': 0.66; 'dear': 0.67; 'dr.': 0.69; 'hesitate': 0.69; 'internet': 0.69; '8bit%:21': 0.70; 'computers': 0.70; 'receive': 0.71; 'electrical': 0.72; 'power': 0.72; '100': 0.79; '8bit%:45': 0.84; 'co-op': 0.84; 'roche': 0.84; 'telefax': 0.84; 'telefon': 0.84; 'together,': 0.84; 'subject:Server': 0.91; 'recipient(s)': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=fXBfO0v+GZoUBjkuKVIO3UWBSDzD5ULmpEqiTRb+yO8=; b=V5J0596nYriFsk7gC65LcWwcWpYRJg6Yv6RraE/ETg4NvZLi7POGN1Ay/W2QpPTT8q tORXZ5yxlEKATefkzs0vckzKiHTiNqLEtJ98/MekyID888ue6dlWFVWDrlvVr6nxcAZb /FkHO7sA9ZrpvF/mXRBKY641us3mHmwZOcAtXK2+ZRLa6b+ggH9MMOfeLd3+elMsIGIN f5Onp6KtLE75MNf1vzDQy8djoEVHXi/97AI6kpkzj1y/EtqUKcqeuVCiZpZWyvcR2bO6 AjUZ8c896E2UCDUCX2GFCKNwMJ/JeA16tIQkbhBGKF6hk1ilcEjKp4rHtE02iZApVbJ7 kHOA== MIME-Version: 1.0 X-Received: by 10.140.216.83 with SMTP id m80mr6422689qhb.14.1432851469404; Thu, 28 May 2015 15:17:49 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 May 2015 15:17:49 -0700 Subject: Re: Accessing DataSocket Server with Python From: Dan Stromberg To: "Garrone, Corrado" Cc: Python List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 72 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432851478 news.xs4all.nl 2856 [2001:888:2000:d::a6]:59470 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91400 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 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 t= he > 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 serve= rs. > Is there a possibility to access NI DataSocket and get measurement data w= ith > 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 w= ith > 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@roche.com > > Roche Diagnostics GmbH > Sandhofer Stra=C3=9Fe 116; D=E2=80=9168305 Mannheim; Telefon +49=E2=80=91= 621=E2=80=91759=E2=80=910; Telefax > +49=E2=80=91621=E2=80=91759=E2=80=912890 > Sitz der Gesellschaft: Mannheim - Registergericht: AG Mannheim HRB 3962 - > Gesch=C3=A4ftsf=C3=BChrung: 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 m= ay > 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 prohibit= ed. > > > -- > https://mail.python.org/mailman/listinfo/python-list >