SPARK. Native Device Interface (NDI)

Similar documents
File Format Specification MMPLD Version: 1.2 Release Author: Sebastian Grottel Date:

MW100 Setting for Data Communications via Modbus Protocol. Connect to Ethernet. Enter Ethernet settings. Enter Server Settings

OptimiData. JPEG2000 Software Development Kit for C/C++ Reference Manual. Version 1.6. from

Faust Android API. Using This Package

ASPRS LiDAR SPRS Data Exchan LiDAR Data Exchange Format Standard LAS ge Format Standard LAS IIT Kanp IIT Kan ur

TrueTime PiccSIM integration

Lecture 7: Examples, MARS, Arithmetic

Motivation was to facilitate development of systems software, especially OS development.

Introduction. This project will focus primarily on processes.

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

TIP675-SW-82. Linux Device Driver. 48 TTL I/O Lines with Interrupts Version 1.2.x. User Manual. Issue November 2013

1

C File System File Functions EXPERIMENT 1.2

intan intan RHS2000 Application Note: Data File Formats RHS2000 Application Note Data Types TECHNOLOGIES, LLC

Motivation was to facilitate development of systems software, especially OS development.

elastique efficient time stretching SDK by zplane.development (c) 2017 zplane.development GmbH & Co. KG

CS 465 Networks. Disassembling Datagram Headers

Binary file structure for PAMGUARD detector output. Version 4.0

Standard Audio Device Driver Specification

Program Block Editor and Compiler (PBEC)

Nabto Serial Link Protocol

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

=== Be sure to read this note. === MISRA C Rule Checker SQMlint V.1.03 Release 00B Release Notes

2. The object-oriented paradigm

BioTac C Library Manual for Cheetah

MIB BROADCAST STREAM SPECIFICATION

Binary representation and data

The Embedded I/O Company TIP700-SW-82 Linux Device Driver User Manual TEWS TECHNOLOGIES GmbH TEWS TECHNOLOGIES LLC

Computer Networks A Simple Network Analyzer Decoding Ethernet and IP headers

Annotation Universal Metadata Set. 1 Scope. 2 References. 3 Introduction. Motion Imagery Standards Board Recommended Practice MISB RP 0602.

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

Description of the XDA/XDR mesh format used in libmesh

CS2141 Software Development using C/C++ C++ Basics

Java. Representing Data. Representing data. Primitive data types

Memory and C/C++ modules

HDR and Dolby Atmos Support for DTA-2195

Announcement. Agenda 7/31/2008. Polymorphism, Dynamic Binding and Interface. The class will continue on Tuesday, 12 th August

1 Shyam sir JAVA Notes

NVJPEG. DA _v0.2.0 October nvjpeg Libary Guide

As stated earlier, the declaration

Socket Programming for TCP and UDP

LAB A Translating Data to Binary

Superior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.1

Crash Course into. Prof. Dr. Renato Pajarola

Understand Computer Storage and Data Types

PROGRAMMAZIONE I A.A. 2017/2018

Data Acquisition ATDAQ DLL. Windows 3.11/95/98/NT/2000 Software Drivers for ATAO and ATDAQ Cards FUNCTION REFERENCE MANUAL

C++ For Science and Engineering Lecture 15

An Introduction to Video Compression in C/C++ Fore June

Use Native Libraries. Introduction

Coursework Lab A. Open the coursework project

Anybus CompactCom. Host Application Implementation Guide. Doc.Id. HMSI Doc. Rev Connecting DevicesTM

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

TECH 3285-s7 SPECIFICATION OF THE BROADCAST WAVE FORMAT - A FORMAT FOR AUDIO DATA FILES IN BROADCASTING. Supplement 7: <chna> Chunk

Chapter 2: Basic Elements of C++

Adaptive Huffman Coding (FastHF) Implementations

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers

Byte Ordering. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

A web-based IDE for Java

Portable C Code

Lecture 4 September Required reading materials for this class

DRAFT. Encapsulation of Dirac Video content and time code markers in ISO/IEC Transport Streams

How to Properly Manage Tabor s AWG Arbitrary Memory

Getting Started. Project 1

Material Exchange Format (MXF) Mapping Type D-10 Essence Data to the MXF Generic Container

ArduCAM USB Camera C/C++ SDK

Compositional C++ Page 1 of 17

Memory Corruption 101 From Primitives to Exploit

5.Coding for 64-Bit Programs

Nabto SDK Nabto Serial Link Protocol

VS1063A SDIENCODER. VLSI Solution Audio Decoder/Encoder

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

CHAPTER 5 VARIABLES AND OTHER BASIC ELEMENTS IN JAVA PROGRAMS

Implementing the specification. SoC design / September 09

API for Auxiliary Processing Unit

Brief introduction about memory queue -- CUQueue and CScopeUQueue objects

libsegy Programmer s Reference Manual

Advanced Systems Programming

Emerson Process ROC Protocol Enhanced Master Driver v3.0

Procedures, Parameters, Values and Variables. Steven R. Bagley

Pointer Casts and Data Accesses

Developer Documentation

Generic access_type descriptor for the Embedded C Technical Report by Jan Kristoffersen Walter Banks

WavPack 5 Library Documentation

Week 3 Lecture 2. Types Constants and Variables

Defining Unified CCX CTI Messages

1B1b Classes in Java Part I

Lab#5 Due Wednesday, February 25, at the start of class. Purpose: To develop familiarity with C++ pointer variables

