Product – ADC™ v11 and v12 Topic: Universal Sercom Driver

advertisement
Product – ADC™ v11 and v12
Topic: Universal Sercom Driver version 2
Release Date: 9-July-2015
Revision History
Revision
Protocol
Date
Author
Company
1
09/29/2006
Alexey
Khromov
Initial version (based on
Universal Sercom v.1 User
Notes)
1.1
11/01/2006
Alexey
Khromov
Review and update
1.2
08/29/2007
Alexey
Khromov
Update
1.3
03/18/2009
TNguyenphuc
Add feature of ER13978 –
adjustable time to send play,
end and skip commands
(DS v11.52)
1.4
12/19/2011
1.5
04/06/2012
As per DS v12.18.12 added
note regarding ability to
send a semicolon character
by entering ‘\;’ into the
macro command or macro
parameters.
1.6
05/01/2014
Rebrand
1.7
7/9/2015
AdcEventID access for
GUID
© 2015 Imagine Communications Corp.
QA
Description
Proprietary and Confidential
Moved content into new
format. Added note on
including the same CR CF
code used in the end of
reply in the description of
the macro
9-July-2015| Page 1 of 24
Description
The Universal Sercom Driver (USD) is intended to handle large amount of media devices. It
doesn’t depend on device protocol and its behavior. USD driver lets operator send both single low
level command (byte sequence) to device and set of commands in a bundle called “macro
command”, at appropriate time. It has also build-in configurable polling engine and set of optional
parameters, which are configurable too.
USD is able to use both serial and TCP/IP network connection to interact with hardware.
USD has been implemented as two-headed device. Primary or secondary events may be played
through the USD.
Cable Requirements
When device uses serial connection, connect one end of the cable to the Device Server. The
other end of cable is connected to the DB9 port located on hardware marked RS422.
When device uses network connection, be sure that both device and the Device Server are
reachable though network.
Communications
For serial communication it is necessary to set appropriate Baud Rate, Data Bits, Parity and Stop
Bits according to device requirements.
For network communication be sure that TCP interface is installed on PC where the Device
Server is run.
Device Server Set-Up
To configure the USD2 driver in ADC™ follow these steps:
IMPORTANT Configuration Note: When you have finished making changes on a configuration
screen, press Apply and all changes made upon the current configuration window will be applied
to the driver. Press OK, and any configuration changes made upon the various tabs will be
applied, however, the configuration window will close. Press Cancel and none of the
configuration changes will be applied to the driver and the configuration window will close.
Create an instance of the USD2 driver
To configure the Universal Sercom Driver on Device Server, follow the procedure below:
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 2 of 24
1. From Configuration utility, right-click on your Device Server icon and select the
Configured Devices item to display Configured Devices window.
2. From the list in the right hand pane select Universal Sercom Driver v.2 from the
Advanced Devices category. Use the mouse pointer to drag this item over the top of one
of the icons in the left hand pane that has the caption NO DEVICE, as shown below.
Set up USD2 connection parameters
1. Select the USD2 icon you’ve created in previous chapter and press the right mouse
button to bring up a menu. Select Properties from this menu (or double-click on the icon
instead).
2. From the resulting dialog select the Connection tab to set up the connection.
Configure Serial connection
1. For serial device click the Serial radio button.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 3 of 24
2. Choose Serial Port in drop-down list. This port is physical port which device is connected
to.
3. Then follow to the Communications tab and set appropriate serial connection settings.
Configure TCP/IP connection
1. For TCP/IP device click the TCP/IP radio button.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 4 of 24
2. Set appropriate host and TCP port to be connected to (it depends on your hardware).
Note: In the case of TCP connection no Communications tab appears.
Set up Device Name and ID Match Name
Universal Sercom Driver is now configured properly to communicate with the device. The device
parameters may now be configured.
1. Click on the General tab to configure the following:
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 5 of 24
2. The Device Name will appear in the Device Status and configuration windows in the
client applications. The default name may be used but it is recommended to use unique
names for easy device identification.
3. The ID Match name will be used in the event ID field in Play List to let the system know
that the event is intended for the appropriate device.
Set up Polling
1. Choose the Polling tab if your device supports polling command. Universal Sercom
Driver will use polling to check whether device is alive. It is optional.
2. Configure the following parameters as required:
•
•
•
•
•
Enable the polling by clicking the Polling Enabled checkbox.
Set appropriate interval of polling in the Interval field.
Set polling reply timeout in the Device TimeOut field.
Polling command or byte sequence, which will be sent with configured interval,
should be entered in the Command area. You may enter any characters and use
hexadecimal representation. For example, you may use {20} instead of space,
{0D0A} instead of carriage return. All hexadecimal values should be wrapped with
braces. For more detailed information about hexadecimal values, refer to the chapter
HEXADECIMAL VALUES.
Choose reply processing mode:
 Automatic reply processing mode means that reply processing should be done
