Difference between revisions of "Libdabdemod"
(→API Description: Some minor changes) |
(Added flow charts) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | =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. | ||
| + | |||
| + | =Usage= | ||
| + | ==Tune to a specific frequency== | ||
| + | This flowchart shows how to tune to a specific frequency or channel. | ||
| + | |||
| + | [[File:Libdabdemod_tune_frequency.png|200px]] | ||
| + | |||
| + | ==Tune to a specific service channel== | ||
| + | This flowchart shows how to tune to a specific service channel. | ||
| + | |||
| + | [[File:Libdabdemod_set_service_channel.png|200px]] | ||
| + | |||
=API Description= | =API Description= | ||
| − | <code>DemodError SetDevice(LibSDRSource* libSDRSource)</code> | + | <code>DemodError LibDABDemod::SetDevice(LibSDRSource* libSDRSource)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 15: | Line 30: | ||
| − | <code>DemodError OpenDevice(void)</code> | + | <code>DemodError LibDABDemod::OpenDevice(void)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 29: | Line 44: | ||
| − | <code>DemodError CloseDevice(void)</code> | + | <code>DemodError LibDABDemod::CloseDevice(void)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 43: | Line 58: | ||
| − | <code>DemodError Start(void)</code> | + | <code>DemodError LibDABDemod::Start(void)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 57: | Line 72: | ||
| − | <code>DemodError Stop(void)</code> | + | <code>DemodError LibDABDemod::Stop(void)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 71: | Line 86: | ||
| − | <code>DemodError SetFrequency(int32_t FrequencyKHz)</code> | + | <code>DemodError LibDABDemod::SetFrequency(int32_t FrequencyKHz)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 85: | Line 100: | ||
| − | <code>DemodError SetChannel(string Channel)</code> | + | <code>DemodError LibDABDemod::SetChannel(string Channel)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 99: | Line 114: | ||
| − | <code>DemodError GetFrequency(int32_t* FrequencyKHz)</code> | + | <code>DemodError LibDABDemod::GetFrequency(int32_t* FrequencyKHz)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 113: | Line 128: | ||
| − | <code>DemodError GetChannel(string* Channel)</code> | + | <code>DemodError LibDABDemod::GetChannel(string* Channel)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 127: | Line 142: | ||
| − | <code>DemodError GetSignalStatus(CSignalStatus* SignalStatus)</code> | + | <code>DemodError LibDABDemod::GetSignalStatus(CSignalStatus* SignalStatus)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 141: | Line 156: | ||
| − | <code>DemodError RemoveServiceComponent(CServiceComponent ServiceComponent)</code> | + | <code>DemodError LibDABDemod::RemoveServiceComponent(CServiceComponent ServiceComponent)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 155: | Line 170: | ||
| − | <code>CServiceComponent AddServiceComponent(char mode, char SubChId, short StartCU, char UEP_EEP, char UEPTabldx, char EEPIdx, short CUNum, short PacketAddr, char FECScheme)</code> | + | <code>CServiceComponent LibDABDemod::AddServiceComponent(char mode, char SubChId, short StartCU, char UEP_EEP, char UEPTabldx, char EEPIdx, short CUNum, short PacketAddr, char FECScheme)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 178: | Line 193: | ||
| − | <code>DemodError GetServiceData(CServiceComponent ServiceComponent, CServiceData &ServiceData)</code> | + | <code>DemodError LibDABDemod::GetServiceData(CServiceComponent ServiceComponent, CServiceData &ServiceData)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 192: | Line 207: | ||
| − | <code>DemodError GetFICData(CFICData &FICData)</code> | + | <code>DemodError LibDABDemod::GetFICData(CFICData &FICData)</code> |
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Latest revision as of 21:06, 15 February 2016
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.
Usage
Tune to a specific frequency
This flowchart shows how to tune to a specific frequency or channel.
Tune to a specific service channel
This flowchart shows how to tune to a specific service channel.
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 |
| 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 |