C++ 11

This content is no longer in active support - and is superceded by the code targeted for C++17 accessible at https://navtechradar.atlassian.net/wiki/spaces/IA/pages/2328199577

C++ Source Code

This code is a series of classes developed using C++ 11. The source code for end users to easily integrate into their application, regardless of the target platform, is available at https://bitbucket.org/navtechradar/iasdk-public/src/master/cpp/cpp_11/

SDK Requirements

C++ 11

C++11 Compiler

  • GCC 4.8 and above

  • Clang 3.5 and above

  • Visual Studio 2019 (VC++ 2019 runtime libraries)

 

Building the SDK

The SDK is written in C++ and must be compiled prior to use. The SDK is designed to be compiled by a standard C++ compiler installation; that is, no external libraries (beyond the standard and/or Posix libraries) are required. The SDK may be built using either: * Command line * From Visual Studio Code * From Visual Studio

To build the SDK outside Visual Studio, your platform must have the CMake tools installed. To check if CMake is present, run:

cmake --version

 

Building from the command line

Cmake can be invoked directly from the command line to build the SDK, as follows:

cd <IA SDK install path>/iasdk/build cmake . make

 

The build can be removed by running:

make clean

 

The build process will generate two executables by default:

 

Building from VS Code

The project is configured to work with the Microsoft CMake Tools. If the CMake Tools are installed, opening the project in VSCode should detect the make files and configure the project accordingly. The first time a build is selected you will need to select a compiler kit. This will present a list of possible compiler configurations.

Using the VS Code build task

The .vscode folder contains a build task configuration for invoking CMake. To build: * hit ctrl-shift-b * select Build

(Note: you can also select Clean as one of the build options)

The build process will (again) generate two executables by default:

 

Building from Visual Studio

If the Microsoft C++ compiler (msvc) is used, the SDK provides a Visual Studio solution (.sln) file.

Double-clicking on the .sln file will launch Visual Studio. In Visual Studio select:

Build -> Build Solution

(Alternatively, use crtl-shift-b)



The SDK C++ API provides an object-based interface for controlling/configuring the radar and for processing incoming data.

Communication to the radar is asynchronous: * Outgoing messages are encapsulated within API calls. The parameters provided to the functions are used to populate Colossus messages, which are sent to the sensor. * Incoming messages from the sensor invoke callbacks. Each (supported) incoming message will have a callback function object associated with it. The callback is passed a (shared) pointer to the received data.

The API handles all endianness and encoding required by the Colossus protocol; removing the need from the client.

Connecting to the sensor

The steps involved in connecting and getting data are as follows:

Setup your radar client and hook up the message and connection events:

 

Connect to the radar:

 

On successful connection you will receive a Configuration message with details of the radar's current configuration. So you must have the handler setup before you connect.

Message handler callbacks

An incoming Colossus message will be unmarshalled and stored in a message-specific structure.

Each structure also defines a pointer type (usually a std::shared_ptr). This pointer type is used to allocate, and then access, the structure object created from the incoming Colossus message.

The message handler callback must be a Callable Type - a function, a member-function, a function-object or a lambda expression.

The signature of the Callable Type for a data item of type Message_Ty depends on the type of the Colossus message being received; for example:

WherePointeris the message structure-specific pointer type.

 

For example:

 

Once connected and you have the config data, tell the radar to start sending FFT Data:

 

You must provide a incoming FFT Data:

 

When you need to disconnect, firstly stop the FFT Data:

 

Then unbind the data handlers:

 

Then disconnect:

 

The file testclient_main.cpp contains an example of basic configuration and FFT data processing operations. It can be used as the basis for more complex applications.

 

 


Â