Programming Information for the WiNRADiO G65DDC receiver in coherent mode.

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 interfaces to control the G65DDC device. This document describes the non-object-oriented interface. The libg65ddcapi.so library exports several functions which makes it possible to control G65DDC receivers in coherent mode.

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.

Processing chain block diagram of the G65DDC device set in coherent mode

The 'G65DDC device set' in coherent mode can consist of up to 16 interconnected G65DDC devices. DDC1 signals from all the G65DDC devices in such a set are phase-coherent. All other provided signals (ADC snapshots, DDC2 and audio) are not phase-coherent. Only one processing channel per device is available in coherent mode.

Simplified block diagram of G65DDC processing chain
Built-in test Preselectors Attenuator Preamplifier Attenuator 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 filters Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Set volume Built-in test Preselectors Attenuator Preamplifier Attenuator 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 filters Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Set volume Built-in test Preselectors Attenuator Preamplifier Attenuator 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 filters Gain Pre-processed DDC2 stream Demodulator Audio gain Audio stream Audio filter Set volume Simplified block diagram of the device set processing chain containing three interconnected G65DDC devices in coherent mode.
Phase-coherent parts of the device set are in the red rectangles.

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 handles to G65DDC devices returned by the CohOpenDeviceSet function must be closed by the CohCloseDeviceSet function, 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"

COH_G65DDC_OPEN_DEVICE_SET CohOpenDeviceSet;
COH_G65DDC_CLOSE_DEVICE_SET CohCloseDeviceSet;
void *API;

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

    if(API!=NULL)
    {
        //Retrieving addresses of used API functions
        CohOpenDeviceSet=(COH_G65DDC_OPEN_DEVICE_SET)dlsym(API,"CohOpenDeviceSet");
        CohCloseDeviceSet=(COH_G65DDC_CLOSE_DEVICE_SET)dlsym(API,"CohCloseDeviceSet");

        //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;
}

List of the available G65DDC device sets in coherent mode

The G65DDC API provides the CohGetDeviceSetList function which returns a list of available G65DDC device sets which can be open using the CohOpenDeviceSet function.

The following source code produces a list of serial numbers of G65DDC devices for the available device sets.

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

COH_G65DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList;
COH_G65DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList;
void *API;

