The document discusses how to create custom testing applications using DekTec APIs. It describes how the author created their own application in VB.net to control a DekTec DTU-215 Gold modulator by modifying sample code provided by DekTec. With just one hour of work, the author had created a Windows application that allows dragging and dropping transport stream files and modulating DVB-T signals using the USB modulator. The document concludes that through the DekTec APIs, even those with little programming experience can create custom applications tailored to their specific testing needs.
1. TEST REPORT DIY Testing
Using
DekTec
APIs for
Programming
• easy programming with Visual C#
• conversion into VB.net possible
• simple pre-programming of user-specific test
routines such as playback of specific transport
streams
• perfectly suited to HF developers
• top-notch solution for a number of task – e.g.
preparing UHDTV signals for testing new receivers
76 TELE-audiovision International — The World‘s Largest Digital TV Trade Magazine — 05-06/2014 — www.TELE-audiovision.com www.TELE-audiovision.com — 05-06/2014 — TELE-audiovision International — 全球发行量最大的数字电视杂志77
2. DIY Testing
TEST REPORT
How to set up tailor-made test
environments – all by yourself
Vitor Martins Augusto
■
We introduced the DekTec Modulator DTU-215 in TELE-audiovision
12-01/2012:
www.TELE-audiovision.com/TELE-satellite-1201/eng/dektec.pdf
1. The original sample source code by DekTec written in C#. All the magic happens with the
line “using DTAPINET;”. This gives access to the functionality of all DekTec products.
1
TELE-audiovision readers have come
to know and appreciate DekTec as a
specialist for digital signal measure-ment.
The range of products on offer
includes PCI, PCI Express and USB-based
receivers for existing digital TV
signals worldwide, as well as corres-ponding
modulators to create all tho-se
signal types from scratch. Added
to that are software applications for
Windows which can be used to analyse,
modulate, demodulate and even multi-plex
signals – without requiring an IT
degree from their users. What’s more:
Any combination of DekTec hardware
and software can be chosen, since they
are all designed to work with each other
no matter how you match them.
While this alone is a unique proposi-tion,
DekTec goes the extra mile and
offers a dedicated application pro-gramming
interface (API) for almost
all of its hardware components. Using
those APIs, software developers can
easily compile specific applications in
a very short time. Need an example?
Perhaps you’re looking for multiplexing
a DVB-S2 satellite signal with a ter-
78 TELE-audiovision International — The World‘s Largest Digital TV Trade Magazine — 05-06/2014 — www.TELE-audiovision.com
3. 2
3
5
4
6
2. Control of the demodulator through DTAPINET is fairly
straightforward.
3. The Object Browser of Visual Studio will list all members
of the selected object. This makes it easy to navigate
amongst the many functions and parameters of the
DTAPINET object.
4-5. Here is my own code, developed in VB.net. For those
less familiar with .net programming: it does not matter if
you chose C# or VB.net – the compiled code will be the
same and has the same performance. However, it is easier
to port C# to C++.
6. Using the Form Design Editor, I designed the form for my
“TELE audiovision DTU-215 Gold Control” application. It is
much simpler to use than the original DekTec StreamXpress
application. It will only modulate DVB-T signals, but perhaps
I will continue development to provider further modulations.
restrial DVB-T2 signal into a
specific frequency to be car-ried
on the coax cable from
a CATV head-end. Not such
a big deal anymore, and you
can even throw in hourly log
reports detailing all relevant
parameters sent to the tech-nician
in charge by e-mail.
Sounds almost too good to
be true, we here you asking?
Well, we tried to find out if
it’s really possible to pro-gram
your own piece of soft-ware
without a lot of hassle
and years of in-depth deve-loper
expertise. As a matter
of fact, we’ve been on the
lookout for quite some time
for a custom-made applica-tion
that nobody really re-quires
apart from us or other
receiver testers working with
a variety of digital signal ty-pes.
So off we went, attemp-ting
to create our own piece
of software with the help of a
DekTec API.
DekTec offers the API for
Windows in 32 bit and 64 bit
versions (including a DTA-PINET
version for the .net
environment), as well as, Li-nux.
For this test, I downloa-ded
the SDK and the source
code of a sample application
in VC#, which sends a Trans-port
Stream to the DTU-2111
modulator. Naturally I alrea-dy
had Microsoft Visual Stu-dio
2010/2012 installed, but
you could get this develop-ment
tool for free from Mi-crosoft,
as long as you settle
with the Visual Studio Ex-press
version, which should
be more than enough.
The source code from Dek-
Tec is very well documen-ted,
but it is basically just
a console application, which
means that you run the fi-
80 TELE-audiovision International — The World‘s Largest Digital TV Trade Magazine — 05-06/2014 — www.TELE-audiovision.com www.TELE-audiovision.com — 05-06/2014 — TELE-audiovision International — 全球发行量最大的数字电视杂志81
4. 7
8
9
nal compiled program from
within a DOS shell. Not really
exciting.
However, the source code
is not complex at all. Actually
it is quite amazing, how sim-ple
it is, thanks to the well
done DTAPI. I quickly took
the source code and built a
Windows Form application
around it, so that the user
can actually select the desi-red
file to be streamed by
the DekTec modulator. Here
you can download my sam-ple
code:
www.TELE-audiovision.
com/dtu215-control.zip
It did not take much thin-king
to change the device
from the initial DTA-2111 (for
PCI Express) to the DTU-215
Gold (USB) modulator, which
I have in the TELE-audiovisi-on
test center.
In less than one hour, I
had my own Windows appli-cation
that uses the DTU-215
Gold modulator. And I have
to confess that I am not very
literate in Visual C#, as I
am much more familiar with
VB.net. So hey, why not con-vert
the source code from
C# to VB.net? It only took a
few minutes, thanks to on-line
converters that do ex-actly
that. The only struggle
was that VB.net expects the
prefix DTAPINET before cer-tain
parameter calls, as op-posed
to C#: I had to manu-ally
change it:
O u t p. S e t Tx C o n t r o l (DTAPI .
TXCTRL_IDLE)
to
Outp.SetTxControl(DTAPINET.
DTAPI.TXCTRL_IDLE.
Amazingly, I could now
just use my familiar VB.net
environment to finish my ap-plication
and guess what, it
turned out great. Instead of
having to use the StreamX-press
application to control
the DTU-215 Gold modula-tor,
I can now use my own
application, which is precon-figured
to output the DVB-T
stream (for those who don’t
know the DTU-215, this mo-dulator
can generate practi-cally
all digital TV modula-tions).
Much less buttons to
tweak and instead I can drag
and drop *.TS files in the
playlist. I think that I could
soon be programming really
great applications with the
DTAPI SDK and if I can do
it, anyone who has program-med
a few lines of code can
do, as well.
Why settle with a standard
product for broadcasting/
distribution or HF product
development, when you can
build your custom product
matching exactly your speci-fic
needs?
7-8. Does it work? Sure it does. Just drag the *.TS files to my
application and press the play button.
9. Use the slider to change the output frequency.
82 TELE-audiovision International — The World‘s Largest Digital TV Trade Magazine — 05-06/2014 — www.TELE-audiovision.com