Repeating TCP/IP commands

You have a question or need an advice about how to do something? Ask it here!
Post Reply
mixmog
Posts: 33
Joined: 06 Feb 2018 11:42
Repeating TCP/IP commands

Post by mixmog »

I use a TCP/IP command to trigger an (software-based) on-air lamp (https://www.voceware.co.uk/products-vclock.aspx).

Is it possible to repeat such a command until cancelled?

The problem: should the PC which runs the on-air lamp restart, the lamp will return to it's default state (off) which doesn't necessarily reflect the state it should be.

The goal: to repeat or otherwise trigger the command until it is cancelled so that the on-air status is accurate.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Repeating TCP/IP commands

Post by radio42 »

A command can not be repeated, as it is triggered by an event. So you can do two strategies:
1) Set the state at startup of ProppFrexx, ie. use the related Application event.
2) use an event which happens regularly to update your state. Eg. use a timer event (see the TI button at the bottom to eg. set this every 15 seconds or so…) OR use the Playlist.OnTrackPlay event, which happens with each new track being played.
mixmog
Posts: 33
Joined: 06 Feb 2018 11:42
Re: Repeating TCP/IP commands

Post by mixmog »

Thanks Bernd.

I can see the timer. Could you possibly give an example of how this might work with a command?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Repeating TCP/IP commands

Post by radio42 »

When you click on the TI button you can set a time interval to raise the "Application.OnTimer" event - e.g. set this to 15000 ms for every 15 sec.
In the Application.OnTimer event you can now specify the command to execute every 15 sec. (note, that global macros can be used here).
In the example below the command "PING Test" is being send.
Application.OnTimer.png
mixmog
Posts: 33
Joined: 06 Feb 2018 11:42
Re: Repeating TCP/IP commands

Post by mixmog »

Much clearer, thank you

Ok, so I wonder if the timer event could be used to trigger a command to evaluate a parameter and result in an action?

Something like IF MIXER_INPUT_VOLUME_GET=1, EXEC_SEND_TCP?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Repeating TCP/IP commands

Post by radio42 »

Conditional command-execution can be performed with the EXEC_COMMAND2 command. See the user manual appendix for details.
Conditional commands use macros to evaluate a condition.

There is currently no explicit macro for getting a specific mixer volume (note, that your example is lacking a mixer name)...
BUT there is a specific mixer event for this existing: make a right-click on a mixer name and select 'Edit Control-Command Event...'
Mixer.OnTimer.png
In this dialog you also have an OnTimer event and this executes on the specific mixer channel, e.g. you can use all mixer related macros!, like the ${mixervolume} - See the user manual appendix for further mixer macros.
E.g. here you could specify the following;

Code: Select all

EXEC_COMMAND2 ${mixervolume}|Equals(1)|SHOW_ALERT_WINDOW TEST
You'll see, it only executes, if this mixer channels volume is fully up (i.e. = 1).
Replace the SHOW_ALERT_WINDOW TEST command with your TCP call, as needed...
mixmog
Posts: 33
Joined: 06 Feb 2018 11:42
Re: Repeating TCP/IP commands

Post by mixmog »

Thanks so much for the info, very useful!
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Repeating TCP/IP commands

Post by radio42 »

Note, that the new version contains a new macro function to conditionally execute a command and Evan its result, see:
EXEC_CONMAND2 [EXEC:{MIXER_INPUT_VOLUME_GET MIC1}]|Equals(1)|…

Post Reply