Splitting a Data String with TCP Node Connection

Moderator: Moderator Group

Splitting a Data String with TCP Node Connection

Postby chrisr » Mon Feb 01, 2016 7:22 pm

Good afternoon all,
I am stuck on a problem. I am trying to learn how to have Widget Designer ask for and display multiple strings of information from Playback Pro. I am using playback pro because I own a computer with it installed. This way I can see the fruits of requested data. This is currently how I am trying to accomplish this.

Custom Script Button:
Script is:
TCPSend,1,AN (asks for Video Clip Names)
WDWait,1
TCPSend,1,AD (asks for Video Clip Durations)
WDWait,1
TCPSend,1,AU (asks for Clip numbers)

When I ask for just one data string, lets say Clip names, then all works out fine. I can get, and display with a couple nodes all this information. The three nodes I use are / TCP Input -> Split Text -> Textbox Output . Once I add another data request to the Script button, I can not seem to be able to grab the first string of data (data1) and the second stream of data (data2). I have tried changing the output channels to two, but to no avail. Right now the TCP Input Node is sending to TWO Split Text nodes. Screen Grab attached. So question is, What am I missing? I feel that there is something I am totally overlooking.

Thanks everyone for reading, My apologies for being a newbie and not fully understanding some of the functionality within this project.

Thanks in Advance

Chris

This is the First screen grab showing where I am currently stuck... The problem is I dont know how to tell Widget Designer what the end of a string is. I have used the split text and told it every comma it sees send text to different textbox ouputs... hence the list you see in the screen grab.

Image

This is Wireshark, you can see in the lower right corner that the data comes across the network. I do not know if there is some sort of END type message denoting that "THIS" is an end to the request string. I've asked the DT Video guys for some input. I'll follow up with what they say for everyone's knowledge.
Image
Last edited by chrisr on Mon Feb 01, 2016 10:20 pm, edited 2 times in total.
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Splitting a Data String with TCP Node Connection

Postby malkuth23 » Mon Feb 01, 2016 9:04 pm

Splitting in the TCP node is mostly for a custom protocol.

Basically you could have the source send something like:

!Start!Billy Bob!Split!Jimmy Bob!End!

Where:
Start = !Start!
Split = !Split!
End = !End!

The node can then produce 2 outputs that will show:
Billy Bob
Jimmy Bob

You can make them whatever you like.
This is very useful for custom stuff and often already existing protocols that the TCP node can adapt to.

http://www.coolux.de/root/downloads/sup ... tcp_in.htm

I am not sure what is happening with your query though. I would go to the tcp connection and "test" the connection. Then send the query and see what the results are. Is there a consistent piece of data at the end of each response? That could be your split...

Test that and post back here maybe.

Also - your image did not attach.
Matthew Newman-Saul
Theatrical Concepts
mattns@theatrical.com
User avatar
malkuth23
 
Posts: 354
Joined: Tue Apr 20, 2010 7:14 pm
Location: New Orleans, LA

Re: Splitting a Data String with TCP Node Connection

Postby chrisr » Mon Feb 01, 2016 9:37 pm

Matthew, Check post now, I fixed the attachments. Thanks for the heads up.

I talked to the DT Videolabs guys, waiting on a response. I'm not sure they put something at the end of the reply stating that its done. something like a [CR LF] or something I can put in saying this is the end, start new. I feel I'm on the right track. Justyn Roy has been a big help as well. Strange thing is when I do make the two requests.... in the TCP Properties Output window, the first reqest pops up, then one second later, the second request fills the window... So the output box is separating the Clip names / Clip duration requests.... HOW does it know!! :) Alright

Cheers!

Chris
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Splitting a Data String with TCP Node Connection

Postby malkuth23 » Mon Feb 01, 2016 9:56 pm

If there is a long enough pause, then the data will be separated.
You are pausing 1 second, so this is implied that it is a new piece of data.

You can determine if there is a useful marker at the end of the message by testing the tcp connection in the connection manager.
Matthew Newman-Saul
Theatrical Concepts
mattns@theatrical.com
User avatar
malkuth23
 
Posts: 354
Joined: Tue Apr 20, 2010 7:14 pm
Location: New Orleans, LA

Re: Splitting a Data String with TCP Node Connection

Postby chrisr » Mon Feb 01, 2016 10:18 pm

Matthew,
As far as I see, there is no "END" to the data query. And thanks for the explanation on how the TCP Properties OUTPUT box denote two different data queries.
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Splitting a Data String with TCP Node Connection

Postby schoissi » Tue Feb 02, 2016 5:10 am

hi,
not sure if i understand your questions correctly...
but,
why don't you try to make 3 different nodes with 3 different script buttons and so on...
one for clip names, one for clip durations, one for clip numbers,
then you only get, per node, the required information and can split/process it easier?

you can than trigger multiple script buttons from one "master" script button.

not sure if this works...
schoissi
 
Posts: 95
Joined: Thu Jan 01, 2009 9:48 pm
Location: Seattle, USA

SUCCESS!! Splitting a Data String with TCP Node Connection

Postby chrisr » Wed Feb 03, 2016 1:24 am

OK Thanks everyone who aided in this learning venture for me. Here is the Node structure to solve the issue of not having any breaks in the data. So, Justyn Roy had the idea of requesting first string of data, and grabbing that string with a wait command, then using Variables doing an equal to to "store" the data. Worked great. schoissi Also had some good input with splitting up the TCP Input Nodes, so thanks all!!

Here was Justyn's Out of the Box thinking:
TCPSend,1,AN
WDWait,1
Var_AN = PBP1

WDWait,1
TCPSend,1,AD
WDWait,1
Var_AD = PBP2

WDWait,1
TCPSend,1,AU
WDWait,1
Var_AU = PBP3

Image

In the end, you can see in the screen grab of how it turned out. Now you can just rinse and repeate to make sure you have enough space for longer playlists. I will hide the nodes on another page, and put the important info on the front page.


If you have any questions feel free to message me. I can explain further if needed.

Cheers!

Chris
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 21 guests