int main(void)
{
 uint32_t i,j;
 COH_G65DDC_DEVICE_SET_LIST *DeviceSetList;

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

    if(API!=NULL)
    {
        //Retrieving address of the CohGetDeviceSetList and CohFreeDeviceSetList functions
        CohGetDeviceSetList=(COH_G65DDC_GET_DEVICE_SET_LIST)dlsym(API,"CohGetDeviceSetList");
        CohFreeDeviceSetList=(COH_G65DDC_FREE_DEVICE_SET_LIST)dlsym(API,"CohFreeDeviceSetList");
        
        DeviceSetList=CohGetDeviceSetList();
        
        if(DeviceSetList!=NULL)
        {            
            if(DeviceSetList->DeviceSetCount!=0)
            {
                printf("Available G65DDC device set count=%d\n",DeviceSetList->DeviceSetCount);
                                
                for(i=0;i<DeviceSetList->DeviceSetCount;i++)
                {
                    printf("Device set %u:\n",i);
                    printf("\tNumber of devices in the set: %u\n",DeviceSetList->DeviceSet[i].DeviceCount);
                    
                    for(j=0;j<DeviceSetList->DeviceSet[i].DeviceCount;j++)
                    {
                        printf("\t\t%u: SN: %s\n",j,DeviceSetList->DeviceSet[i].DeviceInfo[j].SerialNumber);
                    }
                }                
            }
            else
            {
                printf("No available G65DDC device set has been found.\n");
            }
            
            //free memory
            CohFreeDeviceSetList(DeviceSetList);
        }
        else
        {
            printf("CohGetDeviceSetList failed with error %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 set

G65DDC device set has to be open before it can be controlled. The API provides the CohOpenDeviceSet function to open the device set of interconnected G65DDC devices in coherent mode.

The following source code shows how to open the first available G65DDC device set.

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

COH_G65DDC_OPEN_DEVICE_SET CohOpenDeviceSet;
COH_G65DDC_CLOSE_DEVICE_SET CohCloseDeviceSet;
void *API;

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

    if(API!=NULL)
    {
        //Retrieving addresses of the CohOpenDeviceSet and CohCloseDeviceSet API functions
        CohOpenDeviceSet=(COH_G65DDC_OPEN_DEVICE_SET)dlsym(API,"CohOpenDeviceSet");
        CohCloseDeviceSet=(COH_G65DDC_CLOSE_DEVICE_SET)dlsym(API,"CohCloseDeviceSet");

        //Opening the first available G65DDC device set using predefined COH_G65DDC_OPEN_FIRST constant
        hDeviceSet=CohOpenDeviceSet(COH_G65DDC_OPEN_FIRST,0);
        
        if(hDeviceSet>=0)
        {
            //Place code here that works with the open G65DDC device set            
            
            //Closing handle to opened G65DDC device set
            CohCloseDeviceSet(hDeviceSet);
        }
        else
        {
            printf("CohGetDeviceSetList failed with error %d\n",errno);
        }

        dlclose(API);
    }
    else
    {
        //If the dlopen fails
        printf("Failed to load libg65ddcapi.so. %s\n",dlerror());
    }
    
    return 0;
}
The following code demonstrates another way to open the first available G65DDC device set using the device set list.
#include <dlfcn.h>
#include <errno.h>
#include <stdio.h>
#include "g65ddcapi.h"

COH_G65DDC_OPEN_DEVICE_SET CohOpenDeviceSet;
COH_G65DDC_CLOSE_DEVICE_SET CohCloseDeviceSet;
COH_G65DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList;
COH_G65DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList;
void *API;

int main(void)
{  
 int32_t hDeviceSet;
 COH_G65DDC_DEVICE_SET_LIST *DeviceSetList;
 
    //Loading the API
    API=dlopen("libg65ddcapi.so",RTLD_LAZY);

    if(API!=NULL)
    {
        //Retrieving addresses of API functions
        CohOpenDeviceSet=(COH_G65DDC_OPEN_DEVICE_SET)dlsym(API,"CohOpenDeviceSet");
        CohCloseDeviceSet=(COH_G65DDC_CLOSE_DEVICE_SET)dlsym(API,"CohCloseDeviceSet");
        CohGetDeviceSetList=(COH_G65DDC_GET_DEVICE_SET_LIST)dlsym(API,"CohGetDeviceSetList");
        CohFreeDeviceSetList=(COH_G65DDC_FREE_DEVICE_SET_LIST)dlsym(API,"CohFreeDeviceSetList");

        DeviceSetList=CohGetDeviceSetList();
        
        if(DeviceSetList!=NULL)
        {
            if(DeviceSetList->DeviceSetCount!=0)
            {
                //Opening the first available G65DDC device set in the list
                hDeviceSet=CohOpenDeviceSet(DeviceSetList->DeviceSet[0].DeviceInfo,DeviceSetList->DeviceSet[0].DeviceCount);
                
                if(hDeviceSet>=0)
                {
                    //Place code here that works with the open G65DDC device set            
                    
                    //Closing handle to opened G65DDC device set
                    CohCloseDeviceSet(hDeviceSet);
                }
                else
                {
                    printf("CohOpenDeviceSet failed with error %d\n",errno);
                }
            }
            else
            {
                printf("No available G65DDC device set has been found.\n");
            }
            
            CohFreeDeviceSetList(DeviceSetList);
        }
        else
        {
            printf("CohGetDeviceSetList failed with error %d\n",errno);
        }

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

Functions

CohGetDeviceSetList

The CohGetDeviceSetList function returns information about available G65DDC device sets that can be open.

C/C++ declaration

COH_G65DDC_DEVICE_SET_LIST* CohGetDeviceSetList(void);

Address retrieval

COH_G65DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList=(COH_G65DDC_GET_DEVICE_SET_LIST)dlsym(hAPI,"CohGetDeviceSetList");

Parameters

None

Return value

If the function succeeds, the return value is a non-zero pointer to a structure which describes a list of available sets of interconnected G65DDC devices.
If the function fails, the return value is zero. To get extended error information, check errno.

Remarks

If the returned list of available device sets is no longer needed, the memory used by this list has to be freed using the CohFreeDeviceSetList function.


CohFreeDeviceSetList

The CohFreeDeviceSetList function frees memory allocated by the CohGetDeviceSetList function. This memory is used to store a list of the available G65DDC device sets.

C/C++ declaration

void CohFreeDeviceSetList(COH_G65DDC_DEVICE_SET_LIST *DeviceSetList);

Address retrieval

COH_G65DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList=(COH_G65DDC_FREE_DEVICE_SET_LIST)dlsym(hAPI,"CohFreeDeviceSetList");

Parameters

DeviceSetList
[in] Pointer to the data structure returned by a previous call to the CohGetDeviceSetList function. This parameter cannot be NULL.

CohOpenDeviceSet

Opens a G65DDC device set.

C/C++ declaration

int32_t CohOpenDeviceSet(G65DDC_DEVICE_INFO *DeviceInfos,uint32_t Count);

Address retrieval

COH_G65DDC_OPEN_DEVICE_SET CohOpenDeviceSet=(COH_G65DDC_OPEN_DEVICE_SET)dlsym(hAPI,"CohOpenDeviceSet");

Parameters

DeviceInfos
[in] Pointer to an array of G65DDC_DEVICE_INFO structures which contains information about all of the devices in the device set to be open. The number of items in the array is given by the Count parameter. The order of device info structures in the array has to correspond to the hardware interconnect of the G65DDC devices. Array of device info structures and its size can be obtained from the list of device set provided by the CohGetDeviceSetList function. The example above shows how to achieve this.

It is possible to use one of the following predefined values instead of a pointer to the array:
ValueMeaning
COH_G65DDC_OPEN_FIRSTThis function opens the first available G65DDC device set. The Count parameter is ignored, the number of interconnected devices is determined automatically.
COH_G65DDC_OPEN_DEMOThis function opens a demo G65DDC device set. This allows developers to work with the API without physical G65DDC devices. The Count parameter specifies the number of demo receivers in the set and can vary from 1 to 16.
Count
[in] Specifies the number of items in the array pointed to by the DeviceInfos parameter.

Return value

If the function succeeds, the return value is a handle to the specified G65DDC device set. This handle can only be used with functions of the G65DDC API.
If the function fails, the return value is negative. To get extended error information, check errno.

Remarks

The CohOpenDeviceSet function can be called from any user thread, the returned handle can only be used in the same thread, otherwise the application can enter an unpredictable state.

Use the CohCloseDeviceSet function to close the G65DDC device set handle returned by the CohOpenDeviceSet.

The order of devices in the device set corresponds to the hardware interconnect of the G65DDC devices. Each individual device in the device set has its own constant index which does not change while the hardware G65DDC device interconnect remains the same. This index is used in some API functions to access a specific device of the device set. The index of the first device is 0 (master device), the index of the second device is 1, etc..


CohCloseDeviceSet

Closes G65DDC device set.

C/C++ declaration

int CohCloseDeviceSet(int32_t hDeviceSet);

Address retrieval

COH_G65DDC_CLOSE_DEVICE_SET CohCloseDeviceSet=(COH_G65DDC_CLOSE_DEVICE_SET)dlsym(hAPI,"CohCloseDeviceSet");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.

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.

CohIsConnected

Checks if all the devices in the device set are still connected to the computer.

C/C++ declaration

int CohIsConnected(int32_t hDeviceSet,int *Connected);

Address retrieval

COH_G65DDC_IS_CONNECTED CohIsConnected=(COH_G65DDC_IS_CONNECTED)dlsym(hAPI,"CohIsConnected");

Parameters

hDeviceSet
[in] Handle to G65DDC device set returned by the CohOpenDeviceSet function.
Connected
[out] Pointer to a variable which receives the current connection status. If the received value is non-zero, all the devices in the given device set are still connected and available. If any device in the device set is disconnected, the received value is zero.

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

If any device from the set is determined disconnected, the device set is no longer usable and should be closed using CohCloseDeviceSet function.

CohGetDeviceCount

Retrieves the number of G65DDC devices in the device set.

C/C++ declaration

int CohGetDeviceCount(int32_t hDeviceSet,uint32_t *Count);

Address retrieval

COH_G65DDC_GET_DEVICE_COUNT CohGetDeviceCount=(COH_G65DDC_GET_DEVICE_COUNT)dlsym(hAPI,"CohGetDeviceCount");

Parameters

hDeviceSet
[in] Handle to G65DDC device set returned by the CohOpenDeviceSet function.
Count
[out] Pointer to a variable which receives the number of G65DDC devices in the device set. 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.

CohGetDeviceInfo

Retrieves information about a single G65DDC device from the device set.

C/C++ declaration

int CohGetDeviceInfo(int32_t hDeviceSet,uint32_t DeviceIndex,G65DDC_DEVICE_INFO *Info);

Address retrieval

COH_G65DDC_GET_DEVICE_INFO CohGetDeviceInfo=(COH_G65DDC_GET_DEVICE_INFO)dlsym(hAPI,"CohGetDeviceInfo");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than the number of devices' in the device set. The order of the devices corresponds to the hardware interconnection of physical G65DDC devices.
Info
[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 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

Use the CohGetDeviceCount function to determine the number of devices in the device set.

CohGetDeviceInfos

Retrieves information about all of the G65DDC devices in the device set at once.

C/C++ declaration

int CohGetDeviceInfos(int32_t hDeviceSet,G65DDC_DEVICE_INFO *Infos,uint32_t *InfoCount);

Address retrieval

COH_G65DDC_GET_DEVICE_INFOS CohGetDeviceInfos=(COH_G65DDC_GET_DEVICE_INFOS)dlsym(hAPI,"CohGetDeviceInfos");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Infos
[out] Pointer to an array of G65DDC_DEVICE_INFO structures to be filled with information about the device in the device set.
The order of the device infos in the array corresponds to the hardware interconnect of physical G65DDC devices.
InfoCount
[in, out] Pointer to a variable that specifies the size of the array (number of items in the array) pointed to by the Infos parameter. When the function returns, this variable contains the number of items copied to Infos.

If the array specified by Infos parameter is not large enough to hold information about all the devices in the device set, the function fails (errno is equal to ENOMEM) and stores the required array size (number of items) in the variable pointed to by the InfoCount parameter.

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

Use the CohGetDeviceCount function to determine the number of devices in the device set.

CohSetLED

Sets the front panel LED flashing mode of the specified G65DDCe device in the device set.

C/C++ declaration

int CohSetLED(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t LEDMode);

Address retrieval

COH_G65DDC_SET_LED CohSetLED=(COH_G65DDC_SET_LED)dlsym(hAPI,"CohSetLED");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetLED function 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

CohGetLED

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

C/C++ declaration

int CohGetLED(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *LEDMode);

Address retrieval

COH_G65DDC_GET_LED CohGetLED=(COH_G65DDC_GET_LED)dlsym(hAPI,"CohGetLED");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 CohSetLED. 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.

CohSetPower

Turns on or off all of the G65DDC devices in the device set.

C/C++ declaration

int CohSetPower(int32_t hDeviceSet,int Power);

Address retrieval

COH_G65DDC_SET_POWER CohSetPower=(COH_G65DDC_SET_POWER)dlsym(hAPI,"CohSetPower");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Power
[in] Specifies whether to turn on or off the devices. If this parameter is non-zero all of the devices in the device set are turned on, if it is zero then all of the devices are turned off.

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. To get additional information about the failure, check the state of all of the devices in the set using the CohGetDeviceState function.

Remarks

If CohSetPower turns the devices off, all the running streams are stopped.

Use the CohGetPower function to determine the current power state of devices in the device set.

CohSetPower fails if some parts of the multichannel coherent system are not properly interconnected or improper cables are used for interconnection.


CohGetPower

The GetPower function determines whether the devices are turned on or off.

C/C++ declaration

int CohGetPower(int32_t hDeviceSet,int *Power);

Address retrieval

COH_G65DDC_GET_POWER CohGetPower=(COH_G65DDC_GET_POWER)dlsym(hAPI,"CohGetPower");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Power
[out] Pointer to a variable which receives the current power state of the device set. If it is non-zero, the devices are turned on. If it is zero the devices are turned off. 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.

CohGetDeviceState

Retrieves the current state of the G65DDC device in the device set, like internal temperatures, error state, data transfer counters.

C/C++ declaration

int CohGetDeviceState(int32_t hDeviceSet,uint32_t DeviceIndex,G65DDC_DEVICE_STATE *State);

Address retrieval

COH_G65DDC_GET_DEVICE_STATE CohGetDeviceState=(COH_G65DDC_GET_DEVICE_STATE)dlsym(hAPI,"CohGetDeviceState");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetBuiltInTest

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 CohSetBuiltInTest(int32_t hDeviceSet,uint32_t DeviceIndex,int Enabled);

Address retrieval

COH_G65DDC_SET_BUILT_IN_TEST CohSetBuiltInTest=(COH_G65DDC_SET_BUILT_IN_TEST)dlsym(hAPI,"CohSetBuiltInTest");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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
165 MHz ± 5 MHz-40 dBm ± 3 dB
2152 MHz ± 5 MHz-34 dBm ± 3 dB

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.

CohGetBuiltInTest

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

C/C++ declaration

int CohGetBuiltInTest(int32_t hDeviceSet,uint32_t DeviceIndex,int *Enabled);

Address retrieval

COH_G65DDC_GET_BUILT_IN_TEST CohGetBuiltInTest=(COH_G65DDC_GET_BUILT_IN_TEST)dlsym(hAPI,"CohGetBuiltInTest");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetAttenuator

Sets the RF input attenuator.

C/C++ declaration

int CohSetAttenuator(int32_t hDeviceSet,uint32_t Attenuator);

Address retrieval

COH_G65DDC_SET_ATTENUATOR CohSetAttenuator=(COH_G65DDC_SET_ATTENUATOR)dlsym(hAPI,"CohSetAttenuator");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Attenuator
[in] The value that specifies attenuation level in dB. Possible values are: 0, 3, 6, 9, 12, 15, 18, 21. If the value is not from the list, the CohSetAttenuator function rounds the value to the nearest lower one.

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

Use the CohGetAttenuator function to determine the current setting of the attenuator.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetAttenuator function with the same value of the Attenuator parameter has to be called on all of the receivers in this multichannel coherent system.


CohGetAttenuator

Retrieves the current setting of the RF input attenuator.

C/C++ declaration

int CohGetAttenuator(int32_t hDeviceSet,uint32_t *Attenuator);

Address retrieval

COH_G65DDC_GET_ATTENUATOR CohGetAttenuator=(COH_G65DDC_GET_ATTENUATOR)dlsym(hAPI,"CohGetAttenuator");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Attenuator
[out] Pointer to a variable which receives the current attenuation level. 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.

CohSetPreselectors

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

C/C++ declaration

int CohSetPreselectors(int32_t hDeviceSet,uint32_t Low,uint32_t High);

Address retrieval

COH_G65DDC_SET_PRESELECTORS CohSetPreselectors=(COH_G65DDC_SET_PRESELECTORS)dlsym(hAPI,"CohSetPreselectors");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function 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 function rounds it to the nearest one.

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 Low parameter must not be higher than value of the High parameter, otherwise the function fails.

Use the CohGetPreselectors function to determine the current setting of the preselectors.

If the receiver which is open (in the given device set) is part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetPreselectors function with the same values of the Low and High parameters has to be called on all of the receivers in this multichannel coherent system.


CohGetPreselectors

Retrieves the current setting of the RF input band pass filter.

C/C++ declaration

int CohGetPreselectors(int32_t hDeviceSet,uint32_t *Low,uint32_t *High);

Address retrieval

COH_G65DDC_GET_PRESELECTORS CohGetPreselectors=(COH_G65DDC_GET_PRESELECTORS)dlsym(hAPI,"CohGetPreselectors");

Parameters

hDeviceSet
[in] Handle to G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetPreamplifier

Enables or disables the RF input preamplifier.

C/C++ declaration

int CohSetPreamplifier(int32_t hDeviceSet,int Preamp);

Address retrieval

COH_G65DDC_SET_PREAMPLIFIER CohSetPreamplifier=(COH_G65DDC_SET_PREAMPLIFIER)dlsym(hAPI,"CohSetPreamplifier");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 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

Use the CohGetPreamplifier function to determine the current state of the preamplifier.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetPreamplifier function with the same value of the Preamp parameter has to be called on for all of the receivers in this multichannel coherent system.


CohGetPreamplifier

Retrieves the current state of the RF input preamplifier.

C/C++ declaration

int CohGetPreamplifier(int32_t hDeviceSet,int *Preamp);

Address retrieval

COH_G65DDC_GET_PREAMPLIFIER CohGetPreamplifier=(COH_G65DDC_GET_PREAMPLIFIER)dlsym(hAPI,"CohGetPreamplifier");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetInverted

Enables or disables frequency spectrum inversion.

C/C++ declaration

int CohSetInverted(int32_t hDeviceSet,int Inverted);

Address retrieval

COH_G65DDC_SET_INVERTED CohSetInverted=(COH_G65DDC_SET_INVERTED)dlsym(hAPI,"CohSetInverted");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Inverted
[in] Specifies whether to enable or disable frequency spectrum inversion. If this parameter is non-zero, IF spectrum is inverted.

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.

CohGetInverted

Retrieves the current frequency spectrum inversion setting.

C/C++ declaration

int CohGetInverted(int32_t hDeviceSet,int *Inverted);

Address retrieval

COH_G65DDC_GET_INVERTED CohGetInverted=(COH_G65DDC_GET_INVERTED)dlsym(hAPI,"CohGetInverted");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetRange

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

C/C++ declaration

int CohSetRange(int32_t hDeviceSet,uint32_t Range);

Address retrieval

COH_G65DDC_SET_RANGE CohSetRange=(COH_G65DDC_SET_RANGE)dlsym(hAPI,"CohSetRange");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.

If the function fails, the return value is zero. To get extended error information, check errno. To get additional information about the failure, check state of all the devices in the set using the CohGetDeviceState function.

Remarks

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetRange function with the same value of the Range parameter has to be called on all of the receivers in this multichannel coherent system. This is to prepare all of the receivers, and then the operation has to be completed by calling the CohTrigger function on the synchronization master receiver.


CohGetRange

Retrieves information regarding which range is active.

C/C++ declaration

int CohGetRange(int32_t hDeviceSet,uint32_t *Range);

Address retrieval

COH_G65DDC_GET_RANGE CohGetRange=(COH_G65DDC_GET_RANGE)dlsym(hAPI,"CohGetRange");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetADCNoiseBlanker

Enables or disables the noise blanker on the ADC stream.

C/C++ declaration

int CohSetADCNoiseBlanker(int32_t hDeviceSet,int Enabled);

Address retrieval

COH_G65DDC_SET_ADC_NOISE_BLANKER CohSetADCNoiseBlanker=(COH_G65DDC_SET_ADC_NOISE_BLANKER)dlsym(hAPI,"CohSetADCNoiseBlanker");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 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

Use the CohGetADCNoiseBlanker function to determine the current state of the noise blanker.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetADCNoiseBlanker function with the same value of the Enabled parameter has to be called on all of the receivers in this multichannel coherent system.


CohGetADCNoiseBlanker

Retrieves the current ADC noise blanker state.

C/C++ declaration

int CohGetADCNoiseBlanker(int32_t hDeviceSet,int *Enabled);

Address retrieval

COH_G65DDC_GET_ADC_NOISE_BLANKER CohGetADCNoiseBlanker=(COH_G65DDC_GET_ADC_NOISE_BLANKER)dlsym(hAPI,"CohGetADCNoiseBlanker");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetADCNoiseBlankerThreshold

Specifies the ADC noise blanker threshold.

C/C++ declaration

int CohSetADCNoiseBlankerThreshold(int32_t hDeviceSet,uint16_t Threshold);

Address retrieval

COH_G65DDC_SET_ADC_NOISE_BLANKER_THRESHOLD CohSetADCNoiseBlankerThreshold=
    (COH_G65DDC_SET_ADC_NOISE_BLANKER_THRESHOLD)dlsym(hAPI,"CohSetADCNoiseBlankerThreshold");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 CohSetADCNoiseBlanker function.

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

Use the CohGetADCNoiseBlankerThreshold function to retrieve the current threshold of the noise blanker.

CohGetADCNoiseBlankerThreshold

Determines the ADC noise blanker threshold.

C/C++ declaration

int CohGetADCNoiseBlankerThreshold(int32_t hDeviceSet,uint16_t *Threshold);

Address retrieval

COH_G65DDC_GET_ADC_NOISE_BLANKER_THRESHOLD CohGetADCNoiseBlankerThreshold=
    (COH_G65DDC_GET_ADC_NOISE_BLANKER_THRESHOLD)dlsym(hAPI,"CohGetADCNoiseBlankerThreshold");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Threshold
[out] Pointer to a variable which receives the threshold of ADC noise blanker. 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.

CohStartADCSnapshots

Starts the sending of ADC snapshots from a specific device of the device set.

C/C++ declaration

int CohStartADCSnapshots(int32_t hDeviceSet,uint32_t DeviceIndex,uint16_t Interval,uint32_t SamplesPerSnapshot);

Address retrieval

COH_G65DDC_START_ADC_SNAPSHOTS CohStartADCSnapshots=(COH_G65DDC_START_ADC_SNAPSHOTS)dlsym(hAPI,"CohStartADCSnapshots");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Period
[in] Specifies the time interval in milliseconds for how often the ADC snapshots are sent to the ADCSnapshotCallback callback function.
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 ADCSnapshotCallback callback function. 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 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 G65DDC device set has to be turned on using the CohSetPower function before use of CohStartADCSnapshots, otherwise the CohStartADCSnapshots function fails.


CohStopADCSnapshots

Stops the sending of ADC snapshots from a specific device of the device set.

C/C++ declaration

int CohStopADCSnapshots(int32_t hDeviceSet,uint32_t DeviceIndex);

Address retrieval

COH_G65DDC_STOP_ADC_SNAPSHOTS CohStopADCSnapshots=(COH_G65DDC_STOP_ADC_SNAPSHOTS)dlsym(hAPI,"CohStopADCSnapshots");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.

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 ADCSnapshotCallback callback function is not called after CohStopADCSnapshots returns.


CohGetDDCInfo

Retrieves information about the DDC format.

C/C++ declaration

int CohGetDDCInfo(int32_t hDeviceSet,uint32_t DDCTypeIndex,G65DDC_DDC_INFO *DDCInfo);

Address retrieval

COH_G65DDC_GET_DDC_INFO CohGetDDCInfo=(COH_G65DDC_GET_DDC_INFO)dlsym(hAPI,"CohGetDDCInfo");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 the DDC type.

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

Use the CohGetDDC1Count function to determine the number of possible DDC types of DDC1. In this case the DDCTypeIndex parameter can vary from zero to 'one less' than the number determined by the CohGetDDC1Count.

Use the CohGetDDC1 function to determine the current DDC type index of DDC1 and the CohGetDDC2 function to determine current DDC type of DDC2.


CohGetDDC1Count

Retrieves the number of DDC types supported by DDC1.

C/C++ declaration

int CohGetDDC1Count(int32_t hDeviceSet,uint32_t *Count);

Address retrieval

COH_G65DDC_GET_DDC1_COUNT CohGetDDC1Count=(COH_G65DDC_GET_DDC1_COUNT)dlsym(hAPI,"CohGetDDC1Count");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Count
[out] Pointer to a variable which receives the number of DDC types supported by the DDC1. 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.

CohSetDDC1

Sets current DDC type of DDC1.

C/C++ declaration

int CohSetDDC1(int32_t hDeviceSet,uint32_t DDCTypeIndex);

Address retrieval

COH_G65DDC_SET_DDC1 CohSetDDC1=(COH_G65DDC_SET_DDC1)dlsym(hAPI,"CohSetDDC1");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DDCTypeIndex
[in] Specifies the index of DDC type to be used in DDC1. It can vary from zero to 'one less than number of DDC types' of the DDC1.

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

Use the CohGetDDC1Count function to determine the number of possible DDC types of DDC1. The DDCTypeIndex parameter can vary from zero to 'one less' than the number determined by CohGetDDC1Count.

DDC1 streaming must not run when calling CohSetDDC1. In other words, DDC1 streaming which is started using the CohStartDDC1 function has to be stopped using the CohStopDDC1 function before calling of CohSetDDC1, otherwise CohSetDDC1 fails. The CohSetDDC1 function does not start and stop DDC1 streaming, it just changes the DDC type of DDC1.

Calling of CohSetDDC1 can change the current DDC type of DDC2 and current bandwidth of demodulator filter, so it is useful to call the CohGetDDC2 and CohGetDemodulatorFilterBandwidth functions immediately after CohSetDDC1 to determine the current DDC type of DDC2 and current bandwidth of the demodulator filter.

Use the CohGetDDC1 function to determine the current DDC type of the DDC1.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetDDC1 function with the same value of the DDCTypeIndex parameter has to be called on all of the receivers in this multichannel coherent system before DDC1 streaming is started using the CohStartDDC1 function.


CohGetDDC1

Retrieves information about the current DDC type of the DDC1.

C/C++ declaration

int CohGetDDC1(int32_t hDeviceSet,uint32_t *DDCTypeIndex,G65DDC_DDC_INFO *DDCInfo);

Address retrieval

COH_G65DDC_GET_DDC1 CohGetDDC1=(COH_G65DDC_GET_DDC1)dlsym(hAPI,"CohGetDDC1");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DDCTypeIndex
[out] Pointer to a variable which receives the index of current DDC type of the DDC1. 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 DDC1. This parameter can be NULL if the application does not require this information.

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

Returned DDCTypeIndex can be passed to the CohGetDDCInfo function.

CohSetDDC1Frequency

Sets the DDC1 center frequency.

C/C++ declaration

int CohSetDDC1Frequency(int32_t hDeviceSet,int32_t Frequency);

Address retrieval

COH_G65DDC_SET_DDC1_FREQUENCY CohSetDDC1Frequency=(COH_G65DDC_SET_DDC1_FREQUENCY)dlsym(hAPI,"CohSetDDC1Frequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Frequency
[in] Specifies the new center frequency of the DDC1 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. To get additional information about the failure, check state of all the devices in the set using the CohGetDeviceState function.

Remarks

Changing of DDC1 frequency causes a change of the absolute frequency of the DDC2 and demodulator in each device in the set.

Use the CohGetDDC1Frequency function to determine the current center frequency of DDC1.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohSetDDC1Frequency function with the same value of the Frequency parameter has to be called on all of the receivers in this multichannel coherent system. This is to prepare all of the receivers, and then the operation has to be completed by calling the CohTrigger function on the synchronization master receiver.


CohGetDDC1Frequency

Retrieves the current center frequency of DDC1.

C/C++ declaration

int CohGetDDC1Frequency(int32_t hDeviceSet,int32_t *Frequency);

Address retrieval

COH_G65DDC_GET_DDC1_FREQUENCY CohGetDDC1Frequency=(COH_G65DDC_GET_DDC1_FREQUENCY)dlsym(hAPI,"CohGetDDC1Frequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Frequency
[out] Pointer to a variable which receives the current center frequency of DDC1 in Hz. 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.

CohSetDDC1PhaseShift

Sets the phase shift of the DDC1 signal for a specific device in the device set.

C/C++ declaration

int CohSetDDC1PhaseShift(int32_t hDeviceSet,uint32_t DeviceIndex,double PhaseShift);

Address retrieval

COH_G65DDC_SET_DDC1_PHASE_SHIFT CohSetDDC1PhaseShift=(COH_G65DDC_SET_DDC1_PHASE_SHIFT)dlsym(hAPI,"CohSetDDC1PhaseShift");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
PhaseShift
[in] Specifies the new phase shift of the DDC1 signal in degrees at the current DDC1 center frequency. It can vary from -180 to +180 degrees.

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

It can be used for compensation of 'small length differences' of cables used for the coherent clock or at the receiver RF inputs.

Use the CohGetDDC1PhaseShift function to retrieve the current phase shift of the DDC1 signal.


CohGetDDC1PhaseShift

Retrieves the current phase shift of the DDC1 signal for the specific device in the device set.

C/C++ declaration

int CohGetDDC1PhaseShift(int32_t hDeviceSet,uint32_t DeviceIndex,double *PhaseShift);

Address retrieval

COH_G65DDC_GET_DDC1_PHASE_SHIFT CohGetDDC1PhaseShift=(COH_G65DDC_GET_DDC1_PHASE_SHIFT)dlsym(hAPI,"CohGetDDC1PhaseShift");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
PhaseShift
[out] Pointer to a variable which receives the current phase shift of the DDC1 signal in degrees. 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.

CohStartDDC1

Starts coherent DDC1 streaming on all of the devices in the set simultaneously.

C/C++ declaration

int CohStartDDC1(int32_t hDeviceSet,uint32_t SampleSetsPerBuffer);

Address retrieval

COH_G65DDC_START_DDC1 CohStartDDC1=(COH_G65DDC_START_DDC1)dlsym(hAPI,"CohStartDDC1");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
SampleSetsPerBuffer
[in] Specifies the number of I/Q sample sets in each buffer passed to the DDC1StreamCallback callback function. If the current DDC1 type index (specified by the CohSetDDC1 function) is less than or equal to 24 (DDC1 bandwidth <= 5 MHz) the value of the SampleSetsPerBuffer has to be a multiple of 64. If the current the DDC1 type index is greater than 24 (DDC1 bandwidth > 5 MHz), the SampleSetsPerBuffer has to be a multiple of 1024. If it is zero, the CohStartDDC1 function fails.

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. To get additional information about the failure, check state of all the devices in the set using the CohGetDeviceState function.

Remarks

The G65DDC devices have to be turned on using the CohSetPower function before CohStartDDC1 is used. Otherwise CohStartDDC1 fails.

If the DDC1 streaming is already running before use of CohStartDDC1, CohStartDDC1 fails.

Use the CohStopDDC1 function to stop DDC1 streaming.

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.

If the receiver which is open (in the given device set) is a part of the multichannel coherent system in Extended Topology Configuration (ETC, see CohSetConfiguration), then the CohStartDDC1 function with the same value of the SampleSetsPerBuffer parameter has to be called on all of the receivers in this multichannel coherent system. This is to prepare all the receivers and then the operation has to be completed by calling the CohTrigger function on the synchronization master receiver.


CohStopDDC1

Stops DDC1 streaming on all of the devices of the device set.

C/C++ declaration

int CohStopDDC1(int32_t hDeviceSet);

Address retrieval

COH_G65DDC_STOP_DDC1 CohStopDDC1=(COH_G65DDC_STOP_DDC1)dlsym(hAPI,"CohStopDDC1");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.

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 CohStopDDC1 function stops all of the streaming beyond the DDC1 in the processing chain (DDC2 and audio streaming in all the devices in the set).

The DDC1StreamCallback callback function is not called after CohStopDDC1 returns.


CohGetDDC2Count

Retrieves the number of DDC types supported by DDC2.

C/C++ declaration

int CohGetDDC2Count(int32_t hDeviceSet,uint32_t *Count);

Address retrieval

COH_G65DDC_GET_DDC2_COUNT CohGetDDC1Count=(COH_G65DDC_GET_DDC2_COUNT)dlsym(hAPI,"CohGetDDC2Count");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Count
[out] Pointer to a variable which receives the number of DDC types supported by the DDC2. 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

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 DDC1 channel + 1.


CohSetDDC2

Sets the current DDC type of DDC2 for the specific device in the device set.

C/C++ declaration

int CohSetDDC2(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t DDCTypeIndex);

Address retrieval

COH_G65DDC_SET_DDC2 CohSetDDC2=(COH_G65DDC_SET_DDC2)dlsym(hAPI,"CohSetDDC2");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
DDCTypeIndex
[in] Specifies the index of the DDC type to be used in DDC2.

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

Use the CohGetDDC2Count function to determine the number of possible DDC types of DDC2 for the given channel. The DDCTypeIndex parameter can vary from zero to one less than the number determined by CohGetDDC2Count.

DDC2 streaming must not run when calling CohSetDDC2. In other words, DDC2 streaming that is started using the CohStartDDC2 function has to be stopped using the CohStopDDC2 function before calling of CohSetDDC2, otherwise CohSetDDC2 fails. The CohSetDDC2 function does not start and stop DDC2 streaming, it just changes the DDC type of DDC2.

Calling of CohSetDDC2 can change the current bandwidth of the demodulator filter, therefore it is useful to call the CohGetDemodulatorFilterBandwidth functions immediately after CohSetDDC2 to determine the current bandwidth of the demodulator filter.

Use the CohGetDDC2 function to determine the current DDC type of the DDC2.


CohGetDDC2

Retrieves information about the current DDC type of the DDC2 for the specified device in the device set.

C/C++ declaration

int CohGetDDC2(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *DDCTypeIndex,G65DDC_DDC_INFO *DDCInfo);

Address retrieval

COH_G65DDC_GET_DDC2 CohGetDDC2=(COH_G65DDC_GET_DDC2)dlsym(hAPI,"CohGetDDC2");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
DDCTypeIndex
[out] Pointer to a variable which receives the index of the current DDC type of the DDC2. 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 DDC2. This parameter can be NULL if the application does not require this information.

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 BitsPerSample member of the G65DDC_DDC_INFO structure is not used and it can be ignored for DDC2. I and Q samples in buffers passed to the DDC2StreamCallback and DDC2PreprocessedStreamCallback DDC2 callback functions are always in IEEE float (32 bit, little endian) format.

Returned DDCTypeIndex can be passed to the CohGetDDCInfo function.


CohSetDDC2Frequency

Sets the relative center frequency of DDC2 for the specified device of the device set.

C/C++ declaration

int CohSetDDC2Frequency(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t Frequency);

Address retrieval

COH_G65DDC_SET_DDC2_FREQUENCY CohSetDDC2Frequency=(COH_G65DDC_SET_DDC2_FREQUENCY)dlsym(hAPI,"CohSetDDC2Frequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Frequency
[in] Specifies the new center frequency of DDC2 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 DDC2 relative to center of the DDC1. The value can be negative.

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

faDDC2 = faDDC1 + frDDC2

Where faDDC2 is the absolute center frequency of DDC2, faDDC1 is the absolute center frequency of the DDC1 in Hz (set using the CohSetDDC1Frequency function) and frDDC2 is the relative center frequency of DDC2 in Hz (set using CohSetDDC2Frequency).

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 CohGetDDC2Frequency function to determine the current relative center frequency of the DDC2.

The following example shows three methods of how it is possible to set the absolute DDC2 center frequency of the first device (DeviceIndex = 0) to 11.01 MHz:

int32_t hDeviceSet; //Handle to G65DDC device set returned by the CohOpenDeviceSet function

//1. method
CohSetRange(hDeviceSet,G65DDC_RANGE_1); //Set active receiver's input to range 1 (0 - 88 MHz)
CohSetDDC1Frequency(hDeviceSet,11010000);
CohSetDDC2Frequency(hDeviceSet,0,0);

//2. method, can be used if the bandwidth of DDC2 is less than the bandwidth of DDC1
CohSetRange(hDeviceSet,G65DDC_RANGE_1);
CohSetDDC1Frequency(hDeviceSet,11000000);
CohSetDDC2Frequency(hDeviceSet,0,10000);

//3. method, can be used if the bandwidth of DDC2 is less than the bandwidth of DDC1
CohSetRange(hDeviceSet,G65DDC_RANGE_1);
CohSetDDC1Frequency(hDeviceSet,11020000);
CohSetDDC2Frequency(hDeviceSet,0,-10000);

CohGetDDC2Frequency

Retrieves the current relative DDC2 center frequency of the specified device in the device set.

C/C++ declaration

int CohGetDDC2Frequency(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t *Frequency);

Address retrieval

COH_G65DDC_GET_DDC2_FREQUENCY CohGetDDC2Frequency=(COH_G65DDC_GET_DDC2_FREQUENCY)dlsym(hAPI,"CohGetDDC2Frequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Frequency
[out] Pointer to a variable which receives the current relative center frequency of DDC2 in Hz. The returned value can be negative. See remarks of the CohSetDDC2Frequency for information how to calculate the absolute center frequency of DDC2. 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.

CohStartDDC2

Starts DDC2 streaming on the specified device.

C/C++ declaration

int CohStartDDC2(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t SampleSetsPerBuffer);

Address retrieval

COH_G65DDC_START_DDC2 CohStartDDC2=(COH_G65DDC_START_DDC2)dlsym(hAPI,"CohStartDDC2");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
SampleSetsPerBuffer
[in] Specifies the number of I/Q sample sets in each buffer passed to the DDC2StreamCallback and DDC2PreprocessedStreamCallback callback functions. The value has to be a multiple of 64 greater than zero. If it is zero, the CohStartDDC2 function fails. If it is not a multiple of 64, the function rounds it up to nearest multiple of 64.

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

Before CohStartDDC2 is used, the devices of the device set have to be turned on using the CohSetPower function and DDC1 streaming has to be started using the CohStartDDC1 function, otherwise CohStartDDC2 fails.

If the DDC2 streaming for a given device is already running, CohStartDDC2 fails.

Use the CohStopDDC2 function to stop DDC2 streaming.

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.


CohStopDDC2

Stops DDC2 streaming on the specified device.

C/C++ declaration

int CohStopDDC2(int32_t hDeviceSet,uint32_t DeviceIndex);

Address retrieval

COH_G65DDC_STOP_DDC2 CohStopDDC2=(COH_G65DDC_STOP_DDC2)dlsym(hAPI,"CohStopDDC2");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.

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

If audio streaming for a given device is running, it is stopped too.

If DDC2 streaming is not active, CohStopDDC2 does nothing.

The DDC2StreamCallback and DDC2PreprocessedStreamCallback callback functions are not called when CohStopDDC2 returns.


CohSetDDC2NoiseBlanker

Enables or disables the noise blanker on the DDC2 stream of the specified device.

C/C++ declaration

int CohSetDDC2NoiseBlanker(int32_t hDeviceSet,uint32_t DeviceIndex,int Enabled);

Address retrieval

COH_G65DDC_SET_DDC2_NOISE_BLANKER CohSetDDC2NoiseBlanker=(COH_G65DDC_SET_DDC2_NOISE_BLANKER)check errno(hAPI,"CohSetDDC2NoiseBlanker");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetDDC2NoiseBlanker function to determine the current state of the noise blanker.

CohGetDDC2NoiseBlanker

Retrieves the current DDC2 noise blanker state of the specified device.

C/C++ declaration

int CohGetDDC2NoiseBlanker(int32_t hDeviceSet,uint32_t DeviceIndex,int *Enabled);

Address retrieval

COH_G65DDC_GET_DDC2_NOISE_BLANKER CohGetDDC2NoiseBlanker=(COH_G65DDC_GET_DDC2_NOISE_BLANKER)dlsym(hAPI,"CohGetDDC2NoiseBlanker");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Enabled
[out] Pointer to a variable which receives the current state of 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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetDDC2NoiseBlankerThreshold

Specifies the DDC2 noise blanker threshold of the specified device.

C/C++ declaration

int CohSetDDC2NoiseBlankerThreshold(int32_t hDeviceSet,uint32_t DeviceIndex,double Threshold);

Address retrieval

COH_G65DDC_SET_DDC2_NOISE_BLANKER_THRESHOLD CohSetDDC2NoiseBlankerThreshold=
    (COH_G65DDC_SET_DDC2_NOISE_BLANKER_THRESHOLD)dlsym(hAPI,"CohSetDDC2NoiseBlankerThreshold");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Threshold
[in] Specifies threshold in %.

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

Use the CohGetDDC2NoiseBlankerThreshold function to retrieve the current threshold of the noise blanker.

CohGetDDC2NoiseBlankerThreshold

Retrieves the DDC2 noise blanker threshold of the specified device.

C/C++ declaration

int CohGetDDC2NoiseBlankerThreshold(int32_t hDeviceSet,uint32_t DeviceIndex,double *Threshold);

Address retrieval

COH_G65DDC_GET_DDC2_NOISE_BLANKER_THRESHOLD CohGetDDC2NoiseBlankerThreshold=
    (COH_G65DDC_GET_DDC2_NOISE_BLANKER_THRESHOLD)dlsym(hAPI,"CohGetDDC2NoiseBlankerThreshold");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Threshold
[out] Pointer to a variable which receives the threshold of the noise blanker. 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.

CohGetDDC2NoiseBlankerExcessValue

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

C/C++ declaration

int CohGetDDC2NoiseBlankerExcessValue(int32_t hDeviceSet,uint32_t DeviceIndex,double *Value);

Address retrieval

COH_G65DDC_GET_DDC2_NOISE_BLANKER_EXCESS_VALUE CohGetDDC2NoiseBlankerExcessValue=
    (COH_G65DDC_GET_DDC2_NOISE_BLANKER_EXCESS_VALUE)dlsym(hAPI,"CohGetDDC2NoiseBlankerExcessValue");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Value
[out] Pointer to a variable which receives the current excess value in %. 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.

CohGetSignalLevel

Determines the current signal level for the specified device.

C/C++ declaration

int CohGetSignalLevel(int32_t hDeviceSet,uint32_t DeviceIndex,float *Peak,float *RMS);

Address retrieval

COH_G65DDC_GET_SIGNAL_LEVEL CohGetSignalLevel=(COH_G65DDC_GET_SIGNAL_LEVEL)dlsym(hAPI,"CohGetSignalLevel");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

DDC2 streaming has to be active (started using the CohStartDDC2 function) before calling of CohGetSignalLevel, otherwise the returned peak and RMS signal levels are zero.

The 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.

The signal level is evaluated for each buffer processed by the demodulator filter. The buffer size (signal level evaluation rate) is given by the SampleSetsPerBuffer parameter of the CohStartDDC2 function.

The DDC2PreprocessedStreamCallback callback function 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 CohGetSignalLevel.

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 CohGetSignalLevel, R is the G65DDC receiver input impedance (50 Ω), P[W] is power in Watts, P[dBm] is power in dBm and 1000 is the conversion coefficient W -> mW.

The following example shows how to obtain the current signal level in dBm from device 0:

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

int32_t hDeviceSet; //handle to G65DDC device set returned by the CohOpenDeviceSet function
float P_dBm,V_RMS;

CohGetSignalLevel(hDeviceSet,0,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);

CohSetNotchFilter

Enables or disables the notch filter of the specified device.

C/C++ declaration

int CohSetNotchFilter(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,int Enabled);

Address retrieval

COH_G65DDC_SET_NOTCH_FILTER CohSetNotchFilter=(COH_G65DDC_SET_NOTCH_FILTER)dlsym(hAPI,"CohSetNotchFilter");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetNotchFilter function to determine whether the filter is enabled or disabled.

CohGetNotchFilter

Retrieves the current notch filter state of the specified device.

C/C++ declaration

int CohGetNotchFilter(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,int *Enabled);

Address retrieval

COH_G65DDC_GET_NOTCH_FILTER CohGetNotchFilter=(COH_G65DDC_GET_NOTCH_FILTER)dlsym(hAPI,"CohGetNotchFilter");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetNotchFilterFrequency

Specifies the relative center frequency of the notch filter for the specified device.

C/C++ declaration

int CohSetNotchFilterFrequency(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,int32_t Frequency);

Address retrieval

COH_G65DDC_SET_NOTCH_FILTER_FREQUENCY CohSetNotchFilterFrequency=
        (COH_G65DDC_SET_NOTCH_FILTER_FREQUENCY)dlsym(hAPI,"CohSetNotchFilterFrequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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 new center frequency of the notch filter relative to center of the DDC2 (see the CohSetDDC2Frequency function). The value can be negative.

Use the CohGetNotchFilterFrequency function to retrieve the current center frequency of the notch filter.


CohGetNotchFilterFrequency

Retrieves the current relative center frequency of the notch filter.

C/C++ declaration

int CohGetNotchFilterFrequency(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,int32_t *Frequency);

Address retrieval

G65DDC_GET_NOTCH_FILTER_FREQUENCY CohGetNotchFilterFrequency=
        (G65DDC_GET_NOTCH_FILTER_FREQUENCY)dlsym(hAPI,"CohGetNotchFilterFrequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetNotchFilterBandwidth

Specifies the bandwidth of the notch filter of the specified device.

C/C++ declaration

int CohSetNotchFilterBandwidth(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,uint32_t Bandwidth);

Address retrieval

COH_G65DDC_SET_NOTCH_FILTER_BANDWIDTH CohSetNotchFilterBandwidth=
        (COH_G65DDC_SET_NOTCH_FILTER_BANDWIDTH)dlsym(hAPI,"CohSetNotchFilterBandwidth");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetNotchFilterBandwidth function to retrieve the current bandwidth of the notch filter.


CohGetNotchFilterBandwidth

Retrieves the current bandwidth of the notch filter for the specified device.

C/C++ declaration

int CohGetNotchFilterBandwidth(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,uint32_t *Bandwidth);

Address retrieval

COH_G65DDC_GET_NOTCH_FILTER_BANDWIDTH CohGetNotchFilterBandwidth=
        (COH_G65DDC_GET_NOTCH_FILTER_BANDWIDTH)dlsym(hAPI,"CohGetNotchFilterBandwidth");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetNotchFilterLength

Specifies the notch filter length for the specified device. The notch filter is implemented as an FIR filter. This function specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int CohSetNotchFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,uint32_t Length);

Address retrieval

G65DDC_SET_NOTCH_FILTER_LENGTH CohSetNotchFilterLength=
        (G65DDC_SET_NOTCH_FILTER_LENGTH)dlsym(hAPI,"CohSetNotchFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function rounds it up to the nearest multiple of 8.

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

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

Use the CohGetNotchFilterLength function to determine the current length of the notch filter.


CohGetNotchFilterLength

Retrieves the current notch filter length of the specified device.

C/C++ declaration

int CohGetNotchFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t NotchFilterIndex,uint32_t *Length);

Address retrieval

COH_G65DDC_GET_NOTCH_FILTER_LENGTH CohGetNotchFilterLength=
        (COH_G65DDC_GET_NOTCH_FILTER_LENGTH)dlsym(hAPI,"CohGetNotchFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetAGC

Enables or disables the AGC for the specified device.

C/C++ declaration

int CohSetAGC(int32_t hDeviceSet,uint32_t DeviceIndex,int Enabled);

Address retrieval

COH_G65DDC_SET_AGC CohSetAGC=(COH_G65DDC_SET_AGC)dlsym(hAPI,"CohSetAGC");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

If the AGC is disabled, the signal is affected by the 'fixed gain' specified using the CohSetGain function.

Use the CohGetAGC function to determine the current state of the AGC.


CohGetAGC

Retrieves the current state of the AGC for the specified device.

C/C++ declaration

int CohGetAGC(int32_t hDeviceSet,uint32_t DeviceIndex,int *Enabled);

Address retrieval

COH_G65DDC_GET_AGC CohGetAGC=(COH_G65DDC_GET_AGC)dlsym(hAPI,"CohGetAGC");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetAGCParams

Sets parameters of the AGC for the specified device.

C/C++ declaration

int CohSetAGCParams(int32_t hDeviceSet,uint32_t DeviceIndex,double AttackTime,double DecayTime,double ReferenceLevel);

Address retrieval

COH_G65DDC_SET_AGC_PARAMS CohSetAGCParams=(COH_G65DDC_SET_AGC_PARAMS)dlsym(hAPI,"CohSetAGCParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetAGCParams function to determine the current parameters of the AGC.


CohGetAGCParams

Retrieves the current parameters of the AGC for the specified device.

C/C++ declaration

int CohGetAGCParams(int32_t hDeviceSet,uint32_t DeviceIndex,double *AttackTime,double *DecayTime,double *ReferenceLevel);

Address retrieval

COH_G65DDC_GET_AGC_PARAMS CohGetAGCParams=(COH_G65DDC_GET_AGC_PARAMS)dlsym(hAPI,"CohGetAGCParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetMaxAGCGain

Sets the maximum gain of the AGC for the specified device.

C/C++ declaration

int CohSetMaxAGCGain(int32_t hDeviceSet,uint32_t DeviceIndex,double MaxGain);

Address retrieval

COH_G65DDC_SET_MAX_AGC_GAIN CohSetMaxAGCGain=(COH_G65DDC_SET_MAX_AGC_GAIN)dlsym(hAPI,"CohSetMaxAGCGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
MaxGain
[in] Specifies the new maximum gain of the AGC in dB.

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

Use the CohGetMaxAGCGain function to determine the maximum gain of the AGC.


CohGetMaxAGCGain

Retrieves the current maximum gain of the AGC for the specified device.

C/C++ declaration

int CohGetMaxAGCGain(int32_t hDeviceSet,uint32_t DeviceIndex,double *MaxGain);

Address retrieval

COH_G65DDC_GET_MAX_AGC_GAIN CohGetMaxAGCGain=(COH_G65DDC_GET_MAX_AGC_GAIN)dlsym(hAPI,"CohGetMaxAGCGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetGain

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

C/C++ declaration

int CohSetGain(int32_t hDeviceSet,uint32_t DeviceIndex,double Gain);

Address retrieval

COH_G65DDC_SET_GAIN CohSetGain=(COH_G65DDC_SET_GAIN)dlsym(hAPI,"CohSetGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Gain
[in] Specifies the new fixed gain in dB.

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

Use the CohGetGain function to determine the current fixed gain.


CohGetGain

Retrieves the current fixed gain of the specified device.

C/C++ declaration

int CohGetGain(int32_t hDeviceSet,uint32_t DeviceIndex,double *Gain);

Address retrieval

COH_G65DDC_GET_GAIN CohGetGain=(COH_G65DDC_GET_GAIN)dlsym(hAPI,"CohGetGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Gain
[out] Pointer to a variable which receives the current fixed gain in dB. 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.

CohGetCurrentGain

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

C/C++ declaration

int CohGetCurrentGain(int32_t hDeviceSet,uint32_t DeviceIndex,double *CurrentGain);

Address retrieval

COH_G65DDC_GET_CURRENT_GAIN CohGetCurrentGain=(COH_G65DDC_GET_CURRENT_GAIN)dlsym(hAPI,"CohGetCurrentGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
CurrentGain
[out] Pointer to a variable which receives the current gain in dB. 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

If the AGC is enabled (using the CohSetAGC function), 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 CohSetGain function.

CohSetDemodulatorFilterBandwidth

Sets the bandwidth of the demodulator filter for the specified device.

C/C++ declaration

int CohSetDemodulatorFilterBandwidth(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Bandwidth);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_FILTER_BANDWIDTH CohSetDemodulatorFilterBandwidth=
    (COH_G65DDC_SET_DEMODULATOR_FILTER_BANDWIDTH)dlsym(hAPI,"CohSetDemodulatorFilterBandwidth");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Bandwidth
[in] Specifies the new bandwidth of the demodulator filter in Hz. Possible values are from the range of 1 Hz to the current DDC2 bandwidth. Use the CohGetDDC2 function to retrieve information about the current DDC type of DDC2.

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 demodulator filter bandwidth can be changed using the CohSetDDC1 function. 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 CohGetDemodulatorFilterBandwidth function immediately after CohSetDDC1.

CohGetDemodulatorFilterBandwidth

Retrieves the current demodulator filter bandwidth of the specified device.

C/C++ declaration

int CohGetDemodulatorFilterBandwidth(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *Bandwidth);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_FILTER_BANDWIDTH CohGetDemodulatorFilterBandwidth=
    (COH_G65DDC_GET_DEMODULATOR_FILTER_BANDWIDTH)dlsym(hAPI,"CohGetDemodulatorFilterBandwidth");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Bandwidth
[out] Pointer to a variable which receives the current demodulator filter bandwidth. 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.

CohSetDemodulatorFilterShift

Sets the demodulator filter shift of the specified device.

C/C++ declaration

int CohSetDemodulatorFilterShift(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t Shift);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_FILTER_SHIFT CohSetDemodulatorFilterShift=
    (COH_G65DDC_SET_DEMODULATOR_FILTER_SHIFT)dlsym(hAPI,"CohSetDemodulatorFilterShift");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Shift
[in] Specifies the new shift of the demodulator filter 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 Shift parameter is shift in Hz relative to center of the demodulator. This value can be negative.

This function does not change the demodulator frequency, it just shifts the filter from the demodulator's center.

Use the CohGetDemodulatorFilterShift function to determine the current demodulator filter shift.


CohGetDemodulatorFilterShift

Retrieves the current shift of the demodulator filter for the specified device.

C/C++ declaration

int CohGetDemodulatorFilterShift(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t *Shift);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_FILTER_SHIFT CohGetDemodulatorFilterShift=
    (COH_G65DDC_GET_DEMODULATOR_FILTER_SHIFT)dlsym(hAPI,"CohGetDemodulatorFilterShift");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Shift
[out] Pointer to a variable which receives the current shift of the demodulator. 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.

CohSetDemodulatorFilterLength

Specifies the demodulator filter length of the specified device. The demodulator filter is implemented as an FIR filter. This function specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int CohSetDemodulatorFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Length);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_FILTER_LENGTH CohSetDemodulatorFilterLength=
    (COH_G65DDC_SET_DEMODULATOR_FILTER_LENGTH)dlsym(hAPI,"CohSetDemodulatorFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Length
[in] Specifies the length of the demodulator 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 function rounds it up to nearest multiple of 8.

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

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

Use the CohGetDemodulatorFilterLength function to determine the current length of the demodulator filter.


CohGetDemodulatorFilterLength

Retrieves the current length of the demodulator filter for the specified device.

C/C++ declaration

int CohGetDemodulatorFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *Length);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_FILTER_LENGTH CohGetDemodulatorFilterLength=
    (COH_G65DDC_GET_DEMODULATOR_FILTER_LENGTH)dlsym(hAPI,"CohGetDemodulatorFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Length
[out] Pointer to a variable which receives the current demodulator filter length. 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.

CohSetDemodulatorMode

Sets the demodulator mode of the specified device.

C/C++ declaration

int CohSetDemodulatorMode(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Mode);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_MODE CohSetDemodulatorMode=(COH_G65DDC_SET_DEMODULATOR_MODE)dlsym(hAPI,"CohSetDemodulatorMode");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetDemodulatorMode function to retrieve the current demodulator mode.


CohGetDemodulatorMode

Retrieves the current demodulator mode of the specified device.

C/C++ declaration

int CohGetDemodulatorMode(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *Mode);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_MODE CohGetDemodulatorMode=(COH_G65DDC_GET_DEMODULATOR_MODE)dlsym(hAPI,"CohGetDemodulatorMode");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Mode
[out] Pointer to a variable which receives the current demodulator mode. 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.

CohSetDemodulatorFrequency

Sets the relative center frequency of the demodulator for the specified device.

C/C++ declaration

int CohSetDemodulatorFrequency(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t Frequency);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_FREQUENCY CohSetDemodulatorFrequency=
    (COH_G65DDC_SET_DEMODULATOR_FREQUENCY)dlsym(hAPI,"CohSetDemodulatorFrequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 CohSetDDC1Frequency function), frDDC2 is the relative center frequency of DDC2 of in Hz (set using the CohSetDDC2Frequency) and frDEM is the relative center frequency of the demodulator in Hz (set using CohSetDemodulatorFrequency).

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

Use the CohGetDemodulatorFrequency function to determine the current relative center frequency of the demodulator for the given device.

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

int32_t hDeviceSet; //Handle to a G65DDC device set returned by the CohOpenDeviceSet function

//1. method
CohSetRange(hDeviceSet,G65DDC_RANGE_1); //Set active receiver's input to range 1 (0 - 88 MHz)
CohSetDDC1Frequency(hDeviceSet,11010000);
CohSetDDC2Frequency(hDeviceSet,0,0);
CohSetDemodulatorFrequency(hDeviceSet,0,0);

//2. method
CohSetRange(hDeviceSet,G65DDC_RANGE_1);
CohSetDDC1Frequency(hDeviceSet,11000000);
CohSetDDC2Frequency(hDeviceSet,0,10000);
CohSetDemodulatorFrequency(hDeviceSet,0,0);

//3. method
CohSetRange(hDeviceSet,G65DDC_RANGE_1);
CohSetDDC1Frequency(hDeviceSet,11020000);
CohSetDDC2Frequency(hDeviceSet,0,-5000);
CohSetDemodulatorFrequency(hDeviceSet,0,-5000);


CohGetDemodulatorFrequency

Retrieves the current relative center frequency of the demodulator for the specified device.

C/C++ declaration

int CohGetDemodulatorFrequency(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t *Frequency);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_FREQUENCY CohGetDemodulatorFrequency=
    (COH_G65DDC_GET_DEMODULATOR_FREQUENCY)dlsym(hAPI,"CohGetDemodulatorFrequency");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Frequency
[out] Pointer to a variable which receives the current center frequency of the demodulator. 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.

CohSetDemodulatorParam

Sets a parameter of demodulation for the specified device.

C/C++ declaration

int CohSetDemodulatorParam(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Code,const void *Buffer,uint32_t BufferSize);

Address retrieval

COH_G65DDC_SET_DEMODULATOR_PARAM CohSetDemodulatorParam=
    (COH_G65DDC_SET_DEMODULATOR_PARAM)dlsym(hAPI,"CohSetDemodulatorParam");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Code
[in] Specifies the code of the demodulator parameter to be set by this function. 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).

The 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 the 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).

The value of the variable pointed to by the Buffer parameter is the 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).

The 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).

The 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 function will set. This parameter cannot be NULL.
BufferSize
[in] Specifies the size of the buffer.

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.

CohGetDemodulatorParam

Retrieves a parameter of demodulation for the specified device.

C/C++ declaration

int CohGetDemodulatorParam(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Code,void *Buffer,uint32_t BufferSize);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_PARAM CohGetDemodulatorParam=
    (COH_G65DDC_GET_DEMODULATOR_PARAM)dlsym(hAPI,"CohGetDemodulatorParam");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Code
[in] Specifies the code of the demodulator parameter to be retrieved. For detailed information about available codes see CohSetDemodulatorParam.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohGetDemodulatorState

Retrieves information about the current demodulator state of the specified device.

C/C++ declaration

int CohGetDemodulatorState(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Code,void *Buffer,uint32_t BufferSize);

Address retrieval

COH_G65DDC_GET_DEMODULATOR_STATE CohGetDemodulatorState=
    (COH_G65DDC_GET_DEMODULATOR_STATE)dlsym(hAPI,"CohGetDemodulatorState");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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).

The 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).

The 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).

The received value is the difference between demodulator frequency and the frequency of the received signal. Subtract the returned tune error from the demodulator frequency to get the 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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohStartAudio

Starts audio streaming for the specified device.

C/C++ declaration

int CohStartAudio(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t SampleSetsPerBuffer);

Address retrieval

COH_G65DDC_START_AUDIO CohStartAudio=(COH_G65DDC_START_AUDIO)dlsym(hAPI,"CohStartAudio");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
SampleSetsPerBuffer
[in] Specifies the number of sample sets in each buffer passed to the AudioStreamCallback callback function. The value has to be a multiple of 64 greater than zero. If it is zero, the CohStartAudio function fails. If it is not a multiple of 64, the function rounds it up to nearest multiple of 64.

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

Before CohStartAudio is used, the G65DDC devices have to be turned on using the CohSetPower function, DDC1 streaming has to be started using the CohStartDDC1 function and DDC2 streaming has to be started using the CohStartDDC2 function, otherwise CohStartAudio fails.

If the audio streaming of the specified device is already running, CohStartAudio fails.

Use the CohStopAudio function to stop audio streaming.

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.


CohStopAudio

Stops audio streaming for the specified device.

C/C++ declaration

int CohStopAudio(int32_t hDeviceSet,uint32_t DeviceIndex);

Address retrieval

COH_G65DDC_STOP_AUDIO CohStopAudio=(COH_G65DDC_STOP_AUDIO)dlsym(hAPI,"CohStopAudio");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.

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

If audio streaming is not active, CohStopAudio does nothing.

The AudioStreamCallback callback function is not called after CohStopAudio returns.


CohSetAudioGain

Sets fixed audio gain of the specified device.

C/C++ declaration

int CohSetAudioGain(int32_t hDeviceSet,uint32_t DeviceIndex,double Gain);

Address retrieval

COH_G65DDC_SET_AUDIO_GAIN CohSetAudioGain=(COH_G65DDC_SET_AUDIO_GAIN)dlsym(hAPI,"CohSetAudioGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Gain
[in] Specifies a new fixed audio gain in dB.

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

Use the CohGetAudioGain function to retrieve the current audio gain.

CohGetAudioGain

Retrieves the current fixed audio gain of the specified device.

C/C++ declaration

int CohGetAudioGain(int32_t hDeviceSet,uint32_t DeviceIndex,double *Gain);

Address retrieval

COH_G65DDC_GET_AUDIO_GAIN CohGetAudioGain=(COH_G65DDC_GET_AUDIO_GAIN)dlsym(hAPI,"CohGetAudioGain");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Gain
[out] Pointer to a variable which receives the current fixed gain in dB. 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.

CohSetAudioFilter

Enables or disables the audio filter of the specified device.

C/C++ declaration

int CohSetAudioFilter(int32_t hDeviceSet,uint32_t DeviceIndex,int Enabled);

Address retrieval

COH_G65DDC_SET_AUDIO_FILTER CohSetAudioFilter=(COH_G65DDC_SET_AUDIO_FILTER)dlsym(hAPI,"CohSetAudioFilter");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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

Use the CohGetAudioFiler function to retrieve the current state of the audio filter.

CohGetAudioFilter

Retrieves the current state of the audio filter for the specific device.

C/C++ declaration

int CohGetAudioFilter(int32_t hDeviceSet,uint32_t DeviceIndex,int *Enabled);

Address retrieval

COH_G65DDC_GET_AUDIO_FILTER CohGetAudioFilter=(COH_G65DDC_GET_AUDIO_FILTER)dlsym(hAPI,"CohGetAudioFilter");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetAudioFilterParams

Sets the parameters of the audio filter for the specified device.

C/C++ declaration

int CohSetAudioFilterParams(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t CutOffLow,uint32_t CutOffHigh,double Deemphasis);

Address retrieval

COH_G65DDC_SET_AUDIO_FILTER_PARAMS CohSetAudioFilterParams=
    (COH_G65DDC_SET_AUDIO_FILTER_PARAMS)dlsym(hAPI,"CohSetAudioFilterParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 be from the range of 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 be from the range of 1 - 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 be from the range of -9.9 to 0.0 dB/octave. Zero means that de-emphasis is disabled.

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

Use the CohGetAudioFilerParams function to retrieve the current parameters of the audio filter.

CohGetAudioFilterParams

Retrieves the current parameters of the audio filter for the specified device.

C/C++ declaration

int CohGetAudioFilterParams(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *CutOffLow,uint32_t *CutOffHigh,double *Deemphasis);

Address retrieval

COH_G65DDC_GET_AUDIO_FILTER_PARAMS CohGetAudioFilterParams=
    (COH_G65DDC_GET_AUDIO_FILTER_PARAMS)dlsym(hAPI,"CohGetAudioFilterParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohSetAudioFilterLength

Specifies the audio filter length of the specified device. The audio filter is implemented as an FIR filter. This function specifies the number of coefficients used in the filtration procedure.

C/C++ declaration

int CohSetAudioFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t Length);

Address retrieval

COH_G65DDC_SET_AUDIO_FILTER_LENGTH CohSetAudioFilterLength=
        (COH_G65DDC_SET_AUDIO_FILTER_LENGTH)dlsym(hAPI,"CohSetAudioFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Length
[in] Specifies the length of the audio 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 function rounds it up to nearest multiple of 8.

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

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

Use the CohGetAudioFilterLength function to determine the current length of the audio filter.


CohGetAudioFilterLength

Retrieves the current audio filter length of the specified device.

C/C++ declaration

int CohGetAudioFilterLength(int32_t hDeviceSet,uint32_t DeviceIndex,uint32_t *Length);

Address retrieval

COH_G65DDC_GET_AUDIO_FILTER_LENGTH CohGetAudioFilterLength=
        (COH_G65DDC_GET_AUDIO_FILTER_LENGTH)dlsym(hAPI,"CohGetAudioFilterLength");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Length
[out] Pointer to a variable which receives the current length of the audio filter. 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.

CohSetVolume

Sets the audio volume of the specified device.

C/C++ declaration

int CohSetVolume(int32_t hDeviceSet,uint32_t DeviceIndex,uint8_t Volume);

Address retrieval

COH_G65DDC_SET_VOLUME CohSetVolume=(COH_G65DDC_SET_VOLUME)dlsym(hAPI,"CohSetVolume");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Volume
[in] Specifies the new volume. The value can vary from 0 to 31, where 31 means maximum volume.

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

Use the CohGetVolume function to retrieve the current volume.


CohGetVolume

Retrieve the current volume of the specified device.

C/C++ declaration

int CohGetVolume(int32_t hDeviceSet,uint32_t DeviceIndex,uint8_t *Volume);

Address retrieval

COH_G65DDC_GET_VOLUME CohGetVolume=(COH_G65DDC_GET_VOLUME)dlsym(hAPI,"CohGetVolume");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Volume
[out] Pointer to a variable which receives the current volume. 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.

CohSetMute

Mutes or unmutes the audio of the specified device.

C/C++ declaration

int CohSetMute(int32_t hDeviceSet,uint32_t DeviceIndex,int Mute);

Address retrieval

COH_G65DDC_SET_MUTE CohSetMute=(COH_G65DDC_SET_MUTE)dlsym(hAPI,"CohSetMute");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Mute
[in] Specifies whether to mute or unmute the audio. If this parameter is non-zero, the audio is muted. If the parameter is zero, the audio is unmuted.

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

Use the CohGetMute function to retrieve the current mute state.


CohGetMute

Retrieves the current mute state of the specified device.

C/C++ declaration

int CohGetMute(int32_t hDeviceSet,uint32_t DeviceIndex,int *Mute);

Address retrieval

COH_G65DDC_GET_MUTE CohGetMute=(COH_G65DDC_GET_MUTE)dlsym(hAPI,"CohGetMute");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Mute
[out] Pointer to a variable which receives the current mute state. 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.

CohSetDAC

Enables or disables playing of the demodulated audio signal from the specified device on its audio output connector.

C/C++ declaration

int CohSetDAC(int32_t hDeviceSet,uint32_t DeviceIndex,int Enabled);

Address retrieval

G65DDC_SET_DAC SetDAC=(G65DDC_SET_DAC)dlsym(hAPI,"SetDAC");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Enabled
[in] Specifies whether to enable or disable playing of the demodulated audio signal on the audio output connector. If this parameter is non-zero, the audio signal from the specified device is played on its audio output connector. If the parameter is zero, the audio signal is not played on the audio output connector.

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 audio output connector is optional. The following example shows how to determine whether the receiver includes the audio output connector:
    G65DDC_DEVICE_INFO DeviceInfo;
    int32_t hDeviceSet; //Handle to G65DDC device set returned by the CohOpenDeviceSet function
    uint32_t DeviceIndex; //Index of the receiver in the device set
    
    CohGetDeviceInfo(hDeviceSet,DeviceIndex,&DeviceInfo);
    
    if(DeviceInfo.Flags & G65DDC_FLAGS_AUDIO_OUTPUT)
    {
        //the receiver includes audio output connector
    }
    else
    {
        //the receiver is without an audio output connector
    }

CohGetDAC

Determines whether playing of the demodulated audio signal from the specified device on its audio output connector is enabled or disabled.

C/C++ declaration

int CohGetDAC(int32_t hDeviceSet,uint32_t DeviceIndex,int *Enabled);

Address retrieval

G65DDC_GET_DAC GetDAC=(G65DDC_GET_DAC)dlsym(hAPI,"GetDAC");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Enabled
[out] Pointer to a variable which receives information as to whether playing of the audio signal from the specified device 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 function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, check errno.

CohGetSpectrumCompensation

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

C/C++ declaration

int CohGetSpectrumCompensation(int32_t hDeviceSet,uint32_t DeviceIndex,int32_t CenterFrequency,uint32_t Bandwidth,float *Buffer,uint32_t Count);

Address retrieval

COH_G65DDC_GET_SPECTRUM_COMPENSATION CohGetSpectrumCompensation=
    (COH_G65DDC_GET_SPECTRUM_COMPENSATION)dlsym(hAPI,"CohGetSpectrumCompensation");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
DeviceIndex
[in] Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 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 following example shows how to use the CohGetSpectrumCompensation function in DDC2StreamCallback callback function:


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

int32_t hDeviceSet; //handle to G65DDC device set
int32_t AbsDDC2Frequency; //Absolute frequency of the DDC2
int32_t RelDDC2Frequency; //Relative frequency of the DDC2
int32_t DDC1Frequency; //DDC1 frequency
G65DDC_DDC_INFO DDC2Info; //Information about the 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 the useful DDC2 band
G65DDC_CALLBACKS Callbacks; //Structure which contains a pointer to callback functions

Code before...

//Retrieve frequency of the DDC1
CohGetDDC1Frequency(hDeviceSet,&DDC1Frequency);

//Retrieve relative frequency of the DDC2 for device 0
CohGetDDC2Frequency(hDeviceSet,0,&RelDDC2Frequency);

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

//Retrieve DDC type information of the DDC2
CohGetDDC2(hDeviceSet,NULL,&DDC2Info);

//Retrieve compensation data for device 0
CohGetSpectrumCompensation(hDeviceSet,0,AbsDDC2Frequency,DDC2Info.SampleRate,Compensation,2048);
//In this case the Bandwidth 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 using
//the CohSetDDC1Frequency or CohSetDDC2Frequency function.
//In this case a mutual-exclusion synchronization method (for example critical section) should be used 
//if the Compensation buffer would be modified outside the MyDDC2StreamCallback callback.

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

//Set callback function for DDC2 streaming
//Pointers to callback function which should not be called by the API have to be set to NULL.
Callbacks.DDC2StreamCallback=MyDDC2StreamCallback;

//Start DDC2 streaming for device 0
//The SamplesPerBuffer parameter is set to 2048 which is size of the FFT to simplify
//the example.
CohStartDDC2(hDeviceSet,0,2048);

Code after...
    
void MyDDC2StreamCallback(uint32_t DeviceIndex,const float *Buffer,uint32_t NumberOfSamples,uintptr_t UserData)
{
 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.
}


CohSetCallbacks

Registers user-defined functions as callback functions called by the API.

C/C++ declaration

int CohSetCallbacks(int32_t hDeviceSet,const COH_G65DDC_CALLBACKS *Callbacks,uintptr_t UserData);

Address retrieval

COH_G65DDC_SET_CALLBACKS CohSetCallbacks=(COH_G65DDC_SET_CALLBACKS)dlsym(hAPI,"CohSetCallbacks");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Callbacks
[in] Pointer to a COH_G65DDC_CALLBACKS structure which contains pointers to the user-defined functions to be registered as callback functions.
UserData
[in] Specifies a user-defined value which is passed to the callback functions.

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

If the application does not require that the API calls some callback functions, set the related member of the COH_G65DDC_CALLBACKS structure to NULL.

If the value of the Callbacks parameter is NULL, all the callback functions are unregistered, the API will not call any callback functions.


CohSet1PPSEnabled

Enables the 1PPS functionality on the master receiver of the specified device set.

C/C++ declaration

int CohSet1PPSEnabled(int32_t hDeviceSet,int Enabled);

Address retrieval

COH_G65DDC_SET_1PPS_ENABLED CohSet1PPSEnabled=(COH_G65DDC_SET_1PPS_ENABLED)dlsym(hAPI,"CohSet1PPSEnabled");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Enabled
[in] Specifies whether to enable or disable the 1PPS functionality on the master receiver. If this parameter is non-zero, the 1PPS functionality is enabled. If the parameter is zero, the 1PPS functionality is disabled.

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 G65DDC device set has to be turned off when using the CohSet1PPSEnabled function, otherwise CohSet1PPSEnabled fails. The 1PPS functionality state cannot be changed when the device set is turned on using the CohSetPower function.

When the device set is turned on using the CohSetPower function and the 1PPS functionality is enabled at least four 1PPS pulses are needed to synchronize the internal control logic to the 1PPS. The CohSetRange, CohSetDDC1Frequency and CohStartDDC1 functions may fail if the control logic is not synchronized. In this case check the master device state using the CohGetDeviceState function to verify that the control logic is synchronized to the 1PPS.


CohGet1PPSEnabled

Retrieves the current state of the 1PPS functionality for the specified device set.

C/C++ declaration

int CohGet1PPSEnabled(int32_t hDeviceSet,int *Enabled);

Address retrieval

COH_G65DDC_GET_1PPS_ENABLED CohGet1PPSEnabled=(COH_G65DDC_GET_1PPS_ENABLED)dlsym(hAPI,"CohGet1PPSEnabled");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Enabled
[out] Pointer to a variable which receives the current state of the 1PPS functionality. The value is non-zero if the 1PPS functionality is enabled and zero if it is disabled. 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.

CohGet1PPSCounters

Retrieves the state of the master receiver 1PPS counters for the specified device set. 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 CohGet1PPSCounters(int32_t hDeviceSet,uint32_t *EventCounter,uint32_t *ADCPeriodCounter);

Address retrieval

COH_G65DDC_GET_1PPS_COUNTERS CohGet1PPSCounters=(COH_G65DDC_GET_1PPS_COUNTERS)dlsym(hAPI,"CohGet1PPSCounters");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
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 set was turned on using the CohSetPower function. 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 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

Before the CohGet1PPSCounters function is used, the 1PPS functionality has to be enabled using the CohSet1PPSEnabled function, the device set has to be turned on using the CohSetPower function and the internal control logic has to be synchronized to the 1PPS (see the CohGetDeviceState function), otherwise CohGet1PPSCounters may fail.

CohGet1PPSDDC1Counters

Retrieves the state of the DDC1 sample counter for the specified device set.

C/C++ declaration

int CohGet1PPSDDC1Counters(int32_t hDeviceSet,double *SampleCounter,uint64_t *ADCPeriodCounter);

Address retrieval

COH_G65DDC_GET_1PPS_DDC1_COUNTERS CohGet1PPSDDC1Counters=(COH_G65DDC_GET_1PPS_DDC1_COUNTERS)dlsym(hAPI,"CohGet1PPSDDC1Counters");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
SampleCounter
[out] Pointer to a variable which receives the current value of the DDC1 sample counter. The value is the number of sample sets produced by the given DDC1 from the time when it was started (using the CohStartDDC1 function) 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 CohStartDDC1 function) to the last 1PPS event. This parameter can 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

Before the CohGet1PPSDDC1Counters function is used, the 1PPS functionality has to be enabled using the CohSet1PPSEnabled function, the device set has to be turned on using the CohSetPower function, the internal control logic has to be synchronized to the 1PPS (see the CohGetDeviceState function) and DDC1 streaming has to be started using the CohStartDDC1 function, otherwise CohGet1PPSDDC1Counters may fail.

CohSetTriggerDelay

Sets the delay of the synchronization cables used in the specified device set.

C/C++ declaration

int CohSetTriggerDelay(int32_t hDeviceSet,uint32_t Delay);

Address retrieval

COH_G65DDC_SET_TRIGGER_DELAY CohSetTriggerDelay=(COH_G65DDC_SET_TRIGGER_DELAY)dlsym(hAPI,"CohSetTriggerDelay");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Delay
[in] The value that specifies the synchronization cable delay in ADC sampling clock periods.

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 G65DDC device set has to be turned off when using the CohSetTriggerDelay function, otherwise CohSetTriggerDelay fails. The delay cannot be changed when the device set is turned on using the CohSetPower function.

The synchronization SMA patch cables supplied with the kit delay the synchronization signal by 1 sampling clock period. The delay can be different for custom synchronization cables.

All cables used for synchronization must be of the same delay. Cables of various delays cannot be mixed within one coherent device set.


CohGetTriggerDelay

Retrieves the current setting of the synchronization cable delay for the specified device set.

C/C++ declaration

int CohGetTriggerDelay(int32_t hDeviceSet,uint32_t *Delay);

Address retrieval

COH_G65DDC_GET_TRIGGER_DELAY CohGetTriggerDelay=(COH_G65DDC_GET_TRIGGER_DELAY)dlsym(hAPI,"CohGetTriggerDelay");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Delay
[out] Pointer to a variable which receives the current value of the synchronization cable delay. This parameter can 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.

CohSetConfiguration

This function is used to specify the type of configuration used for installation of the given coherent set.

C/C++ declaration

int CohSetConfiguration(int32_t hDeviceSet,uint32_t Configuration);

Address retrieval

COH_G65DDC_SET_CONFIGURATION CohSetConfiguration=(COH_G65DDC_SET_CONFIGURATION)dlsym(hAPI,"CohSetConfiguration");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Configuration
[in] Specifies the type of configuration. The value can be one of the following:

ValueMeaning
COH_G65DDC_CONFIGURATION_NORMAL

Standard installation of G65DDC receivers for multichannel coherent operation. The receivers are connected to the same computer.

The API controls all of the receivers at once during setting of the DDC1 frequency using the CohSetDDC1Frequency function and starting of the DDC1 streaming using the CohStartDDC1 function.

The API provides DDC1 samples with the same index (a position since the DDC1 start, see CohStartDDC1) from all of the receivers together at once. The application does not need to put them together according to their index.

COH_G65DDC_CONFIGURATION_EXTENDED

Non-standard, Extended Topology Configuration (ETC) for multichannel coherent operation of the G65DDC receivers, which allows the receivers to be installed in multiple computers. Typically, each G65DDC receiver is installed in a separate dedicated computer. Installation of multiple receivers inside the same computer is allowed in the ETC configuration, however the receivers installed inside the same computer act the same way as they would if installed in separate dedicated computers. In other words, each receiver has to run its own instance of software. Necessary connections between the receivers and other supportive hardware are realized externally, outside of the computers.

The device set which is referenced by the hDeviceSet has to consist of a single receiver. This means that each receiver in the single ETC multichannel system has to be open in its own device set object and therefore a single device set corresponds to a single receiver in the ETC multichannel system. The COH_G65DDC_CONFIGURATION_EXTENDED has to be specified in each such device set object.

The application layer is responsible for the synchronized DDC1 streaming start and frequency setting. This is divided into two steps. The first step is preparation of the receiver for the synchronized DDC1 streaming start or frequency setting, using the CohStartDDC1 or CohSetDDC1Frequency function for all the receivers connected together in the same ETC multichannel system. The second step is the synchronized completion of the operation generating the synchronization signal on the synchronization master receiver using the CohTrigger function. The master receiver is the first receiver is the synchronization chain. The same DDC1 frequency and DDC1 type have to be set in all of the receivers in the same ETC multichannel system before calling the CohTrigger function.

If each receiver in the same ETC multichannel system is installed into a separate computer, the application can use TCP/IP or another form of communication between computers to achieve the proper setting and synchronization of the receivers when changing DDC1 frequency or starting DDC1 streaming.

The application layer is responsible for putting DDC1 samples from separate receivers together according to their index (a position since the DDC1 start, see CohStartDDC1).

The application layer is responsible for setting of all the receiver parameters, which should be the same on all of the receivers in the same multichannel coherent system, such as the input range, preamplifier, attenuator, pre-selectors and ADC noise blanker.

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 G65DDC devices have to be turned off using the CohSetPower function before CohSetConfiguration is used. Otherwise CohSetConfiguration fails.

Use the CohGetConfiguration function to determine the current setting of the configuration.


CohGetConfiguration

Retrieves the current setting of the configuration.

C/C++ declaration

int CohGetConfiguration(int32_t hDeviceSet,uint32_t *Configuration);

Address retrieval

COH_G65DDC_GET_CONFIGURATION CohGetConfiguration=(COH_G65DDC_GET_CONFIGURATION)dlsym(hAPI,"CohGetConfiguration");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Configuration
[out] Pointer to a variable which receives the current configuration setting (see CohSetConfiguration for detailed information). 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.

CohSetExtendedConfigurationParams

Used to specify parameters of the multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration. In ETC, the G65DDC device set always consists of a single receiver, therefore information about the complete multichannel coherent system has to be additionally specified using this function.

C/C++ declaration

int CohSetExtendedConfigurationParams(int32_t hDeviceSet,uint32_t Index,uint32_t DeviceCount);

Address retrieval

COH_G65DDC_SET_EXTENDED_CONFIGURATION_PARAMS CohSetExtendedConfigurationParams=
        (COH_G65DDC_SET_EXTENDED_CONFIGURATION_PARAMS)dlsym(hAPI,"CohSetExtendedConfigurationParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Index
[in] Specifies the index of the receiver (which is open in the given device set) in the synchronization chain of the multichannel coherent system. The index of the first receiver is 0 and this receiver is called the synchronization master. Other receivers are called synchronization slaves and their index varies from 1 to one less than DeviceCount. This parameter is not equal to the index of the receiver in the given device set. The index of the receiver in the given device set is always equal to 0 because in ETC, the device set always consists of a single receiver.
DeviceCount
[in] Specifies the total number of receivers connected to the multichannel coherent system in ETC. The value of this parameter has to be greater than zero.

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 G65DDC devices have to be turned off using the CohSetPower function before CohSetExtendedConfigurationParams is used. Otherwise CohSetExtendedConfigurationParams fails.

Use the CohGetExtendedConfigurationParams function to determine the current parameters of the multichannel coherent system in the ETC.


CohGetExtendedConfigurationParams

Retrieves the current parameters of the multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration.

C/C++ declaration

int CohGetExtendedConfigurationParams(int32_t hDeviceSet,uint32_t *Index,uint32_t *DeviceCount);

Address retrieval

COH_G65DDC_GET_EXTENDED_CONFIGURATION_PARAMS CohGetExtendedConfigurationParams=
        (COH_G65DDC_GET_EXTENDED_CONFIGURATION_PARAMS)dlsym(hAPI,"CohGetExtendedConfigurationParams");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.
Index
[out] Pointer to a variable which receives the index of the receiver (which is open in the given device set) in the multichannel coherent system. This parameter can be NULL if the application does not require this information.
DeviceCount
[out] Pointer to a variable which receives total number of the receivers in the multichannel coherent system. This parameter can be NULL if the application does not require this information.

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.

CohTrigger

Generates the synchronization signal to synchronize the completion of the receiver's input switching, DDC1 start or DDC1 frequency settings in all of the receivers in a multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration.

C/C++ declaration

int CohTrigger(int32_t hDeviceSet);

Address retrieval

COH_G65DDC_TRIGGER CohTrigger=(COH_G65DDC_TRIGGER)dlsym(hAPI,"CohTrigger");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.

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. To get additional information about the failure, check state of all the devices in the set using the CohGetDeviceState function.

Remarks

The multichannel coherent system has to be in ETC (see CohSetConfiguration), otherwise CohTrigger fails.

The CohTrigger can only be called on the receiver which is the synchronization master. This is the first receiver connected in the synchronization chain and its index specified by the CohSetExtendedConfigurationParams function is equal to zero. Otherwise CohTrigger fails.

The G65DDC devices have to be turned on using the CohSetPower function before CohTrigger is used. Otherwise CohTrigger fails.

The CohTrigger has to be used always after the CohSetRange, CohSetDDC1Frequency or CohStartDDC1 function is called with the same parameters for all of the receivers in the same multichannel coherent system to complete the operation.

All the receivers in the same ETC multichannel coherent system have to use the same DDC1 type (see CohSetDDC1).

If the CohTrigger function succeeds, the CohTriggerTest function has to be called for all the receivers in the same ETC multichannel coherent system to verify successful completion of synchronized operation.


CohTriggerTest

Tests and verifies completion of operation performed synchronously on all of the receivers in a multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration.

C/C++ declaration

int CohTriggerTest(int32_t hDeviceSet);

Address retrieval

COH_G65DDC_TRIGGER_TEST CohTriggerTest=(COH_G65DDC_TRIGGER_TEST)dlsym(hAPI,"CohTriggerTest");

Parameters

hDeviceSet
[in] Handle to a G65DDC device set returned by the CohOpenDeviceSet function.

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 multichannel coherent system has to be in ETC (see CohSetConfiguration), otherwise CohTriggerTest fails.

The G65DDC devices have to be turned on using the CohSetPower function before CohTriggerTest is used. Otherwise CohTriggerTest fails.

The CohTrigger function has to succeed on the master receiver before CohTriggerTest can be used.

If the CohTrigger function succeeds, the CohTriggerTest function has to be called for all the receivers in the same ETC multichannel ETC coherent system, including the master receiver.

The synchronized operation which was triggered by the latest call of the CohTrigger function is completed successfully if CohTriggerTest succeeds on all the receiver of the ETC multichannel coherent system.


Structures

G65DDC_DEVICE_INFO

Contains information about the G65DDC device.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    char          DevicePath[MAX_PATH];
    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.

If the device information structure is obtained from an already open device using the CohGetDeviceInfo function, 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 null-terminated string.
HWVersion
Version of the hardware.
FWVersion[3]
Version of the firmwares.
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. Only a single DDC1 channel is supported in the coherent mode.
MaxDDC2ChannelCount
Maximum number of DDC2 channels. Only a single DDC2 channel is supported in the coherent mode.
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 CohGetDDC2Count function because it is also limited by the currently selected DDC type of the DDC1 channel.
MaxDDC2ChannelsPerDDC1Channel
Maximum number of DDC2 channels per DDC1 channel. Only a single DDC2 channel is supported in the coherent mode.
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.
G65DDC_FLAGS_1PPSThe device includes a 1PPS input.
MACAddress
Physical Ethernet address of the devices.

G65DDC_DEVICE_STATE

Contains information about the device state.

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 CohSetPower to turn off explicitly.
G65DDC_DEVICE_STATE_NO_1PPSThe internal control logic is not synchronized to the 1PPS signal yet. When the 1PPS functionality is enabled using the CohSet1PPSEnabled function, at least four 1PPS pulses are needed to synchronize the control logic to the 1PPS. If this flag is set for a long time, check the cables and connections.
G65DDC_DEVICE_STATE_NOT_ARMEDSynchronized operation was not completed successfully. Failed to set the device to armed mode. Check cables and connections.
G65DDC_DEVICE_STATE_TRIGGER_NOT_SENTSynchronized operation was not completed successfully. Master device failed to send a trigger signal. This can happen when synchronized operation is performed but the control logic is not synchronized to the 1PPS yet.
G65DDC_DEVICE_STATE_NOT_TRIGGEREDSynchronized operation was not completed successfully. Check the cables and connections.
Temperatures
Internal device's temperatures in °C. If the temperature is not available or it is 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 it 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.

COH_G65DDC_DEVICE_SET

Contains information about the G65DDC device set.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint32_t            DeviceCount;
    G65DDC_DEVICE_INFO  *DeviceInfo;   
} COH_G65DDC_DEVICE_SET;

#pragma pack(pop)

Members

DeviceCount
Number of devices in the device set / number of items in the array pointed to by the DeviceInfo member.
DeviceInfo
Pointer to an array of device info structures for all the devices in the device set.

COH_G65DDC_DEVICE_SET_LIST

List of the G65DDC device sets.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    uint32_t                DeviceSetCount;
    COH_G65DDC_DEVICE_SET   *DeviceSet;  
} COH_G65DDC_DEVICE_SET_LIST;

#pragma pack(pop)

Members

DeviceSetCount
Number of devices sets / number of items in the array pointed to by the DeviceSet member.
DeviceSet
Pointer to an array of device set structures.

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 the 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.

COH_G65DDC_CALLBACKS

Contains pointers to user-defined functions to be registered as callback functions.

Each callback function is called in context of the thread created by the API. If some shared data are accessed inside callback functions, it is recommended to use a mutual-exclusion synchronization method. The application should not call any G65DDC API function from the inside callback functions, otherwise the function fails. The only exception is the CohGetSpectrumCompensation function which can be called from inside the callback functions.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    COH_G65DDC_DDC1_STREAM_CALLBACK                 DDC1StreamCallback;
    COH_G65DDC_ADC_SNAPSHOT_CALLBACK                ADCSnapshotCallback;
    COH_G65DDC_DDC2_STREAM_CALLBACK                 DDC2StreamCallback;
    COH_G65DDC_DDC2_PREPROCESSED_STREAM_CALLBACK    DDC2PreprocessedStreamCallback;
    COH_G65DDC_AUDIO_STREAM_CALLBACK                AudioStreamCallback;
} COH_G65DDC_CALLBACKS;

#pragma pack(pop)

Members

DDC1StreamCallback

Pointer to a user-defined function to be registered as DDC1 stream callback. It is called by the API to pass coherent I/Q samples from DDC1 for all the devices in the device set to the application at once. The DDC1 streaming is started using the CohStartDDC1 function.

C/C++ declaration

void DDC1StreamCallback(uint32_t DeviceCount,const void **Buffers,uint32_t Count,uint32_t BitsPerSample,uintptr_t UserData);

Parameters

DeviceCount
Specifies the number of I/Q sample buffers in the array pointed to by the Buffers. It is equal to number of devices in the device set (see the CohGetDeviceCount function).
Buffers
Pointer to an array of pointers to the buffers which contain I/Q sample sets from the DDC1. Sample rate and bits per sample are given by the used DDC type, see the CohSetDDC1 function. One I/Q sample set consists of two samples. The order of the buffers in the array corresponds to the hardware interconnection of the G65DDC devices.
Count
Specifies the number of I/Q sample sets in each buffer in the Buffers array. This value is equal to the value of the SampleSetsPerBuffer parameter of the CohStartDDC1 function.
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 16bit integer (32bits per I/Q sample set), signed, little endian, from the range -32768 to 32767. If it is 32, the sample is 32bit integer (64bits per I/Q sample set), signed, little endian, from the range -2147483648 to 2147483647.
UserData
User-defined data. This is the value passed to the CohSetCallbacks function as the UserData parameter.
ADCSnapshotCallback

Pointer to a user-defined function to be registered as a ADC snapshot callback. It is called by the API to pass ADC snapshots from the specified device of the device set to the application. Sending of ADC snapshots is started using the CohStartADCSnapshots function.

C/C++ declaration

void ADCSnapshotCallback(uint32_t DeviceIndex,const short *Buffer,uint32_t Count,uint32_t CenterFrequency,uint16_t ADCLevel,uintptr_t UserData);

Parameters

DeviceIndex
Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Buffer
Pointer to the buffer which contains samples directly received from the ADC. Sample rate is 210 MHz, the sample is 16bit 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 CohStartADCSnapshots function.
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.
UserData
User-defined data. This is the value passed to the CohSetCallbacks function as the UserData parameter.
DDC2StreamCallback

Pointer to a user-defined function to be registered as DDC2 stream callback. It is called by the API to pass I/Q samples from DDC2 to the application. The DDC2 streaming can be started using the CohStartDDC2 function.

C/C++ declaration

void DDC2StreamCallback(uint32_t DeviceIndex,const float *Buffer,uint32_t Count,uintptr_t UserData);

Parameters

DeviceIndex
Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Buffer
Pointer to the buffer which contains I/Q sample sets from DDC2. Sample rate is given by the used DDC type, see the CohSetDDC2 function. Sample is 32bit IEEE float from range -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 CohStartDDC2 function.
UserData
User-defined data. This is the value passed to the CohSetCallbacks function as the UserData parameter.
DDC2PreprocessedStreamCallback

Pointer to a user-defined function to be registered as pre-processed DDC2 stream callback. It is called by the API to pass preprocessed I/Q samples from DDC2 of device 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 CohStartDDC2 function.

C/C++ declaration

void DDC2PreprocessedStreamCallback(uint32_t DeviceIndex,const float *Buffer,uint32_t Count,float SlevelPeak,float SlevelRMS,uintptr_t UserData);

Parameters

DeviceIndex
Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
Buffer
Pointer to the buffer which contains preprocessed I/Q sample sets from DDC2. Sample rate is given by the used DDC type, see the CohSetDDC2 function. Sample is 32bit IEEE float from range -1.0 to 1.0. One I/Q sample set consists of two samples.
Count
Specifies 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 CohStartDDC2 function.
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 CohGetSignalLevel function.
UserData
User-defined data. This is the value passed to the CohSetCallbacks function as the UserData parameter.
AudioStreamCallback

Pointer to a user-defined function to be registered as audio stream callback. It is called by the API to pass audio samples from the device of the device set to the application. The audio streaming is started using the CohStartAudio function. The callback is invoked three times for each audio buffer (see description of the Stage parameter).

C/C++ declaration

void AudioStreamCallback(uint32_t DeviceIndex,uint32_t Stage,const float *Buffer,uint32_t Count,uintptr_t UserData);

Parameters

DeviceIndex
Specifies the index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.
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 CohSetAudioGain).
G65DDC_AUDIO_STREAM_CALLBACK_STAGE_1The buffer contains audio samples affected by audio gain and audio filter (see CohSetAudioGain and CohSetAudioFilter).
G65DDC_AUDIO_STREAM_CALLBACK_STAGE_2The buffer contains audio samples affected by audio gain, audio filter and volume (see CohSetAudioGain, CohSetAudioFilter, CohSetVolume and CohSetMute).
Buffer
Pointer to the buffer which contains samples of the audio signal. 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 stored in the buffer pointed to by the Buffer parameter. This value is equal to the value of the SampleSetsPerBuffer parameter of the CohStartAudio function.
UserData
User-defined data. This is the value passed to the CohSetCallbacks function as the UserData parameter.