You are on page 1of 4

76 77 TELE-audiovision International The Worlds Largest Digital TV Trade Magazine 05-06/2014 www.TELE-audiovision.com www.TELE-audiovision.

com 05-06/2014 TELE-audiovision International


easy programming with Visual C#
conversion into VB.net possible
simple pre-programming of user-specifc test
routines such as playback of specifc transport
streams
perfectly suited to HF developers
top-notch solution for a number of task e.g.
preparing UHDTV signals for testing new receivers
Using
DekTec
APIs for
Programming
TEST REPORT DIY Testing

1
78 TELE-audiovision International The Worlds Largest Digital TV Trade Magazine 05-06/2014 www.TELE-audiovision.com
TEST REPORT
How to set up tailor-made test
environments all by yourself
Vitor Martins Augusto
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. Whats 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 specifc applications in
a very short time. Need an example?
Perhaps youre looking for multiplexing
a DVB-S2 satellite signal with a ter-
DIY Testing
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.
We introduced the DekTec Modulator DTU-215 in TELE-
audiovision 12-01/2012:
www.TELE-audiovision.com/TELE-satellite-1201/eng/dektec.pdf
2
3
5
4
6
80 81 TELE-audiovision International The Worlds Largest Digital TV Trade Magazine 05-06/2014 www.TELE-audiovision.com www.TELE-audiovision.com 05-06/2014 TELE-audiovision International
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
specifc 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 fnd out if
its 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, weve 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 f-
7
8
9
82 TELE-audiovision International The Worlds Largest Digital TV Trade Magazine 05-06/2014 www.TELE-audiovision.com
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 fle to be streamed by
the DekTec modulator. Here
you can download my sam-
ple code:
www.TELE-audi ovi si on.
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
prefx DTAPINET before cer-
tain parameter calls, as op-
posed to C#: I had to manu-
ally change it:
Ou t p . S e t Tx C o n t r o l ( DTA P I .
TXCTRL_IDLE)
to
Out p. Set TxCont rol (DTAPINET.
DTAPI.TXCTRL_IDLE.
Amazingly, I could now
just use my familiar VB.net
environment to fnish 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-
fgured to output the DVB-T
stream (for those who dont
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 fles 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-
fc needs?
7-8. Does it work? Sure it does. Just drag the *.TS fles to my
application and press the play button.
9. Use the slider to change the output frequency.

You might also like