The G35DDC API SDK is implemented as a dynamic library (G35DDCAPI.dll). It provides object-oriented and non-object-oriented interfaces to control a set of G35DDC devices in coherent mode. This document describes the non-object-oriented interface. The G35DDCAPI.dll library exports several functions which makes it possible to control G35DDC 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 set of G35DDC receivers can be controlled from a single user thread only.
A C/C++ header file G35DDCAPI.h is a part of the SDK. The API can be used by any 32-bit application under Microsoft Windows 7, Windows 8, Windows 10 and Windows 11 (including their 64-bit versions). The API can be used also by any 64-bit application but only under 64-bit versions of the supported operating systems.
The 'G35DDC device set' in coherent mode can consist of up to 8 interconnected G35DDC devices. DDC1 signals from all the G35DDC devices in such a set are phase-coherent. All other provided signals (IF, DDC2 and audio) are not phase-coherent. Only one processing channel per device is available in coherent mode.
The G35DDCAPI.dll library can be loaded to the application by two Microsoft Windows API functions. The first one is LoadLibrary and
the other one is LoadLibraryEx. 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 FreeLibrary function can be used to unload the API. Before the FreeLibrary is called, all the handles to G35DDC device sets returned by the CohOpenDeviceSet function must be closed by the CohCloseDeviceSet function, otherwise the application can become to unpredictable state.
The following source code shows how to load the API.
#include <stdio.h> #include "G35DDCAPI.h" COH_G35DDC_OPEN_DEVICE_SET CohOpenDeviceSet; COH_G35DDC_CLOSE_DEVICE_SET CohCloseDeviceSet; HMODULE hAPI; void main(void) { //Loading the API hAPI=LoadLibrary("G35DDCAPI.dll"); if(hAPI!=NULL) { //Retrieving addresses of used API functions CohOpenDeviceSet=(COH_G35DDC_OPEN_DEVICE_SET)GetProcAddress(hAPI,"CohOpenDeviceSet"); CohCloseDeviceSet=(COH_G35DDC_CLOSE_DEVICE_SET)GetProcAddress(hAPI,"CohCloseDeviceSet"); //Here place code that uses the API FreeLibrary(hAPI); } else { //If the LoadLibrary fails printf("Failed to load G35DDCAPI.dll.\n"); } }
The G35DDC API provides the CohGetDeviceSetList function which returns a list of available G35DDC device sets which can be open using the CohOpenDeviceSet function.
The following source code produces a list of serial numbers of G35DDC devices of the available device sets.
#include <stdio.h> #include "G35DDCAPI.h" COH_G35DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList; COH_G35DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList; HMODULE hAPI; void main(void) { UINT32 i,j; COH_G35DDC_DEVICE_SET_LIST *DeviceSetList; //Loading the API hAPI=LoadLibrary("G35DDCAPI.dll"); if(hAPI!=NULL) { //Retrieving address of the CohGetDeviceSetList and CohFreeDeviceSetList functions CohGetDeviceSetList=(COH_G35DDC_GET_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohGetDeviceSetList"); CohFreeDeviceSetList=(COH_G35DDC_FREE_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohFreeDeviceSetList"); DeviceSetList=CohGetDeviceSetList(); if(DeviceSetList!=NULL) { if(DeviceSetList->DeviceSetCount!=0) { printf("Available G35DDC 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 G35DDC device set has been found.\n"); } //free memory CohFreeDeviceSetList(DeviceSetList); } else { printf("CohGetDeviceSetList failed with error %08X\n",GetLastError()); } FreeLibrary(hAPI); } else { printf("Failed to load G35DDCAPI.dll.\n"); } printf("Press enter to exit\n"); getchar(); }
G35DDC device set has to be open before it can be controlled. The API provides the CohOpenDeviceSet function to open the device set of interconnected G35DDC devices in coherent mode.
The following source code shows how to open the first available G35DDC device set.
#include <stdio.h> #include "G35DDCAPI.h" COH_G35DDC_OPEN_DEVICE_SET CohOpenDeviceSet; COH_G35DDC_CLOSE_DEVICE_SET CohCloseDeviceSet; HMODULE hAPI; void main(void) { INT32 hDeviceSet; //Loading the API hAPI=LoadLibrary("G35DDCAPI.dll"); if(hAPI!=NULL) { //Retrieving addresses of the CohOpenDeviceSet and CohCloseDeviceSet API functions CohOpenDeviceSet=(COH_G35DDC_OPEN_DEVICE_SET)GetProcAddress(hAPI,"CohOpenDeviceSet"); CohCloseDeviceSet=(COH_G35DDC_CLOSE_DEVICE_SET)GetProcAddress(hAPI,"CohCloseDeviceSet"); //Opening the first available G35DDC device set using predefined G35DDC_OPEN_FIRST_SET constant hDeviceSet=CohOpenDeviceSet(G35DDC_OPEN_FIRST_SET,0); if(hDeviceSet>=0) { //Here place code that works with the open G35DDC device set //Closing handle to opened G35DDC device set CohCloseDeviceSet(hDeviceSet); } else { printf("CohOpenDeviceSet failed with error %08X\n",GetLastError()); } FreeLibrary(hAPI); } else { //If the LoadLibrary fails printf("Failed to load G35DDCAPI.dll.\n"); } }The following code demonstrates another way to open the first available G35DDC device set using the device set list.
#include <stdio.h> #include "G35DDCAPI.h" COH_G35DDC_OPEN_DEVICE_SET CohOpenDeviceSet; COH_G35DDC_CLOSE_DEVICE_SET CohCloseDeviceSet; COH_G35DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList; COH_G35DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList; HMODULE hAPI; void main(void) { INT32 hDeviceSet; COH_G35DDC_DEVICE_SET_LIST *DeviceSetList; //Loading the API hAPI=LoadLibrary("G35DDCAPI.dll"); if(hAPI!=NULL) { //Retrieving addresses of API functions CohOpenDeviceSet=(COH_G35DDC_OPEN_DEVICE_SET)GetProcAddress(hAPI,"CohOpenDeviceSet"); CohCloseDeviceSet=(COH_G35DDC_CLOSE_DEVICE_SET)GetProcAddress(hAPI,"CohCloseDeviceSet"); CohGetDeviceSetList=(COH_G35DDC_GET_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohGetDeviceSetList"); CohFreeDeviceSetList=(COH_G35DDC_FREE_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohFreeDeviceSetList"); DeviceSetList=CohGetDeviceSetList(); if(DeviceSetList!=NULL) { if(DeviceSetList->DeviceSetCount!=0) { //Opening the first available G35DDC device set in the list hDeviceSet=CohOpenDeviceSet(DeviceSetList->DeviceSet[0].DeviceInfo,DeviceSetList->DeviceSet[0].DeviceCount); if(hDeviceSet>=0) { //Here place code that works with the open G35DDC device set //Closing handle to opened G35DDC device set CohCloseDeviceSet(hDeviceSet); } else { printf("CohOpenDeviceSet failed with error %08X\n",GetLastError()); } } else { printf("No available G35DDC device set has been found.\n"); } CohFreeDeviceSetList(DeviceSetList); } else { printf("CohGetDeviceSetList failed with error %08X\n",GetLastError()); } FreeLibrary(hAPI); } else { //If the LoadLibrary fails printf("Failed to load G35DDCAPI.dll.\n"); } }
The CohGetDeviceSetList function returns information about available G35DDC device sets that can be open.
C/C++ declaration
COH_G35DDC_DEVICE_SET_LIST* __stdcall CohGetDeviceSetList(void);
Address retrieval
COH_G35DDC_GET_DEVICE_SET_LIST CohGetDeviceSetList=(COH_G35DDC_GET_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohGetDeviceSetList");
Parameters
None
Return value
If the function succeeds, the return value is non-zero pointer to a structure which describes list of available sets of interconnected G35DDC devices.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
If the returned list of available device sets is no longer needed, memory used by this list has to be freed using the CohFreeDeviceSetList function.
The CohFreeDeviceSetList function frees memory allocated by the CohGetDeviceSetList function. This memory is used to store list of the available G35DDC device sets.
C/C++ declaration
void __stdcall CohFreeDeviceSetList(COH_G35DDC_DEVICE_SET_LIST *DeviceSetList);
Address retrieval
COH_G35DDC_FREE_DEVICE_SET_LIST CohFreeDeviceSetList=(COH_G35DDC_FREE_DEVICE_SET_LIST)GetProcAddress(hAPI,"CohFreeDeviceSetList");
Parameters
DeviceSetList[in] Pointer to the data structure returned by a previous call to the CohGetDeviceSetList function. This parameter cannot be NULL.
Opens G35DDC device set.
C/C++ declaration
INT32 __stdcall CohOpenDeviceSet(G35DDC_DEVICE_INFO *DeviceInfos,UINT32 Count);
Address retrieval
COH_G35DDC_OPEN_DEVICE_SET CohOpenDeviceSet=(COH_G35DDC_OPEN_DEVICE_SET)GetProcAddress(hAPI,"CohOpenDeviceSet");
Parameters
DeviceInfos[in] Pointer to array of G35DDC_DEVICE_INFO structures which contains information about all 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 hardware interconnect of the G35DDC 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:
Value Meaning G35DDC_OPEN_FIRST_SET This function opens the first available G35DDC device set. The Count parameter is ignored, the number of interconnected devices is determined automatically. G35DDC_OPEN_DEMO_SET This function opens a demo G35DDC device set. This allows developers to work with the API without physical G35DDC devices. The Count parameter specifies the number of demo receivers in the set and can vary from 1 to 8. 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 handle to the specified G35DDC device set. This handle can only be used with functions of G35DDC API.
If the function fails, the return value is negative. To get extended error information, call GetLastError.
Remarks
The CohOpenDeviceSet function can be called from any user thread, the returned handle can only be used in the same thread, otherwise application can enter an unpredictable state.
Use the CohCloseDeviceSet function to close G35DDC device set handle returned by the CohOpenDeviceSet.
The order of devices in the device set corresponds to hardware interconnect of the G35DDC devices. Each individual device in the device set has its own constant index which does not change while the hardware G35DDC device interconnect remains the same. This index is used in some API function to access a specific device of the device set. Index of the first device is 0, index of the second device is 1, etc..
Closes G35DDC device set.
C/C++ declaration
BOOL __stdcall CohCloseDeviceSet(INT32 hDeviceSet);
Address retrieval
COH_G35DDC_CLOSE_DEVICE_SET CohCloseDeviceSet=(COH_G35DDC_CLOSE_DEVICE_SET)GetProcAddress(hAPI,"CohCloseDeviceSet");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
Checks if all the devices in the device set are still connected to the computer.
C/C++ declaration
BOOL __stdcall CohIsConnected(INT32 hDeviceSet);
Address retrieval
COH_G35DDC_IS_CONNECTED CohIsConnected=(COH_G35DDC_IS_CONNECTED)GetProcAddress(hAPI,"CohIsConnected");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.
Return value
This function returns a non-zero value if all the devices in the set are still connected.
If a device is disconnected or the function fails, the return value is zero. To determine if the function failed, call GetLastError. GetLastError returns ERROR_SUCCESS if a device is disconnected or another error code if CohIsConnected failed.
Remarks
If any device from the set is determined disconnected, the device set is no longer usable and should be closed using CohCloseDeviceSet function.
Retrieves number of G35DDC devices in the device set.
C/C++ declaration
BOOL __stdcall CohGetDeviceCount(INT32 hDeviceSet,UINT32 *Count);
Address retrieval
COH_G35DDC_GET_DEVICE_COUNT CohGetDeviceCount=(COH_G35DDC_GET_DEVICE_COUNT)GetProcAddress(hAPI,"CohGetDeviceCount");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Count[out] Pointer to a variable that receives the number of G35DDC 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, call GetLastError.
Retrieves information about a single G35DDC device from the device set.
C/C++ declaration
BOOL __stdcall CohGetDeviceInfo(INT32 hDeviceSet,UINT32 DeviceIndex,G35DDC_DEVICE_INFO *Info);
Address retrieval
COH_G35DDC_GET_DEVICE_INFO CohGetDeviceInfo=(COH_G35DDC_GET_DEVICE_INFO)GetProcAddress(hAPI,"CohGetDeviceInfo");
Parameters
hDeviceSet[in] Handle to G35DDC 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 the number of devices' in the device set. The order of the devices corresponds to the hardware interconnection of physical G35DDC devices.Info[out] Pointer to a G35DDC_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, call GetLastError.
Remarks
Use the CohGetDeviceCount function to determine the number of devices in the device set.
Retrieves information about all the G35DDC devices in the device set at once.
C/C++ declaration
BOOL __stdcall CohGetDeviceInfos(INT32 hDeviceSet,G35DDC_DEVICE_INFO *Infos,UINT32 *InfoCount);
Address retrieval
COH_G35DDC_GET_DEVICE_INFOS CohGetDeviceInfos=(COH_G35DDC_GET_DEVICE_INFOS)GetProcAddress(hAPI,"CohGetDeviceInfos");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Infos[out] Pointer to array of G35DDC_DEVICE_INFO structures to be filled with information about device in the device set.Order of the device infos in the array corresponds to hardware interconnect of physical G35DDC 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 (GetLastError returns ERROR_INSUFFICIENT_BUFFER) 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, call GetLastError.
Remarks
Use the CohGetDeviceCount function to determine the number of devices in the device set.
Turns on or off all the G35DDC devices in the device set.
C/C++ declaration
BOOL __stdcall CohSetPower(INT32 hDeviceSet,BOOL Power);
Address retrieval
COH_G35DDC_SET_POWER CohSetPower=(COH_G35DDC_SET_POWER)GetProcAddress(hAPI,"CohSetPower");
Parameters
hDeviceSet[in] Handle to G35DDC 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 the device in the device set are turned on, if it is zero then all 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, call GetLastError.
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.
The GetPower function determines whether the devices are turned on or off.
C/C++ declaration
BOOL __stdcall CohGetPower(INT32 hDeviceSet,BOOL *Power);
Address retrieval
COH_G35DDC_GET_POWER CohGetPower=(COH_G35DDC_GET_POWER)GetProcAddress(hAPI,"CohGetPower");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Power[out] Pointer to a variable that receives 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, call GetLastError.
Sets input attenuator.
C/C++ declaration
BOOL __stdcall CohSetAttenuator(INT32 hDeviceSet,UINT32 Attenuator);
Address retrieval
COH_G35DDC_SET_ATTENUATOR CohSetAttenuator=(COH_G35DDC_SET_ATTENUATOR)GetProcAddress(hAPI,"CohSetAttenuator");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Attenuator[in] 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, call GetLastError.
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.
Retrieves current setting of the attenuator.
C/C++ declaration
BOOL __stdcall CohGetAttenuator(INT32 hDeviceSet,UINT32 *Attenuator);
Address retrieval
COH_G35DDC_GET_ATTENUATOR CohGetAttenuator=(COH_G35DDC_GET_ATTENUATOR)GetProcAddress(hAPI,"CohGetAttenuator");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Attenuator[out] Pointer to a variable that 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, call GetLastError.
Controls the band pass filter at RF input.
C/C++ declaration
BOOL __stdcall CohSetPreselectors(INT32 hDeviceSet,UINT32 Low,UINT32 High);
Address retrieval
COH_G35DDC_SET_PRESELECTORS CohSetPreselectors=(COH_G35DDC_SET_PRESELECTORS)GetProcAddress(hAPI,"CohSetPreselectors");
Parameters
hDeviceSet[in] Handle to G35DDC 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 the 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, 50000000. If the value is not from the 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, call GetLastError.
Remarks
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 a 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.
Retrieves the current setting of RF input band pass filter.
C/C++ declaration
BOOL __stdcall CohGetPreselectors(INT32 hDeviceSet,UINT32 *Low,UINT32 *High);
Address retrieval
COH_G35DDC_GET_PRESELECTORS CohGetPreselectors=(COH_G35DDC_GET_PRESELECTORS)GetProcAddress(hAPI,"CohGetPreselectors");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Low[out] Pointer to a variable that 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 that 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, call GetLastError.
Enables or disables the RF input preamplifier.
C/C++ declaration
BOOL __stdcall CohSetPreamp(INT32 hDeviceSet,BOOL Preamp);
Address retrieval
COH_G35DDC_SET_PREAMP CohSetPreamp=(COH_G35DDC_SET_PREAMP)GetProcAddress(hAPI,"CohSetPreamp");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
Remarks
Use the CohGetPreamp 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 CohSetPreamp function with the same value of the Preamp parameter has to be called on all of the receivers in this multichannel coherent system.
Retrieves the current state of RF input preamplifier.
C/C++ declaration
BOOL __stdcall CohGetPreamp(INT32 hDeviceSet,BOOL *Preamp);
Address retrieval
COH_G35DDC_GET_PREAMP CohGetPreamp=(COH_G35DDC_GET_PREAMP)GetProcAddress(hAPI,"CohGetPreamp");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Preamp[out] Pointer to a variable that 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, call GetLastError.
Enables or disables the noise blanker on the ADC stream.
C/C++ declaration
BOOL __stdcall CohSetADCNoiseBlanker(INT32 hDeviceSet,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_ADC_NOISE_BLANKER CohSetADCNoiseBlanker=(COH_G35DDC_SET_ADC_NOISE_BLANKER)GetProcAddress(hAPI,"CohSetADCNoiseBlanker");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Enabled[in] Specifies whether to enable or disable the noise blanker. If this parameter is non-zero, noise blanker is enabled. If the parameter is zero, noise blanker is disabled.
Return value
If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
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.
Retrieves the current ADC noise blanker state.
C/C++ declaration
BOOL __stdcall CohGetADCNoiseBlanker(INT32 hDeviceSet,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_ADC_NOISE_BLANKER CohGetADCNoiseBlanker=(COH_G35DDC_GET_ADC_NOISE_BLANKER)GetProcAddress(hAPI,"CohGetADCNoiseBlanker");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Enabled[out] Pointer to a variable that 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, call GetLastError.
Specifies the ADC noise blanker threshold.
C/C++ declaration
BOOL __stdcall CohSetADCNoiseBlankerThreshold(INT32 hDeviceSet,WORD Threshold);
Address retrieval
COH_G35DDC_SET_ADC_NOISE_BLANKER_THRESHOLD CohSetADCNoiseBlankerThreshold= (COH_G35DDC_SET_ADC_NOISE_BLANKER_THRESHOLD)GetProcAddress(hAPI,"CohSetADCNoiseBlankerThreshold");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
Remarks
Use the CohGetADCNoiseBlankerThreshold function to retrieve the current threshold of the noise blanker.
Determines the ADC noise blanker threshold.
C/C++ declaration
BOOL __stdcall CohGetADCNoiseBlankerThreshold(INT32 hDeviceSet,WORD *Threshold);
Address retrieval
COH_G35DDC_GET_ADC_NOISE_BLANKER_THRESHOLD CohGetADCNoiseBlankerThreshold= (COH_G35DDC_GET_ADC_NOISE_BLANKER_THRESHOLD)GetProcAddress(hAPI,"CohGetADCNoiseBlankerThreshold");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Threshold[out] Pointer to a variable that 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, call GetLastError.
Starts sending of IF snapshots from specific device of the device set.
C/C++ declaration
BOOL __stdcall CohStartIF(INT32 hDeviceSet,UINT32 DeviceIndex,WORD Period);
Address retrieval
COH_G35DDC_START_IF CohStartIF=(COH_G35DDC_START_IF)GetProcAddress(hAPI,"CohStartIF");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Period[in] Specifies the time interval in milliseconds for how often the IF snapshot is taken and sent to the IFCallback callback 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, call GetLastError.
Remarks
The G35DDC device has to be turned on using the CohSetPower function before use of CohStartIF, otherwise the CohStartIF function fails.
Stops sending of IF snapshots from specific device of the device set.
C/C++ declaration
BOOL __stdcall CohStopIF(INT32 hDeviceSet,UINT32 DeviceIndex,);
Address retrieval
COH_G35DDC_STOP_IF CohStopIF=(COH_G35DDC_STOP_IF)GetProcAddress(hAPI,"CohStopIF");
Parameters
hDeviceSet[in] Handle to G35DDC 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.
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, call GetLastError.
Remarks
The IFCallback callback function is not called after CohStopIF returns.
Enables or disables frequency spectrum inversion.
C/C++ declaration
BOOL __stdcall CohSetInverted(INT32 hDeviceSet,BOOL Inverted);
Address retrieval
COH_G35DDC_SET_INVERTED CohSetInverted=(COH_G35DDC_SET_INVERTED)GetProcAddress(hAPI,"CohSetInverted");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
Retrieves the current frequency spectrum inversion setting.
C/C++ declaration
BOOL __stdcall CohGetInverted(INT32 hDeviceSet,BOOL *Inverted);
Address retrieval
COH_G35DDC_GET_INVERTED CohGetInverted=(COH_G35DDC_GET_INVERTED)GetProcAddress(hAPI,"CohGetInverted");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Inverted[out] Pointer to a variable that 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, call GetLastError.
Retrieves information about DDC format.
C/C++ declaration
BOOL __stdcall CohGetDDCInfo(INT32 hDeviceSet,UINT32 DDCTypeIndex,G3XDDC_DDC_INFO *Info);
Address retrieval
COH_G35DDC_GET_DDC_INFO CohGetDDCInfo=(COH_G35DDC_GET_DDC_INFO)GetProcAddress(hAPI,"CohGetDDCInfo");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DDCTypeIndex[in] Specifies index of DDC type. For more information, see remarks.Info[out] Pointer to a G3XDDC_DDC_INFO structure to be filled with information about 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, call GetLastError.
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.
Retrieves the number of DDC types supported by DDC1.
C/C++ declaration
BOOL __stdcall CohGetDDC1Count(INT32 hDeviceSet,UINT32 *Count);
Address retrieval
COH_G35DDC_GET_DDC1_COUNT CohGetDDC1Count=(COH_G35DDC_GET_DDC1_COUNT)GetProcAddress(hAPI,"CohGetDDC1Count");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Count[out] Pointer to a variable that 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, call GetLastError.
Sets current DDC type of DDC1.
C/C++ declaration
BOOL __stdcall CohSetDDC1(INT32 hDeviceSet,UINT32 DDCTypeIndex);
Address retrieval
COH_G35DDC_SET_DDC1 CohSetDDC1=(COH_G35DDC_SET_DDC1)GetProcAddress(hAPI,"CohSetDDC1");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DDCTypeIndex[in] Specifies 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, call GetLastError.
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, 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 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.
Retrieves information about the current DDC type of the DDC1.
C/C++ declaration
BOOL __stdcall CohGetDDC1(INT32 hDeviceSet,UINT32 *DDCTypeIndex,G3XDDC_DDC_INFO *DDCInfo);
Address retrieval
COH_G35DDC_GET_DDC1 CohGetDDC1=(COH_G35DDC_GET_DDC1)GetProcAddress(hAPI,"CohGetDDC1");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DDCTypeIndex[out] Pointer to a variable that receives 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 G3XDDC_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, call GetLastError.
Remarks
Returned DDCTypeIndex can be passed to the CohGetDDCInfo function.
Sets DDC1 center frequency.
C/C++ declaration
BOOL __stdcall CohSetDDC1Frequency(INT32 hDeviceSet,UINT32 Frequency);
Address retrieval
COH_G35DDC_SET_DDC1_FREQUENCY CohSetDDC1Frequency=(COH_G35DDC_SET_DDC1_FREQUENCY)GetProcAddress(hAPI,"CohSetDDC1Frequency");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Frequency[in] Specifies the new center frequency of 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, call GetLastError.
Remarks
Changing of DDC1 frequency causes change of 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.
Retrieves the current center frequency of DDC1.
C/C++ declaration
BOOL __stdcall CohGetDDC1Frequency(INT32 hDeviceSet,UINT32 *Frequency);
Address retrieval
COH_G35DDC_GET_DDC1_FREQUENCY CohGetDDC1Frequency=(COH_G35DDC_GET_DDC1_FREQUENCY)GetProcAddress(hAPI,"CohGetDDC1Frequency");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Frequency[out] Pointer to a variable that 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, call GetLastError.
Sets the phase shift of the DDC1 signal for a specific device in the device set.
C/C++ declaration
BOOL __stdcall CohSetDDC1PhaseShift(INT32 hDeviceSet,UINT32 DeviceIndex,double PhaseShift);
Address retrieval
COH_G35DDC_SET_DDC1_PHASE_SHIFT CohSetDDC1PhaseShift=(COH_G35DDC_SET_DDC1_PHASE_SHIFT)GetProcAddress(hAPI,"CohSetDDC1PhaseShift");
Parameters
hDeviceSet[in] Handle to G35DDC 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 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, call GetLastError.
Remarks
It can be used for compensation of 'small length differences' of cables used for the coherent clock or at receiver RF inputs.
Use the CohGetDDC1PhaseShift function to retrieve the current phase shift of the DDC1 signal.
Retrieves the current phase shift of the DDC1 signal for the specific device in the device set.
C/C++ declaration
BOOL __stdcall CohGetDDC1PhaseShift(INT32 hDeviceSet,UINT32 DeviceIndex,double *PhaseShift);
Address retrieval
COH_G35DDC_GET_DDC1_PHASE_SHIFT CohGetDDC1PhaseShift=(COH_G35DDC_GET_DDC1_PHASE_SHIFT)GetProcAddress(hAPI,"CohGetDDC1PhaseShift");
Parameters
hDeviceSet[in] Handle to G35DDC 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[out] Pointer to a variable that 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, call GetLastError.
Starts coherent DDC1 streaming on all the devices in the set simultaneously.
C/C++ declaration
BOOL __stdcall CohStartDDC1(INT32 hDeviceSet,UINT32 SamplesPerBuffer);
Address retrieval
COH_G35DDC_START_DDC1 CohStartDDC1=(COH_G35DDC_START_DDC1)GetProcAddress(hAPI,"CohStartDDC1");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.SamplesPerBuffer[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 method) is less than or equal to 23 (DDC1 bandwidth <= 4 MHz) the value of the SamplesPerBuffer has to be a multiple of 64. If the current the DDC1 type index is greater than 23 (DDC1 bandwidth > 4 MHz), the SamplesPerBuffers 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, call GetLastError.
Remarks
The G35DDC 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 restarts the streaming except it was previously started with the same SamplesPerBuffer parameter. In this case CohStartDDC1 does nothing. Restart of DDC1 streaming stops DDC2 and audio streaming in each device in the set. CohStartDDC1 does not restart DDC2 and audio streaming.
Use the CohStopDDC1 function to stop DDC1 streaming.
Decreasing the value of the SamplesPerBuffer parameter decreases latency and may increase CPU usage. Increasing the value of the SamplesPerBuffer 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 SamplesPerBuffer 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.
Stops DDC1 streaming on all the devices of the device set.
C/C++ declaration
BOOL __stdcall CohStopDDC1(INT32 hDeviceSet);
Address retrieval
COH_G35DDC_STOP_DDC1 CohStopDDC1=(COH_G35DDC_STOP_DDC1)GetProcAddress(hAPI,"CohStopDDC1");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
Remarks
The CohStopDDC1 function stops all 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.
Retrieves information about the current DDC type of the DDC2.
C/C++ declaration
BOOL __stdcall CohGetDDC2(INT32 hDeviceSet,UINT32 *DDCTypeIndex,G3XDDC_DDC_INFO *DDCInfo);
Address retrieval
COH_G35DDC_GET_DDC2 CohGetDDC2=(COH_G35DDC_GET_DDC2)GetProcAddress(hAPI,"CohGetDDC2");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DDCTypeIndex[out] Pointer to a variable that receives an 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 G3XDDC_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, call GetLastError.
Remarks
DDC type of DDC2 in each device is the same and depends upon the DDC type of DDC1, it cannot be changed by the application directly. The DDC type of DDC2 is equal to the DDC type of DDC1 if DDC type index of DDC1 is less than or equal to 5 (sample rate: 80 kHz, bandwidth: 64 kHz, bits per sample: 32). If the DDC type index of DDC1 is above 5, the DDC type index of DDC2 is always 5. Changing of DDC type of DDC1 can cause a change of DDC type of DDC2, so it is useful to call CohGetDDC2 immediately after the CohSetDDC1 function to determine the current DDC type of DDC2 - if the application needs to know parameters of DDC2.
The BitsPerSample member of the G3XDDC_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.
Sets the relative center frequency of DDC2 for the specified device of the device set.
C/C++ declaration
BOOL __stdcall CohSetDDC2Frequency(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 Frequency);
Address retrieval
COH_G35DDC_SET_DDC2_FREQUENCY CohSetDDC2Frequency=(COH_G35DDC_SET_DDC2_FREQUENCY)GetProcAddress(hAPI,"CohSetDDC2Frequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
The value of the Frequency parameter is 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 = fDDC1 + frDDC2
Where faDDC2 is the absolute center frequency of DDC2, fDDC1 is the 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).
Changing of DDC2 'relative frequency' changes the 'absolute frequency' of the DDC2 and demodulator of specified device.
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 hDeviceSet; //Handle to G35DDC device set returned by the CohOpenDeviceSet function //1. method CohSetDDC1Frequency(hDeviceSet,11010000); CohSetDDC2Frequency(hDeviceSet,0,0); //2. method, it can be used if bandwidth of DDC2 is less than bandwidth of DDC1 CohSetDDC1Frequency(hDeviceSet,11000000); CohSetDDC2Frequency(hDeviceSet,0,10000); //3. method, it can be used if bandwidth of DDC2 is less than bandwidth of DDC1 CohSetDDC1Frequency(hDeviceSet,11020000); CohSetDDC2Frequency(hDeviceSet,0,-10000);
Retrieves the current relative DDC2 center frequency of the specified device in the device set.
C/C++ declaration
BOOL __stdcall CohGetDDC2Frequency(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 *Frequency);
Address retrieval
COH_G35DDC_GET_DDC2_FREQUENCY CohGetDDC2Frequency=(COH_G35DDC_GET_DDC2_FREQUENCY)GetProcAddress(hAPI,"CohGetDDC2Frequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Frequency[out] Pointer to a variable that 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, call GetLastError.
Starts DDC2 streaming on the specified device.
C/C++ declaration
BOOL __stdcall CohStartDDC2(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 SamplesPerBuffer);
Address retrieval
COH_G35DDC_START_DDC2 CohStartDDC2=(COH_G35DDC_START_DDC2)GetProcAddress(hAPI,"CohStartDDC2");
Parameters
hDeviceSet[in] Handle to G35DDC 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.SamplesPerBuffer[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 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, call GetLastError.
Remarks
Before CohStartDDC2 is used, 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 restarts it except the streaming was previously started with the same SamplesPerBuffer parameter. In this case CohStartDDC2 does nothing. Restart of the DDC2 streaming stops audio streaming for the given device. CohStartDDC2 does not restart audio streaming.
Use the CohStopDDC2 function to stop DDC2 streaming.
Decreasing the value of the SamplesPerBuffer parameter decreases latency and may increase CPU usage. Increasing the value of the SamplesPerBuffer parameter increases latency and may decrease CPU usage.
Stops DDC2 streaming on the specified device.
C/C++ declaration
BOOL __stdcall CohStopDDC2(INT32 hDeviceSet,UINT32 DeviceIndex);
Address retrieval
COH_G35DDC_STOP_DDC2 CohStopDDC2=(COH_G35DDC_STOP_DDC2)GetProcAddress(hAPI,"CohStopDDC2");
Parameters
hDeviceSet[in] Handle to G35DDC 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.
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, call GetLastError.
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.
Enables or disables the noise blanker on the DDC2 stream of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDDC2NoiseBlanker(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_DDC2_NOISE_BLANKER CohSetDDC2NoiseBlanker=(COH_G35DDC_SET_DDC2_NOISE_BLANKER)GetProcAddress(hAPI,"CohSetDDC2NoiseBlanker");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetDDC2NoiseBlanker function to determine the current state of the noise blanker.
Retrieves the current DDC2 noise blanker state of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDDC2NoiseBlanker(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_DDC2_NOISE_BLANKER CohGetDDC2NoiseBlanker=(COH_G35DDC_GET_DDC2_NOISE_BLANKER)GetProcAddress(hAPI,"CohGetDDC2NoiseBlanker");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Enabled[out] Pointer to a variable that receives 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, call GetLastError.
Specifies the DDC2 noise blanker threshold of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDDC2NoiseBlankerThreshold(INT32 hDeviceSet,UINT32 DeviceIndex,double Threshold);
Address retrieval
COH_G35DDC_SET_DDC2_NOISE_BLANKER_THRESHOLD CohSetDDC2NoiseBlankerThreshold= (COH_G35DDC_SET_DDC2_NOISE_BLANKER_THRESHOLD)GetProcAddress(hAPI,"CohSetDDC2NoiseBlankerThreshold");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetDDC2NoiseBlankerThreshold function to retrieve the current threshold of the noise blanker.
Retrieves the DDC2 noise blanker threshold of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDDC2NoiseBlankerThreshold(INT32 hDeviceSet,UINT32 DeviceIndex,double *Threshold);
Address retrieval
COH_G35DDC_GET_DDC2_NOISE_BLANKER_THRESHOLD CohGetDDC2NoiseBlankerThreshold= (COH_G35DDC_GET_DDC2_NOISE_BLANKER_THRESHOLD)GetProcAddress(hAPI,"CohGetDDC2NoiseBlankerThreshold");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Threshold[out] Pointer to a variable that 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, call GetLastError.
Determines a value which indicates the percentage ratio between 'short time average signal level' and 'maximum level'.
C/C++ declaration
BOOL __stdcall CohGetDDC2NoiseBlankerExcessValue(INT32 hDeviceSet,UINT32 DeviceIndex,double *Value);
Address retrieval
COH_G35DDC_GET_DDC2_NOISE_BLANKER_EXCESS_VALUE CohGetDDC2NoiseBlankerExcessValue= (COH_G35DDC_GET_DDC2_NOISE_BLANKER_EXCESS_VALUE)GetProcAddress(hAPI,"CohGetDDC2NoiseBlankerExcessValue");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Value[out] Pointer to a variable that receives 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, call GetLastError.
Determines the current signal level for the specified device.
C/C++ declaration
BOOL __stdcall CohGetSignalLevel(INT32 hDeviceSet,UINT32 DeviceIndex,FLOAT *Peak,FLOAT *RMS);
Address retrieval
COH_G35DDC_GET_SIGNAL_LEVEL CohGetSignalLevel=(COH_G35DDC_GET_SIGNAL_LEVEL)GetProcAddress(hAPI,"CohGetSignalLevel");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Peak[out] Pointer to a variable that 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 that 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, call GetLastError.
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.
Signal level is evaluated from the signal after the demodulator filter and before the notch filter (see block diagram), the signal is selected by the demodulator filter.
Signal level is evaluated for each buffer processed by the demodulator filter. Buffer size (signal level evaluation rate) is given by the SamplesPerBuffer parameter of the CohStartDDC2 function.
The DDC2PreprocessedStreamCallback callback function provides signal level for each buffer passed to the callback, i.e. for each buffer used in signal level evaluation. This provides a way to get signal level from each processed buffer without the need for pulling 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 RMS signal level in Volts obtained by CohGetSignalLevel, R is G35DDC receiver input impedance (50 Ω), P[W] is power in Watts and P[dBm] is power in dBm and 1000 is conversion coefficient W -> mW.
The following example shows how to obtain the current signal level in dBm from device 0:
#include <stdio.h> #include <math.h> INT32 hDeviceSet; //handle to G35DDC 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);
Enables or disables the notch filter of the specified device.
C/C++ declaration
BOOL __stdcall CohSetNotchFilter(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_NOTCH_FILTER CohSetNotchFilter=(COH_G35DDC_SET_NOTCH_FILTER)GetProcAddress(hAPI,"CohSetNotchFilter");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetNotchFilter function to determine whether the filter is enabled or disabled.
Retrieves the current notch filter state of the specified device.
C/C++ declaration
BOOL __stdcall CohGetNotchFilter(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_NOTCH_FILTER CohGetNotchFilter=(COH_G35DDC_GET_NOTCH_FILTER)GetProcAddress(hAPI,"CohGetNotchFilter");
Parameters
hDeviceSet[in] Handle to G35DDC 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.NotchFilterIndex[in] Specifies the notch filter index. Possible values are: 0, 1.Enabled[out] Pointer to a variable that 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, call GetLastError.
Specifies the relative center frequency of the notch filter for the specified device.
C/C++ declaration
BOOL __stdcall CohSetNotchFilterFrequency(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,INT32 Frequency);
Address retrieval
COH_G35DDC_SET_NOTCH_FILTER_FREQUENCY CohSetNotchFilterFrequency= (COH_G35DDC_SET_NOTCH_FILTER_FREQUENCY)GetProcAddress(hAPI,"CohSetNotchFilterFrequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
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.
Retrieves the current relative center frequency of the notch filter.
C/C++ declaration
BOOL __stdcall CohGetNotchFilterFrequency(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,INT32 *Frequency);
Address retrieval
G35DDC_GET_NOTCH_FILTER_FREQUENCY CohGetNotchFilterFrequency= (G35DDC_GET_NOTCH_FILTER_FREQUENCY)GetProcAddress(hAPI,"CohGetNotchFilterFrequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.NotchFilterIndex[in] Specifies the notch filter index. Possible values are: 0, 1.Frequency[out] Pointer to a variable that 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, call GetLastError.
Specifies the bandwidth of the notch filter of the specified device.
C/C++ declaration
BOOL __stdcall CohSetNotchFilterBandwidth(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,UINT32 Bandwidth);
Address retrieval
COH_G35DDC_SET_NOTCH_FILTER_BANDWIDTH CohSetNotchFilterBandwidth= (COH_G35DDC_SET_NOTCH_FILTER_BANDWIDTH)GetProcAddress(hAPI,"CohSetNotchFilterBandwidth");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetNotchFilterBandwidth function to retrieve the current bandwidth of the notch filter.
Retrieves the current bandwidth of the notch filter for the specified device.
C/C++ declaration
BOOL __stdcall CohGetNotchFilterBandwidth(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,UINT32 *Bandwidth);
Address retrieval
COH_G35DDC_GET_NOTCH_FILTER_BANDWIDTH CohGetNotchFilterBandwidth= (COH_G35DDC_GET_NOTCH_FILTER_BANDWIDTH)GetProcAddress(hAPI,"CohGetNotchFilterBandwidth");
Parameters
hDeviceSet[in] Handle to G35DDC 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.NotchFilterIndex[in] Specifies the notch filter index. Possible values are: 0, 1.Bandwidth[out] Pointer to a variable that 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, call GetLastError.
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
BOOL __stdcall CohSetNotchFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,UINT32 Length);
Address retrieval
G35DDC_SET_NOTCH_FILTER_LENGTH CohSetNotchFilterLength= (G35DDC_SET_NOTCH_FILTER_LENGTH)GetProcAddress(hAPI,"CohSetNotchFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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 64, greater than or equal to 64 and less than or equal to 32768. If it is not multiple of 64, the function rounds it up to the 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, call GetLastError.
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.
Retrieves the current notch filter length of the specified device.
C/C++ declaration
BOOL __stdcall CohGetNotchFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 NotchFilterIndex,UINT32 *Length);
Address retrieval
COH_G35DDC_GET_NOTCH_FILTER_LENGTH CohGetNotchFilterLength= (COH_G35DDC_GET_NOTCH_FILTER_LENGTH)GetProcAddress(hAPI,"CohGetNotchFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.NotchFilterIndex[in] Specifies the notch filter index. Possible values are: 0, 1.Length[out] Pointer to a variable that 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, call GetLastError.
Enables or disables the AGC for the specified device.
C/C++ declaration
BOOL __stdcall CohSetAGC(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_AGC CohSetAGC=(COH_G35DDC_SET_AGC)GetProcAddress(hAPI,"CohSetAGC");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
If the AGC is disabled, the signal is affected by fixed gain specified using the CohSetGain function.
Use the CohGetAGC function to determine the current state of the AGC.
Retrieves the current state of the AGC for the specified device.
C/C++ declaration
BOOL __stdcall CohGetAGC(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_AGC CohGetAGC=(COH_G35DDC_GET_AGC)GetProcAddress(hAPI,"CohGetAGC");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Enabled[out] Pointer to a variable that 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, call GetLastError.
Sets parameters of the AGC of specified device.
C/C++ declaration
BOOL __stdcall CohSetAGCParams(INT32 hDeviceSet,UINT32 DeviceIndex,double AttackTime,double DecayTime,double ReferenceLevel);
Address retrieval
COH_G35DDC_SET_AGC_PARAMS CohSetAGCParams=(COH_G35DDC_SET_AGC_PARAMS)GetProcAddress(hAPI,"CohSetAGCParams");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetAGCParams function to determine the current parameters of the AGC.
Retrieves the current parameters of the AGC for the specified device.
C/C++ declaration
BOOL __stdcall CohGetAGCParams(INT32 hDeviceSet,UINT32 DeviceIndex,double *AttackTime,double *DecayTime,double *ReferenceLevel);
Address retrieval
COH_G35DDC_GET_AGC_PARAMS CohGetAGCParams=(COH_G35DDC_GET_AGC_PARAMS)GetProcAddress(hAPI,"CohGetAGCParams");
Parameters
hDeviceSet[in] Handle to G35DDC 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.AttackTime[out] Pointer to a variable that 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 that 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 that 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, call GetLastError.
Sets maximum gain of the AGC for the specified device.
C/C++ declaration
BOOL __stdcall CohSetMaxAGCGain(INT32 hDeviceSet,UINT32 DeviceIndex,double MaxGain);
Address retrieval
COH_G35DDC_SET_MAX_AGC_GAIN CohSetMaxAGCGain=(COH_G35DDC_SET_MAX_AGC_GAIN)GetProcAddress(hAPI,"CohSetMaxAGCGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetMaxAGCGain function to determine the maximum gain of the AGC.
Retrieves the current maximum gain of the AGC of the specified device.
C/C++ declaration
BOOL __stdcall CohGetMaxAGCGain(INT32 hDeviceSet,UINT32 DeviceIndex,double *MaxGain);
Address retrieval
COH_G35DDC_GET_MAX_AGC_GAIN CohGetMaxAGCGain=(COH_G35DDC_GET_MAX_AGC_GAIN)GetProcAddress(hAPI,"CohGetMaxAGCGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.MaxGain[out] Pointer to a variable that 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, call GetLastError.
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
BOOL __stdcall CohSetGain(INT32 hDeviceSet,UINT32 DeviceIndex,double Gain);
Address retrieval
COH_G35DDC_SET_GAIN CohSetGain=(COH_G35DDC_SET_GAIN)GetProcAddress(hAPI,"CohSetGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetGain function to determine the current fixed gain.
Retrieves the current fixed gain of the specified device.
C/C++ declaration
BOOL __stdcall CohGetGain(INT32 hDeviceSet,UINT32 DeviceIndex,double *Gain);
Address retrieval
COH_G35DDC_GET_GAIN CohGetGain=(COH_G35DDC_GET_GAIN)GetProcAddress(hAPI,"CohGetGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Gain[out] Pointer to a variable that 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, call GetLastError.
Retrieves the current gain that is applied to the I/Q signal of the specified device.
C/C++ declaration
BOOL __stdcall CohGetCurrentGain(INT32 hDeviceSet,UINT32 DeviceIndex,double *CurrentGain);
Address retrieval
COH_G35DDC_GET_CURRENT_GAIN CohGetCurrentGain=(COH_G35DDC_GET_CURRENT_GAIN)GetProcAddress(hAPI,"CohGetCurrentGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.CurrentGain[out] Pointer to a variable that 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, call GetLastError.
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.
Sets bandwidth of the demodulator filter of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDemodulatorFilterBandwidth(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Bandwidth);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_FILTER_BANDWIDTH CohSetDemodulatorFilterBandwidth= (COH_G35DDC_SET_DEMODULATOR_FILTER_BANDWIDTH)GetProcAddress(hAPI,"CohSetDemodulatorFilterBandwidth");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
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.
Retrieves the current demodulator filter bandwidth of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorFilterBandwidth(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *Bandwidth);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_FILTER_BANDWIDTH CohGetDemodulatorFilterBandwidth= (COH_G35DDC_GET_DEMODULATOR_FILTER_BANDWIDTH)GetProcAddress(hAPI,"CohGetDemodulatorFilterBandwidth");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Bandwidth[out] Pointer to a variable that 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, call GetLastError.
Sets the demodulator filter shift of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDemodulatorFilterShift(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 Shift);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_FILTER_SHIFT CohSetDemodulatorFilterShift= (COH_G35DDC_SET_DEMODULATOR_FILTER_SHIFT)GetProcAddress(hAPI,"CohSetDemodulatorFilterShift");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
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 demodulator frequency, just shifts the filter from the demodulator's centre.
Use the CohGetDemodulatorFilterShift function to determine the current demodulator filter shift.
Retrieves the current shift of the demodulator filter for the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorFilterShift(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 *Shift);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_FILTER_SHIFT CohGetDemodulatorFilterShift= (COH_G35DDC_GET_DEMODULATOR_FILTER_SHIFT)GetProcAddress(hAPI,"CohGetDemodulatorFilterShift");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Shift[out] Pointer to a variable that 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, call GetLastError.
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
BOOL __stdcall CohSetDemodulatorFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Length);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_FILTER_LENGTH CohSetDemodulatorFilterLength= (COH_G35DDC_SET_DEMODULATOR_FILTER_LENGTH)GetProcAddress(hAPI,"CohSetDemodulatorFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Length[in] Specifies the length of the demodulator filter. The value has to be multiple of 64, greater than or equal to 64 and less than or equal to 32768. 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, call GetLastError.
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.
Retrieves the current length of the demodulator filter for the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *Length);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_FILTER_LENGTH CohGetDemodulatorFilterLength= (COH_G35DDC_GET_DEMODULATOR_FILTER_LENGTH)GetProcAddress(hAPI,"CohGetDemodulatorFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Length[out] Pointer to a variable that 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, call GetLastError.
Sets the demodulator mode of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDemodulatorMode(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Mode);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_MODE CohSetDemodulatorMode=(COH_G35DDC_SET_DEMODULATOR_MODE)GetProcAddress(hAPI,"CohSetDemodulatorMode");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Mode[in] Specifies the new demodulator mode. This value can be one of the following:
Value Meaning G3XDDC_MODE_CW Continuous wave G3XDDC_MODE_AM Amplitude modulation G3XDDC_MODE_FM Frequency modulation G3XDDC_MODE_LSB Lower sideband modulation G3XDDC_MODE_USB Upper sideband modulation G3XDDC_MODE_AMS Amplitude modulation G3XDDC_MODE_DSB Double sideband modulation G3XDDC_MODE_ISB Independent sideband modulation G3XDDC_MODE_DRM Digital Radio Mondiale
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, call GetLastError.
Remarks
DRM demodulation is only available if a valid DRM key is loaded using the CohSetDRMKey function. More information about obtaining a DRM key can be viewed at https://www.winradio.com/home/drm.htm.
Use the CohGetDemodulatorMode function to retrieve the current demodulator mode.
Retrieves the current demodulator mode of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorMode(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *Mode);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_MODE CohGetDemodulatorMode=(COH_G35DDC_GET_DEMODULATOR_MODE)GetProcAddress(hAPI,"CohGetDemodulatorMode");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Mode[out] Pointer to a variable that 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, call GetLastError.
Sets the relative center frequency of the demodulator for the specified device.
C/C++ declaration
BOOL __stdcall CohSetDemodulatorFrequency(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 Frequency);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_FREQUENCY CohSetDemodulatorFrequency= (COH_G35DDC_SET_DEMODULATOR_FREQUENCY)GetProcAddress(hAPI,"CohSetDemodulatorFrequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
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 = fDDC1 + frDDC2 + frDEM
Where faDEM is the absolute center frequency of the demodulator in Hz, fDDC1 is the 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 hDeviceSet; //Handle to G35DDC device set returned by the CohOpenDeviceSet function //1. method CohSetDDC1Frequency(hDeviceSet,11010000); CohSetDDC2Frequency(hDeviceSet,0,0); CohSetDemodulatorFrequency(hDeviceSet,0,0); //2. method CohSetDDC1Frequency(hDeviceSet,11000000); CohSetDDC2Frequency(hDeviceSet,0,10000); CohSetDemodulatorFrequency(hDeviceSet,0,0); //3. method CohSetDDC1Frequency(hDeviceSet,11020000); CohSetDDC2Frequency(hDeviceSet,0,-5000); CohSetDemodulatorFrequency(hDeviceSet,0,-5000);
Retrieves the current relative center frequency of the demodulator for the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorFrequency(INT32 hDeviceSet,UINT32 DeviceIndex,INT32 *Frequency);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_FREQUENCY CohGetDemodulatorFrequency= (COH_G35DDC_GET_DEMODULATOR_FREQUENCY)GetProcAddress(hAPI,"CohGetDemodulatorFrequency");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Frequency[out] Pointer to a variable that 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, call GetLastError.
Sets a parameter of demodulation of the specified device.
C/C++ declaration
BOOL __stdcall CohSetDemodulatorParam(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Code,CONST VOID *Buffer,UINT32 BufferSize);
Address retrieval
COH_G35DDC_SET_DEMODULATOR_PARAM CohSetDemodulatorParam= (COH_G35DDC_SET_DEMODULATOR_PARAM)GetProcAddress(hAPI,"CohSetDemodulatorParam");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Code[in] Specifies the code of the demodulator parameter to be set by this function. The code can be one of the following:
Value Meaning G3XDDC_DEMODULATOR_PARAM_AMS_SIDE_BAND Side band for synchronous AM demodulation.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Value of the variable pointed to by the Buffer parameter can be one of the following:
G3XDDC_SIDE_BAND_LOWER
AMS demodulator will use lower sidebandG3XDDC_SIDE_BAND_UPPER
AMS demodulator will use upper sidebandG3XDDC_SIDE_BAND_BOTH
AMS demodulator will use both side bands.G3XDDC_DEMODULATOR_PARAM_AMS_CAPTURE_RANGE Capture range of synchronous AM demodulator.
The Buffer parameter has to be pointer to a G3XDDC_AMS_CAPTURE_RANGE structure, and the BufferSize parameter has to be sizeof(G3XDDC_AMS_CAPTURE_RANGE).
G3XDDC_DEMODULATOR_PARAM_CW_FREQUENCY CW tone frequency
The Buffer parameter has to be pointer to a INT32 variable, and the BufferSize parameter has to be sizeof(INT32).
Value of the variable pointed to by the Buffer parameter is CW tone frequency in Hz.
G3XDDC_DEMODULATOR_PARAM_DSB_SIDE_BAND Side band for DSB demodulation.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Value of the variable pointed to by the Buffer parameter can be one of the following:
G3XDDC_SIDE_BAND_LOWER
DSB demodulator will use lower sidebandG3XDDC_SIDE_BAND_UPPER
DSB demodulator will use upper sidebandG3XDDC_SIDE_BAND_BOTH
DSB demodulator will use both side bands.G3XDDC_DEMODULATOR_PARAM_ISB_SIDE_BAND Side band for ISB demodulation.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Value of the variable pointed to by the Buffer parameter can be one of the following:
G3XDDC_SIDE_BAND_LOWER
ISB demodulator will use lower sidebandG3XDDC_SIDE_BAND_UPPER
ISB demodulator will use upper sidebandG3XDDC_SIDE_BAND_BOTH
ISB demodulator will use both side bands.G3XDDC_DEMODULATOR_PARAM_DRM_AUDIO_SERVICE Audio service of DRM demodulator/decoder to be listening to.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Value of the variable pointed to by the Buffer parameter is index of the audio service. Possible values are: 1, 2, 3, 4, where 1 is the first audio service, 2 is the second one, etc. Use the CohGetDemodulatorState function with G3XDDC_DEMODULATOR_STATE_DRM_STATUS to retrieve information about available audio services for currently received DRM station.
G3XDDC_DEMODULATOR_PARAM_DRM_MULTIMEDIA_SERVICE Multimedia service of DRM demodulator/decoder to be decoded.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Value of the variable pointed to by the Buffer parameter is index of the multimedia service. Possible values are: 1, 2, 3, 4, where 1 is the first multimedia service, 2 is the second one, etc. Use the CohGetDemodulatorState function with G3XDDC_DEMODULATOR_STATE_DRM_STATUS to retrieve information about available multimedia services for currently received DRM station.
It is required that DRM multimedia player has to be installed to display multimedia content. It is included in G35DDC software installer as optional.
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, call GetLastError.
Retrieves a parameter of demodulation of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorParam(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Code,VOID *Buffer,UINT32 BufferSize);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_PARAM CohGetDemodulatorParam= (COH_G35DDC_GET_DEMODULATOR_PARAM)GetProcAddress(hAPI,"CohGetDemodulatorParam");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Code[in] Specifies the code of the demodulator parameter to be retrieved. For detailed information about available codes see SetDemodulatorParam.Buffer[out] Pointer to a buffer that 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, call GetLastError.
Retrieves information about the current demodulator state of the specified device.
C/C++ declaration
BOOL __stdcall CohGetDemodulatorState(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Code,VOID *Buffer,UINT32 BufferSize);
Address retrieval
COH_G35DDC_GET_DEMODULATOR_STATE CohGetDemodulatorState= (COH_G35DDC_GET_DEMODULATOR_STATE)GetProcAddress(hAPI,"CohGetDemodulatorState");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Code[in] Specifies the code of the demodulator state to be retrieved. The code can be one of the following:
Value Meaning G3XDDC_DEMODULATOR_STATE_AMS_LOCK Lock state of synchronous AM demodulation.
The Buffer parameter has to be pointer to a BOOL variable, and the BufferSize parameter has to be sizeof(BOOL).
Received value is non-zero if synchronous AM demodulator is locked to signal, and zero if it is not locked.
G3XDDC_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).
G3XDDC_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).
G3XDDC_DEMODULATOR_STATE_DSB_LOCK Lock state of DSB demodulation.
The Buffer parameter has to be pointer to a BOOL variable, and the BufferSize parameter has to be sizeof(BOOL).
Received value is non-zero if DSB demodulator is locked to signal, and zero if it is not locked.
G3XDDC_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).
G3XDDC_DEMODULATOR_STATE_TUNE_ERROR Estimated tune error in Hz.
The Buffer parameter has to be pointer to an INT32 variable, and the BufferSize parameter has to be sizeof(INT32).
Received value is difference between demodulator frequency and frequency of received signal. Subtract the returned tune error from demodulator frequency to get frequency of the received signal. Tune error is relative to center of the demodulator and it can be negative.
G3XDDC_DEMODULATOR_STATE_DRM_STATUS Status of DRM demodulator/decoder.
The Buffer parameter has to be pointer to a G3XDDC_DRM_STATUS structure, and the BufferSize parameter has to be sizeof(G3XDDC_DRM_STATUS).
G3XDDC_DEMODULATOR_STATE_FM_DEVIATION Estimated frequency deviation in Hz.
The Buffer parameter has to be pointer to an UINT32 variable, and the BufferSize parameter has to be sizeof(UINT32).
Buffer[out] Pointer to a buffer that 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, call GetLastError.
Starts audio streaming for the specified device.
C/C++ declaration
BOOL __stdcall CohStartAudio(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 SamplesPerBuffer);
Address retrieval
COH_G35DDC_START_AUDIO CohStartAudio=(COH_G35DDC_START_AUDIO)GetProcAddress(hAPI,"CohStartAudio");
Parameters
hDeviceSet[in] Handle to G35DDC 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.SamplesPerBuffer[in] Specifies the number of samples in each buffer passed to the AudioStreamCallback callback function. The value has to be multiple of 64 greater than zero. If it is zero, the StartAudio 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, call GetLastError.
Remarks
Before CohStartAudio is used, the G35DDC 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 restarts it except the streaming was previously started with the same SamplesPerBuffer parameter. In this case CohStartAudio does nothing.
Use the CohStopAudio function to stop audio streaming.
Decreasing the value of the SamplesPerBuffer parameter decreases latency and may increase CPU usage. Increasing value of the SamplesPerBuffer parameter increases latency and may decrease CPU usage.
Stops audio streaming for the specified device.
C/C++ declaration
BOOL __stdcall CohStopAudio(INT32 hDeviceSet,UINT32 DeviceIndex);
Address retrieval
COH_G35DDC_STOP_AUDIO CohStopAudio=(COH_G35DDC_STOP_AUDIO)GetProcAddress(hAPI,"CohStopAudio");
Parameters
hDeviceSet[in] Handle to G35DDC 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.
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, call GetLastError.
Remarks
If audio streaming is not active, CohStopAudio does nothing.
The AudioStreamCallback callback function are not called after CohStopAudio returns.
Sets fixed audio gain of the specified device.
C/C++ declaration
BOOL __stdcall CohSetAudioGain(INT32 hDeviceSet,UINT32 DeviceIndex,double Gain);
Address retrieval
COH_G35DDC_SET_AUDIO_GAIN CohSetAudioGain=(COH_G35DDC_SET_AUDIO_GAIN)GetProcAddress(hAPI,"CohSetAudioGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetAudioGain function to retrieve the current audio gain.
Retrieves the current fixed audio gain of the specified device.
C/C++ declaration
BOOL __stdcall CohGetAudioGain(INT32 hDeviceSet,UINT32 DeviceIndex,double *Gain);
Address retrieval
COH_G35DDC_GET_AUDIO_GAIN CohGetAudioGain=(COH_G35DDC_GET_AUDIO_GAIN)GetProcAddress(hAPI,"CohGetAudioGain");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Gain[out] Pointer to a variable that 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, call GetLastError.
Enables or disables the audio filter of the specified device.
C/C++ declaration
BOOL __stdcall CohSetAudioFilter(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_AUDIO_FILTER CohSetAudioFilter=(COH_G35DDC_SET_AUDIO_FILTER)GetProcAddress(hAPI,"CohSetAudioFilter");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
Use the CohGetAudioFiler function to retrieve the current state of the audio filter.
Retrieves the current state of the audio filter for the specific device.
C/C++ declaration
BOOL __stdcall CohGetAudioFilter(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_AUDIO_FILTER CohGetAudioFilter=(COH_G35DDC_GET_AUDIO_FILTER)GetProcAddress(hAPI,"CohGetAudioFilter");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Enabled[out] Pointer to a variable that 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, call GetLastError.
Sets the parameters of the audio filter for the specified device.
C/C++ declaration
BOOL __stdcall CohSetAudioFilterParams(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 CutOffLow,UINT32 CutOffHigh,double Deemphasis);
Address retrieval
COH_G35DDC_SET_AUDIO_FILTER_PARAMS CohSetAudioFilterParams= (COH_G35DDC_SET_AUDIO_FILTER_PARAMS)GetProcAddress(hAPI,"CohSetAudioFilterParams");
Parameters
hDeviceSet[in] Handle to G35DDC 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.CutOffLow[in] Specifies the cut-off low frequency of the filter in Hz. This is the start frequency of filter's passband, it can be from the range of 0 to 23999 Hz. The value has to be less then 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 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 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, call GetLastError.
Remarks
Use the CohGetAudioFilerParams function to retrieve the current parameters of the audio filter.
Retrieves the current parameters of the audio filter for the specified device.
C/C++ declaration
BOOL __stdcall CohGetAudioFilterParams(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *CutOffLow,UINT32 *CutOffHigh,double *Deemphasis);
Address retrieval
COH_G35DDC_GET_AUDIO_FILTER_PARAMS CohGetAudioFilterParams= (COH_G35DDC_GET_AUDIO_FILTER_PARAMS)GetProcAddress(hAPI,"CohGetAudioFilterParams");
Parameters
hDeviceSet[in] Handle to G35DDC 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.CutOffLow[out] Pointer to a variable that 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 that 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 that 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, call GetLastError.
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
BOOL __stdcall CohSetAudioFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 Length);
Address retrieval
COH_G35DDC_SET_AUDIO_FILTER_LENGTH CohSetAudioFilterLength= (COH_G35DDC_SET_AUDIO_FILTER_LENGTH)GetProcAddress(hAPI,"CohSetAudioFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Length[in] Specifies the length of the audio filter. The value has to be multiple of 64, greater than or equal to 64 and less than or equal to 32768. 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, call GetLastError.
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.
Retrieves the current audio filter length of the specified device.
C/C++ declaration
BOOL __stdcall CohGetAudioFilterLength(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *Length);
Address retrieval
COH_G35DDC_GET_AUDIO_FILTER_LENGTH CohGetAudioFilterLength= (COH_G35DDC_GET_AUDIO_FILTER_LENGTH)GetProcAddress(hAPI,"CohGetAudioFilterLength");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Length[out] Pointer to a variable that 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, call GetLastError.
Sets the audio volume of the specified device.
C/C++ declaration
BOOL __stdcall CohSetVolume(INT32 hDeviceSet,UINT32 DeviceIndex,BYTE Volume);
Address retrieval
COH_G35DDC_SET_VOLUME CohSetVolume=(COH_G35DDC_SET_VOLUME)GetProcAddress(hAPI,"CohSetVolume");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
Remarks
The G35DDC receiver has an audio output connector, the CohSetVolume function affects the audio signal level at this output (see also CohSetDAC).
Use the CohGetVolume function to retrieve the current volume.
Retrieve the current volume of the specified device.
C/C++ declaration
BOOL __stdcall CohGetVolume(INT32 hDeviceSet,UINT32 DeviceIndex,BYTE *Volume);
Address retrieval
COH_G35DDC_GET_VOLUME CohGetVolume=(COH_G35DDC_GET_VOLUME)GetProcAddress(hAPI,"CohGetVolume");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Volume[out] Pointer to a variable that 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, call GetLastError.
Mutes or unmutes audio of the specified device.
C/C++ declaration
BOOL __stdcall CohSetMute(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL Mute);
Address retrieval
COH_G35DDC_SET_MUTE CohSetMute=(COH_G35DDC_SET_MUTE)GetProcAddress(hAPI,"CohSetMute");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Mute[in] Specifies whether to mute or unmute audio. If this parameter is non-zero, the audio is muted. If the parameter is zero, the audio is unmuted.
Return value
If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The G35DDC receiver has an audio output connector, the CohSetMute function affects the audio signal at this output (see also CohSetDAC).
Use the CohGetMute function to retrieve the current mute state.
Retrieves the current mute state of the specified device.
C/C++ declaration
BOOL __stdcall CohGetMute(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL *Mute);
Address retrieval
COH_G35DDC_GET_MUTE CohGetMute=(COH_G35DDC_GET_MUTE)GetProcAddress(hAPI,"CohGetMute");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Mute[out] Pointer to a variable that 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, call GetLastError.
Allows routing of audio output to a DAC (Digital-to-analog converter). The DAC output is connected to the audio output connector of the receiver.
C/C++ declaration
BOOL __stdcall CohSetDAC(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 DAC);
Address retrieval
COH_G35DDC_SET_DAC CohSetDAC=(COH_G35DDC_SET_DAC)GetProcAddress(hAPI,"CohSetDAC");
Parameters
hDeviceSet[in] Handle to G35DDC 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.DAC[in] Specifies the routed audio to the DAC.
Bit Meaning 0 If it is set, audio output is routed to left channel of the audio output connector. 1 If it is set, audio output is routed to right channel of the audio output connector. 2 - 31 Reserved. Must be 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, call GetLastError.
Determines if audio output is routed to the audio output connector (DAC).
C/C++ declaration
BOOL __stdcall CohGetDAC(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *DAC);
Address retrieval
COH_G35DDC_GET_DAC CohGetDAC=(COH_G35DDC_GET_DAC)GetProcAddress(hAPI,"CohGetDAC");
Parameters
hDeviceSet[in] Handle to G35DDC 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.DAC[out] Pointer to a variable that receives a bitwise array which specifies how the audio is routed to the audio output connector (DAC). For more information, see CohSetDAC. 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, call GetLastError.
Determines compensation data for the frequency spectrum computed from DDC1, DDC2 and IF signal. It is used to convert relative amplitudes in dB to absolutes ones in dBm.
C/C++ declaration
BOOL __stdcall CohGetSpectrumCompensation(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 CenterFrequency,UINT32 Width,FLOAT *Buffer,UINT32 Count);
Address retrieval
COH_G35DDC_GET_SPECTRUM_COMPENSATION CohGetSpectrumCompensation= (COH_G35DDC_GET_SPECTRUM_COMPENSATION)GetProcAddress(hAPI,"CohGetSpectrumCompensation");
Parameters
hDeviceSet[in] Handle to G35DDC 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.CenterFrequency[in] Specifies the absolute center frequency of the requested compensation data in Hz.Width[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, call GetLastError.
Remarks
The following example shows how to use the CohGetSpectrumCompensation function in DDC2StreamCallback callback function:
//Let the following is prototype of a function which computes FFT from I/Q signal stored in //the buffer pointed to be the Input parameter. Result is stored in complex form in the buffer //pointed to by the Output parameter. Size of the FFT is given be the Size parameter. //The example uses 2048 bins FFT. void FFT(float *Output,const float *Input,int Size); INT32 hDeviceSet; //handle to G35DDC device set UINT32 AbsDDC2Frequency; //Absolute frequency of the DDC2 INT32 RelDDC2Frequency; //Relative frequency of the DDC2 UINT32 DDC1Frequency; //DDC1 frequency G3XDDC_DDC_INFO DDC2Info; //Information about current DDC type of the DDC2 FLOAT FFTBuffer[2*2048]; //Buffer for FFT result FLOAT Compensation[2048]; //Buffer for compensation data UINT32 FirstBin,LastBin; //the first and last bins in the FFT of useful DDC2 band G35DDC_CALLBACKS Callbacks; //Structure which contains 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=(INT32)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 Width parameter is equal to sample rate, because we need compensation data //for whole DDC2 band. //Compensation data have to be updated after change of absolute DDC2 frequency 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 __stdcall MyDDC2StreamCallback(UINT32 DeviceIndex,CONST FLOAT *Buffer,UINT32 NumberOfSamples,DWORD_PTR UserData) { UINT32 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. }
Registers user-defined functions as callback functions called by the API.
C/C++ declaration
BOOL __stdcall CohSetCallbacks(INT32 hDeviceSet,CONST COH_G35DDC_CALLBACKS *Callbacks,DWORD_PTR UserData);
Address retrieval
COH_G35DDC_SET_CALLBACKS CohSetCallbacks=(COH_G35DDC_SET_CALLBACKS)GetProcAddress(hAPI,"CohSetCallbacks");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Callbacks[in] Pointer to a COH_G35DDC_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, call GetLastError.
Remarks
If the application does not require that the API calls some callback function, set the related member of the COH_G35DDC_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 function.
Sets a directory with a DRM key file to unlock the DRM demodulator/decoder.
C/C++ declaration
BOOL __stdcall CohSetDRMKey(INT32 hDeviceSet,CONST CHAR *DRMKeyFileDirectory);
Address retrieval
COH_G35DDC_SET_DRM_KEY CohSetDRMKey=(COH_G35DDC_SET_DRM_KEY)GetProcAddress(hAPI,"CohSetDRMKey");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DRMKeyFileDirectory[in] Pointer to a null-terminated string that specifies the directory which contains valid a DRM key file.
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, call GetLastError.
Remarks
If the specified directory contains a valid DRM key file, the key is loaded and the DRM demodulator/decoder is unlocked and available for use, otherwise the function fails.
If the DRM demodulator/decoder is already unlocked, this function does nothing.
Use the CohIsDRMUnlocked function to determine whether the DRM demodulator/decoder is unlocked or not.
More information about obtaining a DRM key can be viewed at https://www.winradio.com/home/drm.htm.
Determines whether the DRM demodulator/decoder is unlocked or not.
C/C++ declaration
BOOL __stdcall CohIsDRMUnlocked(INT32 hDeviceSet);
Address retrieval
COH_G35DDC_IS_DRM_UNLOCKED CohIsDRMUnlocked=(COH_G35DDC_IS_DRM_UNLOCKED)GetProcAddress(hAPI,"CohIsDRMUnlocked");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.
Return value
If this function succeeds and the DRM demodulator/decoder is unlocked, the return value is non-zero.
If the function fails or the DRM demodulator/decoder is locked, the return value is zero. To get extended error information, call GetLastError.
Retrieves the current internal temperature of the G35DDC device in the device set.
C/C++ declaration
BOOL __stdcall CohGetTemperature(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *Temperature);
Address retrieval
COH_G35DDC_GET_TEMPERATURE CohGetTemperature=(COH_G35DDC_GET_TEMPERATURE)GetProcAddress(hAPI,"CohGetTemperature");
Parameters
hDeviceSet[in] Handle to G35DDC 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.Temperature[out] Pointer to a variable that receives the current internal temperature in degrees of Celsius. 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, call GetLastError.
Remarks
The G35DDC devices have to be turned on using the CohSetPower function before CohGetTemperature is used. Otherwise CohGetTemperature fails.
Retrieves the current error state of the G35DDC device.
C/C++ declaration
BOOL __stdcall CohGetDeviceState(INT32 hDeviceSet,UINT32 DeviceIndex,UINT32 *State);
Address retrieval
COH_G35DDC_GET_DEVICE_STATE CohGetDeviceState=(COH_G35DDC_GET_DEVICE_STATE)GetProcAddress(hAPI,"CohGetDeviceState");
Parameters
hDeviceSet[in] Handle to G35DDC 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.State[out] Pointer to a variable that receives the current error state of the device. This parameter cannot be NULL. The value can be zero or G3XDDC_DEVICE_STATE_ERROR_HIGH_TEMP if critical temperature is detected and the device is turned off. In this case the application should call CohSetPower to turn off explicitly.
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, call GetLastError.
Retrieves the state of DDC1 and ADC counters.
C/C++ declaration
BOOL __stdcall CohGetTimestampCounters(INT32 hDeviceSet,double *DDC1SampleCounter,UINT64 *ADCPeriodCounter);
Address retrieval
COH_G35DDC_GET_TIMESTAMP_COUNTERS CohGetTimestampCounters=(COH_G35DDC_GET_TIMESTAMP_COUNTERS)GetProcAddress(hAPI,"CohGetTimestampCounters");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.DDC1SampleCounter[out] Pointer to a variable that receives the current value of DDC1 sample counter. The value specifies how many I/Q sample sets were produced by the DDC1 since its start, to the latest pulse received at the 1PPS input of the coherent clock generator board.ADCPeriodCounter[out] Pointer to a variable that receives the current value of ADC counter. The value represents the number of periods of ADC clock since DDC1 start, to the latest pulse received at the 1PPS input of the coherent clock generator board.
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, call GetLastError.
Remarks
The counters are active only when the DDC1 is running (see the CohStartDDC1 function). If the DDC1 is not running, the CohGetTimestampCounters function fails.
The DDC1 sample counter can be used to time stamp the DDC1 I/Q sample sets received in the DDC1StreamCallback callback function. The value of the DDC1 sample counter is equal to the number of I/Q sample sets received in the DDC1StreamCallback callback function, since start of the DDC1 to the latest pulse at the 1PPS input of the coherent clock generator board.
The counters are common for all the devices in the device set.
Enables or disables the test signal at the receiver's input, which allows testing of the entire signal and processing path.
C/C++ declaration
BOOL __stdcall CohSetBuiltInTest(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL Enabled);
Address retrieval
COH_G35DDC_SET_BUILT_IN_TEST CohSetBuiltInTest=(COH_G35DDC_SET_BUILT_IN_TEST)GetProcAddress(hAPI,"CohSetBuiltInTest");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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:
Frequency Level 25 MHz ± 2 kHz -40 dBm ± 5 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, call GetLastError.
Remarks
Built-in test is optional. If the receiver does not support built-in test, SetBuiltInTest fails. The following example shows how to determine that receiver supports built-in test:
G35DDC_DEVICE_INFO DeviceInfo; INT32 hDeviceSet; //handle to open G35DDC device set UINT32 DeviceIndex; //index of the receiver in the device set CohGetDeviceInfo(hDeviceSet,DeviceIndex,&DeviceInfo); if(DeviceInfo.Flags & G35DDC_FLAGS_BIT) { //the receiver supports built-in test } else { //the receiver does not support built-in test }
Retrieves information about whether the test signal is enabled or not.
C/C++ declaration
BOOL __stdcall CohGetBuiltInTest(INT32 hDeviceSet,UINT32 DeviceIndex,BOOL *Enabled);
Address retrieval
COH_G35DDC_GET_BUILT_IN_TEST CohGetBuiltInTest=(COH_G35DDC_GET_BUILT_IN_TEST)GetProcAddress(hAPI,"CohGetBuiltInTest");
Parameters
hDeviceSet[in] Handle to G35DDC 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.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, call GetLastError.
This function is used to specify the type of configuration used for installation of the given coherent set.
C/C++ declaration
BOOL __stdcall CohSetConfiguration(INT32 hDeviceSet,UINT32 Configuration);
Address retrieval
COH_G35DDC_SET_CONFIGURATION CohSetConfiguration=(COH_G35DDC_SET_CONFIGURATION)GetProcAddress(hAPI,"CohSetConfiguration");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Configuration[in] Specifies the type of configuration. The value can be one of the following:
Value Meaning G35DDC_COH_CONFIGURATION_NORMAL Standard installation of G35DDC receivers for multichannel coherent operation. The receivers are installed inside the same computer, all connections between receivers and other supportive hardware are realized internally, within the same computer.
The API controls all 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.
G35DDC_COH_CONFIGURATION_EXTENDED
Non-standard, Extended Topology Configuration (ETC) for multichannel coherent operation of the G35DDC receivers, which allows the receivers to be installed in multiple computers. Typically, each G35DDC 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 receivers and other supportive hardware are realized externally, outside of the computers.
The device set which is referenced by the hDeviceSet has to consists 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 G35DDC_COH_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 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, call GetLastError.
Remarks
The G35DDC 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.
Retrieves the current setting of the configuration.
C/C++ declaration
BOOL __stdcall CohGetConfiguration(INT32 hDeviceSet,UINT32 *Configuration);
Address retrieval
COH_G35DDC_GET_CONFIGURATION CohGetConfiguration=(COH_G35DDC_GET_CONFIGURATION)GetProcAddress(hAPI,"CohGetConfiguration");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Configuration[out] Pointer to a variable that 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, call GetLastError.
Used to specify parameters of the multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration. In ETC, the G35DDC 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
BOOL __stdcall CohSetExtendedConfigurationParams(INT32 hDeviceSet,UINT32 Index,UINT32 DeviceCount,INT32 Delay);
Address retrieval
COH_G35DDC_SET_EXTENDED_CONFIGURATION_PARAMS CohSetExtendedConfigurationParams= (COH_G35DDC_SET_EXTENDED_CONFIGURATION_PARAMS)GetProcAddress(hAPI,"CohSetExtendedConfigurationParams");
Parameters
hDeviceSet[in] Handle to G35DDC 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 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.Delay[in] Specifies the synchronization cable delay in sampling clock periods. This information can be found printed on the label of synchronization coaxial cables (SYNC CABLE) used in the multichannel coherent system. The same value has to be specified for all of the receivers in the multichannel coherent system. 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, call GetLastError.
Remarks
The G35DDC 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.
Retrieves the current parameters of the multichannel coherent system in Extended Topology Configuration (ETC), see CohSetConfiguration.
C/C++ declaration
BOOL __stdcall CohGetExtendedConfigurationParams(INT32 hDeviceSet,UINT32 *Index,UINT32 *DeviceCount,INT32 *Delay);
Address retrieval
COH_G35DDC_GET_EXTENDED_CONFIGURATION_PARAMS CohGetExtendedConfigurationParams= (COH_G35DDC_GET_EXTENDED_CONFIGURATION_PARAMS)GetProcAddress(hAPI,"CohGetExtendedConfigurationParams");
Parameters
hDeviceSet[in] Handle to G35DDC device set returned by the CohOpenDeviceSet function.Index[out] Pointer to a variable that 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 that receives total number of the receivers in the multichannel coherent system. This parameter can be NULL if the application does not require this information.Delay[out] Pointer to a variable that receives the synchronization cable delay in sampling clock periods. 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, call GetLastError.
Generates the synchronization signal to synchronize the completion of 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
BOOL __stdcall CohTrigger(INT32 hDeviceSet);
Address retrieval
COH_G35DDC_TRIGGER CohTrigger=(COH_G35DDC_TRIGGER)GetProcAddress(hAPI,"CohTrigger");
Parameters
hDeviceSet[in] Handle to G35DDC 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, call GetLastError.
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 G35DDC 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 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).
Contains information about G35DDC device.
C/C++ declaration
#pragma pack(push,1) typedef struct { CHAR DevicePath[MAX_PATH]; BYTE InterfaceType; CHAR SerialNumber[9]; WORD HWVersion; WORD FWVersion; BYTE EEPROMVersion; UINT32 Flags; UINT32 ChannelCount; UINT32 DDCTypeCount; } G35DDC_DEVICE_INFO; #pragma pack(pop)
Members
DevicePathDevice system path in a null-terminated string. It is used to open the device using object interface.InterfaceTypeDevice interface type. The value can be one of the following:
G3XDDC_INTERFACE_TYPE_PCIE
The device is connected to the computer via PCI express.G3XDDC_INTERFACE_TYPE_USB
The device is connected to the computer via USB.SerialNumberSerial number in null-terminated string.HWVersionVersion of the hardware.FWVersionVersion of the firmware.EEPROMVersionEEPROM structure version.FlagsHardware configuration flags can be a combination of the following values:
Value Meaning G35DDC_FLAGS_EXTERNAL_REFERENCE The device supports external reference. G35DDC_FLAGS_AUDIO_OUTPUT The device has an audio output connector. G35DDC_FLAGS_COHERENT The device supports coherent mode. G35DDC_FLAGS_BIT The device supports built-in test. ChannelCountNumber of channels. This is always 3. In coherent mode each device has single processing channel.DDCTypeCountNumber of DDC types supported by the DDC1.
Contains information about G35DDC device set.
C/C++ declaration
#pragma pack(push,1) typedef struct { UINT32 DeviceCount; G35DDC_DEVICE_INFO *DeviceInfo; } COH_G35DDC_DEVICE_SET; #pragma pack(pop)
Members
DeviceCountNumber of devices in the device set / number of items in the array pointed to by the DeviceInfo member.DeviceInfoPointer to array of device info structures of all the devices in the device set.
Contains information about G35DDC device set.
C/C++ declaration
#pragma pack(push,1) typedef struct { UINT32 DeviceSetCount; COH_G35DDC_DEVICE_SET *DeviceSet; } COH_G35DDC_DEVICE_SET_LIST; #pragma pack(pop)
Members
DeviceSetCountNumber of devices sets / number of items in the array pointed to by the DeviceSet member.DeviceSetPointer to array of device set structures.
Contains information about the DDC type.
C/C++ declaration
#pragma pack(push,1) typedef struct { UINT32 SampleRate; UINT32 Bandwidth; UINT32 BitsPerSample; } G3XDDC_DDC_INFO; #pragma pack(pop)
Members
SampleRateSample rate of I/Q signal in Hz.BandwidthUseful bandwidth in Hz.BitsPerSampleNumber of bits per sample. This can be 16 or 32. It is used to determine the bits per sample for DDC1.
Contains information about the AMS capture range.
C/C++ declaration
#pragma pack(push,1) typedef struct { UINT32 Tune; UINT32 Lock; } G3XDDC_AMS_CAPTURE_RANGE; #pragma pack(pop)
Members
TuneInitial capture range in Hz.LockCapture range (in Hz) used when the AMS demodulator is locked.
Contains pointers to user-defined functions to be registered as callback functions.
Each callback function is called in context of 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 G35DDC API function from the inside callback functions, otherwise it can cause deadlock or the application can enter an unpredictable state.
C/C++ declaration
#pragma pack(push,1) typedef struct { COH_G35DDC_DDC1_STREAM_CALLBACK DDC1StreamCallback; COH_G35DDC_IF_CALLBACK IFCallback; COH_G35DDC_DDC2_STREAM_CALLBACK DDC2StreamCallback; COH_G35DDC_DDC2_PREPROCESSED_STREAM_CALLBACK DDC2PreprocessedStreamCallback; COH_G35DDC_AUDIO_STREAM_CALLBACK AudioStreamCallback; } COH_G35DDC_CALLBACKS; #pragma pack(pop)
Members
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 of 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 __stdcall DDC1StreamCallback(UINT32 DeviceCount,CONST VOID **Buffers,UINT32 NumberOfSamples,UINT32 BitsPerSample,DWORD_PTR UserData);Parameters
DeviceCountSpecifies 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).BuffersPointer to the array of pointers to the buffers which contain I/Q sample sets from DDC1. Sample rate and bits per sample is 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 G35DDC devices.NumberOfSamplesSpecifies the number of I/Q sample sets in each buffer in the Buffers array. This value is equal to value of the SamplesPerBuffer parameter of the CohStartDDC1 function.BitsPerSampleSpecifies the number of bits per sample. It is given by 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.UserDataUser-defined data. It is value passed to the CohSetCallbacks function as the UserData parameter.Pointer to a user-defined function to be registered as IF callback. It is called by the API to pass IF snapshots from the specified device of the device set to the application. Sending of IF snapshots is started using the CohStartIF function.
C/C++ declaration
VOID __stdcall IFCallback(UINT32 DeviceIndex,CONST SHORT *Buffer,UINT32 NumberOfSamples,WORD MaxADCAmplitude,UINT32 ADCSamplingRate,DWORD_PTR UserData);Parameters
DeviceIndexSpecifies index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.BufferPointer to the buffer which contains samples directly received from the ADC. Sample rate is 100 MHz, the sample is 16bit signed little endian.NumberOfSamplesSpecifies the number of samples in the buffer pointed to by the Buffer parameter. This is usually 65536.MaxADCAmplitudeSpecifies the maximum amplitude. Measurement of the maximum is started at the end of the previous snapshot to the current one. The possible value is 0 to 32767.ADCSamplingRateSpecifies the sample rate of the ADC in Hz.UserDataUser-defined data. It is value passed to the CohSetCallbacks function as the UserData parameter.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 __stdcall DDC2StreamCallback(UINT32 DeviceIndex,CONST FLOAT *Buffer,UINT32 NumberOfSamples,DWORD_PTR UserData);Parameters
DeviceIndexSpecifies index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.BufferPointer to the buffer which contains I/Q sample sets from DDC2. Sample rate is given by the DDC type of the DDC2. Use the CohGetDDC2 function to determine the current DDC type of the DDC2. Sample is 32bit IEEE float from range -1.0 to 1.0. One I/Q sample set consists of two samples.NumberOfSamplesSpecifies the number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SamplesPerBuffer parameter of the CohStartDDC2 function.UserDataUser-defined data. It is value passed to the CohSetCallbacks function as the UserData parameter.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 __stdcall DDC2PreprocessedStreamCallback(UINT32 DeviceIndex,CONST FLOAT *Buffer,UINT32 NumberOfSamples, FLOAT SlevelPeak,FLOAT SlevelRMS,DWORD_PTR UserData);Parameters
DeviceIndexSpecifies index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.BufferPointer to the buffer which contains preprocessed I/Q sample sets from DDC2. Sample rate is given by the DDC type of the DDC2. Use the CohGetDDC2 function to determine the current DDC type of the DDC2. Sample is 32bit IEEE float from range -1.0 to 1.0. One I/Q sample set consists of two samples.NumberOfSamplesSpecifies number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SamplesPerBuffer parameter of the CohStartDDC2 function.SlevelPeakSpecifies the peak signal level in Volts evaluated from samples stored in the buffer pointed to by the Buffer parameter.SlevelRMSSpecifies 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.UserDataUser-defined data. It is value passed to the CohSetCallbacks function as the UserData parameter.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 Type parameter).
C/C++ declaration
VOID __stdcall AudioStreamCallback(UINT32 DeviceIndex,UINT32 Type,CONST FLOAT *Buffer,UINT32 NumberOfSamples,DWORD_PTR UserData);Parameters
DeviceIndexSpecifies index of the device in the device set. It can vary from zero to 'one less than number of devices' in the device set.TypeSpecifies the type (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:
Value Meaning 0 The buffer contains audio samples affected by audio gain (see CohSetAudioGain). 1 The buffer contains audio samples affected by audio gain and audio filter (see CohSetAudioGain and CohSetAudioFilter). 2 The buffer contains audio samples affected by audio gain, audio filter and volume (see CohSetAudioGain, CohSetAudioFilter, CohSetVolume and CohSetMute). BufferPointer to the buffer which contains samples of the audio signal. The signal is mono, sample rate is 48000 Hz, sample is 32bit IEEE float from range -1.0 to 1.0.NumberOfSamplesSpecifies the number of samples stored in the buffer pointed to by the Buffer parameter. This value is equal to the value of the SamplesPerBuffer parameter of the CohStartAudio function.UserDataUser-defined data. It is value passed to the CohSetCallbacks function as the UserData parameter.
Contains information about the DRM demodulator/decoder status.
C/C++ declaration
#pragma pack(push,1) typedef struct { BOOL Valid; struct { BOOL SyncFound; BOOL FACDecoded; BOOL SDCDecoded; BOOL AudioDecoded; SHORT NumberOfAudioFrames; SHORT NumberOfAudioErrors; } DecodingState; INT32 Mode; double RFBandwidth; BYTE Interleaver; SHORT SDCQam; SHORT MSCQam; BYTE MSCQamType; double CoderateH; double CoderateA; double CoderateB; double EstimatedSNR; WCHAR TextMessage[128 + 1 + 16]; struct { BYTE Content; WCHAR DynamicLabel[256]; WCHAR Country[256]; WCHAR Language[256]; WCHAR ProgramType[256]; double AudioBitrate; double TextMsgBitrate; double MultimediaBitrate; double DataBitrate; } ServiceInfo[4]; struct { BOOL Valid; BYTE AudioCoding; BOOL SBR; INT32 AudioMode; } AudioDecoderInfo[4]; } G3XDDC_DRM_STATUS; #pragma pack(pop)
Members
ValidThe value is non-zero if content of the structure is valid. It is zero if the content of the structure is not valid.DecodingStateStructure that contains status of the decoder modules.
Members
SyncFoundStatus of the sync detection. It is non-zero if sync detected.FACDecodedStatus of the FAC decoder. It is non-zero if FAC decoded.SDCDecodedStatus of the SDC decoder. It is non-zero if SDC decoded.AudioDecodedStatus of the audio decoder. It is non-zero if audio decoded.NumberOfAudioFramesNumber of audio frames in the transmission frame. It is -1 if this information is not available.NumberOfAudioErrorsNumber of audio frames that were invalid.ModeThe used DRM robustness mode can be one of the following:
Value Meaning G3XDDC_DRM_STATE_MODE_NOT_DETERMINED_YET Robustness mode is not determined yet. G3XDDC_DRM_STATE_MODE_A Broadcast is using DRM robustness mode A. G3XDDC_DRM_STATE_MODE_B DRM robustness mode B. G3XDDC_DRM_STATE_MODE_C DRM robustness mode C. G3XDDC_DRM_STATE_MODE_D DRM robustness mode D. RFBandwidthOccupied RF bandwidth in kHz. It is zero if it is invalid or this information is not available (yet).InterleaverThe Interleaver length can be one of the following:
Value Meaning G3XDDC_DRM_STATE_INTERLEAVER_LONG Long interleaver used (2 sec). G3XDDC_DRM_STATE_INTERLEAVER_SHORT Short interleaver used (400 msec). SDCQamCoding of the SDC (QAM). It is zero if this information is not available (yet).MSCQamCoding of the MSC (QAM). It is zero if this information is not available (yet).MSCQamTypeThe used QAM coding for the MSC can be one of the following:
Value Meaning G3XDDC_DRM_STATE_QAM_TYPE_STD Standard G3XDDC_DRM_STATE_QAM_TYPE_HIER_SYM Hierarchical symmetrical G3XDDC_DRM_STATE_QAM_TYPE_HIER_MIX Hierarchical mixed CoderateHUsed code-rate for hierarchical coding, values less than or equal to zero indicate not available or not used.CoderateAUsed code-rate for protection level A, values less than or equal to zero indicate not available or not used.CoderateBUsed code-rate for protection level B, values less than or equal to zero indicate not available or not used.EstimatedSNREstimated SNR in dB of the decoded signal.TextMessageDecoded text message for the selected service in 16bit Unicode null-terminated string.ServiceInfoArray of four structures which contain general information on the services.
Members
ContentThe type of the service can be combination of the following:
Value Meaning G3XDDC_DRM_STATE_SERVICE_CONTENT_EMPTY Given service is not used, it contains no data, all other members of the structure are invalid. G3XDDC_DRM_STATE_SERVICE_CONTENT_AUDIO Given service contains audio data. G3XDDC_DRM_STATE_SERVICE_CONTENT_TEXTMSG Given service contains text messages. G3XDDC_DRM_STATE_SERVICE_CONTENT_MULTIMEDIA Given service contains multimedia data. G3XDDC_DRM_STATE_SERVICE_CONTENT_DATA Given service contains application specific data. DynamicLabel16bit Unicode null-terminated string containing dynamic label of the service.Country16bit Unicode null-terminated string containing the signalled country for this service.Language16bit Unicode null-terminated string containing the signalled language for this service.ProgramType16bit Unicode null-terminated string containing the signalled program type for this service.AudioBitrateData rate for the audio content. It is zero if this information is not available.TextMsgBitrateData rate for the text message content. It is zero if this information is not available.MultimediaBitrateData rate for the multimedia content. It is zero if this information is not available.DataBitrateData rate for the data content. It is zero if this information is not available.AudioDecoderInfoArray of four structures which contain audio decoder specific information on the services.
Members
ValidIf it is non-zero, audio decoder information are valid, if it is zero, audio decoder information are invalid and all other members of the structure contain no valid data.AudioCodingUsed audio coding, which can be one of the following:
Value Meaning G3XDDC_DRM_STATE_AUDIO_CODING_AAC Audio coding for given service is AAC. G3XDDC_DRM_STATE_AUDIO_CODING_CELP Audio coding for given service is CELP. G3XDDC_DRM_STATE_AUDIO_CODING_HVXC Audio coding for given service is HVXC. G3XDDC_DRM_STATE_AUDIO_CODING_RFU Reserved for future use. SBRIf it is non-zero, SBR is used, if it is zero, SBR is not used.AudioModeThe value depends upon the audio coding and can be one of the following:
Value Meaning G3XDDC_DRM_STATE_AUDIO_MODE_AAC_MONO Mono G3XDDC_DRM_STATE_AUDIO_MODE_AAC_PARAM_STEREO Parametric stereo G3XDDC_DRM_STATE_AUDIO_MODE_AAC_STEREO Stereo G3XDDC_DRM_STATE_AUDIO_MODE_AAC_RFU Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_CELP_NO_CRC Audio data is without CRC G3XDDC_DRM_STATE_AUDIO_MODE_CELP_CRC CRC used G3XDDC_DRM_STATE_AUDIO_MODE_CELP_RFU_10 Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_CELP_RFU_11 Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_HVXC_RFU_00 Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_HVXC_RFU_01 Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_HVXC_RFU_10 Reserved for future use G3XDDC_DRM_STATE_AUDIO_MODE_HVXC_RFU_11 Reserved for future use