Link and Share Transmitter

From SOUND4wiki
Revision as of 17:10, 23 February 2021 by Marcel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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