Programming Information for WiNRADiO G65DDC receiver.

The G65DDC API SDK is implemented as a dynamic library (libg65ddcapi.so) for 32-bit i386 and 64-bit x86_64 platforms. It provides object-oriented and non-object-oriented interface to control the G65DDC device. This document describes the object-oriented interface. The libg65ddcapi.so library provides several object types which makes it possible to control G65DDC receivers.

The API is not fully thread-safe so preferably it should be used in single-threaded applications. It can be used in multi-threaded applications as well, but with some care: One G65DDC receiver can be controlled from a single user thread only.

A C/C++ header file g65ddcapi.h is a part of the SDK.

Block diagram of G65DDC processing chain

Simplified block diagram of G65DDC processing chain
Built-in test Preselectors Attenuator Attenuator Preamplifier Preamplifier Range switch Noise blanker ADC snapshots DDC1 frequency shift DDC1 DDC1 stream DDC2 frequency shift DDC2 DDC2 stream DDC2 noise blanker Demodulator filter Signal level Notch filter Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Volume DDC2 frequency shift DDC2 DDC2 stream DDC2 noise blanker Demodulator filter Signal level Notch filter Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Volume DDC2 frequency shift DDC2 DDC2 stream DDC2 noise blanker Demodulator filter Signal level Notch filter Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Volume Simplified block diagram of G65DDC processing chain

Using the WiNRADiO G65DDC API

Loading the API

The lib65ddcapi.so library can be loaded to the application using the dlopen function of dynamic linking loader (link with -ldl). After the library is loaded, it is necessary to get addresses of exported functions. When the API is no longer required in the memory, the dlclose function can be used to unload the API. Before the dlclose is called, all the objects created using CreateInstance function must be freed releasing their interfaces using the Release method, otherwise the application can enter an unpredictable state. The following source code shows how to load the API:

 
#include <stdio.h>
#include <dlfcn.h>
#include "g65ddcapi.h"

G65DDC_CREATE_INSTANCE CreateInstance;
void *API;

int main(void)
{  
    //Loading the API
    API=dlopen("libg65ddcapi.so",RTLD_LAZY);

    if(API!=NULL)
    {
        //Retrieving addresses of CreateInstance functions
        CreateInstance=(G65DDC_CREATE_INSTANCE)dlsym(API,"CreateInstance");

        //Here place code that uses the API

        dlclose(API);
    }
    else
    {
        //If the dlopen fails
        printf("Failed to load libg65ddcapi.so. %s\n",dlerror());
    }
    
    return 0;
} 

Enumerating available G65DDC devices

To enumerate available G65DDC devices the API provides an enumeration object. The object has to be created using the CreateInstance function. The following source code in C++ produces a list of serial numbers for the available G65DDC devices:

#include <stdio.h>
#include <dlfcn.h>
#include <errno.h>
#include "g65ddcapi.h"

int main(void)
{
 G65DDC_CREATE_INSTANCE CreateInstance;
 void *API;
 IG65DDCDeviceEnumerator *Enumerator=NULL;
 G65DDC_DEVICE_INFO DevInfo;
 uint32_t Index;
 uint32_t Count;

    API=dlopen("libg65ddcapi.so",RTLD_LAZY);

    if(API!=NULL)
    {
        CreateInstance=(G65DDC_CREATE_INSTANCE)dlsym(API,"CreateInstance");

        if(CreateInstance(G65DDC_CLASS_ID_DEVICE_ENUMERATOR,(void**)&Enumerator))
        {
            Enumerator->Enumerate();

            Count=Enumerator->GetCount();
            
            if(Count!=0)
            {
                printf("Available G65DDC devices count=%d:\n",Count);

                for(Index=0;Index<Count;Index++)
                {
                    Enumerator->GetDeviceInfo(Index,&DevInfo);
                    printf("%d. SN: %s\n",Index,DevInfo.SerialNumber);
                }
            }
            else
            {
                printf("No available G65DDC device found.\n");
            }

            Enumerator->Free();
        }
        else
        {
            printf("Failed to create enumerator object. Error code=%d\n",errno);
        }

        dlclose(API);
    }
    else
    {
        printf("Failed to load libg65ddcapi.so. %s\n",dlerror());
    }

    printf("Press enter to exit\n");
    getchar();
    
    return 0;
} 

Opening the G65DDC device

The API provides an object to control the G65DDC device. Before the device is open, the object has to be created using the CreateInstance function.
The following source code in C++ shows how to open the first available G65DDC device.

#include <stdio.h>
#include <dlfcn.h>
#include <errno.h>
#include "g65ddcapi.h"


int main(void)
{  
 G65DDC_CREATE_INSTANCE CreateInstance;
 void *API;
 IG65DDCDevice *Device;
 
    //Loading the API
    API=dlopen("libg65ddcapi.so",RTLD_LAZY);

    if(API!=NULL)
    {
        //Retrieving address of the CreateInstance API functions
        CreateInstance=(G65DDC_CREATE_INSTANCE)dlsym(API,"CreateInstance");
        
        //Creating instance of the device object
        if(CreateInstance(G65DDC_CLASS_ID_DEVICE,(void**)&Device))
        {
            //Opening the first available G65DDC device using predefined G65DDC_OPEN_FIRST constant            
            if(Device->Open(G65DDC_OPEN_FIRST))
            {            
                //Here place code that works with the open G65DDC device            
                
                //Closing device
                Device->Close();
            }
            else
            {
                printf("Failed to open device. Error code=%d\n",errno);
            }
            
            //Release interface of device object
            Device->Free();
        }
        else
        {
            printf("Failed to create device object. Error code=%d\n",errno);
        }        

        dlclose(API);
    }
    else
    {
        //If the dlopen fails
        printf("Failed to load libg65ddcapi.so. %s\n",dlerror());
    }
    
    return 0;
} 

Functions

CreateInstance

Creates single object of the specified class and returns the interface of the object.

C/C++ declaration

int CreateInstance(uint32_t ClassId,void **Interface);

Address retrieval

G65DDC_CREATE_INSTANCE CreateInstance=(G65DDC_CREATE_INSTANCE)dlsym(hAPI,"CreateInstance");

Parameters

ClassId
[in] Specifies class identifier of the object to be created. This parameter must be one of the following:

ValueMeaning
G65DDC_CLASS_ID_DEVICE_ENUMERATORClass identifier of the enumerator object. When the function finished successfully, IG65DDCDeviceEnumerator interface is stored to a pointer variable pointed to by the Interface parameter.
G65DDC_CLASS_ID_NETWORK_ENUMERATORClass identifier of the object which allows to enumerate G65DDC devices connected via their LAN interface. When the function finished successfully, IG65DDCNetworkEnumerator interface is stored to a pointer variable pointed to by the Interface parameter.
G65DDC_CLASS_ID_DEVICEClass identifier of the device object. When the function finished successfully, IG65DDCDevice interface is stored to pointer variable pointed to by the Interface parameter.

Interface
[out] Pointer to a variable which receives the interface to a newly created object of the specified class. This parameter cannot be NULL.

Return value

If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

Remarks

All the objects created using CreateInstance must be freed, using the Free method before the API is unloaded using the FreeLibrary function.


Interfaces

IG65DDCDeviceEnumerator interface

IG65DDCDeviceEnumerator interface is the interface of the enumerator object which is created using the CreateInstance function and provides an enumeration mechanism of available G65DDC devices. The enumerator does not discover G65DDC devices connected via their LAN interface.


IG65DDCDeviceEnumerator::Free

Frees the enumerator object from memory. The interface is no longer usable.

C/C++ declaration

void Free(void);

Parameters

None

Return value

None

IG65DDCDeviceEnumerator::Enumerate

Performs enumeration of available G65DDC devices.

C/C++ declaration

int Enumerate(void);

Parameters

None

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDeviceEnumerator::GetCount

Retrieves the number of available G65DDC devices enumerated using the IG65DDCDeviceEnumerator::Enumerate method.

C/C++ declaration

uint32_t GetCount(void);

Parameters

None

Return value

The method returns the number of available G65DDC devices.

IG65DDCDeviceEnumerator::GetDeviceInfo

Retrieves information about the available G65DDC device.

C/C++ declaration

int GetDeviceInfo(uint32_t DeviceIndex,G65DDC_DEVICE_INFO *DeviceInfo);

Parameters

DeviceIndex
[in] Specifies the index of the device. It can vary from zero to 'one less' than the value returned by the IG65DDCDeviceEnumerator::GetCount method.
DeviceInfo
[out] Pointer to a G65DDC_DEVICE_INFO structure to be filled with information about the device.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCNetworkEnumerator interface

IG65DDCNetworkEnumerator interface is the interface of the network device enumerator object which is created using the CreateInstance function and which allows to a search for G65DDC devices connected via their LAN interface in the computer's subnet. It discovers the devices broadcasting a UDP packet to all IP addresses contained within the computer's subnet. The enumerator does not enumerate local G65DDC devices connected via USB/PCIe interfaces.


IG65DDCNetworkEnumerator::Free

Frees the object from memory. The interface is no longer usable.

C/C++ declaration

void Free(void);

Parameters

None

Return value

None

IG65DDCNetworkEnumerator::Start

Starts searching for G65DDC devices in the computer's subnet.

C/C++ declaration

int Start(IG65DDCNetworkEnumeratorCallback *Callback);

Parameters

Callback
[in] Interface to a user-device object which implements IG65DDCNetworkEnumeratorCallback::G65DDC_DeviceFound method. This method is called when a G65DDC device is found on the computer's subnet.

Return value

If the method succeeds, the return value non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The method starts searching for G65DDC devices in the computer's subnet broadcasting a UDP packet to all IP addresses in the subnet. The method returns within a short time, it does not wait for found devices. Responses from G65DDC devices are processed asynchronously in a working thread. Information about a discovered G65DDC device (IP address, port number and serial number) is passed to the application calling the IG65DDCNetworkEnumeratorCallback::G65DDC_DeviceFound method of the provided user-defined callback object.

The provided user-defined callback object must exists during entire searching time.

The searching is finished using the IG65DDCNetworkEnumerator::Stop method or freeing the enumerator object using the IG65DDCNetworkEnumerator::Free method.

Subsequent calls of the Start function (without stopping the searching using the IG65DDCNetworkEnumerator::Stop method) broadcasts a G65DDC discovery UDP packet again to all IP addresses in the computer's subnet.


IG65DDCNetworkEnumerator::Stop

Stops searching for G65DDC devices in the computer's subnet.

C/C++ declaration

void Stop(void);

Parameters

None

Return value

None

IG65DDCDevice interface

IG65DDCDevice interface is an interface of the device object which is created using the CreateInstance function. This interface allows control of the selected G65DDC device.


IG65DDCDevice::Free

Frees the device object from memory. The interface is no longer usable.

C/C++ declaration

void Free(void);

Parameters

None

Return value

None

IG65DDCDevice::Open

Opens the G65DDC device by its system path and associates the device with the device object given by its interface pointer.

C/C++ declaration

int Open(const char *DevicePath);

Parameters

DevicePath
[in] Pointer to a null-terminated string which specifies the system path of the G65DDC device to open. The system device path of the device can be obtained from the G65DDC_DEVICE_INFO structure filled by the IG65DDCDeviceEnumerator::GetDeviceInfo method.

If the G65DDCe device is connected via its LAN interface this parameter specifies its remote address and port in the following form: udp:remote_address:remote_port (e.g. "udp:192.168.1.250:6500").

Instead of the system path and remote address, it can use a device's serial number or one of the following values:

ValueMeaning
G65DDC_OPEN_FIRSTThis method opens the first available G65DDC device.
G65DDC_OPEN_DEMOThis method opens a demo G65DDC device. This allows developers to work with the API without a physical G65DDC device.

Return value

If the method succeeds, the return value non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::Close method to close the currently open G65DDC device associated with the device object.


IG65DDCDevice::Close

Closes the currently open G65DDC device associated with the device object and makes the object available for use with another G65DDC device.

C/C++ declaration

int Close(void);

Parameters

None

Return value

If the method succeeds, the return value non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If the method fails the device object stays associated with currently open G65DDC device.

If no 'open' G65DDC device is associated with the object, the Close method does nothing.


IG65DDCDevice::IsOpen

Checks if a device is associated with the device object.

C/C++ declaration

int IsOpen(void);

Parameters

None

Return value

This method returns a non-zero value if a device is associated with the device object (using the IG65DDCDevice::Open method) and it can be controlled using methods of the device object interface.
The method returns zero if no device is associated with the device object.

IG65DDCDevice::IsConnected

Checks if the device is still connected to the computer.

C/C++ declaration

int IsConnected(int *Connected);

Parameters