automatically by driver. This option is useful only if you are using custom device
driver based on the Universal Sercom. For more detailed information about
custom Universal Sercom drivers, refer to the chapter CUSTOM UNIVERSAL
SERCOM DRIVERS.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 6 of 24

User defined reply mode means that you define expected reply yourself. In this
case text field below should contain expected sequence of character, which
device will send after polling command is received.
Set up Initialization
1. Choose the Initialization tab if your device supports initialization. Initialization command
is sent to device immediately after connection to device is established.
2. Configure the following parameters as required:
•
•
•
Enable initialization by clicking the Command checkbox.
Enter initialization command in the Command area. You may enter any characters
and use hexadecimal representation. For example, you may use {20} instead of
space, {0D0A} instead of carriage return. All hexadecimal values should be wrapped
with braces. For more detailed information about hexadecimal values, refer to the
chapter HEXADECIMAL VALUES.
To enable reply processing click on the Reply expected checkbox. Then choose
reply processing mode:
 Automatic reply processing mode means that reply processing should be done
automatically by driver. This option is useful only if you are using custom device
driver based on the Universal Sercom. For more detailed information about
custom Universal Sercom drivers, refer to the chapter CUSTOM UNIVERSAL
SERCOM DRIVERS.

User defined reply mode means that you define expected reply yourself. In this
case text field below should contain expected sequence of character, which
device will send after initialization command is received.
 Set initialization reply timeout in the Reply Timeout field.
