Libdabdemod

From Opendigitalradio
(Difference between revisions)
Jump to: navigation, search
(API Description: Add description)
(Added flow charts)
 

Latest revision as of 21:06, 15 February 2016

Contents

[edit] Introduction

libdabdemod is a library that demodulates the digital OFDM DAB signal and outputs the digital DAB stream. At the moment this library is in the concept phase.

[edit] Usage

[edit] Tune to a specific frequency

This flowchart shows how to tune to a specific frequency or channel.

Libdabdemod tune frequency.png

[edit] Tune to a specific service channel

This flowchart shows how to tune to a specific service channel.

Libdabdemod set service channel.png

[edit] API Description

DemodError LibDABDemod::SetDevice(LibSDRSource* libSDRSource)
Description Sets the SDR driver source from the library libsdrsource.
Parameter libSDRSource: libsdrsource object
return Error code enum object


DemodError LibDABDemod::OpenDevice(void)
Description Opens the device
Parameter none
return Error code enum object


DemodError LibDABDemod::CloseDevice(void)
Description Closes the device
Parameter none
return Error code enum object


DemodError LibDABDemod::Start(void)
Description Starts the OFDM demodulation
Parameter none
return Error code enum object


DemodError LibDABDemod::Stop(void)
Description Stops the OFDM demodulation
Parameter none
return Error code enum object


DemodError LibDABDemod::SetFrequency(int32_t FrequencyKHz)
Description Sets the channel frequency in kHz
Parameter FrequencyKHz: Channel frequency in kHz
return Error code enum object


 DemodError LibDABDemod::SetChannel(string Channel)
Description Sets the channel (Band III: 5A to 13F; L band: LA to LP)
Parameter Channel: Channel string e.g.
return Error code enum object


DemodError LibDABDemod::GetFrequency(int32_t* FrequencyKHz)
Description Gets the current frequency
Parameter FrequencyKHz: Pointer to frequency in KHz
return Error code enum object


DemodError LibDABDemod::GetChannel(string* Channel)
Description Gets the current channel
Parameter Channel: Channel string e.g. “5A”
return Error code enum object


DemodError LibDABDemod::GetSignalStatus(CSignalStatus* SignalStatus)
Description Gets the current signal status
Parameter SignalStatus: Pinter to signal status object.
return Error code enum object


DemodError LibDABDemod::RemoveServiceComponent(CServiceComponent ServiceComponent)
Description Removes a selected service component
Parameter ServiceComponent: Service component object
return Error code enum object


CServiceComponent LibDABDemod::AddServiceComponent(char mode, char SubChId, short StartCU, char UEP_EEP, char UEPTabldx, char EEPIdx, short CUNum, short PacketAddr, char FECScheme)
Description Adds a service component
Parameter Mode: DAB Mode. 0: DAB audio, 1: DAB+ audio, 2: packet, 3: stream

SubChId: Sub-channel identifier
StartCU: Address the first Capacity Unit (CU) of the sub-channel
UEP_EEP: Short or the long form of the size and protection field. 0: short form (UEP), 1: long form (EEP)
UEPTabldx: UEP Table index. Only used if UEP_EEP=0
EEPIdx: Protection level. Only used if UEP_EEP=1
CUNum: Sub-channel size (CUs)
PacketAddr: Address of the packet in which the service component is carried
FECScheme: FEC Scheme

return Service component object, NULL if an error occurred

For a detailed description please see "ETSI EN 300 401" section 6.2 "Sub-channel organization" and 6.3 "Service organization". [1]


DemodError LibDABDemod::GetServiceData(CServiceComponent ServiceComponent, CServiceData &ServiceData)
Description Gets the data of a selected service channel. This method is blocking. It blocks until new data is available.
Parameter ServiceComponent: Service component buffer
return Error code enum object


DemodError LibDABDemod::GetFICData(CFICData &FICData)
Description Gets the FIC data. This method is blocking. It blocks until new data is available.
Parameter FICData: FIC data buffer
return Error code enum object
Personal tools