Connected
[out] Pointer to a variable which receives the current connection status. If the received value is non-zero, the device is still connected and available. If the device is disconnected the received value is zero.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If it is determined that the device is disconnected, the IG65DDCDevice::Close should be used.

IG65DDCDevice::GetDeviceInfo

Retrieves information about the G65DDC device.

C/C++ declaration

int GetDeviceInfo(G65DDC_DEVICE_INFO *DeviceInfo);

Parameters

DeviceInfo
[out] Pointer to a G65DDC_DEVICE_INFO structure to be filled with information about the device. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetLED

Sets the front panel LED flashing mode of the G65DDCe device.

C/C++ declaration

int SetLED(uint32_t LEDMode);

Parameters

LEDMode
[in] Specifies the front panel LED flashing mode which can be one of the following:

ValueMeaning
G65DDC_FRONT_PANEL_LED_MODE_DIAGDiagnostic flashing.
G65DDC_FRONT_PANEL_LED_MODE_ONAlways on.
G65DDC_FRONT_PANEL_LED_MODE_OFFAlways off.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetLED method to determine the current flashing mode of the front panel LED.

A complete list of the diagnostic flashing patterns and their meaning is as follows:

No. Pattern Description Mode
1
        
Off No power
2
 
Fading No connection to computer
3
        
Two short flashes USB or LAN client connected, radio off
4
        
One short flash followed by a long one USB or LAN connected, radio on, ready
5
        
Two short flashes followed by a long one USB connected, driver not installed
6
        
Three short flashes USB or LAN connected, driver installed, application not running

IG65DDCDevice::GetLED

Determines the current flashing mode of device's front panel LED.

C/C++ declaration

int GetLED(uint32_t *LEDMode);

Parameters

LEDMode
[out] Pointer to a variable which receives the current flashing mode of device's front panel LED. For a list of possible values, see IG65DDCDevice::SetLED. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetPower

Turns the G65DDC device on or off.

C/C++ declaration

int SetPower(int Power);

Parameters

Power
[in] Specifies whether to turn on or off the device. If this parameter is non-zero the device is turned on, if it is zero the device is turned off.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If SetPower turns the device off, all the running streams are stopped.

Use the IG65DDCDevice::GetPower method to determine the current power state of the device.


IG65DDCDevice::GetPower

Determines whether the device is turned on or off.

C/C++ declaration

int GetPower(int *Power);

Parameters

Power
[out] Pointer to a variable which receives current power state of the device. If it is non-zero, the device is turned on. If it is zero the device is turned off. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetDeviceState

Retrieves the current state of the G65DDC device, such as internal temperatures, error state, data transfer counters.

C/C++ declaration

int GetDeviceState(G65DDC_DEVICE_STATE *State);

Parameters

State
[out] Pointer to a G65DDC_DEVICE_STATE structure to be filled with the current device state. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetExternalReference

Enables or disables the use of an external reference as the clock source.

C/C++ declaration

int SetExternalReference(int Enabled);

Parameters

Enabled
[in] Specifies the desired clock source: nonzero - external reference, zero - internal.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

External reference is optional. If the receiver does not support external reference, IG65DDCDevice::SetExternalReference fails. The following example shows how to determine whether the receiver supports an external reference:
    G65DDC_DEVICE_INFO DeviceInfo;
    IG65DDCDevice *Device;  //Interface of G65DDC device object, created using the CreateInstance function
    
    Device->GetDeviceInfo(&DeviceInfo);
    
    if(DeviceInfo.Flags & G65DDC_FLAGS_EXTERNAL_REFERENCE_IN)
    {
        //the receiver has external reference input
    }
    else
    {
        //the receiver does not have external reference input
    }

IG65DDCDevice::GetExternalReference

Retrieves the current clock source.

C/C++ declaration

int GetExternalReference(int *Enabled);

Parameters

Enabled
[out] Pointer to a variable which receives information about the current clock source. If it is non-zero, external reference is used, if it is zero, internal reference is used. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetBuiltInTest

Enables or disables the test signal at the receiver's input, which allows testing of the entire signal and processing path.

C/C++ declaration

int SetBuiltInTest(int Enabled);

Parameters

Enabled
[in] Specifies whether to enable or disable the built-in test. If this parameter is non-zero, the test signal is enabled. If the parameter is zero, the test signal is disabled.

Test signal parameters:

RangeFrequencyLevel
145 MHz ± 2.5 MHz-60 dBm ± 5 dB
2152 MHz ± 2.5 MHz-48 dBm ± 5 dB

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetBuiltInTest

Retrieves information about whether the test signal is enabled or not.

C/C++ declaration

int GetBuiltInTest(int *Enabled);

Parameters

Enabled
[out] Pointer to a variable which receives information about the test signal state. If it is non-zero, test signal is enabled, if it is zero, test signal is not enabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAttenuator

Sets the input attenuator.

C/C++ declaration

int SetAttenuator(uint32_t Attenuator);

Parameters

Attenuator
[in] Value that specifies the attenuation level in dB. Possible values are: 0, 3, 6, 9, 12, 15, 18, 21. If the value is not from this list, the SetAttenuator method rounds the value to the nearest lower one.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetAttenuator method to determine the current setting of the attenuator.

IG65DDCDevice::GetAttenuator

Retrieves current setting of the attenuator.

C/C++ declaration

int GetAttenuator(uint32_t *Attenuator);

Parameters

Attenuator
[out] Pointer to a variable which receives the current attenuation level. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetPreselectors

Controls the band pass filter at the RF input in the first range.

C/C++ declaration

int SetPreselectors(uint32_t Low,uint32_t High);

Parameters

Low
[in] Specifies the cut-off low frequency of the filter in Hz. Possible values are: 0, 850000, 2400000, 5400000, 11800000. If the value is not from this list, the method rounds it to the nearest one.
High
[in] Specifies the cut-off high frequency of the filter in Hz. Possible values are: 3100000, 5400000, 11800000, 23300000, 88000000. If the value is not from this list, the method rounds it to the nearest one.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Value of the Low parameter must not be higher than value of the High parameter, otherwise the method fails.

Use the IG65DDCDevice::GetPreselectors method to determine the current setting of the preselectors.


IG65DDCDevice::GetPreselectors

Retrieves the current setting of the RF input band pass filter in the first range.

C/C++ declaration

int GetPreselectors(uint32_t *Low,uint32_t *High);

Parameters

Low
[out] Pointer to a variable which receives the current cut-off low frequency of the filter in Hz. This parameter can be NULL if the application does not require this information.
High
[out] Pointer to a variable which receives the current cut-off high frequency of the filter in Hz. This parameter can be NULL if the application does not require this information.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetPreamplifier

Enables or disables the RF input preamplifier.

C/C++ declaration

int SetPreamplifier(int Preamp);

Parameters

Preamp
[in] Specifies whether to enable or disable the RF preamplifier. If this parameter is non-zero, the preamplifier is enabled. If the parameter is zero, the preamplifier is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetPreamplifier method to determine the current state of the preamplifier.


IG65DDCDevice::GetPreamplifier

Retrieves the current state of the RF input preamplifier.

C/C++ declaration

int GetPreamplifier(int *Preamp);

Parameters

Preamp
[out] Pointer to a variable which receives the current state of the preamplifier. The value is non-zero if the preamplifier is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetInverted

Enables or disables frequency spectrum inversion.

C/C++ declaration

int SetInverted(int Inverted);

Parameters

Inverted
[in] Specifies whether to enable or disable frequency spectrum inversion. If this parameter is non-zero, the IF spectrum is inverted.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetInverted

Retrieves the current frequency spectrum inversion setting.

C/C++ declaration

int GetInverted(int *Inverted);

Parameters

Inverted
[out] Pointer to a variable which receives a non-zero value if the frequency spectrum inversion is enabled, and zero if the inversion is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetRange

Switches the active receiver's input between range 1 and range 2.

C/C++ declaration

int SetRange(uint32_t Range);

Parameters

Range
[in] Specifies which range will be active. The value can be G65DDC_RANGE_1 for range 1, or G65DDC_RANGE_2 for range 2.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetRange

Retrieves information regarding which range is active.

C/C++ declaration

int GetRange(uint32_t *Range);

Parameters

Range
[out] Pointer to a variable which receives G65DDC_RANGE_1 if range 1 is active or G65DDC_RANGE_2 if range 2 is active. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetADCNoiseBlanker

Enables or disables the noise blanker on the ADC stream.

C/C++ declaration

int SetADCNoiseBlanker(int Enabled);

Parameters

Enabled
[in] Specifies whether to enable or disable the noise blanker. If this parameter is non-zero, noise blanker is enabled. If the parameter is zero, noise blanker is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetADCNoiseBlanker method to determine the current state of the noise blanker.

IG65DDCDevice::GetADCNoiseBlanker

Retrieves the current ADC noise blanker state.

C/C++ declaration

int GetADCNoiseBlanker(int *Enabled);

Parameters

Enabled
[out] Pointer to a variable which receives the current state of the noise blanker. The value is non-zero if noise blanker is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetADCNoiseBlankerThreshold

Specifies the ADC noise blanker threshold.

C/C++ declaration

int SetADCNoiseBlankerThreshold(uint16_t Threshold);

Parameters

Threshold
[in] Specifies the maximum acceptable input signal. The maximum possible value of threshold is 32767, in this case the noise blanker has no effect even if it is enabled using the IG65DDCDevice::SetADCNoiseBlanker method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetADCNoiseBlankerThreshold method to retrieve the current threshold of the noise blanker.

IG65DDCDevice::GetADCNoiseBlankerThreshold

Determines ADC noise blanker threshold.

C/C++ declaration

int GetADCNoiseBlankerThreshold(uint16_t *Threshold);

Parameters

Threshold
[out] Pointer to a variable which receives the threshold of ADC noise blanker. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::StartADCSnapshots

Starts sending ADC snapshots.

C/C++ declaration

int StartADCSnapshots(uint16_t Period,uint32_t SamplesPerSnapshot);

Parameters

Period
[in] Specifies the time interval in milliseconds for how often the IF snapshots are sent to the IG65DDCDeviceCallback::G65DDC_ADCSnapshotCallback callback.
SamplesPerSnapshot
[in] Specifies the number of 16-bit samples per single ADC snapshot. In other words, it is the number of samples per buffer passed to the IG65DDCDeviceCallback::G65DDC_ADCSnapshotCallback callback. It can be one of the following:

ValueNumber of samples per snapshot
G65DDC_ADC_SAMPLES_PER_SNAPSHOT_64K65536
G65DDC_ADC_SAMPLES_PER_SNAPSHOT_128K131072
G65DDC_ADC_SAMPLES_PER_SNAPSHOT_256K262144

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The G65DDC device has to be turned on using the IG65DDCDevice::SetPower method before use of StartADCSnapshots, otherwise the StartADCSnapshots method fails.

Too low a value of the Period parameter can dramatically increase data flow through the USB/LAN connection which could cause failure of the active streaming.


IG65DDCDevice::StopADCSnapshots

Stops sending ADC snapshots.

C/C++ declaration

int StopADCSnapshots(void);

Parameters

None

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The IG65DDCDeviceCallback::G65DDC_ADCSnapshotCallback callback is not called after StopADCSnapshots returns.


IG65DDCDevice::GetDDCInfo

Retrieves information about DDC format.

C/C++ declaration

int GetDDCInfo(uint32_t DDCTypeIndex,G65DDC_DDC_INFO *DDCInfo);

Parameters

DDCTypeIndex
[in] Specifies the index of DDC type. For more information, see remarks.
DDCInfo
[out] Pointer to a G65DDC_DDC_INFO structure to be filled with information about DDC type.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetDDCCount method to determine the number of possible DDC types of DDC channel (DDC1 or DDC2). In this case the DDCTypeIndex parameter can vary from zero to one less than the number determined by the IG65DDCDevice::GetDDCCount.

Use the IG65DDCDevice::GetDDC method to determine the current DDC type index of DDC channel (DDC1 or DDC2).

DDC channels are created dynamically during run time when they are required. The DDC1 channel can be created using the IG65DDCDevice::CreateDDC1 method and the DDC2 channel can be created using the IG65DDCDevice::CreateDDC2 method.


IG65DDCDevice::CreateDDC1

Creates the primary digital down-converter (DDC1) channel. The DDC1 makes the down-conversion of the signal produced by the ADC.

C/C++ declaration

int CreateDDC1(uint32_t *DDC1ChannelId);

Parameters

DDC1ChannelId
[out] Pointer to a variable which receives the identification number of a newly created DDC1 channel. The value of the identification number can vary from 0 to one less than sum of values of the MaxDDC1ChannelCount and MaxDDC2ChannelCount members of the G65DDC_DEVICE_INFO structure. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The maximum number of DDC1 channels which can be created with the CreateDDC1 method, is determined by the MaxDDC1ChannelCount member of the G65DDC_DEVICE_INFO structure.