About Initialization commands:
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 7 of 24
You may send several initialization commands. Every command is an independent
command which has its own place in the command queue and particular reply
processing.
Semicolon is used to separate several commands and several replies for them.
For example, two commands in the Command text field:
first command;
second command
must have two replies in the reply text field:
reply for the first command;
reply for the second command;
or have Automatic reply processing mode enabled or have no reply at all.
Now the main configuration process is completed. Press Apply button in the bottom of
dialog.
Note: Follow to the next section to learn about the Driver Diagnostic feature.
Set up Latency Adjustments
1. Setup time adjustment to send play, end and skip commands using the following
interface: this UI appears only in USD2 driver specific and not in any other USD drivers.
The parameters allow user to adjust the time (in frames) to send play, end, and skip
commands earlier than the crossing point, the end time, and the skip time, respectively.
The default values of these parameters are zeros.
Note: These options can be operated only on primary, secondary A/V events, or any
event that supports duration counter.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 8 of 24
Driver Diagnostics
After the communication to device is configured you may use the Diagnostics feature to send test
commands to the device and see what is going on.
There are two ways of sending the diagnostic command: from the Diagnostics tab of the
Properties dialog and from the Diagnostics dialog.
Using the Diagnostics dialog
1. Right-click on the icon of Universal Sercom Driver in the list and choose the Diagnostics
item.
2. The following window is displayed:
3. If polling is enabled, you will see polling commands, sending to the device and its replies.
4. Along with the polling commands you can send custom commands, typing them in the
Test Command edit box and pressing Send button.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 9 of 24
5. You can suppress messages that you don’t want to see by typing fragments of them in
the Suppress messages containing strings edit box. You can enter several fragments
separated by semicolons. For example, to suppress polling commands enter some
fragment of the polling command to Suppress messages containing strings edit box. To
suppress all commands sent to device enter (Tx), to suppress all replies enter (Rx).
6. By default all commands which were sent to device are displayed in blue color. All replies
are displayed in green. Also you can use red color to mark bad (error) replies received
from the device. To enable red color indication of error replies enter fragments of error
replies to the Display in red messages containing strings edit box.
7. Use Show messages in hex checkbox to enable/disable hexadecimal presentation of
commands and replies.
8. The Auto scroll checkbox enables/disables automatic scrolling to the end of the log
when new messages appear. You can turn off this checkbox and scroll to any message
to analyze it in detail without incessantly scrolling.
9. You can leave the Diagnostics window opened and follow to the Properties window (see
above).
Using the Diagnostics tab
1. Open the Properties dialog and choose the Diagnostics tab.
2. Enter a command or byte sequence in the Test Command text box and press Send
button. To see what was sent to the device and received from the device you need open
the Diagnostics window first. See section above.
3. Press Reinitialize button to re-initialize device and diagnostics log. If you have defined
an initialization command(s) it will be re-sent.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 10 of 24
Assign USD2 Device to a List
To assign Universal Sercom Driver to the list do the following:
1. From your Configuration utility, right-click on your Device Server and select List
Configurations to display the List Assignments window.
2. USD2_DEV is Universal Sercom device, which Device Name was changed to
USD2_DEV.
3. Currently it is not assigned to any PlayList. So you can find it in the Available Media
column. Left-click and drag it to desired PlayList in the Lists column. In the following
image it is assigned to the PlayList1.
4. Save the configuration.
Performing a Test Run
1. Make sure that your device is connected properly and not offline.
2. From the Properties dialog go to the Macros tab and turn off Check if macro exists
checkbox.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 11 of 24
3. Run Air Client.
4. Choose the list, which the device is assigned to.
5. Create event with the configured Device Match ID in ID field.
6. Enter any command or byte sequence in the Title field.
7. Thread the list.
8. Run the list.
9. As the result you can see sending byte sequence and reply in the Diagnostics window.
Note: spaces in front of the command in the Title field are ignored. For example,
command “<cmd></cmd>” in the Title field is equal to " <cmd></cmd>".
Macro Template Configuration
Universal Sercom Definitions
Let's clarify some terms that will be used.
Macro Event — primary event or secondary Audio/Video event that the user puts on the list,
containing a valid combination of macro name and parameter values separated by colons in the
Title field, or a secondary External event with the macro name in the Title field and the correct
number of parameter values separated by carriage returns in the Data. If an event does not meet
these explicit criteria, then it is not a Macro Event.
Macro Template — the pre-defined command that is created using the Extended Macro Entry
dialog in the device driver. The Macro Template may contain placeholders for parameters, which
are imported from the Macro Event on the list. The Macro Template is organized into device
states (cue, play, etc.).
Macro Commands — the actual commands that are sent to the device as a result of identifying a
Macro Template and importing of the parameter values from the Macro Event.
To Configure a Macro Template
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 12 of 24
1. Select the Macros Tab. All operations with the Macro Templates (adding, removing,
editing, etc) are available on the Macros tab.
2. Perform the following actions as required:
•
•
•
•
Add button opens a dialog for new Macro Template creation.
Delete button removes existing Macro Template.
Edit button opens dialog for existing Macro Template edition.
Check if macro exists option enables or disables check for existence of specified
macro in the Play List. When this option is enabled, the Title field of each event will
be checked whether Macro Template exists in the Universal Sercom Driver or not. If
specified Macro Template does not exist, event will be red colored.
3. When finished one of the following actions can be performed:
•
•
•
Click the OK button to save the Macro Template configuration and close the dialog.
Click the Apply button to save the Macro Template configuration but leave the dialog
open.
Click the Cancel button to close the dialog without saving.
Macro Template Creation
To create Macro Template do the following steps:
1. On the Macros tab click the Add button.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 13 of 24
2. In the Extended Macro Entry dialog enter Macro Template name in the Macro Name
edit box and number of parameters in the Playlist Parameters section.
3. The Macro Name will be used in the Title field of Play List to identify the Macro Template,
which should be processed. Valid macro names can consist of letters, numbers and
underscore, but may not start with a number. The Number of parameters sets flexibility of
Macro Template. It defines how many external parameters will be passed to Macro
Template.
4. The TITLE Field format will show you the way you should use Macro in Title field of Play
List. It is syntax of Macro Template. In example above you should put something like
TEST_MACRO:file1:scene2 into the Title field of the event in Play List. file1 is the value
of the first parameter, passed to the Macro Template. scene2 is the value of the second.
Note: Spaces in front and at the end of the macro name in the Title field are ignored. For
example, you can call TEST_MACRO from the Title field as “TEST_MACRO:file1:scene2”
or “ TEST_MACRO :file1:scene2”.
5. When Macro Template is ready to save, click the OK button. The Macro Template is
saved and Extended Macro Entry dialog closed.
•
•
•
Cancel button closes the dialog without saving.
Apply button saves Macro Template but stays the dialog opened.
And Apply and New button performs the Apply button operations and opens clear
Extended Macro Entry dialog for new Macro Template creation.
6. Event States: There are seven states of the event, when Universal Sercom Driver can
send commands to device. They are Check, Cue, Preroll, Play, End, Postroll and Skip.
•
Check state occurs when the media is checked out if it is available or not.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 14 of 24
•
•
Cue state occurs when the media tries to be cued (prepared).
Preroll state occurs before the Play will be started. Preroll time is configurable
parameter of Play List.
• Play state occurs when media is playing.
• End and Postroll goes directly after the Play. Postroll time is configurable parameter
for the list too.
• And Skip state occurs when operator skips the event (for example, by pressing Skip
button in Air Client).
Each state may contain command(s) and optional expected reply(ies) (see description
below).
It is not required to use all seven states. For example, you might fill in only Cue and Play.
But it is possible to fill in all of them.
At the Check state you can define a command which will be sent to check availability of
the media. This command must contain one parameter which represents the media to
check (it may be logo or layout name, material ID and so on). This command will be sent
when Universal Sercom Driver needs to check media availability. It happens for example
when you load a Play List or insert a new event to Play List or change event fields and so
on. If bad reply has been received on the command of the Check state then
corresponding event will be red in the Air Client (refer to chapter REPLY PROCESSING
to learn how to enable reply processing).
Universal Sercom Driver stores results of the media check. So if some parameter value
was already checked then Universal Sercom Driver will not send the command again but
it will use result of the previous check.
On the Global Timeout Settings tab of the Properties dialog you can define Time to
believe — time (in minutes) within which Universal Sercom Driver believes to the results
of the media check. If this time is expired Universal Sercom Driver sends the command
again.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 15 of 24
Example
Let’s take a look at the example below.
To send command COMMAND_A during cue state and COMMAND_B during play state with no
expected replies, follow these steps:
In Configuration Tool:
1. Open Extended Macro Entry dialog.
2. Enter Macro Template name (for example Test1).
3. Set number of parameters to zero.
4. Go to the Cue tab.
5. Click to the Command checkbox.
6. Enter COMMAND_A sequence into the Command text box.
7. Go to the Play tab.
8. Click to the Command checkbox.
9. Enter COMMAND_B sequence into the Command text box.
10. Click OK.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 16 of 24
In Air Client:
1. Create new event against the Universal Sercom Driver.
2. Enter Test1 in the Title field of the event.
3. When the event is processed, Test1 Macro Template will be handled. That is
COMMAND_A will be sent to the device during Cue state of the event and
COMMAND_B — during Play state.
Note: It is possible to use hexadecimal representation in the command or reply text fields.
For example, you may use {20} instead of space, {0D0A} instead of carriage return. All
hexadecimal values should be wrapped with braces. For more detailed information about
hexadecimal values, refer to chapter HEXADECIMAL VALUES.
Note: New line symbols inserted in the macro command or reply field after <Enter> key
press are ignored when macro is saved. If you want to insert new line symbol which will
not be ignored then use {0D0A}.
Reply Processing
IMPORTANT: If the reply from a device includes CR CF at the end of the reply, it is necessary to
include the same code CR CF in the end of reply in the description of the macro. So bring in
{0D}{0A} in the end of reply.
1. If you expect the reply for sent command, enable the Reply expected checkbox for
appropriate state.
2. Choose reply processing mode:
•
•
Automatic reply processing mode means that reply processing should be done
automatically by driver. This option is useful only if you are using custom device
driver based on the Universal Sercom. For more detailed information about custom
Universal Sercom drivers, refer to chapter CUSTOM UNIVERSAL SERCOM
DRIVERS.
User defined reply mode means that you define expected reply yourself. In this case
text field below should contain expected reply. You may use hexadecimal values
wrapped with braces inside the expected reply. Universal Sercom Driver tries to
compare the sequence it has received from the device and the sequence stored in
the text box for this state. If they don’t match, error occurs.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 17 of 24
3. The timeout (in frames) for expected reply should be entered in the Reply Timeout field
for each state.
Configure Global Reply Timeout Settings
1. There is a way to configure global reply timeout settings. From the Properties dialog
select the Global Timeout Settings tab to change global timeouts.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 18 of 24
2. Enter the reply timeouts in frames for each state and press Apply. Now new default
values will be used in the Extended Macro Entry dialog.
Example: Macros with Parameters
A more flexible way of using Macro Templates is to create Macro Template with parameters. The
example below will explain the way of using Macro Templates with parameters.
For example, we have SCENE_ACTION device command, which has two parameters: scene
name and scene state (1 — scene is “on”, 0 — scene is “off”).
So SCENE_ACTION(myscene, 1) command will show “myscene” on screen and
SCENE_ACTION(myscene, 0) command will hide “myscene”.
To handle this example we need to create Macro Template with single parameter.
In Configuration Tool:
1. Open Extended Macro Entry dialog.
2. Enter Macro Template name (for example Test2).
3. Set number of parameters to 1.
4. Go to the Play tab.
5. Click to the Command checkbox.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 19 of 24
6. Enter SCENE_ACTION([1],1) sequence into the Command text box.
7. Go to the Postroll tab.
8. Click to the Command checkbox.
9. Enter SCENE_ACTION([1],0) sequence into the Command text box.
10. Click OK.
In Air Client:
1. Create new event against the Universal Sercom Driver.
2. Enter Test2:myscene in the Title field of the event.
3. When the event is processed, Test2 Macro Template will be handled. That is all [1]
appearances in the Macro Template will be changed to myscene and then
SCENE_ACTION(myscene,1) or SCENE_ACTION(myscene,0) will be sent according to
the event state.
You may use parameters within hexadecimal values and in the reply text box as well.
Note: spaces in front and at the end of the macro name and parameters' values in the
Title field are ignored. For example, “Test2:myscene” in the Title field is equal to “ Test2
: myscene”.
Several Commands for Each State
You may send several commands on each state. Every command is an independent command
which has its own place in the command queue and particular reply processing.
A Semicolon is used to separate several commands and several replies for them in one state.
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 20 of 24
For example, two commands in the command text field:
first command;
second command
must have two replies in the reply text field:
reply for the first command;
reply for the second command;
or have Automatic reply processing mode enabled or have no reply at all.
Hexadecimal Values
Hexadecimal values may be used in the command or reply text fields for polling, initialization and
Macro Templates.
Hexadecimal values are wrapped in braces and within braces may be separated with spaces. If
hexadecimal value contains odd number of digits then single digit becomes zero-leading.
For example,
{1 2} is equal to {01 02}
{123} is equal to {01 23}
{1234} is equal to
{12 34}
{12 34} is equal to
{12 34}
Ability to send semicolon character
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 21 of 24
Device Server v12.18.12 and higher allows a semicolon character to be sent by the USD2 driver
by entering ‘\;’ into the macro command or macro parameters. This supports devices, such as the
Lynx 5660 Upconverter, which require the sending of the semicolon character as it is part of their
protocol.
AdcEventID access for GUID
This enhancement adds support for GUID access to USD2 Serial Driver. This supports the
following dynamic branding scenarios:




