Visual Productions forum

Author Topic: COREs TCP Connections  (Read 1785 times)

July 21, 2022, 09:29:08 AM
Read 1785 times

greg-pulse

  • Member
  • *
  • Posts: 20
Hi,
I am trying to create a driver to communicate with a third part control server and I want to receive all the data from the device on connection. How can I retrieve the status of all playbacks, intensity and rate upon connection to the TCP.

Another issue I have is the data being sent from a core doesn't have a Carriage Return "\r" which means my TCP server doesn't recognize the message as there is no end and the messages keep coming until the server crashes or times out. - Is there anyway to add a carriage return to the API?

Thanks a lot,

Greg

August 22, 2022, 01:08:21 PM
Reply #1

Julien Levaufre

  • Administrator
  • Member
  • *****
  • Posts: 3095
    • www.visualproductions.nl
Sorry for the late answer, because of vacations we kind of missed you post.
Since then I don't know if you find a solution for your problem.

About the feedback of your core via TCP, there is currently no possibility to request the status of playbacks. For now there is only an automatic feedback information via TCP, when a value is changed. This will happen if you sent a TCP request previously to the core, then the core will store the IP address and port number. Then when any value will change, it will send the updated value to the stored IP address via TCP message.

About the carriage return issue, for now, messages sent from  core do not include any. If you are sending many messages and want to be able to parse each message, you can detect the beginning of the next message that will always be the API name of the core that you can set in the settings page.
But I will also transmit this problem to our dev team and see if they can do something for it.

I hope those informations will help you.

Julien Levaufre
Visual Productions BV

August 25, 2022, 05:43:01 PM
Reply #2

greg-pulse

  • Member
  • *
  • Posts: 20
Thanks Julien,

We found a workaround for the carriage return by receiving bytes instead of string.

For the feedback, we find this kind of critical, when our control device first connects to the VP device we would like to get the full status to show the user the current state of PBs as a feedback, hope this can be looked at :) We are using the feedback if the state changes to update our controller but we really need that 'Initial State'

August 26, 2022, 09:52:42 AM
Reply #3

Julien Levaufre

  • Administrator
  • Member
  • *****
  • Posts: 3095
    • www.visualproductions.nl
Hi Greg,
I am glad you found a work around for the carriage return issue.
About the feedback via TCP, I will transfert the request to the dev team and include it to their todo list, but I cannot guarantee  it will be solve any soon.
Maybe you could use UDP messages? In this case it's easy to create actions that will send back all playback values to your controller.
You did not say which controller you are using, with our Cuecore 3 you can actually send custom TCP messages and then create the feedback messages  like I said previously via UDP with Cuecore 2, Bstation2 and Quadcore.
I hope this will help you,
Julien Levaufre
Visual Productions BV

August 02, 2023, 11:55:27 AM
Reply #4

greg-pulse

  • Member
  • *
  • Posts: 20
Hi Julian,

Please could you expand on this point please "with our Cuecore 3 you can actually send custom TCP messages and then create the feedback messages  like I said previously via UDP with Cuecore 2, Bstation2 and Quadcore."

Do you have any link to the manual or further information?

August 02, 2023, 01:41:41 PM
Reply #5

Julien Levaufre

  • Administrator
  • Member
  • *****
  • Posts: 3095
    • www.visualproductions.nl
So the idea is ,instead of using the API commands, use the show control to create a specific behaviour of the Cuecore that will send back the status of each playback when your server will send a TCP request for it typically at its start.

The first step, is to store in variables the current cue of each playback:
- In show control create a playback action list and add one action for each playback,
- In the action select "cue index" as trigger type, select witch playback you want to use.
- Add a Variable action, and select "set value"/"control" and set the index of the variable you want to use ( let's say variable 1 for playback 1 etc.)
- do that for each action/playback

Second step is to make the Cuecore send the variables values:
- create a variable action list
- create one action for each variable
- edit the action, in "trigger type" select "channel" and in "variable index" set the variable index from where you want the value
- add a TCP task and select "send unsigned", in the first parameter type the TCP tag you want to use like 'PB1=" for the variable 1; second parameter is the IP address and TCP port of your server.

Last step is to say to the Cuecore when to send the messages to your server
- create a TCP action list
- create 1 action
- Edit the action and in the trigger value, type the TCP key word your server will send to ask for informations ( you can type it or use the learn button to avoid typo)
- create an "action list task", set it to "enable"/"set" select the "variable" action list and set it to "on"
- create a variable task, set it to "refresh"/"all" . (When you refresh the variables it will send all the TCP messages.)
- create a last "action list" task, set it to "enable"/"set" select the "variable" action list and set it to "off"

So, the idea is to have the value of the playing cue stored into variables.
The variable action list should send TCP messages as soon as the value change but by default it will be inactive.
When the Cuecore will receive the TCP message from your server, it will activate the variable action list, refresh all variables triggering all the variables actions and send the TCP messages.
And finally in the end we deactivate again the variable action list.

I hope this clear and will help you
Julien Levaufre
Visual Productions BV

 

SMF spam blocked by CleanTalk