Difference between revisions of "Libdabdemod"

From OpenDigitalRadio
Jump to navigationJump to search
(→‎API Description: Some minor changes)
(→‎API Description: Added class LibDABDemod)
Line 1: Line 1:
 
=API Description=
 
=API Description=
  
  <code>DemodError SetDevice(LibSDRSource* libSDRSource)</code>
+
  <code>DemodError LibDABDemod::SetDevice(LibSDRSource* libSDRSource)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 15: Line 15:
  
  
  <code>DemodError OpenDevice(void)</code>
+
  <code>DemodError LibDABDemod::OpenDevice(void)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 29: Line 29:
  
  
  <code>DemodError CloseDevice(void)</code>
+
  <code>DemodError LibDABDemod::CloseDevice(void)</code>
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
Line 43: Line 43:
  
  
  <code>DemodError Start(void)</code>
+
  <code>DemodError LibDABDemod::Start(void)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 57: Line 57:
  
  
  <code>DemodError Stop(void)</code>
+
  <code>DemodError LibDABDemod::Stop(void)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 71: Line 71:
  
  
  <code>DemodError SetFrequency(int32_t FrequencyKHz)</code>
+
  <code>DemodError LibDABDemod::SetFrequency(int32_t FrequencyKHz)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 85: Line 85:
  
  
   <code>DemodError SetChannel(string Channel)</code>
+
   <code>DemodError LibDABDemod::SetChannel(string Channel)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 99: Line 99:
  
  
  <code>DemodError GetFrequency(int32_t* FrequencyKHz)</code>
+
  <code>DemodError LibDABDemod::GetFrequency(int32_t* FrequencyKHz)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 113: Line 113:
  
  
  <code>DemodError GetChannel(string* Channel)</code>
+
  <code>DemodError LibDABDemod::GetChannel(string* Channel)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 127: Line 127:
  
  
  <code>DemodError GetSignalStatus(CSignalStatus* SignalStatus)</code>
+
  <code>DemodError LibDABDemod::GetSignalStatus(CSignalStatus* SignalStatus)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 141: Line 141:
  
  
  <code>DemodError RemoveServiceComponent(CServiceComponent ServiceComponent)</code>
+
  <code>DemodError LibDABDemod::RemoveServiceComponent(CServiceComponent ServiceComponent)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 155: Line 155:
  
  
  <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 178:
  
  
  <code>DemodError GetServiceData(CServiceComponent ServiceComponent, CServiceData &ServiceData)</code>
+
  <code>DemodError LibDABDemod::GetServiceData(CServiceComponent ServiceComponent, CServiceData &ServiceData)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 192: Line 192:
  
  
  <code>DemodError GetFICData(CFICData &FICData)</code>
+
  <code>DemodError LibDABDemod::GetFICData(CFICData &FICData)</code>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-

Revision as of 22:06, 10 February 2016

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