Sending the event GUID to a graphics engine to identify the event as a unique element.
The graphics engine will use the GUID value to make sure graphics run-down stays
synchronized with the playlsit. Allowing the primary GUID value to dynamically to
populate the USD (secondary) means the user does not have to manually edit this value
if the primary is moved within the sequence of the playlist or copied
Dynamic branding where the primary event title automatically populates the USD
secondary to be sent to a graphics engine or Electronic Program Gide.
Dynamic branding and populating the duration
Dynamic branding and sending the start time of the ad break.
Operation
Normally, when a Parameter is defined in the Macro command, it can be read in from the
Transmission List in either the Title field of the Data portion of a local Secondary External event.
In this implementation the word GUID is written in the macro body without [] brackets (i.e. it is not
a parameter). USD2 searches for this substring in the macro body and replaces it with the event
GUID. The substring is started with a symbol (e.g. $), meaning it is not a part of a command, but
a special designation which will be replaced by driver before sending the command.


The [GUID] parameter is read from the Event's ADCEventID.
The Macro body will look like this: prefix[1]command$GUID
Setting up AdcEventID access for GUID
1. Create USD2 driver in standard manner; assign it to list
2. Create necessary macros in USD2 settings in Config Tool.
To specify necessary fields, use designations:
Field
Designation
GUID
$GUID
Start time
$START
Duration
$DUR
Title
$TITLE
Note: These designations are case-sensitive
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 22 of 24
3. For example, if you want to send these fields on Play step, macro should look like this:
4. To run this macro, create secondary A/V, Data or Data with Data event in standard
manner:
Note: ‘Data’ and ‘Data with Data’ events are compatible only with those macros, which do
not have any steps except Play.
5. When USD2 driver prepares to send macro command, it replaces specified fields with
their real values. So command for the example above will look like this:
Play A2F0045C-C92C-49E3-A999-4DDBE403196E AV 00:00:10.00 00:00:20.00
Custom Universal Sercom Drivers
Custom Universal Sercom driver is a driver based on the Universal Sercom Driver which is
adapted to specific requirements of the certain device. It may support following features:


number of heads different from two
specific check of the parameters in the event Title field
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 23 of 24






specific actions during the preparation of commands (for example, the checksum
calculation)
specific actions during the reply processing (for example, automatic reply processing)
specific predefined default macro templates
specific default connection parameters
specific default polling settings
and some other specific features.
Internal Document #
xxxxx
File
xxxxx
© 2015 Imagine Communications Corp.
Proprietary and Confidential
9-July-2015| Page 24 of 24
Download