prads Posted May 17, 2008 Report Share Posted May 17, 2008 Hello, I have a text file with some data in ASN.1 notation. I have to open this file in labVIEW (which I have done and converted the path to string). Now this output string has to be transmitted and Received. Its just a dummy/prototype model which I have to do as of now. 1. Do we have something like a transmitter and a Receiver? 2. Also is there a Property node wherein the names of the properties can be set and selected by me and not from a given fixed collection of properties. 3. I want to convert a path/string to double and path/string to unsigned long. Is there a VI that I can use? I could not find any directly so i used path to string, Fract/Exp string to num, num to unsigned long int and num to double precision float. Is this correct? and is this the only way to do it? Thanks, prads Quote Link to comment
Karissap Posted May 17, 2008 Report Share Posted May 17, 2008 For a transmitter and receiver you could use the TCP, UDP or DataSocket functions. If you want to set custom properties try converting the data to a variant and using "Set Variant Attribute.vi" Have a look at the example "DS Writer With Attributes" in the NI example finder. This shows an example of DataSocket communication with variant properties. For converting strings to number formats you can also use "Scan from String.vi" which gives more flexibility to scan a value from a string into any format. Quote Link to comment
Ton Plomp Posted May 17, 2008 Report Share Posted May 17, 2008 QUOTE (prads @ May 16 2008, 02:19 AM) Hello,I have a text file with some data in ASN.1 notation. I have to open this file in labVIEW (which I have done and converted the path to string). Now this output string has to be transmitted and Received. Its just a dummy/prototype model which I have to do as of now. 1. Do we have something like a transmitter and a Receiver? 2. Also is there a Property node wherein the names of the properties can be set and selected by me and not from a given fixed collection of properties. 3. I want to convert a path/string to double and path/string to unsigned long. Is there a VI that I can use? I could not find any directly so i used path to string, Fract/Exp string to num, num to unsigned long int and num to double precision float. Is this correct? and is this the only way to do it? Hi Prads, your questions (which look like some homework) needs a lot more information. For instance what is ASN.1? A path has alphanumeric info, how would that match to a numeric datatype? I cannot think of a valid conversion between path and numeric. What do you mean with the property node? Does your data-type have some specific meta-info you want to read? If that's the case you should built your own functions. Without any code you allready have it will be very unlikely that we can help you. Ton Quote Link to comment
Mellroth Posted May 17, 2008 Report Share Posted May 17, 2008 QUOTE (prads @ May 16 2008, 01:19 AM) 1. Do we have something like a transmitter and a Receiver?2. Also is there a Property node wherein the names of the properties can be set and selected by me and not from a given fixed collection of properties. 3. I want to convert a path/string to double and path/string to unsigned long. Is there a VI that I can use? I could not find any directly so i used path to string, Fract/Exp string to num, num to unsigned long int and num to double precision float. Is this correct? and is this the only way to do it? You will have to create most of the ASN.1 support by yourself, at least that was the case last time we used it. 1. Specific ASN.1 support for sending/reading data? No, but you can use the TCP/IP or UDP support fort the actual transfer, but formatting according to ASN.1 has to be created. 2. No, Encoder/Decoder for ASN.1 does not exist in standard LabVIEW as far as I know. 3. again, as there is no native support for ASN.1, you'll have to come up with a clever solution. Using the primitives as you have done so far is a good start. This file you mention, does it contain packed data (ASN.1 encoded), or is it a description of the protocol? QUOTE (tcplomp @ May 16 2008, 05:21 AM) For instance what is ASN.1? ASN.1 is a way to describe packaging of data in communications. http://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One /J Quote Link to comment
prads Posted May 17, 2008 Author Report Share Posted May 17, 2008 Hello JFM, My path only consists of ASN.1 data structure and will include the record values. I am not packing it in any format for now. I want to read the data in this file and transmit it to receive it and then write it to another file. Do you have any idea how to proceed with this task. Thanks, prads Quote Link to comment
Mellroth Posted May 18, 2008 Report Share Posted May 18, 2008 QUOTE (prads @ May 16 2008, 09:03 PM) ...Do you have any idea how to proceed with this task... Prads, When you say you don't use any packaging, do you mean that you only want to; 1. read the contents of a file (raw format, i.e. byte by byte) 2. transfer the content to another computer (e.g. using TCP/IP) 3. write content to a new file (basically making a file copy over the network) You will probably get more/faster help if you could show us what you have done so far, and perhaps also show the contents of the file. /J Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.