EMBEDDED SYSTEMS PROGRAMMING OO Basics

Lecture 04 Introduction to pointers

Arduino Board Design. Nicholas Skadberg 4/30/09 EE290. Dr. Pushkin Kachroo

Byte Ordering. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

SREAL File Converter. Overview. Content

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector.

Lecture 4: Outline. Arrays. I. Pointers II. III. Pointer arithmetic IV. Strings

NVJPEG. DA _v0.1.4 August nvjpeg Libary Guide

Programming Abstraction in C++

CS149: Elements of Computer Science. Fundamental C++ objects

Transcription:

SPARK Software Modulator for Digital Radio Native Device Interface (NDI) Version: 1.1 Author: Michael Feilen Birkerstraße 34 D-80636 Munich (Germany) mail@drm-sender.de Last changed: August, 6th 2011 First published: September, 9th 2009

1 What is the Spark NDI? The NDI is a set of C++ functions which allow for using proprietary input and output devices together with Spark. Figure 1 depicts the role of the NDI in the Spark I/O environment. The NDI is provided as a shared library to Spark, i.e. as a Dynamic Linked Library (DLL) under Windows or as a Shared Object File (SO) under Linux. In short, the NDI enables you to: Interface your output devices with Spark for RF output. Interface your input devices with Spark for audio input. Figure 1: Role of the native device interface in the Spark environment. 2 Architecture The interface to Spark is realized by communicating to the static functions as stated in the header file NativePCMDevice.h. This file contains several functions to read or write to the device and to control the I/O activity. Using a direct implementation of the functions defined in NativePCMDevice.h is not recommended. In the following paragraphs describe the recommended way to connect your I/O devices to Spark. An NDI device may consist of multiple input lines, i.e. source lines, and multiple output lines, i.e. target lines. Figure 2: Schematic of Spark native PCM device interface. 1

Figure 1 shows a schematic overview of the Spark NDI architecture. Spark forwards the RF data to the NDI target lines or retrieves the audio data from the NDI source lines. The classes SourceLine and TargetLine classes inherit from the superclass Line as shown in Figure 3. All member functions of these classes are pure virtual. Figure 3: Inheritance Model 3 Line Names and UIDs Each source line and target line is uniquely identified by an unique line id (UID), reflected by a 32 bit integer number. The UIDs are necessary for line identification and line management by Spark. Source and target lines must not have the same line UID. A native PCM device must return an ASCII-coded name by the to the application by overwriting the function: void GetName ( char name [], uint32 numchars, uint32 * numcharsrequired ); The example device implementation ExampleDevice.cpp is defined to return the name Native Example Device to Spark as shown in Figure 4. Figure 4: The Native Example Device in the FAAC configuration dialog 2

The example device implementation contains two source line instances with the names Input Line A and Input Line B. Furthermore, the example device contains two target line instances Output Line A and Output Line B as shown in Figure 5. Figure 5: The Native Example Device in the Spark output device dialog. The line UIDs in the example device have been chosen arbitrarily and do not appear in the Spark UI. 4 Example Implementation An example may say more than thousand words. The following files contain a simple implementation example for the source and target line interfaces: source / ExampleDevice. cpp source / ExampleTargetLine. cpp source / ExampleSourceLine. cpp It is highly recommended to use the existing implementation as defined in the file ExampleDevice.cpp and create your own source and target lines. As shown in the last section, your source line implementations must implement the pure virtual functions of the class SourceLine and your target line implementation must implement the pure virtual functions of the class TargetLine. For a deeper understanding of the I/O control functionality it is strongly recommended to have a look at the example implementations ExampleSourceLine.cpp and ExampleTargetLine.cpp. After successful compilation of the source files, the created dynamic link library pcmout.dll under Windows or libpcmout.lo under Linux must be copied into the folder where the Spark executable is located. 5 Reading and Writing of Data In this section the data format of the read and write functions of the source and target lines will be explained. 3

The source line read function passes a quantized pulse-code-modulated (PCM) frame as a byte-array (char pbytes[]) which is to be filled by the respective input device. Similarly, the target line write function passes a PCM frame as a byte-array (char pbytes[]) from which the data can be read to be written to the respective output device. A PCM frame is partitioned into a certain number of bytes depending on the number of bytes per sample. The byte-order is little-endian. Hence, the number of samples per function-call can be calculated as: numsamples = numbytes / numbytessample The stream of samples for each channel is interleaved depending on the number of channels. An interleaved block of samples containing one sample for each channel is called a sample block. Thus, the number of sample blocks per function-call is calculated as follows: numsampleblocks = numsamples / numchannels The PCM frame structure and an example of a sample block for a signal with 2 channels (I and Q) and a resolution of 16 bits per sample is shown in Figure 6. Figure 6: Example of a sample block for a complex 16 bit IQ signal (2 channels) and a PCM frame with N sample blocks. The following source code shows an example function that decodes a sample block comprising of two 16 bit samples i and q in C. function process_ iq_ 16bit ( unsigned char * pbytes, unsigned int numbytes ) { int n; short i, q; for ( n = 0; n < numbytes ; n += 4) { /* Decode 16 bit signed integer ( I/ Q) samples */ i = ( pbytes [n +1] << 8) pbytes [n]; q = ( pbytes [n +3] << 8) pbytes [n +2]; } } /* Do something with i and q */ 4