LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert .Net refnum for video through TCP/IP

Solved!
Go to solution

 The project that i am doing is on video conferencing. I have some problems sending the real time Video through TCP/IP. The source is a .Net refnum and i need to transmit the data through the Type Cast in string. So from the picture box i pass the data through Anything to Variant and then Variant to flatten string. This is for the server.

PIC53.tmp.jpg

 

For the client, i create another Vi and with the new picture box, i pass the received data from the Type Cast through Anything to Variant and Variant to Data back to the Picture Box.However i am unable to get any images at the clientside. Is my concept wrong in doing this way?I tried passing data from the Type Cast back from flatten string back to variant but to no avail.

PIC55.tmp.jpg

 

P.S : i am new to labview and hope that you would help me. Any help is greatly appreciated. Thanks

0 Kudos
Message 1 of 8
(4,899 Views)

It is not just labVIEW but all computer languages that would have this issue.

 

References do not include the data, they are a way to find the data. They are much different than the number you get when you want service at the butcher shop so "you take a number". The butcher does not know your name, but will let you know it is your turn by calling out your number. Similarly the number you get at the butcher will not help out at the barber shop.

 

The refnum you have is a key number used to locate the data or resources assocaited with your widget. when you pass that number (ref) to a function that knows about it, the number is used to look up all of the details that go with that ref. The numbers are usually given to you when the resources are allocated and you open the gizmo.

 

So...

 

You are trying to use a ticket from the butcher to work at the barber shop!

 

What you will have to do is pull out the data associated with that ref and pass the data (not the ref to the data) to the client.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 8
(4,892 Views)
ok, now i understand what you mean. Just to ask you, how cani pull out the data assosciated with the Ref so i can pass the data to the client. Anyway to do that?
0 Kudos
Message 3 of 8
(4,888 Views)

Blanko wrote:
ok, now i understand what you mean. Just to ask you, how cani pull out the data assosciated with the Ref so i can pass the data to the client. Anyway to do that?

I suggest you broden that target audience becuase I have no idea how to do that (without interupting on eof the other developers I work with).

 

Ben

 

"Jack of all trades but only a master of some"

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(4,884 Views)

This appears to be a repackaging of your previous question.

 

Where are people supposed to respond?

0 Kudos
Message 5 of 8
(4,871 Views)
i am sorry that i repackage my question. i wanted to close the last threads but i am not sure how to do it. i follow your ideas on using tcp/ip for the video conversation but i am stuck somehow that why i decided to ask again. sorry if i double post.
0 Kudos
Message 6 of 8
(4,841 Views)
Solution
Accepted by topic author Blanko

In order to transfer the data from one computer to another you have to extract the data from the PictureBox control. The .NET classes are all documented in MSDN. The .NET PictureBox documentation is here. This will tell you what methods and properties you have to use to get to the image data. Specifically, the Image property will return the image being displayed as an Image class. This class has its own properties and methods. Now, with this class getting the raw data is not trivial. There is no "RawData" property. You could, instead, use the Save method and save the image to a Stream object though that's probably not going to buy you much. You could use the Save method and save the image to file and then transfer the file over TCP/IP. If you use the file save to file method then at the client end you would need to capture the data, save it to file and create an Image from file and then set the PictureBox's Image property to the Image object you just creted.

 

That's a lot of work and a lot of .NET calls. This will be quite slow. 

Message 7 of 8
(4,833 Views)
Thanks great idea from you. i will tried it out . Thanks you once again
0 Kudos
Message 8 of 8
(4,812 Views)