UDP Control

<< Click to Display Table of Contents >>

Navigation:  Configure VideoSyncPro Studio > Program Settings > Control >

UDP Control

Mangold VideoSyncPro Studio can receive and send UDP commands for remote control by third-party software. This allows you to start and stop recordings from within another application.

The command structure is very simple and consists of a [TAB]-separated string for each COMMAND. ([TAB] = ASCII character 9)

Because all individual information items in such a COMMAND are delimited by TABs, SPACES can be used inside of those information items (e.g. in file names)

Each COMMAND sent, is typically confirmed by an ACKNOWLEDGE by the receiver. This way, the sender can be sure the receiver app is running and has processed the command. The following commands and their information fragments are currently available:

Constant

Description

UDP_Delimiter = chr(9)

ASCII [TAB] character. Delimits all information items in a UDP string.

UDP Prefix for each string sent

'REQ'

Tells the receiver that this command string is a “Request”
Example:
=> REQ [TAB] STARTREC

'ACK'

Tells the receiver that this command string is an “Acknowledge” for having received the command XYZ.

The command XYZ is hereby the core command of the received string.

Example:
=> REQ [TAB] STARTREC <= ACK [TAB] STARTREC

'ANS'

Tells the receiver that this command is an “Answer” to a specific command.

Example:
=> REQ [TAB] STARTREC <= ACK [TAB] STARTREC <= ANS [TAB] READY

'ERR'

Tells the receiver that an “Error” occurred.

Example:
<= ERR [TAB] Disc full! File abc cannot be saved.

UDP Parameters

'TIME'

A High precision Mangold Time Information follows (in Milliseconds * 10000).

'TIMEONSET'

'TIMEOFFSET'

A High precision Mangold Time Information follows (in Milliseconds * 10000), which shall be interpreted as onset (start) or offset (end) time information for a specific functionality

'FILE'

A filename follows.

Example:
=> REQ [TAB] PREPARE [TAB] FILE [TAB] my recoding file name

UDP Core command elements

'PREPARE'

Tells VSP to prepare for recording.

VSP will prepare a new recording based on the first scenario found. It will be recorded later, using the given filename.

When the scenario has been loaded and the cameras are initialized, VSP sends back a “READY” answer. Necessary parameters: FILE

Example:
=> REQ [TAB] PREPARE [TAB] FILE [TAB] my recoding file name

'READY'

VSP tells the sender that recording preparation is finished. Recording can be started with a STARTREC command.

'STARTREC'

Tells VSP to start the prepared recording.

'STOPREC'

 

 

Tells VSP to stop the prepared recording.

 REQ[TAB]STOPREC[TAB]FORCE

Overrules the confirmation dialog on the recording station.

'ADDMARKER'

Tells VSP to add a marker.
Necessary parameters: An arbitrary text string as marker.
Optional parameters: TIME

If NOT TIME parameter is given, the marker will be recorded at the point in time, the marker is received by VSP, relative to the start of the recording (always time ZERO).

If a TIME parameter is given, this time value will be subtracted from the current time in VSP. Thus, if the sender knows the sending delay time, this parameter can be used to set more precise markers.

Example:

=> REQ [TAB] ADDMARKER [TAB] This is a comment [TAB] TIME [TAB] 5000000

(Add a marker and subtract 500 milliseconds of the time this marker is recorded in VSP, relative to the recording start. Because those 500 milliseconds are “known” in this specific example as UDP delay time)

'CLOSEAPP' 

 

Tells VSP to close the entire application.

Depending on its state (maybe VSP is currently recording), it may not close without a necessary user interaction (a pop-up dialog requesting to stop recording or similar).

 REQ[TAB]CLOSEAPP[TAB]FORCE

Overrules the  confirmation dialogs.

'TERMINATE'

Tells VSP to (forcibly) terminate the entire application under all circumstances, without any further user interaction.

Example communication protocol

This is a simple but typical communication for a video recording cycle (send “=>” / send back “<=”)

=> "REQ [TAB] PREPARE [TAB] FILE [TAB] my recoding file name" 

<= "ACK [TAB] PREPARE" 

<= "ANS [TAB] READY" 

=> "REQ [TAB] STARTREC" 

<= "ACK [TAB] STARTREC" 

=> "REQ [TAB] ADDMARKER [TAB] This is a comment" 

<= "ACK [TAB] ADDMARKER" 

=> "REQ [TAB] STOPREC" 

<= "ACK [TAB] STOPREC"

 

Note: We can provide a test application to experiment with this feature. Contact support@mangold-international.com to receive a download link.

UDP Port

The UDP Port used for the communication is specified in the application settings, on the Control tab:

VSP_Settings_Control

BEWARE: If you also use any other Mangold Lab Suite application (Remote Observer, LogSquare or Mangold Vision) changing the default UDP port will affect communication between these products. As a result, certain processes may no longer work.