Visual Productions forum

Author Topic: TCP/UDP Message, no Carriage Return ?  (Read 1167 times)

May 28, 2018, 04:45:29 PM
Read 1167 times

p.ricard

  • Member
  • *
  • Posts: 3
Hello,

i'm using a QSC Core to control a CueCore2, this is easy and work fine.
But between each string that the CueCore2 send as a answer, there is no EOL/CR/LF....
So... how can i know if the message is ended ?

I receive something like that : core-pb-1-cue-1core-pb-1-cue-2core-pb-1-cue-1core-pb-1-cue-2core-pb-1-cue-1core-pb-1-cue-2

I need a CR between each message.... how can it be modified ?

Thanks,

May 29, 2018, 10:38:52 AM
Reply #1

Guido Visser

  • Administrator
  • Member
  • *****
  • Posts: 227
    • Visual Productions
Hello Ricard,

What application are you using to receive the messages from the CueCore2?

Because both UDP and TCP messages use one Ethernet packet per message. The first message would be "core-pb-1-cue-1" the second "core-pb-1-cue-2". Both messages have a UDP or TCP packet. Which allows an application to separate the messages. Some application like netcat and putty will place all messages on the screen without a visible separation. Other applications like the CueCore2 will use the end of a UDP or TCP packet as the end of a message.

While you can not modify the API feedback. Maybe you can separate them using the first part of the message "core-". Which the API will put in front of every message.

Best regards,
Guido
Guido Visser
Visual Productions BV

May 29, 2018, 07:31:52 PM
Reply #2

p.ricard

  • Member
  • *
  • Posts: 3
I use Hercules to catch the received packet. But the programmation will be with a QSC Core ( Q-SYS ). It's like a Crestron....

But the fact is... you send a message without a proper ending... it's like a sentence without a dot...
I've program hundred of devices over TCP, UDP, RS232, ...  with Q-Sys but it's the very first time a see this.

I think you should add a CrLf at the end of each message.

For the moment, i use the TCP bufferlenght to calculate the ending of a string, but when 2 messages are sent very close, i can't manipulate it correctly...


May 30, 2018, 09:57:56 AM
Reply #3

Guido Visser

  • Administrator
  • Member
  • *****
  • Posts: 227
    • Visual Productions
Hello Ricard,

What you can do is use show control instead of the API. In show control you can create your own messages.

Use can use the following steps to set it up:
1. Add the Playback source to the actionlist.
2. Add and action to the Playback actionlist.
3. Set the trigger type CueIndex
4. Set the trigger value to the playback index. Which indicates which playback will trigger this action.
5. Add a task. UDP -> Send Unsigned -> Control -> "Started cue: " -> IP address.
6. Add another task to the same action. UDP -> Send Bytes -> Set -> "0D0A" -> IP address. The 0D0A is a hexadecimal encoding of the CRLF.

I you have any questions please ask them.

Best regards,
Guido
Guido Visser
Visual Productions BV

 

SMF spam blocked by CleanTalk