Difference between revisions of "Link and Share Transmitter"

From SOUND4wiki
(Created page with "This tool eases command sending in an automatic and recurrent way. This interpreter reads and executes text files containing the commands to send, with also specific command...")
 
 
Line 5: Line 5:
 
This tool has been designed to optimize the command transmission. Thus, if multiple hosts are specified in a single file, they will be controlled in parallel.
 
This tool has been designed to optimize the command transmission. Thus, if multiple hosts are specified in a single file, they will be controlled in parallel.
  
== Specific Commands ==
+
==Specific Commands==
 
Lines starting with # are comments and are ignored.
 
Lines starting with # are comments and are ignored.
  
 
Lines starting with * are commands to configure the Transmitter.
 
Lines starting with * are commands to configure the Transmitter.
  
=== *host ===
+
===*host===
 
Selects the IP address that will be used to send following commands.
 
Selects the IP address that will be used to send following commands.
  
 
Example:<blockquote><code>*host=192.168.0.24</code></blockquote>
 
Example:<blockquote><code>*host=192.168.0.24</code></blockquote>
  
=== *port ===
+
===*port===
 
Selects the TCP communication port (default is 3004 due to historical reasons. Please always use 3003 now).
 
Selects the TCP communication port (default is 3004 due to historical reasons. Please always use 3003 now).
  
 
Example:<blockquote><code>*port=3003</code></blockquote>
 
Example:<blockquote><code>*port=3003</code></blockquote>
  
=== *multihost ===
+
===*multihost===
 
Allows to send the same script to many Processors.
 
Allows to send the same script to many Processors.
  
Line 39: Line 39:
 
</syntaxhighlight>Will be sent to the 3 processors. Note that logins were all different on each host !
 
</syntaxhighlight>Will be sent to the 3 processors. Note that logins were all different on each host !
  
=== *include ===
+
===*include===
 
Used to insert the content of another file at the current file location.
 
Used to insert the content of another file at the current file location.
  
 
Example:<blockquote><code>*include=my_commands.s4las</code></blockquote>Remark:
 
Example:<blockquote><code>*include=my_commands.s4las</code></blockquote>Remark:
  
* if the included file was encrypted, the command is unchanged because the Link&Share Transmitter will automatically look for the right file to use (with s4lasx extension).
+
*if the included file was encrypted, the command is unchanged because the Link&Share Transmitter will automatically look for the right file to use (with s4lasx extension).
* if there is in a directory an encrypted file and a non encrypted file with the same name (except extension), priority is given to non encrypted file : the previous command first looks for “my_commands.s4las” non-encrypted file. If it does not exist, it will look for the “my_commands.s4lasc” non-encrypted file
+
*if there is in a directory an encrypted file and a non encrypted file with the same name (except extension), priority is given to non encrypted file : the previous command first looks for “my_commands.s4las” non-encrypted file. If it does not exist, it will look for the “my_commands.s4lasc” non-encrypted file
  
=== *loadfile ===
+
===*loadfile===
 
Used to load a binary file, to convert it in ASCII and affect it to a named buffer.
 
Used to load a binary file, to convert it in ASCII and affect it to a named buffer.
  
Line 57: Line 57:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== *wait ===
+
===*wait===
 
Wait for the specified time in milliseconds.
 
Wait for the specified time in milliseconds.
  
 
Example:<blockquote><code>*Wait=500</code></blockquote>
 
Example:<blockquote><code>*Wait=500</code></blockquote>
  