Use the IG65DDCDevice::DeleteDDC method to delete the DDC1 channel created by CreateDDC1.


IG65DDCDevice::CreateDDC2

Creates the secondary digital down-converter (DDC2) channel. The DDC2 channel makes the down-conversion of the signal produced by the primary digital down-converter (DDC1) and subsequently other signal processing like AGC, filtering, demodulation, etc.

C/C++ declaration

int CreateDDC2(uint32_t DDC1ChannelId,uint32_t *DDC2ChannelId);

Parameters

DDC1ChannelId
[in] Identification number of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method. The signal from this DDC1 will be subsequently processed by a newly create DDC2 channel.
DDC2ChannelId
[out] Pointer to a variable which receives the identification number of a newly created DDC2 channel. The value of the identification number can vary from 0 to one less than sum of values of the MaxDDC1ChannelCount and MaxDDC2ChannelCount members of the G65DDC_DEVICE_INFO structure. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The maximum number of DDC2 channels, which can be created with the CreateDDC2 method, is determined by the MaxDDC2ChannelCount member of the G65DDC_DEVICE_INFO structure.

The maximum number of DDC2 channels, which are connected to the same DDC1 channel, is determined by the MaxDDC2ChannelsPerDDC1Channel member of the G65DDC_DEVICE_INFO structure.

Use the IG65DDCDevice::DeleteDDC method to delete the DDC2 channel created by CreateDDC2.


IG65DDCDevice::DeleteDDC

Deletes the DDC (DDC1 or DDC2) channel previously created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.

C/C++ declaration

int DeleteDDC(uint32_t DDCChannelId);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If DDCChannelId is the identification number of the DDC1 channel (primary DDC), the DeleteDDC method deletes this DDC1 channel including all the DDC2 (secondary DDC) channels connected to the deleted DDC1 channel. When the DeleteDDC returns, identification numbers of these DDC channels will be invalid and no longer usable.


IG65DDCDevice::GetDDCCount

Retrieves the number of DDC types supported by the given DDC channel (DDC1 or DDC2).

C/C++ declaration

int GetDDCCount(uint32_t DDCChannelId,uint32_t *Count);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 function.
Count
[out] Pointer to a variable which receives the number of DDC types supported by given DDC. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Different DDC channels can support a different number of DDC types.

The maximum number of DDC types supported by the DDC1 channel is determined by the MaxDDC1TypeCount member of the G65DDC_DEVICE_INFO structure. This number can be affected by the type of interface used for connection of the G65DDC device to the computer. The G65DDC device, which is connected via LAN or USB2 interface, supports less DDC types than the device connected via USB3.

The maximum number of DDC types supported by the DDC2 channel is determined by the MaxDDC2TypeCount member of the G65DDC_DEVICE_INFO structure, but it cannot be greater than the current DDC type index of the connected DDC1 channel + 1.


IG65DDCDevice::SetDDC

Sets the current DDC type in the given DDC channel (DDC1 or DDC2).

C/C++ declaration

int SetDDC(uint32_t DDCChannelId,uint32_t DDCTypeIndex);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 function.
DDCTypeIndex
[in] Specifies the index of DDC type to be used in the specified DDC channel. It can vary from zero to one less than number of supported DDC types of the DDC channel.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetDDCCount method to determine the number of possible DDC types of DDC channel. The DDCTypeIndex parameter can vary from zero to one less than the number determined by GetDDCCount.

The specified DDC channel must be idle, DDC streaming must not run when calling SetDDC. In other words, DDC streaming which is started using the IG65DDCDevice::StartDDC function has to be stopped using the IG65DDCDevice::StopDDC method before calling of SetDDC, otherwise SetDDC fails. The SetDDC method does not start and stop DDC streaming, it just changes the DDC type of the DDC channel.

Calling of SetDDC on the DDC1 channel can change the current DDC type of its DDC2 channels and current bandwidth of demodulator filters, so it is useful to call the IG65DDCDevice::GetDDC for DDC2 channels connected to the given DDC1 and IG65DDCDevice::GetDemodulatorFilterBandwidth methods immediately after SetDDC to determine the current DDC type of DDC2 channels and current bandwidth of demodulator filters.

Use the IG65DDCDevice::GetDDC method to determine the current DDC type of the DDC channel.


IG65DDCDevice::GetDDC

Retrieves information about the current DDC type of the DDC1 or DDC2 channel.

C/C++ declaration

int GetDDC(uint32_t DDCChannelId,uint32_t *DDCTypeIndex,G65DDC_DDC_INFO *DDCInfo);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.
DDCTypeIndex
[out] Pointer to a variable which receives the index of current DDC type of the specified DDC channel. This parameter can be NULL if the application does not require this information.
DDCInfo
[out] Pointer to a G65DDC_DDC_INFO structure to be filled with information about the current DDC type of the specified DDC channel. This parameter can be NULL if the application does not require this information.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The BitsPerSample member of the G65DDC_DDC_INFO structure is not used and it can be ignored for DDC2 channels (if the DDCChannelId is the identification number of a DDC2 channel). I and Q samples in buffers passed to the IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback and IG65DDCDeviceCallback::G65DDC_DDC2PreprocessedStreamCallback callbacks are always in IEEE float (32 bit, little endian) format.


IG65DDCDevice::SetDDCFrequency

Sets the center frequency of the DDC1 or DDC2.

C/C++ declaration

int SetDDCFrequency(uint32_t DDCChannelId,int32_t Frequency);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.
Frequency
[in] Specifies the new center frequency of the DDC in Hz.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If the value of the DDCChannelId parameter is the identification number of the DDC1 channel, the Frequency parameter specifies a new absolute center frequency for the given DDC1 channel.

If the value of the DDCChannelId parameter is the identification number of the DDC2 channel, the Frequency specifies a new center frequency of the DDC2 channel relative to the center frequency of its DDC1 channel. The value can be negative. The absolute center frequency of the DDC2 channel is given by the following formula:

faDDC2 = faDDC1 + frDDC2

Where faDDC2 is the absolute center frequency of a DDC2 channel in Hz, faDDC1 is the absolute center frequency of the corresponding DDC1 channel in Hz and frDDC2 is the relative center frequency of the DDC2 channel in Hz.

A change of center frequency of the DDC1 channel causes a change of absolute frequency of the DDC2 channels (and its demodulators) connected to the given DDC1 channel.

Use the IG65DDCDevice::GetDDCFrequency method to determine the current center frequency of the DDC1 or DDC2 channel.

The following example shows three methods of how it is possible to set the absolute DDC2 center frequency to 11.01 MHz:

IG65DDCDevice *Device; //Interface of G65DDC device object, created by the CreateInstance function
uint32_t DDC1Id; //Identifier of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method: Device->CreateDDC1(&DDC1Id)
uint32_t DDC2Id; //Identifier of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method: Device->CreateDDC2(DDC1Id,&DDC2Id)

//1. method
Device->SetRange(G65DDC_RANGE_1); //Set active receiver's input to the range 1 (0 - 88 MHz)
Device->SetDDCFrequency(DDC1Id,11010000);
Device->SetDDCFrequency(DDC2Id,0);

//2. method, it can be used if bandwidth of DDC2 is less than bandwidth of DDC1
Device->SetRange(G65DDC_RANGE_1);
Device->SetDDCFrequency(DDC1Id,11000000);
Device->SetDDCFrequency(DDC2Id,10000);

//3. method, it can be used if bandwidth of DDC2 is less than bandwidth of DDC1
Device->SetRange(G65DDC_RANGE_1);
Device->SetDDCFrequency(DDC1Id,11020000);
Device->SetDDCFrequency(DDC2Id,-10000);

IG65DDCDevice::GetDDCFrequency

Retrieves the current center frequency of DDC1 or DDC2.

C/C++ declaration

int GetDDCFrequency(int32_t DDCChannelId,uint32_t *Frequency);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.
Frequency
[out] Pointer to a variable which receives the current center frequency of the DDC1 or DDC2 channel in Hz. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If the value of the DDCChannelId parameter is the identification number of the DDC1 channel, the received frequency is the absolute center frequency of the given DDC1 channel.

If the value of the DDCChannelId parameter is the identification number of the DDC2 channel, the received frequency is the center frequency of the DDC2 channel relative to the center frequency of its DDC1 channel.


IG65DDCDevice::StartDDC

Starts DDC1 or DDC2 streaming.

C/C++ declaration

int StartDDC(uint32_t DDCChannelId,uint32_t SampleSetsPerBuffer);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.
SampleSetsPerBuffer
[in] If the DDCChannelId is the identification number of the DDC1 channel this parameter specifies the number of I/Q sample sets in each buffer passed to the IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback callback. If the DDCChannelId parameter is the identification number of the DDC2 the SampleSetsPerBuffer specifies the number of I/Q sample sets in each buffer passed to the IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback and IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback callbacks. If the current DDC type index (specified by the IG65DDCDevice::SetDDC method) is less than or equal to 24 (DDC bandwidth <= 5 MHz) the value of the SampleSetsPerBuffer has to be a multiple of 64. If the current DDC type index is greater than 24 (DDC bandwidth > 5 MHz), the SampleSetsPerBuffer has to be a multiple of 1024. If the value of the SampleSetsPerBuffer is not a multiple of 64/1024, the method rounds it up to the nearest multiple of 64/1024. If it is zero, StartDDC fails.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The G65DDC device has to be turned on using the IG65DDCDevice::SetPower method before StartDDC is used. Otherwise StartDDC fails.

If the DDC streaming is already running before use of StartDDC, StartDDC fails.

If the DDCChannelId is the identification number of the DDC2 channel, streaming in the connected DDC1 channel has to be already started (using StartDDC or the IG65DDCDevice::StartDDC1Playback method) before starting the DDC2 streaming.

Use the IG65DDCDevice::StopDDC method to stop streaming in the given DDC channel.

Decreasing the value of the SampleSetsPerBuffer parameter decreases latency and may increase CPU usage. Increasing the value of the SampleSetsPerBuffer parameter increases latency and may decrease CPU usage.


IG65DDCDevice::StopDDC

Stops DDC1 or DDC2 streaming.

C/C++ declaration

int StopDDC(uint32_t DDCChannelId);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If streaming is not active in the given DDC channel, StopDDC does nothing.

If the DDCChannelId parameter specifies the identification number of the DDC1 channel, the StopDDC method also stops all the streaming beyond this DDC channel in the processing chain (DDC2 and audio streaming in all the connected channels).

If DDC1 playback is running (started using IG65DDCDevice::StartDDC1Playback) before use of StopDDC, the StopDDC method stops it.

The IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback and IG65DDCDeviceCallback::G65DDC_DDC1PlaybackStreamCallback callbacks are not called after StopDDC returns.

If the DDCChannelId parameter specifies the identification number of the DDC2 channel, the StopDDC method also stops the corresponding audio streaming.

The IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback and IG65DDCDeviceCallback::G65DDC_DDC2PreprocessedStreamCallback callbacks are not called after StopDDC returns.


IG65DDCDevice::StartDDC1Playback

Starts DDC1 playback. It allows passing of previously recorded DDC1 I/Q samples to the processing chain instead of the samples received from the device.

C/C++ declaration

int StartDDC1Playback(uint32_t DDC1ChannelId,uint32_t SampleSetsPerBuffer,uint32_t BitsPerSample);

Parameters

DDCChannelId
[in] Identification number of the DDC channel created by the IG65DDCDevice::CreateDDC1 or IG65DDCDevice::CreateDDC2 method.
SampleSetsPerBuffer
[in] Specifies the number of I/Q sample sets in each buffer passed to the IG65DDCDeviceCallback::G65DDC_DDC1PlaybackStreamCallback callback to fill the buffer by the application and to the IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback callback. If the current DDC type index (specified by the IG65DDCDevice::SetDDC method) is less than or equal to 24 (DDC bandwidth <= 5 MHz) the value of the SampleSetsPerBuffer has to be a multiple of 64. If the current DDC type index is greater than 24 (DDC bandwidth > 5 MHz), the SampleSetsPerBuffer has to be a multiple of 1024. If the value of the SampleSetsPerBuffer is not a multiple of 64/1024, the function rounds it up to the nearest multiple of 64/1024. If it is zero, the StartDDC1Playback method fails.
BitsPerSample
[in] Specifies the number of bits per I and Q samples. It is used for both IG65DDCDeviceCallback::G65DDC_DDC1PlaybackStreamCallback and IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback callbacks. The possible value is one of the following:

ValueMeaning
0I and Q samples have a default number of bits. It is given by the BitsPerSample member of the G65DDC_DDC_INFO structure which can be retrieved using the IG65DDCDevice::GetDDC or IG65DDCDevice::GetDDCInfo method. Possible values are 16 or 32 bits per sample, signed, little endian.
16I and Q samples have 16 bit (16 bits per I, 16 bits per Q), signed, little endian.
32I and Q samples have 32 bit (32 bits per I, 32 bits per Q), signed, little endian.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The G65DDC device has to be turned on using the IG65DDCDevice::SetPower method before use of StartDDC1Playback.

If the DDC streaming is already running before use of StartDDC1Playback, StartDDC1Playback fails.

Use the IG65DDCDevice::StopDDC method to stop DDC1 playback.


IG65DDCDevice::PauseDDC1Playback

Pauses DDC1 playback.

C/C++ declaration

int PauseDDC1Playback(uint32_t DDC1ChannelId);

Parameters

DDC1ChannelId
[in] Identification number of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If DDC1 playback is not active or is already paused, PauseDDC1Playback does nothing.

The IG65DDCDeviceCallback::G65DDC_DDC1PlaybackStreamCallback and IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback callbacks can be called once after PauseDDC1Playback returns. Then they are not called until playback is resumed using the IG65DDCDevice::ResumeDDC1Playback method.


IG65DDCDevice::ResumeDDC1Playback

Resumes paused DDC1 playback.

C/C++ declaration

int ResumeDDC1Playback(uint32_t DDC1ChannelId);

Parameters

DDC1ChannelId
[in] Identification number of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If DDC1 playback is not active or is not paused, ResumeDDC1Playback does nothing.


IG65DDCDevice::SetDDC2NoiseBlanker

Enables or disables the noise blanker on the DDC2 stream.

C/C++ declaration

