Page 1 of 1

Splitting a Data String with TCP Node Connection

PostPosted: Mon Feb 01, 2016 7:22 pm
by chrisr
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)
TCPSend,1,AD (asks for Video Clip Durations)
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


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.


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.

Re: Splitting a Data String with TCP Node Connection

PostPosted: Mon Feb 01, 2016 9:04 pm
by malkuth23
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!

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. ... 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.

Re: Splitting a Data String with TCP Node Connection

PostPosted: Mon Feb 01, 2016 9:37 pm
by chrisr
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



Re: Splitting a Data String with TCP Node Connection

PostPosted: Mon Feb 01, 2016 9:56 pm
by malkuth23
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.

Re: Splitting a Data String with TCP Node Connection

PostPosted: Mon Feb 01, 2016 10:18 pm
by chrisr
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.

Re: Splitting a Data String with TCP Node Connection

PostPosted: Tue Feb 02, 2016 5:10 am
by schoissi
not sure if i understand your questions correctly...
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...

SUCCESS!! Splitting a Data String with TCP Node Connection

PostPosted: Wed Feb 03, 2016 1:24 am
by chrisr
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:
Var_AN = PBP1

Var_AD = PBP2

Var_AU = PBP3


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.