=== *waitfor/*event ===
+
===*waitfor/*event===
 
Used for synchronization : <code>*event</code> is used to send a named event to an host, <code>*waitfor</code> is used on another host to wait for this event.
 
Used for synchronization : <code>*event</code> is used to send a named event to an host, <code>*waitfor</code> is used on another host to wait for this event.
  
Line 80: Line 80:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== *rendezvous ===
+
===*rendezvous===
 
Used to synchronize many hosts, using a “Rendez-Vous” mechanism.
 
Used to synchronize many hosts, using a “Rendez-Vous” mechanism.
  
Line 98: Line 98:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== *savenext ===
+
===*savenext===
 
Save in a variable the next command result.<blockquote><code>*savenext=buffername</code></blockquote>Example: Request the PS (RDS Program Service name) and the RT (RDS RadioText) of a processor, and affect them to the RT of the other processor<syntaxhighlight lang="text">
 
Save in a variable the next command result.<blockquote><code>*savenext=buffername</code></blockquote>Example: Request the PS (RDS Program Service name) and the RT (RDS RadioText) of a processor, and affect them to the RT of the other processor<syntaxhighlight lang="text">
 
*host=localhost
 
*host=localhost
Line 113: Line 113:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== *Set ===
+
===*Set===
 
Use to affect a value to a buffer. Then the value can be recalled easily.
 
Use to affect a value to a buffer. Then the value can be recalled easily.
  
Line 121: Line 121:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== Command line parameters ==
+
==Command line parameters==
  
=== --version ===
+
===--version===
 
Request the software version
 
Request the software version
  
=== -- check-none ===
+
===-- check-none===
 
Configure the software not to verify the Servers replies. Useful for half-duplex links.
 
Configure the software not to verify the Servers replies. Useful for half-duplex links.
  
=== -- check-full ===
+
===-- check-full===
 
Configure the software to verify all Servers replies, to retry in case of error, and finally to return an error code if one or many commands failed.
 
Configure the software to verify all Servers replies, to retry in case of error, and finally to return an error code if one or many commands failed.
  
=== -- check-back ===
+
===-- check-back===
 
Configure the software to return immediately et execute the commands in background. Errors will be visible only in the log file.
 
Configure the software to return immediately et execute the commands in background. Errors will be visible only in the log file.
  
=== --host --port --cmd ===
+
===--host --port --cmd===
 
Used to send commands directly without using a command file. <code>^</code> sign replaces the “Carriage Return” (end-of-line)
 
Used to send commands directly without using a command file. <code>^</code> sign replaces the “Carriage Return” (end-of-line)
  
 
Example:<blockquote><code>LinkAndShareTransmitter --host=localhost --port=3003 --cmd="LOGIN admin,admin^RDS.PS=My Radio"</code></blockquote>
 
Example:<blockquote><code>LinkAndShareTransmitter --host=localhost --port=3003 --cmd="LOGIN admin,admin^RDS.PS=My Radio"</code></blockquote>
  
=== --crypt ===
+
===--crypt===
 
Used to encrypt a file so nobody can read it. A new file is created with the same name but a different extension.
 
Used to encrypt a file so nobody can read it. A new file is created with the same name but a different extension.
  
Line 147: Line 147:
 
Remark: Link&Share Transmitter does not provides a way to decrypt a file.
 
Remark: Link&Share Transmitter does not provides a way to decrypt a file.
  
= Typical use examples =
+
=Typical use examples=
  
=== RadioText configuration ===
+
===RadioText configuration===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost
 
*host=localhost
Line 156: Line 156:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== OnAir Preset Selection ===
+
===OnAir Preset Selection===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost
 
*host=localhost
Line 163: Line 163:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Backup mode Main Input configuration ===
+
===Backup mode Main Input configuration===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost
 
*host=localhost
Line 173: Line 173:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Backup mode input order configuration ===
+
===Backup mode input order configuration===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost
 
*host=localhost
Line 180: Line 180:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Copy a preset from one processor to another ===
+
===Copy a preset from one processor to another===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost # Source Processor
 
*host=localhost # Source Processor
Line 192: Line 192:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Copy the OnAir preset from one processor to another ===
+
===Copy the OnAir preset from one processor to another===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost # Source Processor
 
*host=localhost # Source Processor
Line 212: Line 212:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Copy the RDS Program Service from one processor to two others ===
+
===Copy the RDS Program Service from one processor to two others===
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
*host=localhost  # Source processor
 
*host=localhost  # Source processor
Line 224: Line 224:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Turning back an IP link ===
+
===Turning back an IP link===
 
Suppose that 192.168.0.1 processor is encoding and emitting on its Link 1, and that 192.168.0.2 processor receives it on its Link 1. This script turns back the Link.<syntaxhighlight lang="text">
 
Suppose that 192.168.0.1 processor is encoding and emitting on its Link 1, and that 192.168.0.2 processor receives it on its Link 1. This script turns back the Link.<syntaxhighlight lang="text">
 
*host=192.168.0.1
 
*host=192.168.0.1
Line 254: Line 254:
 
IP.Dec.enable=0
 
IP.Dec.enable=0
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
[[Category:Link And Share]]

Latest revision as of 17:10, 23 February 2021

This tool eases command sending in an automatic and recurrent way.

This interpreter reads and executes text files containing the commands to send, with also specific commands to configure the Links or to synchronize the commands.

This tool has been designed to optimize the command transmission. Thus, if multiple hosts are specified in a single file, they will be controlled in parallel.

Specific Commands

Lines starting with # are comments and are ignored.

Lines starting with * are commands to configure the Transmitter.

*host

Selects the IP address that will be used to send following commands.

Example:

*host=192.168.0.24

*port

Selects the TCP communication port (default is 3004 due to historical reasons. Please always use 3003 now).

Example:

*port=3003

*multihost

Allows to send the same script to many Processors.

Syntax:

*multihost=< IPaddress> :< port >,< target >,< user >,< password >

port is optional.

If user and password are not specified, Login will be required in the command flow, else Login command is implicit.

Example 1: This command will be sent to both Processors

*multihost=192.168.4.23
*multihost=192.168.4.24:3003
LOGIN admin,admin
Bk.Src[1]=Analog

Example 2:

*multihost=192.168.4.23,,admin,pass1
*multihost=192.168.4.25,09100001,admin,pass2
*multihost=192.168.4.25,09110022,admin,pass3
Bk.Src[1]=Analog

Will be sent to the 3 processors. Note that logins were all different on each host !

*include

Used to insert the content of another file at the current file location.

Example:

*include=my_commands.s4las

Remark:

  • if the included file was encrypted, the command is unchanged because the Link&Share Transmitter will automatically look for the right file to use (with s4lasx extension).
  • if there is in a directory an encrypted file and a non encrypted file with the same name (except extension), priority is given to non encrypted file : the previous command first looks for “my_commands.s4las” non-encrypted file. If it does not exist, it will look for the “my_commands.s4lasc” non-encrypted file

*loadfile

Used to load a binary file, to convert it in ASCII and affect it to a named buffer.

Syntax:

*loadfile=< name >,< filename >

The content may be called back later by starting the line with $ sign and using the buffer name surrounded with $ signs. Example:

*loadfile=MyPreset,OnePreset.s4fm4
$PRESET.FORCEIMPORT=$MyPreset$

*wait

Wait for the specified time in milliseconds.

Example:

*Wait=500

*waitfor/*event

Used for synchronization : *event is used to send a named event to an host, *waitfor is used on another host to wait for this event.

Caution not to create dead-locks. Best use the *rendezvous where possible.

Syntax:

*event=eventname

*waitfor=eventname

Example:

*host=localhost
*port=3003
LOGIN 06010001,admin,admin
*WaitFor=myevent
RDS.PS=Tata1
*host=localhost
*port=3003
LOGIN 06010002,admin,admin
*event=myevent
RDS.PS=Tata2

*rendezvous

Used to synchronize many hosts, using a “Rendez-Vous” mechanism.

Syntax:

*rendezvous=< rendezvous_name >

Every host that contains this command will wait for the others. Caution, use a particular rendez-vous only once per host. Example:

*host=localhost
*port=3004
LOGIN 06010001,Admin,admin
*RendezVous=myrdv
RDS.PS=Tata1
*host=localhost
*port=3004
LOGIN 06010002,Admin,admin
*RendezVous=myrdv
RDS.PS=Tata2

*savenext

Save in a variable the next command result.

*savenext=buffername

Example: Request the PS (RDS Program Service name) and the RT (RDS RadioText) of a processor, and affect them to the RT of the other processor

*host=localhost
*port=3004
LOGIN 06010001,Admin,admin
*SaveNext=myps
RDS.PS?
*SaveNext=myrt
RDS.RT?
*host=localhost
*port=3004
LOGIN 06010002,Admin,admin
$RDS.RT=$myps$ - $myrt$!

*Set

Use to affect a value to a buffer. Then the value can be recalled easily.

Example:

*set=PS_perso,My Radio
$RDS.PS=$PS_perso$

Command line parameters

--version

Request the software version

-- check-none

Configure the software not to verify the Servers replies. Useful for half-duplex links.

-- check-full

Configure the software to verify all Servers replies, to retry in case of error, and finally to return an error code if one or many commands failed.

-- check-back

Configure the software to return immediately et execute the commands in background. Errors will be visible only in the log file.

--host --port --cmd

Used to send commands directly without using a command file. ^ sign replaces the “Carriage Return” (end-of-line)

Example:

LinkAndShareTransmitter --host=localhost --port=3003 --cmd="LOGIN admin,admin^RDS.PS=My Radio"

--crypt

Used to encrypt a file so nobody can read it. A new file is created with the same name but a different extension.

Example:

LinkAndShareTransmitter –crypt MyFile.s4las-preset

This command creates an encrypted file named MyFile.s4lasc-preset.

Remark: Link&Share Transmitter does not provides a way to decrypt a file.

Typical use examples

RadioText configuration

*host=localhost
LOGIN admin,admin
RDS.RT=My new text...

OnAir Preset Selection

*host=localhost
LOGIN admin,admin
Preset.OnAir=4B - Rock Hot # Selects OnAir Preset

Backup mode Main Input configuration

*host=localhost
LOGIN admin,admin
# Force to quit Mix Mode
In.MixMode=0
# Force Backup mode
Bk.Src[Main]=Analog  # analog input is Main

Backup mode input order configuration

*host=localhost
LOGIN admin,admin
Bk.Src=Analog:Digital:PCI:IP # Inputs in this order

Copy a preset from one processor to another

*host=localhost # Source Processor
LOGIN admin,admin
*SaveNext=MyVariable
Preset.Export=4B - Rock Hot

*host=192.168.0.22 # Target Processor
LOGIN admin,admin
$Preset.ForceImport=4B - Rock Hot,$MyVariable$

Copy the OnAir preset from one processor to another

*host=localhost # Source Processor
LOGIN admin,admin
# Gets the OnAir preset name
*savenext=PresetName
Preset.OnAir?
# Get the OnAir preset config
*SaveNext=BufferPreset
$Preset.Export=$PresetName$

*host=192.168.0.22 # Target Processor
LOGIN admin,admin
# ForceImport allows to reconfigure even if the preset
# is already OnAir, without renaming it
$Preset.ForceImport=$PresetName$,$BufferPreset$
# Configure the OnAir preset if it was not already OnAir
$Preset.OnAir=$PresetName$

Copy the RDS Program Service from one processor to two others

*host=localhost  # Source processor
LOGIN admin,admin
*SaveNext=MyVariable
RDS.PS?

*multihost=192.168.0.22,,admin,admin
*multihost=192.168.0.23,,admin,admin
$RDS.PS=$MyVariable$

Turning back an IP link

Suppose that 192.168.0.1 processor is encoding and emitting on its Link 1, and that 192.168.0.2 processor receives it on its Link 1. This script turns back the Link.

*host=192.168.0.1
LOGIN admin,admin
# Turns back Link 1
IP.Lk1.mode=RX
IP.Lk1.enable=1
# just in case
# Activate the decoder
IP.dec.source=Link 1
IP.dec.enable=1
# Change the Process Input to use this stream
Bk.Src[Main]=IP
# Stops the encoder
IP.Enc.enable=0

*host=192.168.0.2
LOGIN admin,admin
# Change the process input before removing the source
Bk.Src[Main]=Analog
# Activate the encodur
IP.enc.enable=1
# Turns back Link 1
IP.Lk1.source=Encoder
IP.Lk1.mode=TX
IP.Lk1.enable=1
# just in case
# Stops the Decoder
IP.Dec.enable=0