int SetDDC2NoiseBlanker(uint32_t DDC2ChannelId,int Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[in] Specifies whether to enable or disable the noise blanker. If this parameter is non-zero, the noise blanker is enabled. If the parameter is zero, the noise blanker is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetDDC2NoiseBlanker method to determine the current state of the noise blanker.

IG65DDCDevice::GetDDC2NoiseBlanker

Retrieves the current DDC2 noise blanker state.

C/C++ declaration

int GetDDC2NoiseBlanker(uint32_t DDC2ChannelId,int *Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[out] Pointer to a variable which receives the current state of the noise blanker. The value is non-zero if noise blanker is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDDC2NoiseBlankerThreshold

Specifies the DDC2 noise blanker threshold.

C/C++ declaration

int SetDDC2NoiseBlankerThreshold(uint32_t DDC2ChannelId,double Threshold);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Threshold
[in] Specifies the threshold in %.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetDDC2NoiseBlankerThreshold method to retrieve the current threshold of the noise blanker.

IG65DDCDevice::GetDDC2NoiseBlankerThreshold

Retrieves the DDC2 noise blanker threshold.

C/C++ declaration

int GetDDC2NoiseBlankerThreshold(uint32_t DDC2ChannelId,double *Threshold);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Threshold
[out] Pointer to a variable which receives the threshold of the noise blanker. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetDDC2NoiseBlankerExcessValue

Determines a value which indicates the percentage ratio between the 'short time average signal level' and 'maximum level'.

C/C++ declaration

int GetDDC2NoiseBlankerExcessValue(uint32_t DDC2ChannelId,double *Value);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Value
[out] Pointer to a variable which receives the current excess value in %. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetSignalLevel

Determines the current signal level for the given channel.

C/C++ declaration

int GetSignalLevel(uint32_t DDC2ChannelId,float *Peak,float *RMS);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Peak
[out] Pointer to a variable which receives the current signal level (peak) in Volts. This parameter can be NULL if the application does not require this information.
RMS
[out] Pointer to a variable which receives the current signal level (RMS) in Volts. This parameter can be NULL if the application does not require this information.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

DDC2 streaming has to be active (started using the IG65DDCDevice::StartDDC method) before calling of GetSignalLevel, otherwise the returned peak and RMS signal levels are zero.

Signal level is evaluated from the signal after the demodulator filter and before the notch filter (see block diagram), the signal is selected by the demodulator filter.

Signal level is evaluated for each buffer processed by the demodulator filter. Buffer size (signal level evaluation rate) is given by the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartDDC method.

The IG65DDCDeviceCallback::G65DDC_DDC2PreprocessedStreamCallback callback method provides the signal level for each buffer passed to the callback, i.e. for each buffer used in the signal level evaluation. This provides a way to get the signal level from each processed buffer without the need to poll it using GetSignalLevel.

To convert RMS signal level in Volts to power in dBm use the following formulas:

P[W] = (VRMS)2 / R = (VRMS)2 / 50

P[dBm]= 10 * log10( P[W] * 1000 )

Where VRMS is the RMS signal level in Volts obtained by GetSignalLevel, R is the G65DDC receiver input impedance (50 Ω), P[W] is power in Watts and P[dBm] is power in dBm and 1000 is conversion coefficient W -> mW.

The following example shows how to obtain the current signal level in dBm from DDC2 channel:

#include <stdio.h>
#include <math.h>

IG65DDCDevice *Device; //Interface of G65DDC device object, created using the CreateInstance function
uint32_t DDC1Id; //Identifier of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method: Device->CreateDDC1(&DDC1Id)
uint32_t DDC2Id; //Identifier of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method: Device->CreateDDC2(DDC1Id,&DDC2Id)
float P_dBm,V_RMS;

Device->GetSignalLevel(DDC2Id,NULL,&V_RMS);

P_dBm=10.0*log10(V_RMS*V_RMS*(1000.0/50.0));

printf("Current signal level [RMS]: %.1f dBm\n",P_dBm);

IG65DDCDevice::SetNotchFilter

Enables or disables the notch filter for the given channel.

C/C++ declaration

int SetNotchFilter(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,int Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Enabled
[in] Specifies whether to enable or disable the notch filter. If this parameter is non-zero, the filter is enabled. If the parameter is zero, the filter is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetNotchFilter method to determine whether the filter is enabled or disabled.

IG65DDCDevice::GetNotchFilter

Retrieves the current notch filter state for the given channel.

C/C++ declaration

int GetNotchFilter(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,int *Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Enabled
[out] Pointer to a variable which receives the current state of the notch filter. The value is non-zero if the filter is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetNotchFilterFrequency

Specifies the relative center frequency of the notch filter for the given channel.

C/C++ declaration

int SetNotchFilterFrequency(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,int32_t Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Frequency
[in] Specifies the new center frequency of the notch filter in Hz.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The value of the Frequency parameter is the new center frequency of the notch filter relative to center of the DDC2 (see the IG65DDCDevice::SetDDCFrequency method). The value can be negative.

Use the IG65DDCDevice::GetNotchFilterFrequency method to retrieve the current center frequency of the notch filter.


IG65DDCDevice::GetNotchFilterFrequency

Retrieves the current relative center frequency of the notch filter.

C/C++ declaration

int GetNotchFilterFrequency(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,int32_t *Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Frequency
[out] Pointer to a variable which receives the current center frequency of the notch filter. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetNotchFilterBandwidth

Specifies the bandwidth of the notch filter for the given channel.

C/C++ declaration

int SetNotchFilterBandwidth(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,uint32_t Bandwidth);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Bandwidth
[in] Specifies the new bandwidth of the notch filter in Hz. The bandwidth can be from range 1 - 3000 Hz.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetNotchFilterBandwidth method to retrieve the current bandwidth of the notch filter.


IG65DDCDevice::GetNotchFilterBandwidth

Retrieves the current bandwidth of the notch filter for the given channel.

C/C++ declaration

int GetNotchFilterBandwidth(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,uint32_t *Bandwidth);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Bandwidth
[out] Pointer to a variable which receives the current bandwidth of the notch filter. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetNotchFilterLength

Specifies the notch filter length for the given channel. The notch filter is implemented as an FIR filter. This method specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int SetNotchFilterLength(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,uint32_t Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Length
[in] Specifies the length of the notch filter. The value has to be multiple of 8, greater than or equal to 64 and less than or equal to 32768. If it is not multiple of 8, the method rounds it up to the nearest multiple of 8.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The given DDC2 channel has to be idle (streaming is not started using the IG65DDCDevice::StartDDC method) when calling the SetNotchFilterLength method, otherwise it fails.

Increasing the filter length increases the filter steepness and may increase CPU usage.

Use the IG65DDCDevice::GetNotchFilterLength method to determine the current length of the notch filter.


IG65DDCDevice::GetNotchFilterLength

Retrieves the current notch filter length for the given channel.

C/C++ declaration

int GetNotchFilterLength(uint32_t DDC2ChannelId,uint32_t NotchFilterIndex,uint32_t *Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
NotchFilterIndex
[in] Specifies the notch filter index. Possible values are: 0, 1.
Length
[out] Pointer to a variable which receives the current length of the notch filter. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAGC

Enables or disables the AGC for the given channel.

C/C++ declaration

int SetAGC(uint32_t DDC2ChannelId,int Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[in] Specifies whether to enable or disable the AGC. If this parameter is non-zero, the AGC is enabled. If the parameter is zero, the AGC is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If the AGC is disabled, the signal is affected by the 'fixed gain' specified using the IG65DDCDevice::SetGain method.

Use the IG65DDCDevice::GetAGC method to determine the current state of the AGC.


IG65DDCDevice::GetAGC

Retrieves the current state of the AGC for the given channel.

C/C++ declaration

int GetAGC(uint32_t DDC2ChannelId,int *Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[out] Pointer to a variable which receives the current state of the AGC. The value is non-zero if the AGC is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAGCParams

Sets parameters of the AGC for the given channel.

C/C++ declaration

int SetAGCParams(uint32_t DDC2ChannelId,double AttackTime,double DecayTime,double ReferenceLevel);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
AttackTime
[in] Specifies the new attack time of the AGC in seconds.
DecayTime
[in] Specifies the new decay time of the AGC in seconds.
ReferenceLevel
[in] Specifies the new reference level of the AGC in dB.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetAGCParams method to determine the current parameters of the AGC.


IG65DDCDevice::GetAGCParams

Retrieves the current parameters of the AGC for the given channel.

C/C++ declaration

int GetAGCParams(uint32_t DDC2ChannelId,double *AttackTime,double *DecayTime,double *ReferenceLevel);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
AttackTime
[out] Pointer to a variable which receives the current attack time of the AGC in seconds. This parameter can be NULL if the application does not require this information.
DecayTime
[out] Pointer to a variable which receives the current decay time of the AGC in seconds. This parameter can be NULL if the application does not require this information.
ReferenceLevel
[out] Pointer to a variable which receives the current reference level of the AGC in dB. This parameter can be NULL if the application does not require this information.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetMaxAGCGain

Sets maximum gain of the AGC for the given channel.

C/C++ declaration

int SetMaxAGCGain(uint32_t DDC2ChannelId,double MaxGain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
MaxGain
[in] Specifies the new maximum gain of the AGC in dB.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetMaxAGCGain method to determine the maximum gain of the AGC.


IG65DDCDevice::GetMaxAGCGain

Retrieves the current maximum gain of the AGC for the given channel.

C/C++ declaration

int GetMaxAGCGain(uint32_t DDC2ChannelId,double *MaxGain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
MaxGain
[out] Pointer to a variable which receives the current maximum gain of the AGC in dB. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetGain

Sets fixed gain for the given channel. This gain is applied to the I/Q signal if the AGC is disabled, otherwise it is not used.

C/C++ declaration

int SetGain(uint32_t DDC2ChannelId,double Gain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Gain
[in] Specifies the new fixed gain in dB.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetGain method to determine the current fixed gain.


IG65DDCDevice::GetGain

Retrieves the current fixed gain for the given channel.

C/C++ declaration

int GetGain(uint32_t DDC2ChannelId,double *Gain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Gain
[out] Pointer to a variable which receives the current fixed gain in dB. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetCurrentGain

Retrieves the current gain that is applied to the I/Q signal.

C/C++ declaration

int GetCurrentGain(uint32_t DDC2ChannelId,double *CurrentGain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
CurrentGain
[out] Pointer to a variable which receives the current gain in dB. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If the AGC is enabled (using the IG65DDCDevice::SetAGC method), the variable pointed to by the CurrentGain parameter is filled by the current gain of the AGC. If the AGC is disabled, the variable pointed to by the CurrentGain parameter is filled by fixed gain that is specified using the IG65DDCDevice::SetGain method.

IG65DDCDevice::SetDemodulatorFilterBandwidth

Sets bandwidth of the demodulator filter for the given channel.

C/C++ declaration

int SetDemodulatorFilterBandwidth(uint32_t DDC2ChannelId,uint32_t Bandwidth);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Bandwidth
[in] Specifies the new bandwidth of the demodulator filter in Hz. Possible values range from 1 Hz to the current DDC2 bandwidth. Use the IG65DDCDevice::GetDDC method to retrieve information about the current DDC type of DDC2.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The demodulator filter bandwidth can be changed by changing the DDC type of the corresponding DDC1 channel (using the IG65DDCDevice::SetDDC method). It can change DDC type of DDC2 and if the current demodulator filter bandwidth is greater than the new bandwidth of DDC2, the demodulator filter bandwidth is reduced. So it is useful to call the IG65DDCDevice::GetDemodulatorFilterBandwidth method immediately after IG65DDCDevice::SetDDC.

IG65DDCDevice::GetDemodulatorFilterBandwidth

Retrieves the current demodulator filter bandwidth for the given channel.

C/C++ declaration

int GetDemodulatorFilterBandwidth(uint32_t DDC2ChannelId,uint32_t *Bandwidth);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Bandwidth
[out] Pointer to a variable which receives the current demodulator filter bandwidth. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDemodulatorFilterShift

Sets the demodulator filter shift for the given channel.

C/C++ declaration

int SetDemodulatorFilterShift(uint32_t DDC2ChannelId,int32_t Shift);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Shift
[in] Specifies the new shift of the demodulator filter in Hz.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The value of the Shift parameter is the shift in Hz relative to center of the demodulator. This value can be negative.

This method does not change the demodulator frequency, just shifts the filter from the demodulator's centre.

Use the IG65DDCDevice::GetDemodulatorFilterShift method to determine the current demodulator filter shift.


IG65DDCDevice::GetDemodulatorFilterShift

Retrieves the current shift of the demodulator filter for the given channel.

C/C++ declaration

int GetDemodulatorFilterShift(uint32_t DDC2ChannelId,int32_t *Shift);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Shift
[out] Pointer to a variable which receives the current shift of the demodulator. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDemodulatorFilterLength

Specifies the demodulator filter length for the given channel. The demodulator filter is implemented as an FIR filter. This method specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int SetDemodulatorFilterLength(uint32_t DDC2ChannelId,uint32_t Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Length
[in] Specifies the length of the demodulator filter. The value has to be multiple of 8, greater than or equal to 64 and less than or equal to 32768. If it is not a multiple of 8, the method rounds it up to nearest multiple of 8.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The given DDC2 channel has to be idle (streaming is not started using the IG65DDCDevice::StartDDC method) when calling the SetDemodulatorFilterLength method, otherwise it fails.

Increasing the filter length increases filter steepness and may increase CPU usage.

Use the IG65DDCDevice::GetDemodulatorFilterLength method to determine the current length of the demodulator filter.


IG65DDCDevice::GetDemodulatorFilterLength

Retrieves the current length of the demodulator filter for the given channel.

C/C++ declaration

int GetDemodulatorFilterLength(uint32_t DDC2ChannelId,uint32_t *Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Length
[out] Pointer to a variable which receives the current demodulator filter length. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDemodulatorMode

Sets the demodulator mode for the given channel.

C/C++ declaration

int SetDemodulatorMode(uint32_t DDC2ChannelId,uint32_t Mode);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Mode
[in] Specifies the new demodulator mode. This value can be one of the following:

ValueMeaning
G65DDC_MODE_AMAmplitude modulation
G65DDC_MODE_AMSAmplitude modulation
G65DDC_MODE_LSBLower sideband modulation
G65DDC_MODE_USBUpper sideband modulation
G65DDC_MODE_DSBDouble sideband modulation
G65DDC_MODE_ISBIndependent sideband modulation
G65DDC_MODE_CWContinuous wave
G65DDC_MODE_FMFrequency modulation

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetDemodulatorMode method to retrieve the current demodulator mode.


IG65DDCDevice::GetDemodulatorMode

Retrieves the current demodulator mode for the given channel.

C/C++ declaration

int GetDemodulatorMode(uint32_t DDC2ChannelId,uint32_t *Mode);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Mode
[out] Pointer to a variable which receives the current demodulator mode. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDemodulatorFrequency

Sets the relative center frequency of the demodulator for the given channel.

C/C++ declaration

int SetDemodulatorFrequency(uint32_t DDC2ChannelId,int32_t Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Frequency
[in] Specifies the new center frequency of the demodulator in Hz.

Return value

If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

Remarks

The value of the Frequency parameter is the center frequency of the demodulator relative to the center of the DDC2. The value can be negative.

The absolute frequency of the demodulator is given by the following formula:

faDEM = faDDC1 + frDDC2 + frDEM

Where faDEM is the absolute center frequency of the demodulator in Hz, faDDC1 is the absolute center frequency of the DDC1 in Hz (set using the IG65DDCDevice::SetDDCFrequency function), frDDC2 is the relative center frequency of DDC2 in Hz (set using the IG65DDCDevice::SetDDCFrequency) and frDEM is the relative center frequency of the demodulator in Hz (set using SetDemodulatorFrequency).

The absolute center frequency of the demodulator is the real-world frequency which you are listening to.

Use the IG65DDCDevice::GetDemodulatorFrequency function to determine the current relative center frequency of the demodulator for the given channel.

The following example shows four methods of how to set the absolute demodulator center frequency to 11.01 MHz:

IG65DDCDevice *Device; //Interface of G65DDC device object, created by the CreateInstance function
uint32_t DDC1Id; //Identifier of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method: Device->CreateDDC1(&DDC1Id)
uint32_t DDC2Id; //Identifier of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method: Device->CreateDDC2(DDC1Id,&DDC2Id)

//1. method
Device->SetRange(G65DDC_RANGE_1); //Set active receiver's input to the range 1 (0 - 88 MHz)
Device->SetDDCFrequency(DDC1Id,11010000);
Device->SetDDCFrequency(DDC2Id,0);
Device->SetDemodulatorFrequency(DDC2Id,0);

//2. method
Device->SetRange(G65DDC_RANGE_1);
Device->SetDDCFrequency(DDC1Id,11000000);
Device->SetDDCFrequency(DDC2Id,10000);
Device->SetDemodulatorFrequency(DDC2Id,0);

//3. method
Device->SetRange(G65DDC_RANGE_1);
Device->SetDDCFrequency(DDC1Id,11020000);
Device->SetDDCFrequency(DDC2Id,-5000);
Device->SetDemodulatorFrequency(DDC2Id,-5000);

//4. method
Device->SetFrequency(DDC2Id,11010000); 
//The IG65DDCDevice::SetFrequency method selects proper receiver's input range and sets DDC1, DDC2 and demodulator
//center frequencies so that demodulator's absolute frequency is set to the required frequency

IG65DDCDevice::GetDemodulatorFrequency

Retrieves the current relative center frequency of the demodulator for the given channel.

C/C++ declaration

int GetDemodulatorFrequency(uint32_t Channel,int32_t *Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Frequency
[out] Pointer to a variable which receives the current center frequency of the demodulator. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDemodulatorParam

Sets a parameter of the demodulation for the given channel.

C/C++ declaration

int SetDemodulatorParam(uint32_t DDC2ChannelId,uint32_t Code,const void *Buffer,uint32_t BufferSize);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Code
[in] Specifies the code of the demodulator parameter to be set by this method. The code can be one of the following:

ValueMeaning
G65DDC_DEMODULATOR_PARAM_AMS_SIDE_BAND

Side band for synchronous AM demodulation

The Buffer parameter has to be pointer to an uint32_t variable, and the BufferSize parameter has to be sizeof(uint32_t)

Value of the variable pointed to by the Buffer parameter can be one of the following:

G65DDC_SIDE_BAND_LOWER
AMS demodulator will use lower sideband

G65DDC_SIDE_BAND_UPPER
AMS demodulator will use upper sideband

G65DDC_SIDE_BAND_BOTH
AMS demodulator will use both side bands.

G65DDC_DEMODULATOR_PARAM_AMS_CAPTURE_RANGE

Capture range of synchronous AM demodulator

The Buffer parameter has to be pointer to a G65DDC_AMS_CAPTURE_RANGE structure, and the BufferSize parameter has to be sizeof(G65DDC_AMS_CAPTURE_RANGE)

G65DDC_DEMODULATOR_PARAM_CW_FREQUENCY

CW tone frequency

The Buffer parameter has to be pointer to a int32_t variable, and the BufferSize parameter has to be sizeof(int32_t)

Value of the variable pointed to by the Buffer parameter is CW tone frequency in Hz

G65DDC_DEMODULATOR_PARAM_DSB_SIDE_BAND

Side band for DSB demodulation

The Buffer parameter has to be pointer to an uint32_t variable, and the BufferSize parameter has to be sizeof(uint32_t)

Value of the variable pointed to by the Buffer parameter can be one of the following:

G65DDC_SIDE_BAND_LOWER
DSB demodulator will use lower sideband

G65DDC_SIDE_BAND_UPPER
DSB demodulator will use upper sideband

G65DDC_SIDE_BAND_BOTH
DSB demodulator will use both side bands.

G65DDC_DEMODULATOR_PARAM_ISB_SIDE_BAND

Side band for ISB demodulation

The Buffer parameter has to be pointer to an uint32_t variable, and the BufferSize parameter has to be sizeof(uint32_t)

Value of the variable pointed to by the Buffer parameter can be one of the following:

G65DDC_SIDE_BAND_LOWER
ISB demodulator will use lower sideband

G65DDC_SIDE_BAND_UPPER
ISB demodulator will use upper sideband

G65DDC_SIDE_BAND_BOTH
ISB demodulator will use both side bands.

Buffer
[in] Pointer to a buffer containing the value of the demodulator parameter which this method will set. This parameter cannot be NULL.
BufferSize
[in] Specifies the size of the buffer.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetDemodulatorParam

Retrieves a parameter of the demodulation for the given channel.

C/C++ declaration

int GetDemodulatorParam(uint32_t DDC2ChannelId,uint32_t Code,void *Buffer,uint32_t BufferSize);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Code
[in] Specifies the code of the demodulator parameter to be retrieved. For detailed information about available codes see IG65DDCDevice::SetDemodulatorParam.
Buffer
[out] Pointer to a buffer which receives the requested parameter. This parameter cannot be NULL.
BufferSize
[in] Specifies the size of the buffer.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetDemodulatorState

Retrieves information about the current demodulator state for the given channel.

C/C++ declaration

int GetDemodulatorState(uint32_t DDC2ChannelId,uint32_t Code,void *Buffer,uint32_t BufferSize);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Code
[in] Specifies the code of the demodulator state to be retrieved. The code can be one of the following:

ValueMeaning
G65DDC_DEMODULATOR_STATE_AMS_LOCK

Lock state of synchronous AM demodulation

The Buffer parameter has to be pointer to a int variable, and the BufferSize parameter has to be sizeof(int)

Received value is non-zero if synchronous AM demodulator is locked to signal, and zero if it is not locked

G65DDC_DEMODULATOR_STATE_AMS_FREQUENCY

Frequency in Hz which synchronous AM demodulator is locked to. It is relative to center of the demodulator. It can be negative

The Buffer parameter has to be pointer to a double variable, and the BufferSize parameter has to be sizeof(double)

G65DDC_DEMODULATOR_STATE_AM_DEPTH

Depth of AM modulation in %

The Buffer parameter has to be pointer to a double variable, and the BufferSize parameter has to be sizeof(double)

G65DDC_DEMODULATOR_STATE_DSB_LOCK

Lock state of DSB demodulation

The Buffer parameter has to be pointer to a int variable, and the BufferSize parameter has to be sizeof(int)

Received value is non-zero if DSB demodulator is locked to signal, and zero if it is not locked

G65DDC_DEMODULATOR_STATE_DSB_FREQUENCY

Frequency in Hz which DSB demodulator is locked to. It is relative to center of the demodulator. It can be negative

The Buffer parameter has to be pointer to a double variable, and the BufferSize parameter has to be sizeof(double)

G65DDC_DEMODULATOR_STATE_TUNE_ERROR

Estimated tune error in Hz

The Buffer parameter has to be pointer to an int32_t variable, and the BufferSize parameter has to be sizeof(int32_t)

Received value is difference between demodulator frequency and frequency of received signal. Subtract the returned tune error from demodulator frequency to get frequency of the received signal. Tune error is relative to center of the demodulator and it can be negative

G65DDC_DEMODULATOR_STATE_FM_DEVIATION

Estimated frequency deviation in Hz

The Buffer parameter has to be pointer to an uint32_t variable, and the BufferSize parameter has to be sizeof(uint32_t)

Buffer
[out] Pointer to a buffer which receives the requested information. This parameter cannot be NULL.
BufferSize
[in] Specifies the size of the buffer.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::StartAudio

Starts audio streaming for given the channel.

C/C++ declaration

int StartAudio(uint32_t DDC2ChannelId,uint32_t SampleSetsPerBuffer);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
SampleSetsPerBuffer
[in] Specifies the number of sample sets in each buffer passed to the IG65DDCDeviceCallback::G65DDC_AudioStreamCallback callback method (the sample set consists of two samples). The value has to be a multiple of 64 greater than zero. If it is zero, the StartAudio method fails. If it is not a multiple of 64, the method rounds it up to nearest multiple of 64.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Before StartAudio is used, the G65DDC device has to be turned on using the IG65DDCDevice::SetPower method and DDC1 streaming has to be started using the IG65DDCDevice::StartDDC or IG65DDCDevice::StartDDC1Playback method and DDC2 streaming has to be started using the IG65DDCDevice::StartDDC method, otherwise StartAudio fails.

If the audio streaming for the given DDC2 channel is already running, StartAudio fails.

Use the IG65DDCDevice::StopAudio method to stop audio streaming.

Decreasing the value of the SampleSetsPerBuffer parameter decreases latency and may increase CPU usage. Increasing value of the SampleSetsPerBuffer parameter increases latency and may decrease CPU usage.


IG65DDCDevice::StopAudio

Stops audio streaming for the given channel.

C/C++ declaration

int StopAudio(uint32_t DDC2ChannelId);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If audio streaming is not active, StopAudio does nothing.

If audio playback (started using the IG65DDCDevice::StartAudioPlayback method) is active, StopAudio stops it.

The IG65DDCDeviceCallback::G65DDC_AudioStreamCallback and IG65DDCDeviceCallback::G65DDC_AudioPlaybackStreamCallback callback methods are not called after StopAudio returns.


IG65DDCDevice::StartAudioPlayback

Starts audio playback for the given channel. It passes previously recorded audio samples to the processing chain instead of the samples from the demodulator.

C/C++ declaration

int StartAudioPlayback(uint32_t DDC2ChannelId,uint32_t SampleSetsPerBuffer);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
SampleSetsPerBuffer
[in] Specifies the number of sample sets in each buffer passed to the IG65DDCDeviceCallback::G65DDC_AudioPlaybackStreamCallback callback to fill the buffer by the application and to the IG65DDCDeviceCallback::G65DDC_AudioStreamCallback callback method (the sample set consists of two samples). The value has to be a multiple of 64 greater than zero. If it is zero, the StartAudioPlayback method fails. If it is not a multiple of 64, the method rounds it up to nearest multiple of 64.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The G65DDC device has to be turned on using IG65DDCDevice::SetPower method before use of StartAudioPlayback.

If the audio streaming for the given DDC2 channel is already running, StartAudio fails.

Use the IG65DDCDevice::StopAudio method to stop audio playback.


IG65DDCDevice::PauseAudioPlayback

Pauses audio playback for the given channel.

C/C++ declaration

int PauseAudioPlayback(uint32_t DDC2ChannelId);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If audio playback is not active or is already paused, PauseAudioPlayback does nothing.

The IG65DDCDeviceCallback::G65DDC_AudioPlaybackStreamCallback and IG65DDCDeviceCallback::G65DDC_AudioStreamCallback callback methods can be called once after PauseAudioPlayback returns. Then they are not called until playback is resumed using the IG65DDCDevice::ResumeAudioPlayback method.


IG65DDCDevice::ResumeAudioPlayback

Resumes paused audio playback for the given channel.

C/C++ declaration

int ResumeAudioPlayback(uint32_t DDC2ChannelId);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

If audio playback is not active or is not paused, ResumeAudioPlayback does nothing.


IG65DDCDevice::SetAudioGain

Sets fixed audio gain for the given channel.

C/C++ declaration

int SetAudioGain(uint32_t DDC2ChannelId,double Gain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Gain
[in] Specifies a new fixed audio gain in dB.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetAudioGain method to retrieve the current audio gain.

IG65DDCDevice::GetAudioGain

Retrieves the current fixed audio gain for the given channel.

C/C++ declaration

int GetAudioGain(uint32_t DDC2ChannelId,double *Gain);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Gain
[out] Pointer to a variable which receives the current fixed gain in dB. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAudioFilter

Enables or disables the audio filter for the given channel.

C/C++ declaration

int SetAudioFilter(uint32_t DDC2ChannelId,int Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[in] Specifies whether to enable or disable the audio filter. If this parameter is non-zero, the filter is enabled. If the parameter is zero, the filter is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetAudioFiler method to retrieve the current state of the audio filter.

IG65DDCDevice::GetAudioFilter

Retrieves the current state of the audio filter for the given channel.

C/C++ declaration

int GetAudioFilter(uint32_t DDC2ChannelId,int *Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[out] Pointer to a variable which receives the current state of the audio filter. The value is non-zero if the filter is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAudioFilterParams

Sets the parameters of the audio filter for the given channel.

C/C++ declaration

int SetAudioFilterParams(uint32_t DDC2ChannelId,uint32_t CutOffLow,uint32_t CutOffHigh,double Deemphasis);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
CutOffLow
[in] Specifies the cut-off low frequency of the filter in Hz. This is the start frequency of the filter's passband, it can range from 0 to 23999 Hz. The value has to be less than the cut-off high frequency specified by the CutOffHigh parameter.
CutOffHigh
[in] Specifies the cut-off high frequency of the filter in Hz. This is the end frequency of the filter's passband, it can range from 1 to 24000 Hz. The value has to be greater than the cut-off low frequency specified by the CutOffLow parameter.
Deemphasis
[in] Specifies the de-emphasis of the filter in dB per octave. De-emphasis starts at the cut-off low frequency of the filter. This value can range from -9.9 to 0.0 dB/octave. Zero means that de-emphasis is disabled.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetAudioFilerParams method to retrieve the current parameters of the audio filter.

IG65DDCDevice::GetAudioFilterParams

Retrieves current parameters of the audio filter for the given channel.

C/C++ declaration

int GetAudioFilterParams(uint32_t DDC2ChannelId,uint32_t *CutOffLow,uint32_t *CutOffHigh,double *Deemphasis);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
CutOffLow
[out] Pointer to a variable which receives the current cut-off low frequency of the filter. This parameter can be NULL if the application does not require this information.
CutOffHigh
[out] Pointer to a variable which receives the current cut-off high frequency of the filter. This parameter can be NULL if the application does not require this information.
Deemphasis
[out] Pointer to a variable which receives the current de-emphasis setting of the filter. This parameter can be NULL if the application does not require this information.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetAudioFilterLength

Specifies the audio filter length for the given channel. The audio filter is implemented as an FIR filter. This method specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int SetAudioFilterLength(uint32_t DDC2ChannelId,uint32_t Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Length
[in] Specifies the length of the audio filter. The value has to be a multiple of 8, greater than or equal to 64 and less than or equal to 32768. If it is not a multiple of 8, the method rounds it up to nearest multiple of 8.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Increasing the filter length increases the filter steepness and may increase CPU usage.

Use the IG65DDCDevice::GetAudioFilterLength method to determine the current length of the audio filter.


IG65DDCDevice::GetAudioFilterLength

Retrieves the current audio filter length for the given channel.

C/C++ declaration

int GetAudioFilterLength(uint32_t DDC2ChannelId,uint32_t *Length);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Length
[out] Pointer to a variable which receives the current length of the audio filter. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetVolume

Sets the audio volume for the given channel.

C/C++ declaration

int SetVolume(uint32_t DDC2ChannelId,uint8_t Volume);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Volume
[in] Specifies the new volume. The value can vary from 0 to 31, where 31 means maximum volume.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetVolume method to retrieve the current volume.


IG65DDCDevice::GetVolume

Retrieve the current volume for the given channel.

C/C++ declaration

int GetVolume(uint32_t DDC2ChannelId,uint8_t *Volume);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Volume
[out] Pointer to a variable which receives the current volume. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetMute

Mutes or unmutes the audio.

C/C++ declaration

int SetMute(uint32_t DDC2ChannelId,int Mute);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Mute
[in] Specifies whether to mute or unmute audio. If this parameter is non-zero, the audio is muted. If the parameter is zero, the audio is unmuted.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

Use the IG65DDCDevice::GetMute method to retrieve the current mute state.


IG65DDCDevice::GetMute

Retrieves the current mute state for the given channel.

C/C++ declaration

int GetMute(uint32_t DDC2ChannelId,int *Mute);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Mute
[out] Pointer to a variable which receives the current mute state. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetDAC

Enables or disables playing of the demodulated audio signal from the specified DDC2 channel on the receiver's audio output connector.

C/C++ declaration

int SetDAC(uint32_t DDC2ChannelId,int Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[in] Specifies whether to enable or disable playing of the demodulated audio signal on the receiver's audio output connector. If this parameter is non-zero, the audio signal from the specified DDC2 channel is played on the audio output connector. If the parameter is zero, the audio signal is not played on the audio output connector.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The audio output connector is optional. The following example shows how to determine whether the receiver includes the audio output connector:
    G65DDC_DEVICE_INFO DeviceInfo;
    IG65DDCDevice *Device;  //Interface of G65DDC device object, created using the CreateInstance function
    
    Device->GetDeviceInfo(&DeviceInfo);
    
    if(DeviceInfo.Flags & G65DDC_FLAGS_AUDIO_OUTPUT)
    {
        //the receiver includes audio output connector
    }
    else
    {
        //the receiver is without an audio output connector
    }

IG65DDCDevice::GetDAC

Determines whether playing of the demodulated audio signal from the specified DDC2 channel on the receiver's audio output connector is enabled or disabled.

C/C++ declaration

int GetDAC(uint32_t DDC2ChannelId,int *Enabled);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Enabled
[out] Pointer to a variable which receives information as to whether playing of the audio signal from the specified DDC2 channel on the audio output connector is enabled or disabled. The value is non-zero if it is enabled and zero if it is disabled. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::SetFrequency

Sets the absolute frequency of the demodulator for the given channel.

C/C++ declaration

int SetFrequency(uint32_t DDC2ChannelId,uint32_t Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Frequency
[in] Specifies the new absolute frequency of the demodulator in Hz.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

This method selects appropriate receiver RF input range and sets DDC1, DDC2 and demodulator frequencies so that the new absolute frequency of the demodulator is the requested one.

Absolute frequency of the demodulator is given by the following formula:

faDEM = faDDC1 + frDDC2 + frDEM

Where faDEM is the absolute center frequency of the demodulator in Hz, faDDC1 is the absolute center frequency of the DDC1 in Hz (set using the IG65DDCDevice::SetDDCFrequency method), frDDC2 is the relative center frequency of DDC2 in Hz (set using the IG65DDCDevice::SetDDCFrequency) and frDEM is the relative center frequency of the demodulator in Hz (set using the IG65DDCDevice::SetDemodulatorFrequency method).

The absolute center frequency of the demodulator is the real-world frequency which you are listening to.

When changing the receiver's RF input range or DDC1 center frequency, the method can affect absolute center frequency of other DDC2 channels (demodulators) which are connected to the same DDC1 as the given DDC2 channel.

Use the IG65DDCDevice::GetFrequency method to retrieve the current absolute frequency of the demodulator.


IG65DDCDevice::GetFrequency

Determines the absolute frequency of the demodulator for the given channel.

C/C++ declaration

int GetFrequency(uint32_t DDC2ChannelId,uint32_t *Frequency);

Parameters

DDC2ChannelId
[in] Identification number of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method.
Frequency
[out] Pointer to a variable which receives the current absolute frequency of the demodulator. This parameter cannot be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The returned value of the variable pointed to by the Frequency parameter is the sum of DDC1, DDC2 and the demodulator relative frequency. For more information, see the remarks for the IG65DDCDevice::SetFrequency method.

IG65DDCDevice::GetSpectrumCompensation

Determines compensation data for the frequency spectrum computed from the DDC1 or DDC2 signal. It is used to convert relative amplitudes in dB to absolutes ones in dBm.

C/C++ declaration

int GetSpectrumCompensation(int32_t CenterFrequency,uint32_t Bandwidth,float *Buffer,uint32_t Count);

Parameters

CenterFrequency
[in] Specifies the absolute center frequency of the requested compensation data in Hz.
Bandwidth
[in] Specifies the width of the requested compensation data in Hz.
Buffer
[out] Pointer to a buffer to be filled with compensation data. This parameter cannot be NULL.
Count
[in] Specifies the number of FLOAT items in the buffer pointed to by the Buffer parameter.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The following example shows how to use the GetSpectrumCompensation method in IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback callback:


//Let the following is prototype of a function which computes FFT from I/Q signal stored in
//the buffer pointed to be the Input parameter. Result is stored in complex form in the buffer
//pointed to by the Output parameter. Size of the FFT is given be the Size parameter.
//The example uses 2048 bins FFT.
void FFT(float *Output,const float *Input,int Size);

IG65DDCDevice *Device; //Interface of G65DDC device object, created by the CreateInstance function
uint32_t DDC1Id; //Identifier of the DDC1 channel created by the IG65DDCDevice::CreateDDC1 method: Device->CreateDDC1(&DDC1Id)
uint32_t DDC2Id; //Identifier of the DDC2 channel created by the IG65DDCDevice::CreateDDC2 method: Device->CreateDDC2(DDC1Id,&DDC2Id)
int32_t AbsDDC2Frequency; //Absolute frequency of the DDC2
int32_t RelDDC2Frequency; //Relative frequency of the DDC2
int32_t AbsDDC1Frequency; //Absolute DDC1 frequency
G65DDC_DDC_INFO DDC2Info; //Information about current DDC type of the DDC2
float FFTBuffer[2*2048]; //Buffer for FFT result
float Compensation[2048]; //Buffer for compensation data
uint32_t FirstBin,LastBin; //the first and last bins in the FFT of useful DDC2 band
MY_CALLBACK_OBJECT MyCallbackObject; //User defined callback object which implements methods of IG65DDCDeviceCallback interface

Code before...

//Retrieve frequency of the DDC1
Device->GetDDCFrequency(DDC1Id,&AbsDDC1Frequency);

//Retrieve relative frequency of the DDC2
Device->GetDDC2Frequency(DDC2Id,&RelDDC2Frequency);

//Calculate absolute frequency of the DDC2
AbsDDC2Frequency=AbsDDC1Frequency+RelDDC2Frequency;

//Retrieve DDC type information of the DDC2
Device->GetDDC2(DDC2Id,NULL,&DDC2Info);

//Retrieve compensation data
Device->GetSpectrumCompensation(AbsDDC2Frequency,DDC2Info.SampleRate,Compensation,2048);
//In this case the Width parameter is equal to sample rate, because we need compensation data
//for whole DDC2 band.
//Compensation data have to be updated after change of absolute DDC2 frequency changing center frequency of its DDC1 or relative center frequency of itself.


FirstBin=2048*(DDC2Info.SampleRate-DDC2Info.Bandwidth)/2/DDC2Info.SampleRate;
LastBin=2048*(DDC2Info.SampleRate+DDC2Info.Bandwidth)/2/DDC2Info.SampleRate;

//Register callback object
Device->SetCallback(&MyCallbackObject);

//Start DDC2 streaming for channel 0
//The SampleSetsPerBuffer parameter is set to 2048 which is size of the FFT to simplify
//the example.
Device->StartDDC(DDC2Id,2048);

Code after...
    
void MY_CALLBACK_OBJECT::G65DDC_DDC2StreamCallback(IG65DDCDevice *Device,uint32_t DDC2ChannelId,const float *Buffer,uint32_t NumberOfSamples)
{
 uint32_t i;
 
    //Compute FFT
    FFT(FFTBuffer,Buffer,2048);
    
    //Converts complex FFT result to dB
    for(i=0;i<2048;i++)
    {
        FFTBuffer[i]=(float)(10.0*log10(FFTBuffer[i*2]*FFTBuffer[i*2]+FFTBuffer[i*2+1]*FFTBuffer[i*2+1]));
    }
    
    //Apply compensation data to get amplitudes in frequency spectrum in dBm
    for(i=0;i<2048;i++)
    {
        FFTBuffer[i]+=Compensation[i];
    }
    
    //now the FFTBuffer contains amplitudes in dBm
    //Useful band starts at the bin given by the FirstBin variable
    //and ends at the bin given by the LastBin variable.
}


IG65DDCDevice::SetCallback

Registers a user-defined callback object given by its interface. The API calls 'methods' of the object to pass samples to the application. The object has to implement methods of the IG65DDCDeviceCallback interface.

C/C++ declaration

int SetCallback(IG65DDCDeviceCallback *Callback);

Parameters

Callback
[in] Interface to a user-defined object to be registered as a callback object. If this parameter is NULL, the current callback object is unregistered, the API will not call any callback after SetCallback returns.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

IG65DDCDevice::GetCallback

Returns a pointer to the current user-defined callback object.

C/C++ declaration

IG65DDCDeviceCallback* GetCallback(void);

Parameters

None

Return value

This method returns a pointer to the current user-defined callback object, previously set by the IG65DDCDevice::SetCallback method.

IG65DDCDevice::SetNetworkParams

Sets the device network parameters (IPv4 address and netmask) which are used when the device is connected to the computer via a LAN interface. The network parameters can only be set when the device is connected to the computer via USB.

C/C++ declaration

int SetNetworkParams(const G65DDC_NETWORK_PARAMS *Params);

Parameters

Params
[in] Pointer to a G65DDC_NETWORK_PARAMS structure which contains new network parameters.

Before calling the SetNetworkParams method, set the Size member of the structure to sizeof(G65DDC_NETWORK_PARAMS).

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The SetNetworkParams method is available only when the G65DDC device is connected to the computer via USB.

Use the GetNetworkParams method to retrieve the current network parameters of the device.


IG65DDCDevice::GetNetworkParams

Retrieves the current device network parameters. The network parameters can be retrieved only when the device is connected to the computer via USB.

C/C++ declaration

int GetNetworkParams(G65DDC_NETWORK_PARAMS *Params);

Parameters

Params
[out] Pointer to a G65DDC_NETWORK_PARAMS structure to be filled with the device network parameters. This parameter cannot be NULL.

Before calling the GetNetworkParams nethod, set the Size member of the structure to sizeof(G65DDC_NETWORK_PARAMS).

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The GetNetworkParams method is available only when the G65DDC device is connected to the computer via USB.

IG65DDCDevice::Get1PPSCounters

Retrieves the state of the 1PPS counters. These counters can be used for evaluation of presence and quality of the 1PPS signal used for time stamping of the DDC1 signal.

C/C++ declaration

int Get1PPSCounters(uint32_t *EventCounter,uint32_t *ADCPeriodCounter);

Parameters

EventCounter
[out] Pointer to a variable which receives the current value of the 1PPS event counter. The value represents the number of 1PPS events since the device was turned on using the IG65DDCDevice::SetPower method. This parameter can be NULL.
ADCPeriodCounter
[out] Pointer to a variable which receives the current value of ADC sample counter. The value specifies the number of ADC samples elapsed between the last two 1PPS events. The normal value is ~210e6. This parameter can be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The 1PSS input is optional. The following example shows how to determine whether the receiver includes the 1PPS input:
    G65DDC_DEVICE_INFO DeviceInfo;
    IG65DDCDevice *Device;  //Interface of G65DDC device object, created using the CreateInstance function
    
    Device->GetDeviceInfo(&DeviceInfo);
    
    if(DeviceInfo.Flags & G65DDC_FLAGS_1PPS)
    {
        //the receiver includes 1PPS input
    }
    else
    {
        //the receiver does not include 1PPS input
    }

IG65DDCDevice::Get1PPSDDC1Counters

Retrieves the state of DDC1 sample counter.

C/C++ declaration

int Get1PPSDDC1Counters(uint32_t DDC1ChannelId,double *SampleCounter,uint64_t *ADCPeriodCounter);

Parameters

DDC1ChannelId
[in] Identification number of the DDC1 channel created by the CreateDDC1 function.
SampleCounter
[out] Pointer to a variable which receives the current value of the DDC1 sample counter. The value is the number of samples produced by the given DDC1 from the time when it was started (using the IG65DDCDevice::StartDDC method) to the last 1PPS event. This parameter can be NULL.
ADCPeriodCounter
[out] Pointer to a variable which receives the current value of the ADC sample counter. The value is the number of ADC samples at the input of the given DDC1 from the time when it was started (using the IG65DDCDevice::StartDDC method) to the last 1PPS event. This parameter can be NULL.

Return value

If the method succeeds, the return value is non-zero.
If the method fails, the return value is zero. To get extended error information, check errno.

Remarks

The 1PSS input is optional. The following example shows how to determine whether the receiver includes the 1PPS input:
    G65DDC_DEVICE_INFO DeviceInfo;
    IG65DDCDevice *Device;  //Interface of G65DDC device object, created using the CreateInstance function
    
    Device->GetDeviceInfo(&DeviceInfo);
    
    if(DeviceInfo.Flags & G65DDC_FLAGS_1PPS)
    {
        //the receiver includes 1PPS input
    }
    else
    {
        //the receiver does not include 1PPS input
    }

IG65DDCDeviceCallback interface

The IG65DDCDeviceCallback interface is an interface of the application-defined object that implements methods of the interface. The object is used to receive streamed buffers from the G65DDC device object. See IG65DDCDevice::SetCallback.

Each method of the interface is called in context of the thread created by the API. If some shared data is accessed inside callback methods, use of a mutual-exclusion synchronization method is recommended. The application should not call any G65DDC API function/method from inside the method of this interface, otherwise the function/method fails. The only exception is the IG65DDCDevice::GetSpectrumCompensation method which can be called from inside the callbacks.


IG65DDCDeviceCallback::G65DDC_ADCSnapshotCallback

This is called by the API to pass ADC snapshots to the application. Sending of ADC snapshots is started using the IG65DDCDevice::StartADCSnapshots method.

C/C++ declaration

void G65DDC_ADCSnapshotCallback(IG65DDCDevice *Device,const short *Buffer,uint32_t Count,uint32_t CenterFrequency,uint16_t ADCLevel);

Parameters

Device
Interface of the device object which called the method.
Buffer
Pointer to the buffer which contains samples directly received from the ADC. Sample rate is 210 MHz, the sample is 16-bit signed little endian.
Count
Specifies the number of samples in the buffer pointed to by the Buffer parameter. This depends on the SamplesPerSnapshot parameter of the IG65DDCDevice::StartADCSnapshots method.
CenterFrequency
Specifies the center frequency of the useful band in the received 105 MHz wide snapshot. Not all of the 105 MHz band of the snapshot is usable. Usable bandwidth depends on the selected receiver's input range and is given by the difference of the MaxFrequency and MinFrequency of the Ranges member of the G65DDC_DEVICE_INFO structure.
ADCLevel
Specifies the maximum amplitude. Measurement of the maximum is started at the end of the previous snapshot to the current one. The possible value ranges from 0 to 32767. The value 32767 means ADC clipping.

IG65DDCDeviceCallback::G65DDC_DDC1StreamCallback

This is called by the API to pass I/Q samples from DDC1 to the application. The DDC1 streaming can be started using the IG65DDCDevice::StartDDC or IG65DDCDevice::StartDDC1Playback method.

C/C++ declaration

void G65DDC_DDC1StreamCallback(IG65DDCDevice *Device,uint32_t DDC1ChannelId,const void *Buffer,uint32_t Count,uint32_t BitsPerSample);

Parameters

Device
Interface of the device object which called the method.
DDC1ChannelId
Specifies the identification number of the DDC1 channel. See IG65DDCDevice::CreateDDC1.
Buffer
Pointer to the buffer which contains I/Q sample sets from DDC1. Sample rate and bits per sample is given by the used DDC type, see the IG65DDCDevice::SetDDC method. One I/Q sample set consists of two samples.
Count
Specifies the number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to the value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartDDC or IG65DDCDevice::StartDDC1Playback method.
BitsPerSample
Specifies the number of bits per sample. It is given by the DDC type used for DDC1 and it can be 16 or 32. If it is 16, the sample is 16-bit integer (32-bits per I/Q sample set), signed, little endian, from the range -32768 to 32767. If it is 32, the sample is 32-bit integer (64-bits per I/Q sample set), signed, little endian, from the range -2147483648 to 2147483647.

IG65DDCDeviceCallback::G65DDC_DDC1PlaybackStreamCallback

This is called by the API to fill the buffer with I/Q samples by the application. The DDC1 playback can be started using the IG65DDCDevice::StartDDC1Playback method.

C/C++ declaration

int G65DDC_DDC1PlaybackStreamCallback(IG65DDCDevice *Device,uint32_t DDC1ChannelId,void *Buffer,uint32_t Count,uint32_t BitsPerSample);

Parameters

Device
Interface of the device object which called the method.
DDC1ChannelId
Specifies the identification number of the DDC1 channel. See IG65DDCDevice::CreateDDC1.
Buffer
Pointer to the buffer to be filled with I/Q sample sets. The sample rate and bits per sample are given by the used DDC type, see the IG65DDCDevice::SetDDC method.
Count
Specifies the number of I/Q sample sets to be stored to the buffer pointed to by the Buffer parameter. This value is equal to the value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartDDC1Playback method. If the application does not have the requested number of sample sets, it has to fill the buffer with zeros. One I/Q sample set consists of two samples.
BitsPerSample
Specifies the number of bits per sample. It is given by the DDC type used for DDC1 and it can be 16 or 32. If it is 16, the sample is 16-bit integer (32-bits per I/Q sample set), signed, little endian, from the range -32768 to 32767. If it is 32, the sample is 32-bit integer (64-bits per I/Q sample set), signed, little endian, from the range -2147483648 to 2147483647.

Return value

The application should return non-zero to continue playback. The application should return zero to stop the API to call G65DDC_DDC1PlaybackStreamCallback again. This does not stop DDC1 playback, it has to be done explicitly by the application calling the IG65DDCDevice::StopDDC method from the thread in which the device object was created using the CreateInstance function. IG65DDCDevice::StopDDC must not be called from inside the callback.

IG65DDCDeviceCallback::G65DDC_DDC2StreamCallback

This is called by the API to pass I/Q samples from DDC2 to the application. The DDC2 streaming can be started using the IG65DDCDevice::StartDDC method.

C/C++ declaration

void G65DDC_DDC2StreamCallback(IG65DDCDevice *Device,uint32_t DDC2ChannelId,const float *Buffer,uint32_t Count);

Parameters

Device
Interface of the device object which called the method.
DDC2ChannelId
Specifies the identification number of the DDC2 channel. See IG65DDCDevice::CreateDDC2.
Buffer
Pointer to the buffer which contains I/Q sample sets from DDC2. Sample rate is given by the DDC type of the DDC2. Use the IG65DDCDevice::GetDDC method to determine the current DDC type of the DDC2. Sample is 32-bit IEEE float from the range of -1.0 to 1.0. One I/Q sample set consists of two samples.
Count
Specifies the number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartDDC method.

IG65DDCDeviceCallback::G65DDC_DDC2PreprocessedStreamCallback

This is called by the API to pass pre-processed I/Q samples from DDC2 to the application. The samples are filtered by the demodulator filter, notch filter and affected by AGC or fixed gain. The DDC2 streaming can be started using the IG65DDCDevice::StartDDC method.

C/C++ declaration

void G65DDC_DDC2PreprocessedStreamCallback(IG65DDCDevice *Device,uint32_t DDC2ChannelId,const float *Buffer,
    uint32_t Count,float SlevelPeak,float SlevelRMS);

Parameters

Device
Interface of the device object which called the method.
DDC2ChannelId
Specifies the identification number of the DDC2 channel. See IG65DDCDevice::CreateDDC2.
Buffer
Pointer to the buffer which contains pre-processed I/Q sample sets from DDC2. Sample rate is given by the DDC type of the DDC2. Use the IG65DDCDevice::GetDDC method to determine the current DDC type of the DDC2. Sample is 32-bit IEEE float from the range of -1.0 to 1.0. One I/Q sample set consists of two samples.
Count
Specifies the number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartDDC method.
SlevelPeak
Specifies the peak signal level in Volts evaluated from samples stored in the buffer pointed to by the Buffer parameter.
SlevelRMS
Specifies the RMS signal level in Volts evaluated from samples stored in the buffer pointed to by the Buffer parameter. For detailed information on how to convert RMS signal level to dBm, see the remarks of the IG65DDCDevice::GetSignalLevel method.

IG65DDCDeviceCallback::G65DDC_AudioStreamCallback

This is called by the API to pass audio samples to the application. The audio streaming can be started using the IG65DDCDevice::StartAudio or IG65DDCDevice::StartAudioPlayback method.

C/C++ declaration

void G65DDC_AudioStreamCallback(IG65DDCDevice *Device,uint32_t DDC2ChannelId,uint32_t Stage,const float *Buffer,uint32_t Count);

Parameters

Device
Interface of the device object which called the method.
DDC2ChannelId
Specifies the identification number of the DDC2 channel. See IG65DDCDevice::CreateDDC2.
Stage
Specifies the stage of audio samples stored in the buffer pointed to by the Buffer parameter. The value of this parameter can be one of the following:

ValueMeaning
G65DDC_AUDIO_STREAM_CALLBACK_STAGE_0The buffer contains audio samples affected by audio gain (see IG65DDCDevice::SetAudioGain).
G65DDC_AUDIO_STREAM_CALLBACK_STAGE_1The buffer contains audio samples affected by audio gain and audio filter (see IG65DDCDevice::SetAudioGain and IG65DDCDevice::SetAudioFilter).
G65DDC_AUDIO_STREAM_CALLBACK_STAGE_2The buffer contains audio samples affected by audio gain, audio filter and volume (see IG65DDCDevice::SetAudioGain, IG65DDCDevice::SetAudioFilter, IG65DDCDevice::SetVolume and IG65DDCDevice::SetMute).
Buffer
Pointer to the buffer which contains samples of the audio signal. The signal consists of two channels (interleaved), the sample rate is 48000 Hz, each sample is 32-bit IEEE float from the range of -1.0 to 1.0.
Count
Specifies the number of sample sets stored in the buffer pointed to by the Buffer parameter (the sample set consists of two samples). This value is equal to the value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartAudio or IG65DDCDevice::StartAudioPlayback method.

IG65DDCDeviceCallback::G65DDC_AudioPlaybackStreamCallback

This is called by the API to fill the buffer with audio samples by the application. The audio playback can be started using the IG65DDCDevice::StartAudioPlayback method.

C/C++ declaration

int G65DDC_AudioPlaybackStreamCallback(IG65DDCDevice *Device,uint32_t DDC2ChannelId,float *Buffer,uint32_t Count);

Parameters

Device
Interface of the device object which called the method.
DDC2ChannelId
Specifies the identification number of the DDC2 channel. See IG65DDCDevice::CreateDDC2.
Buffer
Pointer to the buffer to be filled with audio samples. The audio signal consists of two channels (interleaved), the sample rate is 48000 Hz, each sample is 32-bit IEEE float from the range of -1.0 to 1.0.
Count
Specifies the number of sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SampleSetsPerBuffer parameter of the IG65DDCDevice::StartAudioPlayback method. If the application does not have requested number of samples, the application has to fill the buffer with zeros.

Return value

The application should return non-zero to continue playback. The application should return zero to stop the API from calling G65DDC_AudioPlaybackStreamCallback again. This does not stop audio playback, it has to be done explicitly by the application calling the IG65DDCDevice::StopAudio method from the thread in which the device object was created using the CreateInstance function. IG65DDCDevice::StopAudio must not be called from inside the callback.

IG65DDCNetworkEnumeratorCallback interface

The IG65DDCNetworkEnumeratorCallback interface is an interface of 'application-defined object' that implements the method of the interface. The object is used to receive information about discovered G65DDC devices in the computer's subnet. See IG65DDCNetworkEnumerator::Start..


IG65DDCNetworkEnumeratorCallback::G65DDC_DeviceFound

This is called by the API to pass information about discovered G65DDC device to the application. The method is called in context of the thread created by the API.

C/C++ declaration

void G65DDC_DeviceFound(uint32_t IpAddress,uint16_t Port,const char *SerialNumber,uint32_t Flags);

Parameters

IpAddress
IP address of discovered G65DDC device in network byte order.
Port
IP port number in network byte order.
SerialNumber
Device's serial number in null-terminated string.
Flags
Flags which allow testing whether the discovered device is idle and ready to be open. If (Flags & 0x04) is zero, the device is ready to be open, otherwise it is locked by another client software.

Structures

G65DDC_DEVICE_INFO

Contains information about the G65DDC device.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    char          DevicePath[256];
    uint8_t       InterfaceType;
    char          SerialNumber[9];
    uint16_t      HWVersion;
    uint16_t      FWVersion[3];
    uint8_t       EEPROMVersion;    	
    struct
    {
        uint32_t  MinFrequency;
        uint32_t  MaxFrequency;
    }             Ranges[2];  	
    uint32_t      MaxDDC1ChannelCount;    
    uint32_t      MaxDDC2ChannelCount;
    uint32_t      MaxDDC1TypeCount;
    uint32_t      MaxDDC2TypeCount;   
    uint32_t      MaxDDC2ChannelsPerDDC1Channel;	
    uint32_t      Flags;
    uint8_t       MACAddress[6];
} G65DDC_DEVICE_INFO;

#pragma pack(pop)

Members

DevicePath
The device system path in a null-terminated string. It is used to open the device using the object interface.

If the device information structure is obtained from an already open device using the IG65DDCDevice::GetDeviceInfo method, the DevicePath can contain a remote address/port of the device, if it is connected via its LAN interface.

InterfaceType
Device interface type. The value can be one of the following:

ValueMeaning
G65DDC_INTERFACE_TYPE_PCIEThe device is connected to the computer via PCI express.
G65DDC_INTERFACE_TYPE_USB2The device is connected to the computer via USB that is not capable of USB3 speeds. The receiver works in limited mode, DDC1 bandwidths above 6.4 MHz are not available.
G65DDC_INTERFACE_TYPE_USB3The device is connected to the computer via USB3.
G65DDC_INTERFACE_TYPE_LANThe device is connected to the computer via a LAN interface. The receiver works in limited mode, DDC1 bandwidths above 16 MHz are not available.
G65DDC_INTERFACE_TYPE_DEMODemo G65DDC device.
SerialNumber
Serial number in a null-terminated string.
HWVersion
Version of the hardware.
FWVersion[3]
Version of the firmware.
EEPROMVersion
EEPROM structure version.
Ranges
Specifies the minimum (MinFrequency) and the maximum (MaxFrequency) frequencies (in Hz) for both of the supported receiver's input ranges.
MaxDDC1ChannelCount
Maximum number of DDC1 channels which can be created by the IG65DDCDevice::CreateDDC1 method per single device.
MaxDDC2ChannelCount
Maximum number of DDC2 channels which can be created by the IG65DDCDevice::CreateDDC2 method per single device.
MaxDDC1TypeCount
Maximum number of DDC types supported by the DDC1 channel.
MaxDDC2TypeCount
Maximum number of DDC types supported by the DDC2 channel. The current maximum can be determined using the IG65DDCDevice::GetDDCCount method because it is also limited by the currently selected DDC type of related DDC1 channel.
MaxDDC2ChannelsPerDDC1Channel
Maximum number of DDC2 channels per DDC1 channel.
Flags
Hardware configuration flags can be a combination of the following values:

ValueMeaning
G65DDC_FLAGS_EXTERNAL_REFERENCE_INThe device includes an external reference oscillator input.
G65DDC_FLAGS_COHERENTThe device supports coherent mode.
G65DDC_FLAGS_EXTERNAL_REFERENCE_OUTThe device includes a reference oscillator output.
MACAddress
Physical Ethernet address of the devices.

G65DDC_DEVICE_STATE

Contains information about the DDC type.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint32_t  Flags;
    int32_t   Temperatures[3];
    uint32_t  FanRPM;
    uint64_t  DataTransferred;
    uint64_t  DataLost;
} G65DDC_DEVICE_STATE;

#pragma pack(pop)

Members

Flags
A set of bits flags. This member can be a combination of the following flags:

ValueMeaning
G65DDC_DEVICE_STATE_HIGH_TEMPERATURECritical temperature is detected and the device is turned off automatically. In this case the application should call IG65DDCDevice::SetPower to turn off explicitly.
Temperatures
Internal device's temperatures in °C. If the temperature is not available or unknown the value is equal to G65DDC_TEMPERATURE_UNKNOWN.
FanRPM
Device's fan rotations per minute. Zero value means the fan is off.
DataTransferred
Total number of bytes transferred from/to the device since is has been open.
DataLost
Total number of bytes lost. A non-zero value can indicate an unreliable (USB/LAN) connection or connection with insufficient data throughput.

G65DDC_DDC_INFO

Contains information about the DDC type.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint32_t  SampleRate;
    uint32_t  Bandwidth;
    uint32_t  BitsPerSample;
} G65DDC_DDC_INFO;

#pragma pack(pop)

Members

SampleRate
Sample rate of I/Q signal in Hz.
Bandwidth
Useful bandwidth in Hz.
BitsPerSample
Number of bits per sample. This can be 16 or 32. It is used to determine the bits per sample for DDC1.

G65DDC_AMS_CAPTURE_RANGE

Contains information about the AMS capture range.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint32_t  Tune;
    uint32_t  Lock;
} G65DDC_AMS_CAPTURE_RANGE;

#pragma pack(pop)

Members

Tune
Initial capture range in Hz.
Lock
Capture range (in Hz) used when the AMS demodulator is locked.

G65DDC_NETWORK_PARAMS

Contains network parameters of the device.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint16_t  Size
    uint32_t  IpAddress;
    uint32_t  Mask;
} G65DDC_NETWORK_PARAMS;

#pragma pack(pop)

Members

Size
The size of this data structure, in bytes. Set this member to sizeof(G65DDC_NETWORK_PARAMS).
IpAddress
IPv4 address in network byte order.
Mask
Netmask in network byte order.