Programming Information for WiNRADiO G66WSB receiver.

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

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

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

Block diagram of G66WSB processing chain

Simplified block diagram of G66WSB processing chain
Built-in test Attenuator Preamplifier Noise blanker Channel activity Channel Create DDC Set bandwidth DDC stream Signal level Audio gain Audio filter Volume Audio stream Audio stream Audio stream Channel Create DDC Set bandwidth DDC stream Signal level Audio gain Audio filter Volume Audio stream Audio stream Audio stream Channel Create DDC Set bandwidth DDC stream Signal level Audio gain Audio filter Volume Audio stream Audio stream Audio stream Simplified block diagram of G66WSB processing chain

Using the WiNRADiO G66WSB API

Loading the API

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

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

G66WSB_CREATE_INSTANCE CreateInstance;
void *API;

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

    if(API!=NULL)
    {
        //Retrieving address of the CreateInstance function
        CreateInstance=(G66WSB_CREATE_INSTANCE)dlsym(API,"CreateInstance");

        //Here place code that uses the API

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

Enumerating available G66WSB devices

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

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

int main(void)
{
 G66WSB_CREATE_INSTANCE CreateInstance;
 void *API;
 IG66WSBDeviceEnumerator *Enumerator=NULL;
 G66WSB_DEVICE_INFO DevInfo;
 uint32_t Index;
 uint32_t Count;

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

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

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

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

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

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

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

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

Opening the G66WSB device

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

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


int main(void)
{  
 G66WSB_CREATE_INSTANCE CreateInstance;
 void *API;
 IG66WSBDevice *Device;
 
    //Loading the API
    API=dlopen("libg66wsbapi.so",RTLD_LAZY);

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

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

Functions

CreateInstance

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

C/C++ declaration

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

Address retrieval

G66WSB_CREATE_INSTANCE CreateInstance=(G66WSB_CREATE_INSTANCE)dlsym(API,"CreateInstance");

Parameters

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

ValueMeaning
G66WSB_CLASS_ID_DEVICE_ENUMERATORClass identifier of the enumerator object. When the function finished successfully, IG66WSBDeviceEnumerator interface is stored to a pointer variable pointed to by the Interface parameter.
G66WSB_CLASS_ID_DEVICEClass identifier of the device object. When the function finished successfully, IG66WSBDevice interface is stored to pointer variable pointed to by the Interface parameter.

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

Return value

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

Remarks

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


Interfaces

IG66WSBDeviceEnumerator interface

IG66WSBDeviceEnumerator interface is the interface of the enumerator object which is created using the CreateInstance function and provides an enumeration mechanism of available G66WSB devices.


IG66WSBDeviceEnumerator::Free

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

C/C++ declaration

void Free(void);

Parameters

None

Return value

None

IG66WSBDeviceEnumerator::Enumerate

Performs enumeration of available G66WSB devices.

C/C++ declaration

int Enumerate(void);

Parameters

None

Return value

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

IG66WSBDeviceEnumerator::GetCount

Retrieves the number of available G66WSB devices enumerated using the IG66WSBDeviceEnumerator::Enumerate method.

C/C++ declaration

uint32_t GetCount(void);

Parameters

None

Return value

The method returns the number of available G66WSB devices.

IG66WSBDeviceEnumerator::GetDeviceInfo

Retrieves information about the available G66WSB device.

C/C++ declaration

int GetDeviceInfo(uint32_t DeviceIndex,G66WSB_DEVICE_INFO *DeviceInfo);

Parameters

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

Return value

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

IG66WSBDevice interface

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


IG66WSBDevice::Free

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

C/C++ declaration

void Free(void);

Parameters

None

Return value

None

IG66WSBDevice::Open

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

C/C++ declaration

int Open(const char *DevicePath);

Parameters

DevicePath
[in] Pointer to a null-terminated string which specifies the system path of the G66WSB device to open. The system device path of the device can be obtained from the G66WSB_DEVICE_INFO structure filled by the IG66WSBDeviceEnumerator::GetDeviceInfo method. Instead of the system path, it can use a device's serial number or one of the following values:

ValueMeaning
G66WSB_OPEN_FIRSTThis method opens the first available G66WSB device.
G66WSB_OPEN_DEMOThis method opens a demo G66WSB device. This allows developers to work with the API without a physical G66WSB device.

Return value

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

Remarks

Use the IG66WSBDevice::Close method to close the currently open G66WSB device associated with the device object.


IG66WSBDevice::Close

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

C/C++ declaration

int Close(void);

Parameters

None

Return value

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

Remarks

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

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


IG66WSBDevice::IsOpen

Checks if a device is associated with the device object.

C/C++ declaration

int IsOpen(void);

Parameters

None

Return value

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

IG66WSBDevice::IsConnected

Checks whether the device is still connected to the computer.

C/C++ declaration

int IsConnected(int *Connected);

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetDeviceInfo

Retrieves information about the G66WSB device.

C/C++ declaration

int GetDeviceInfo(G66WSB_DEVICE_INFO *DeviceInfo);

Parameters

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

Return value

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

IG66WSBDevice::SetLED

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

C/C++ declaration

int SetLED(uint32_t LEDMode);

Parameters

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

ValueMeaning
G66WSB_FRONT_PANEL_LED_MODE_DIAGDiagnostic flashing.
G66WSB_FRONT_PANEL_LED_MODE_ONAlways on.
G66WSB_FRONT_PANEL_LED_MODE_OFFAlways off.

Return value

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

Remarks

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

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

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

IG66WSBDevice::GetLED

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

C/C++ declaration

int GetLED(uint32_t *LEDMode);

Parameters

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

Return value

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

IG66WSBDevice::SetPower

Turns the G66WSB device on or off.

C/C++ declaration

int SetPower(int Power);

Parameters

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

Return value

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

Remarks

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

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


IG66WSBDevice::GetPower

Determines whether the device is turned on or off.

C/C++ declaration

int GetPower(int *Power);

Parameters

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

Return value

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

IG66WSBDevice::GetDeviceState

Retrieves the current state of the G66WSB device, like internal temperatures, error state, data transfer counters.

C/C++ declaration

int GetDeviceState(G66WSB_DEVICE_STATE *State);

Parameters

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

Return value

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

IG66WSBDevice::SetBuiltInTest

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

C/C++ declaration

int SetBuiltInTest(int Enabled);

Parameters

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

Test signal parameters:

FrequencyLevel
152 MHz ± 5 MHz-34 dBm ± 3 dB

Return value

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

IG66WSBDevice::GetBuiltInTest

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

C/C++ declaration

int GetBuiltInTest(int *Enabled);

Parameters

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

Return value

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

IG66WSBDevice::SetAttenuator

Sets the input attenuator.

C/C++ declaration

int SetAttenuator(uint32_t Attenuator);

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetAttenuator

Retrieves current setting of the attenuator.

C/C++ declaration

int GetAttenuator(uint32_t *Attenuator);

Parameters

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

Return value

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

IG66WSBDevice::SetPreamplifier

Enables or disables the RF input preamplifier.

C/C++ declaration

int SetPreamplifier(int Preamp);

Parameters

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

Return value

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

Remarks

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


IG66WSBDevice::GetPreamplifier

Retrieves the current state of the RF input preamplifier.

C/C++ declaration

int GetPreamplifier(int *Preamp);

Parameters

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

Return value

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

IG66WSBDevice::SetADCNoiseBlanker

Enables or disables the noise blanker on the ADC stream.

C/C++ declaration

int SetADCNoiseBlanker(int Enabled);

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetADCNoiseBlanker

Retrieves the current ADC noise blanker state.

C/C++ declaration

int GetADCNoiseBlanker(int *Enabled);

Parameters

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

Return value

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

IG66WSBDevice::SetADCNoiseBlankerThreshold

Specifies the ADC noise blanker threshold.

C/C++ declaration

int SetADCNoiseBlankerThreshold(uint16_t Threshold);

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetADCNoiseBlankerThreshold

Determines ADC noise blanker threshold.

C/C++ declaration

int GetADCNoiseBlankerThreshold(uint16_t *Threshold);

Parameters

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

Return value

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

IG66WSBDevice::SetBandwidth

Sets bandwidth of the demodulator filter for all the DDC channels. The bandwidth is the same for all the DDC channels.

C/C++ declaration

int SetBandwidth(uint32_t Bandwidth);

Parameters

Bandwidth
[in] Specifies the new bandwidth of the demodulator filters in Hz. Possible values range from 1 to 250000 Hz.

Return value

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

IG66WSBDevice::GetBandwidth

Retrieves the current demodulator filter bandwidth.

C/C++ declaration

int GetBandwidth(uint32_t *Bandwidth);

Parameters

Bandwidth
[out] Pointer to a variable which receives the current demodulator filter bandwidth. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::CreateDDC

Creates the digital down-converter (DDC) channel. The DDC makes the down-conversion of the signal produced by the ADC and subsequently other signal processing like FM demodulation, audio filtering, etc.

C/C++ declaration

int CreateDDC(uint32_t *DDCId);

Parameters

DDCId
[out] Pointer to a variable which receives the identification number of a newly created DDC channel. The value of the identification number can vary from 0 to one less than value of the MaxDDCCount member of the G66WSB_DEVICE_INFO structure. This parameter cannot be NULL.

Return value

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

Remarks

The maximum number of DDC channels which can be created with the IG66WSBDevice::CreateDDC method, is determined by the MaxDDCCount member of the G66WSB_DEVICE_INFO structure.

Parameters of the digital down-converter are fixed. Sampling rate of produced I/Q signal is 312.5 kHz and the usable bandwidth is 250 kHz.

Use the IG66WSBDevice::DeleteDDC method to delete the DDC channel created by IG66WSBDevice::CreateDDC.


IG66WSBDevice::DeleteDDC

Deletes the DDC channel previously created by the IG66WSBDevice::CreateDDC method.

C/C++ declaration

int DeleteDDC(uint32_t DDCId);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.

Return value

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

IG66WSBDevice::StartDDC

Starts DDC streaming.

C/C++ declaration

int StartDDC(uint32_t DDCId,uint32_t SampleSetsPerBuffer);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
SampleSetsPerBuffer
[in] This parameter specifies the number of I/Q sample sets in each buffer passed to the IG66WSBDeviceCallback::G66WSB_DDCStreamCallback callback. The value of the SampleSetsPerBuffer has to be a multiple of 64, otherwise the method rounds it up to the nearest multiple of 64. If it is zero, the IG66WSBDevice::StartDDC fails.

Return value

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

Remarks

The G66WSB device has to be turned on using the IG66WSBDevice::SetPower function before IG66WSBDevice::StartDDC is used otherwise IG66WSBDevice::StartDDC fails.

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

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

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


IG66WSBDevice::StopDDC

Stops DDC streaming.

C/C++ declaration

int StopDDC(uint32_t DDCId);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.

Return value

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

Remarks

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

The IG66WSBDeviceCallback::G66WSB_DDCStreamCallback callback is not called after IG66WSBDevice::StopDDC returns.

The IG66WSBDevice::StopDDC method also stops the corresponding audio streaming.


IG66WSBDevice::SetChannel

Tunes the DDC to the specified sonobuoy channel.

C/C++ declaration

int SetChannel(uint32_t DDCId,uint32_t Channel);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Channel
[in] Specifies sonobuoy channel. The value can vary from 1 to 99.

Return value

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

Remarks

Use the IG66WSBDevice::GetChannel method to determine currently tuned sonobuoy channel and its frequency for the specified DDC.


IG66WSBDevice::GetChannel

Retrieves currently tuned sonobuoy channel number and its frequency for the specified DDC.

C/C++ declaration

int GetChannel(uint32_t DDCId,uint32_t *Channel,uint32_t *Frequency);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Channel
[out] Pointer to a variable that receives the number of currently tuned sonobuoy channel. This parameter can be NULL if the application does not require this information.
Frequency
[out] Pointer to a variable that receives the frequency [in Hz] of currently tuned sonobuoy channel. This parameter can be NULL if the application does not require this information.

Return value

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

IG66WSBDevice::GetChannelFrequency

Retrieves frequency of the specified sonobuoy channel.

C/C++ declaration

int GetChannelFrequency(uint32_t Channel,uint32_t *Frequency);

Parameters

Channel
[in] Specifies the number of sonobuoy channel. The value can vary from 1 to 99.
Frequency
[out] Pointer to a variable that receives the frequency [in Hz] of the specified sonobuoy channel. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::GetSignalLevel

Determines the current RF signal level for the given DDC channel.

C/C++ declaration

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

Parameters

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

Return value

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

Remarks

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

Signal level is evaluated for each buffer produced by the DDC. Buffer size (signal level evaluation rate) is given by the SampleSetsPerBuffer parameter of the IG66WSBDevice::StartDDC method.

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

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

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

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

Where VRMS is the RMS signal level in Volts obtained by GetSignalLevel, R is the G66WSB 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 the DDC channel:

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

IG66WSBDevice *Device; //Interface of G66WSB device object, created using the CreateInstance function
uint32_t DDCId; //Identifier of the DDC channel created by the IG66WSBDevice::CreateDDC method: Device->CreateDDC(&DDCId)
float P_dBm,V_RMS;

Device->GetSignalLevel(DDCId,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);

IG66WSBDevice::SetAudioSampleRate

Sets the output audio sample rate for all DDC channels.

C/C++ declaration

int SetAudioSampleRate(uint32_t SampleRateIndex);

Parameters

SampleRateIndex
[in] Specifies the audio sample rate index which can be one of the following:

ValueAudio sample rate
G66WSB_AUDIO_SAMPLE_RATE_4800048 kHz
G66WSB_AUDIO_SAMPLE_RATE_6400064 kHz
G66WSB_AUDIO_SAMPLE_RATE_9600096 kHz
G66WSB_AUDIO_SAMPLE_RATE_128000128 kHz
G66WSB_AUDIO_SAMPLE_RATE_192000192 kHz

Return value

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

Remarks

The DDC streaming must not be running when calling SetAudioSampleRate on any DDC channel. In other words, all DDC streams started with the IG66WSBDevice::StartDDC method must be stopped using the IG66WSBDevice::StopDDC method before calling SetAudioSampleRate, otherwise SetAudioSampleRate fails.

Use the IG66WSBDevice::GetAudioSampleRate method to determine the current audio sample rate and the corresponding sample rate index.


IG66WSBDevice::GetAudioSampleRate

Retrieves the current audio sample rate and the corresponding sample rate index.

C/C++ declaration

int GetAudioSampleRate(uint32_t *SampleRateIndex,uint32_t *SampleRate);

Parameters

SampleRateIndex
[out] Pointer to a variable which receives the current audio sample rate index. This parameter can be NULL if the application does not require this information.
SampleRate
[out] Pointer to a variable which receives the current audio sample rate in Hz. This parameter can be NULL if the application does not require this information.

Return value

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

IG66WSBDevice::StartAudio

Starts audio streaming for given the channel.

C/C++ declaration

int StartAudio(uint32_t DDCId,uint32_t SamplesPerBuffer);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
SamplesPerBuffer
[in] Specifies the number of samples in each buffer passed to the IG66WSBDeviceCallback::G66WSB_AudioStreamCallback callback method. The value has to be a multiple of 64 greater than zero. If it is zero, the StartAudio method fails. If it is not a multiple of 64, the method rounds it up to nearest multiple of 64.

Return value

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

Remarks

Before StartAudio is used, the G66WSB device has to be turned on using the IG66WSBDevice::SetPower method and DDC streaming has to be started using the IG66WSBDevice::StartDDC method, otherwise StartAudio fails.

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

Use the IG66WSBDevice::StopAudio method to stop audio 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.


IG66WSBDevice::StopAudio

Stops audio streaming for the given channel.

C/C++ declaration

int StopAudio(uint32_t DDCId);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.

Return value

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

Remarks

If audio streaming is not active, StopAudio does nothing.

The IG66WSBDeviceCallback::G66WSB_AudioStreamCallback callback method is not called after StopAudio returns.


IG66WSBDevice::SetAudioGain

Sets fixed audio gain for the given channel.

C/C++ declaration

int SetAudioGain(uint32_t DDCId,double Gain);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Gain
[in] Specifies a new fixed audio gain in dB.

Return value

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

Remarks

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

IG66WSBDevice::GetAudioGain

Retrieves the current fixed audio gain for the given channel.

C/C++ declaration

int GetAudioGain(uint32_t DDCId,double *Gain);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Gain
[out] Pointer to a variable that receives the current fixed gain in dB. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::SetAudioFilter

Enables or disables the audio filter for the given channel.

C/C++ declaration

int SetAudioFilter(uint32_t DDCId,int Enabled);

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetAudioFilter

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

C/C++ declaration

int GetAudioFilter(uint32_t int,BOOL *Enabled);

Parameters

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

Return value

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

IG66WSBDevice::SetAudioFilterParams

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

C/C++ declaration

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

Parameters

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

Return value

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

Remarks

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

IG66WSBDevice::GetAudioFilterParams

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

C/C++ declaration

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

Parameters

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

Return value

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

IG66WSBDevice::SetAudioFilterLength

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

C/C++ declaration

int SetAudioFilterLength(uint32_t DDCId,uint32_t Length);

Parameters

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

Return value

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

Remarks

Audio streaming in the given DDC channel has to be idle (streaming is not started using the IG66WSBDevice::StartAudio method) when calling the IG66WSBDevice::SetAudioFilterLength method, otherwise it fails.

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

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


IG66WSBDevice::GetAudioFilterLength

Retrieves the current audio filter length for the given channel.

C/C++ declaration

int GetAudioFilterLength(uint32_t DDCId,uint32_t *Length);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Length
[out] Pointer to a variable which receives the current length of the audio filter. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::SetVolume

Sets the audio volume for the given channel.

C/C++ declaration

int SetVolume(uint32_t DDCId,uint8_t Volume);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Volume
[in] Specifies the new volume. The value can vary from 0 to 31, where 31 means maximum volume.

Return value

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

Remarks

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


IG66WSBDevice::GetVolume

Retrieve the current volume for the given channel.

C/C++ declaration

int GetVolume(uint32_t DDCId,uint8_t *Volume);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Volume
[out] Pointer to a variable which receives the current volume. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::SetMute

Mutes or unmutes the audio.

C/C++ declaration

int SetMute(uint32_t DDCId,int Mute);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Mute
[in] Specifies whether to mute or unmute audio. If this parameter is non-zero, the audio is muted. If the parameter is zero, the audio is unmuted.

Return value

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

Remarks

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


IG66WSBDevice::GetMute

Retrieves the current mute state for the given channel.

C/C++ declaration

int GetMute(uint32_t DDCId,int *Mute);

Parameters

DDCId
[in] Identification number of the DDC channel created by the IG66WSBDevice::CreateDDC method.
Mute
[out] Pointer to a variable which receives the current mute state. This parameter cannot be NULL.

Return value

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

IG66WSBDevice::StartChannelActivity

Starts monitoring sonobuoy channels activity - signal levels of all the channels at once.

C/C++ declaration

int StartChannelActivity(uint16_t Interval);

Parameters

Interval
[in] Specifies the time interval in milliseconds for how often the signal levels are measured and sent to the application calling the IG66WSBDeviceCallback::G66WSB_ChannelActivityCallback callback.

Return value

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

Remarks

The G66WSB device has to be turned on using the IG66WSBDevice::SetPower method before use of StartChannelActivity, otherwise the StartChannelActivity method fails.

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

Use the IG66WSBDevice::StopChannelActivity method to stop the channels activity monitoring.


IG66WSBDevice::StopChannelActivity

Stops monitoring sonobuoy channels activity previously started by the IG66WSBDevice::StartChannelActivity method.

C/C++ declaration

int StopChannelActivity(void);

Parameters

None

Return value

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

Remarks

The IG66WSBDeviceCallback::G66WSB_ChannelActivityCallback callback is not called when StopChannelActivity returns.


IG66WSBDevice::GetSpectrumCompensation

Determines the compensation value for the frequency spectrum computed from the DDC signal. It is used to convert relative amplitudes in dB to absolutes ones in dBm.

C/C++ declaration

int GetSpectrumCompensation(uint32_t Channel,float *Value);

Parameters

Channel
[in] Specifies sonobuoy channel to retrieve the compensation value for. It can vary from 1 to 99.
Value
[out] Pointer to a variable which receives compensation value for the specified sonobuoy channel. This parameter cannot be NULL.

Return value

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

Remarks

The following example shows how to use the GetSpectrumCompensation method in IG66WSBDeviceCallback::G66WSB_DDCStreamCallback callback:


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

IG66WSBDevice *Device; //Interface of G66WSB device object, created by the CreateInstance function
uint32_t DDCId; //Identifier of the DDC channel created by the IG66WSBDevice::CreateDDC method: Device->CreateDDC(&DDCId)
uint32_t SonobuoyChannel;
float FFTBuffer[2*2048]; //Buffer for FFT result
float Compensation; //Spectrum compensation value
MY_CALLBACK_OBJECT MyCallbackObject; //User defined callback object which implements methods of IG66WSBDeviceCallback interface

Code before...

//Retrieve sonobuoy channel that the specified DDC is tuned to
Device->GetChannel(DDCId,&SonobuoyChannel,NULL);

//Retrieve spectrum compensation value
Device->GetSpectrumCompensation(SonobuoyChannel,&Compensation);

//Compensation value have to be updated after change of the sonobuoy channel of the given DDC



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

//Start DDC streaming
//The SampleSetsPerBuffer parameter is set to 2048 which is size of the FFT to simplify
//the example.
Device->StartDDC(DDCId,2048);

Code after...
    
void MY_CALLBACK_OBJECT::G66WSB_DDCStreamCallback(IG66WSBDevice *Device,uint32_t DDCId,const float *Buffer,uint32_t Count,float Peak,float RMS)
{
 uint32_t i;
 
    //Compute FFT
    FFT(FFTBuffer,Buffer,2048);
    
    //Converts complex FFT result to dB
    for(i=0;i<2048;i++)
    {
        FFTBuffer[i]=(float)(10.0*log10(FFTBuffer[i*2]*FFTBuffer[i*2]+FFTBuffer[i*2+1]*FFTBuffer[i*2+1]));
    }
    
    //Apply compensation value to get amplitudes in dBm
    for(i=0;i<2048;i++)
    {
        FFTBuffer[i]+=Compensation;
    }
    
    //now the FFTBuffer contains amplitudes in dBm
}


IG66WSBDevice::SetCallback

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

C/C++ declaration

int SetCallback(IG66WSBDeviceCallback *Callback);

Parameters

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

Return value

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

IG66WSBDevice::GetCallback

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

C/C++ declaration

IG66WSBDeviceCallback* GetCallback(void);

Parameters

None

Return value

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

IG66WSBDeviceCallback interface

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

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


IG66WSBDeviceCallback::G66WSB_DDCStreamCallback

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

C/C++ declaration

void G66WSB_DDCStreamCallback(IG66WSBDevice *Device,uint32_t DDCId,const float *Buffer,uint32_t Count,float SlevelPeak,float SlevelRMS);

Parameters

Device
Interface of the device object which called the method.
DDCId
Specifies the identification number of the DDC channel. See IG66WSBDevice::CreateDDC.
Buffer
Pointer to the buffer which contains I/Q sample sets from DDC. Sample rate is 312.5 kHz, usable bandwidth is 250 kHz. Sample is 32-bit IEEE float from the range of -1.0 to 1.0. One I/Q sample set consists of two samples, I and Q.
Count
Specifies the number of I/Q sample sets in the buffer pointed to by the Buffer parameter. This value is equal to value of the SampleSetsPerBuffer parameter of the IG66WSBDevice::StartDDC function.
SlevelPeak
Specifies the peak signal level in Volts evaluated from samples stored in the buffer pointed to by the Buffer parameter.
SlevelRMS
Specifies the RMS signal level in Volts evaluated from samples stored in the buffer pointed to by the Buffer parameter. For detailed information on how to convert RMS signal level to dBm, see the remarks of the IG66WSBDevice::GetSignalLevel method.

IG66WSBDeviceCallback::G66WSB_AudioStreamCallback

This is called by the API to pass audio samples to the application. The audio streaming can be started using the IG66WSBDevice::StartAudio or IG66WSBDevice::StartAudioPlayback method. The callback is invoked three times for each audio buffer (see the description of the Stage parameter).

C/C++ declaration

void G66WSB_AudioStreamCallback(IG66WSBDevice *Device,uint32_t DDCId,uint32_t Stage,const float *Buffer,uint32_t Count);

Parameters

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

ValueMeaning
G66WSB_AUDIO_STREAM_CALLBACK_STAGE_0The buffer contains audio samples affected by the audio gain (see IG66WSBDevice::SetAudioGain).
G66WSB_AUDIO_STREAM_CALLBACK_STAGE_1The buffer contains audio samples affected by the audio gain and audio filter (see IG66WSBDevice::SetAudioGain and IG66WSBDevice::SetAudioFilter).
G66WSB_AUDIO_STREAM_CALLBACK_STAGE_2The buffer contains audio samples affected by the audio gain, audio filter and volume (see IG66WSBDevice::SetAudioGain, IG66WSBDevice::SetAudioFilter, IG66WSBDevice::SetVolume and IG66WSBDevice::SetMute).
Buffer
Pointer to the buffer which contains samples of the audio signal. The audio signal is mono (single channel), the sample rate is specified by the IG66WSBDevice::SetAudioSampleRate method, each sample is 32-bit IEEE float from the range of -1.0 to 1.0.
Count
Specifies 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 IG66WSBDevice::StartAudio or IG66WSBDevice::StartAudioPlayback method.

IG66WSBDeviceCallback::G66WSB_ChannelActivityCallback

Thist is called by the API to pass measured signal levels of all the sonobuoy channels to the application at once. Channels activity monitoring is started using the IG66WSBDevice::StartChannelActivity method.

C/C++ declaration

void G66WSB_ChannelActivityCallback(IG66WSBDevice *Device,const float *RMS,const float *dBm,uint16_t ADCLevel);

Parameters

Device
Interface of the device object which called the method.
RMS
Pointer to the array which contains measured signal levels of the all the sonobuoy channels in volts. The array consists of 99 elements, the first element in the array (RMS[0]) contains signal level of the sonobuoy channel 1, the second elements (RMS[1]) contains signal level of the sonobuoy channel 2, etc.
dBm
Pointer to the array which contains measured signal levels of the all the sonobuoy channels in dBm. The array consists of 99 elements, the first element in the array (dBm[0]) contains signal level of the sonobuoy channel 1, the second elements (dBm[1]) contains signal level of the sonobuoy channel 2, etc.
ADCLevel
Specifies the maximum amplitude of ADC signal. Measurement of the maximum is started at the end of the previous calling of the this callback up to the current one. The possible value ranges from 0 to 32767. The value 32767 means ADC clipping.

Structures

G66WSB_DEVICE_INFO

Contains information about the G66WSB device.

C/C++ declaration

#pragma pack(push,1)

typedef struct
{
    char        DevicePath[256];
    uint8_t     InterfaceType;
    char        SerialNumber[9];
    uint16_t    HWVersion;
    uint16_t    FWVersion[3];
    uint8_t     EEPROMVersion;    	    
    uint32_t    MaxDDCCount;        
    uint32_t    Flags;    
} G66WSB_DEVICE_INFO;

#pragma pack(pop)

Members

DevicePath
The device system path in a null-terminated string.
InterfaceType
Device interface type. The value can be one of the following:

ValueMeaning
G66WSB_INTERFACE_TYPE_PCIEThe device is connected to the computer via PCI express.
G66WSB_INTERFACE_TYPE_USB2The device is connected to the computer via USB that is not capable of USB3 speeds. The receiver works in limited mode and it is not usable.
G66WSB_INTERFACE_TYPE_USB3The device is connected to the computer via USB3.
G66WSB_INTERFACE_TYPE_DEMODemo G66WSB device.
SerialNumber
Serial number in null-terminated string.
HWVersion
Version of the hardware.
FWVersion[3]
Version of the firmwares.
EEPROMVersion
EEPROM structure version.
MaxDDCCount
Maximum number of DDC channels which can be created by the CreateDDC function per single device.
Flags
Reserved for future use.

G66WSB_DEVICE_STATE

Contains information about the device state.

C/C++ declaration

#pragma pack(push,1)

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

#pragma pack(pop)

Members

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

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

Table

Sonobuoy channels

ChannelFrequencyChannelFrequencyChannelFrequency
1162.250 MHz34136.750 MHz67149.125 MHz
2163.000 MHz35137.125 MHz68149.500 MHz
3163.750 MHz36137.500 MHz69149.875 MHz
4164.500 MHz37137.875 MHz70150.250 MHz
5165.250 MHz38138.250 MHz71150.625 MHz
6166.000 MHz39138.625 MHz72151.000 MHz
7166.750 MHz40139.000 MHz73151.375 MHz
8167.500 MHz41139.375 MHz74151.750 MHz
9168.250 MHz42139.750 MHz75152.125 MHz
10169.000 MHz43140.125 MHz76152.500 MHz
11169.750 MHz44140.500 MHz77152.875 MHz
12170.500 MHz45140.875 MHz78153.250 MHz
13171.250 MHz46141.250 MHz79153.625 MHz
14172.000 MHz47141.625 MHz80154.000 MHz
15172.750 MHz48142.000 MHz81154.375 MHz
16173.500 MHz49142.375 MHz82154.750 MHz
17162.625 MHz50142.750 MHz83155.125 MHz
18163.375 MHz51143.125 MHz84155.500 MHz
19164.125 MHz52143.500 MHz85155.875 MHz
20164.875 MHz53143.875 MHz86156.250 MHz
21165.625 MHz54144.250 MHz87156.625 MHz
22166.375 MHz55144.625 MHz88157.000 MHz
23167.125 MHz56145.000 MHz89157.375 MHz
24167.875 MHz57145.375 MHz90157.750 MHz
25168.625 MHz58145.750 MHz91158.125 MHz
26169.375 MHz59146.125 MHz92158.500 MHz
27170.125 MHz60146.500 MHz93158.875 MHz
28170.875 MHz61146.875 MHz94159.250 MHz
29171.625 MHz62147.250 MHz95159.625 MHz
30172.375 MHz63147.625 MHz96160.000 MHz
31173.125 MHz64148.000 MHz97160.375 MHz
32136.000 MHz65148.375 MHz98160.750 MHz
33136.375 MHz66148.750 MHz99161.125 MHz