View on GitHub

Chapter 14
Using the REDHAWK IDE

The REDHAWK IDE is a tool that enables developers to create, test, and deploy software for REDHAWK systems. This tool is built on Eclipse, which is a generic, extensible IDE that allows developers to add custom modules. The REDHAWK IDE, therefore, leverages all of the features available in a bare-bones Eclipse IDE while also providing customized features specific to REDHAWK development.

The following features are included in REDHAWK Version 2.0:

For signal processing developers, the REDHAWK IDE provides graphical interfaces for the auto-generation of Component, Device, and Service code in C++, Python, and Java. Built on top of the Eclipse Java Developer Tools (JDT), Eclipse PyDev, and Eclipse C/C++ Developer Tools (CDT), the IDE provides feature-rich editors for code written in any of the three languages. In addition, a drag-and-drop environment for testing these modules and constructing them into Waveforms and Nodes is available.

For system developers, the IDE provides an environment for deploying and maintaining Applications onto fielded systems. Furthermore, the pluggable nature of Eclipse allows system developers to add customized system user-interface modules.

The REDHAWK Explorer is a lighter-weight application that includes a subset of the REDHAWK IDE’s functionality. The REDHAWK Explorer can be used to connect to a running REDHAWK Domain, navigate the contents, launch and view Waveforms, and so forth. It provides no development functionality, only runtime interaction with REDHAWK Domains.

14.1 Launching the REDHAWK IDE for the First Time

This section describes the basic process for starting the REDHAWK IDE for the first time.

Before starting the REDHAWK IDE for the first time, the REDHAWK Core Framework and the IDE must be installed (Section 2.2).

  1. Start the REDHAWK IDE by entering the following command:

    At startup, the IDE may prompt for a Workspace location. The Workspace stores many of the IDE’s settings and also acts as a logical collection of projects under development. The IDE creates new projects in the workspace by default.

    If you upgraded from 1.8.x, 1.9.x, or 1.10.x, it is recommended that you use a different workspace location rather than reusing a previous version’s workspace. If you set the workspace to the same workspace that you used in 1.8.x, 1.9.x, or 1.10.x, you must delete the Domain from REDHAWK Explorer before launching the Domain from Target SDR.

14.1.1 PyDev Overview

PyDev is an external product that comes bundled with the REDHAWK IDE and provides a Python IDE for Eclipse, which may be used in Python, Jython, and IronPython development.

PyDev’s many features include:

PyDev has its own set of documentation and getting started details. First time users are strongly advised to read the Getting Started Guide, which explains how to properly configure PyDev. The PyDev documentation can be found in the following locations:

PyDev’s default configuration causes some files within REDHAWK to appear as if they are invalid. To address these problems, refer to Section 14.2.

14.2 Configuring PyDev for REDHAWK Development

Every time a new workspace is used, PyDev is automatically configured. If you want to manually configure PyDev, use the following procedure:

  1. Start the REDHAWK IDE by entering the following:
  2. Select Window > Preferences.
  3. Select PyDev > Interpreter - Python.
  4. Select Auto Config.
  5. Click OK.

    If OSSIEHOME is not within the default system location of /usr, it may be unchecked by default. Ensure that OSSIEHOME/lib/python and OSSIEHOME/lib64/python directories are checked.

  6. Select Forced Builtins.
  7. Select New
  8. Enter the following information into the dialog box. Remove any new lines.
  9. Click OK.

14.2.1 PyDev: Undefined variable or imports

Most of these types of errors can be fixed by ensuring that the Forced Built-ins has been added correctly as shown in Section 14.2.

The user can also force PyDev to ignore these types of errors by entering the following into the Python source file on the line with the error:

14.3 The Workbench

The Eclipse introductory screen displays a Workbench button that takes the user to the IDE’s development environment: the Workbench. The Workbench is made up of multiple, smaller windows, which are referred to as Views in the Eclipse context.

At the center of the IDE Workbench is the Editor window, which is empty at initial startup. The Editor is the primary window used when developing code within the REDHAWK IDE. An Eclipse Editor is a context-sensitive window within the Workbench; the language of opened files dictates the type of editor that is opened, impacting editing features such as syntax highlighting.

For a more detailed understanding of the Eclipse environment and nomenclature, consult the online Eclipse documentation at http://help.eclipse.org/ or the embedded documentation within the REDHAWK IDE by selecting Help > Search.

14.3.1 Perspectives

The Views that makeup the Workbench, along with the particular layout of those Views, are referred to as a Perspective. By changing Perspectives throughout the development process, a developer may optimize his/her work environment based on the requirements of the particular task at hand. The default Perspective in the REDHAWK IDE is the REDHAWK Perspective, which is discussed in the following section. A user may switch from the REDHAWK Perspective to any other Perspective whenever needed.

There are two primary methods for changing Perspectives:

A view may be resized, moved, and closed within a given Perspective to allow for personal customization.

To reset the current Perspective to its default state:

  1. Click Window > Reset Perspective

14.3.2 The REDHAWK Perspective

The REDHAWK Perspective is comprised of seven Views and the Editor window. Five of these views are provided by Eclipse IDE, while the remaining two views are REDHAWK-specific.

The following five Eclipse-provided Views are in the REDHAWK Perspective:

The following two REDHAWK-specific Views are in the REDHAWK Perspective:

14.3.3 Programming Language Specific Perspectives

While the REDHAWK Perspective combines views that are commonly used while viewing Domain objects, creating REDHAWK resources, and launching Applications, many other Perspectives are available that are optimized for code development. Because the REDHAWK IDE is built on top of the Eclipse platform, it takes advantage of standard Eclipse, as well as third party, IDE Perspectives for the purpose of supporting language-specific development. Specifically, the IDE contains Perspectives that support C/C++, Java, and Python development.

For example, the Java Perspective combines views that are commonly used while editing Java source files, while the Debug Perspective contains the views that are used while debugging Java programs.

For more information on Perspectives, particularly the Eclipse default and the programming language-specific Perspectives packaged with the REDHAWK IDE, refer to http://help.eclipse.org/.

14.4 Editors and Views

This section discusses the most commonly used Editors and Views provided with the REDHAWK IDE.

14.4.1 SoftPkg Editor


PIC

Figure 14.4: SoftPkg Editor


To open the SoftPkg Editor, double-click an SPD file from the Project Explorer View. It presents all the content that can be found within the spd.xml file in an editing environment designed for ease of use. If the SPD file references a PRF or SCD file, additional tabs are made available that represent these files in similar fashion.

Each of the Editor tabs, with the exception of the raw XML tabs, have the following buttons located in the top right corner:

The SoftPkg Editor is organized into four main tabs:

The following sections describe each of these Editors.

14.4.1.1 Overview Tab

The Overview tab, as seen in Figure 14.4, is a representation of the content found within the SPD file and contains five sections:

  1. The General Information section provides the ability to view and set (if write permissions are granted) the resource’s ID and Name as well as the location of the PRF and SCD files. The initial content of these fields is auto-generated when the project is created and is generally left unaltered. The optional fields, Version, Title, and Description, may be set to aid in the project’s documentation.
  2. The Interfaces section lists the IDLs that this resource inherits. This includes IDLs used by the resource’s Ports, lifecycle, and Properties. This table is read only, and additional IDL interfaces cannot be added here.
  3. The Component Content section displays hyperlinks to navigate to the Properties and Implementations tabs of the SoftPkg Editor.
  4. The Testing section displays two hyperlinks. Launch a local component launches a local instantiation of this resource within the Sandbox. Launch a local component in debug mode provides additional runtime control, including the ability to place breakpoints, pause execution, and inspect and modify variables. For information on how to use these hyperlinks refer to Section 14.7.
  5. The Exporting section provides a hyperlink for deploying a project to the SDR Root.

    Use the following procedure to export a project using the Export Wizard:

    • Click Export Wizard.
    • Select the projects to export.
    • Type or browse to the export location.
    • Click Finish.

14.4.1.2 Properties Tab


PIC

Figure 14.5: SoftPkg Editor Properties Tab


Within the Properties tab, the All Properties section displays all of the properties defined for the component or device. Refer to Section 3.3.4 for information about the different Property types.

To add a property, click on one of Add Simple, Add Sequence, Add Struct or Add StructSeq to create a new property of the corresponding type. To remove a property, select it in the All Properties section and click the Remove button on the right.

In addition to creating a new property from scratch, a user may also copy an existing Property from a deployed resource:

  1. In the All Properties Section, click Browse.
  2. Expand Target SDR.
  3. Drill down to and select the desired Property.
  4. Click Finish.

When a property is selected in the All Properties section, a type-specific details section appears on the right-hand side of the tab. All property types include a few common fields:

Nested properties—fields in a struct, or the struct definition for a struct sequence—do not include Kind or Mode. The parent property determines these fields.

The Simple Property details section includes additional fields:

Ordinarily, properties are set to their initial value via a call to the component or device’s initializeProperties() method. However, for certain use cases, simple properties may receive their initial value on the exectuable command line by enabling the Pass on command line checkbox, located next to Kind.

In the Simple Sequence details section, the fields Type, Units, Action and Range are identical to those for simple properties. The default value of a simple sequence property can be viewed or edited via the Values list.

The fields that make up a struct property are displayed as children of the struct in the All Properties section.

The default value of a struct property is the determined by the default values of its fields.

If any field has a default value, all fields must have a default value.

The default value of a struct sequence may be viewed or edited via the StructValue section in the Struct Sequence Property details section.

The struct definition appears as a child of the struct sequence in the All Properties section. It may be modified in the same manner as a struct property.

14.4.1.3 Ports Tab


PIC

Figure 14.6: SoftPkg Editor Ports Tab


The Ports tab provides the ability to add, edit, and view Port information. Information about Ports is described in Section 3.3.3.

Click Add to create a new port with default values. The Port Details section shows the new port, which can be modified as needed:

An existing Port may be edited by selecting it from the All Ports section and changing its options via the Port Details section.

To remove a Port, select it from the All Ports section and click the Remove button.

14.4.1.4 Implementations Tab


PIC

Figure 14.7: SoftPkg Editor Implementations Tab


The Implementations Tab is a representation of the content found within the SCD file. It describes the programming language implementations that are generated and the hardware dependencies required for this resource.

During the New Project Wizard, the initial programming language and code generation template were selected. In the All Implementations section there is the option to add additional programming language implementations.

The right portion of the editor is context sensitive, and displays the information pertaining to the selected implementation.

14.4.2 Waveform Editor


PIC

Figure 14.8: Waveform Editor


To open the Waveform Editor, double-click a SAD file from the Project Explorer View. It presents all the content that can be found within the sad.xml file in an editing environment designed for ease of use. The Waveform Editor contains an Overview, Properties, Diagram, and a raw XML tab, which contains the SAD file content.

14.4.2.1 Waveform Editor Overview Tab


PIC

Figure 14.9: The Waveform Editor Overview Tab


The Overview tab provides general information about the Waveform, and hyperlinks to additional Waveform-related sections within the IDE.

14.4.2.2 Waveform Editor Properties Tab


PIC

Figure 14.11: The Waveform Editor Properties Tab


The Properties tab provides access to the Component’s properties within the Waveform. Within the Properties tab, you can:

The Properties of the Component designated as the Assembly Controller are always accessible externally and are greyed out in the Properties tab (Figure 14.12). Additional Properties may be assigned an external ID, which allows for a particular Component’s Property to be designated as accessible to external Waveform objects. For more information about external Properties, refer to Section 11.4.6.

To make a Property external:

  1. Select the Properties tab of the Application’s SAD file.
  2. Edit the External ID field by entering the desired ID.

The external IDs must be unique. If a duplicate external ID is entered that conflicts with the Assembly Controller defaults, the following error message is displayed: External property ID duplicates Assembly Controller property ID External ID. If a duplicate external ID is entered that conflicts with that of a regular Component, a generic error message is displayed. To view the error details, hover over the error message.


PIC

Figure 14.12: Waveform External Properties


14.4.2.3 Waveform Editor Diagram Tab


PIC

Figure 14.13: The Waveform Editor Diagram Tab


You can use the Diagram tab to place Components into a Waveform, connect Components together, set Waveform-specific Properties for Components, make a Port external, and add a FrontEnd Tuner Device to a Waveform. For more information about external Ports, refer to Section 11.4.5.

To zoom in and out on the diagram, press and hold Ctrl; then scroll up or down. Alternatively, press and hold Ctrl; then press + or -.

To add a Component to the Waveform and configure its Properties:

  1. Drag the Component from the Palette onto the diagram.
  2. Click the Component.
  3. Open the Properties View.
  4. From the Properties View, change the desired Properties.
  5. Press Ctrl+S to save the changes.

If you want to quickly locate a Component in the Palette, you can replace the text type filter text in the text field at the top of the Palette with a keyword to filter the Component list.

Any Property modified here is specific to this Waveform and does not impact the Component’s execution in other environments.

To make a Port external:

  1. Left-click the Port you want to make external, to gain focus on the Port.
  2. Right-click the Port to open the Port context menu.
  3. Select Mark External Port.
    PIC
    Figure 14.14: Mark External Ports


From the Diagram tab, a user may also use the Find By feature. The Find By feature enables a user to find a resource by name, a Service by name or type, or an Event Channel by name. For more information about the Find By feature, refer to Section 11.4.7.

Connections may be made from input to output Ports by clicking and dragging from one Port to the other. Multiple connections can be drawn to or from Ports. Any unsupported or erroneous connection that the IDE can detect is marked with an appropriate indicator. Hovering over the indicator provides information concerning the error.

To add a dependency on a FrontEnd Tuner Device that the Waveform needs to use at runtime (a usesdevice in the XML):

  1. From the Palette, in the Advanced folder, select Use FrontEnd Tuner Device and drag it onto the diagram. The Select Target Device dialog is displayed.


    PIC
    Figure 14.15: Select Target Device


  2. Select the FrontEnd Tuner Device you want to use. This will complete some of the information in the subsequent wizard pages. Alternatively, select Generic FrontEnd Device for defaults. Click Next. The Allocate Tuner dialog is displayed.


    PIC
    Figure 14.16: Allocate Tuner


  3. Enter the Uses Device ID and optionally, enter the Device Model, and then click Next. The Tuner Allocation dialog is displayed. For more information about tuner allocation, refer to Section 7.1.3.1.
  4. Enter the appropriate information and click Next. The Identify Ports dialog is displayed.
    PIC
    Figure 14.17: Identify Ports


  5. Enter the names of any uses and provides Ports that you want to use from the target Device and click Finish. The Use FrontEnd Tuner Device is displayed in the diagram. When you launch the Waveform, the FrontEnd Tuner Device must be available in order for the Waveform to run.

    The sad.xml tab displays the raw XML data, which describes this Waveform fully. Although not recommended, manually editing the XML file is supported.

14.4.3 Node Editor


PIC

Figure 14.18: Node Editor


To open the Node Editor, double-click a DCD file from the Project Explorer View. It presents all the content that can be found within the dcd.xml file in an editing environment designed for ease of use. The Node Editor contains an Overview, Devices, Diagram, and a raw XML tab, which contains the DCD file content.

14.4.3.1 Node Editor Overview Tab


PIC

Figure 14.19: Node Editor Overview Tab


The Overview tab provides general information about the Node, and hyperlinks to additional Node-related sections within the IDE. From the General Information section, the ID, name, and description of the Node may be set. The Node Content section provides a hyperlink to the Devices tab, which allows the user to specify what Devices are within this Node. The Testing section is currently under development and is presently not supported. Lastly, the Exporting section provides a hyperlink to the Export Wizard, which steps through the process of deploying the Node into the SDR root.

14.4.3.2 Node Editor Devices Tab


PIC

Figure 14.20: Node Editor Devices Tab


The Devices tab enables a user to add Devices from the SDR Root into the Node and to configure the Properties for the Devices. When a Property is set or changed here, it is specific to this Node and does not impact other Nodes or instances of this Device.

The following steps explain how to add a device to the Node:

  1. Click Add.
  2. Select the Device to add.
  3. Click Finish.

Use the table in the Device section to configure the Nodes Properties.

14.4.3.3 Node Editor Diagram Tab


PIC

Figure 14.21: Node Editor Diagram Tab


The Diagram section (along with the Properties View) provides the same features as the Devices tab.

To zoom in and out on the diagram, press and hold Ctrl; then scroll up or down. Alternatively, press and hold Ctrl; then press + or -.

The following steps explain how to add a Device to the Node and configure its Properties:

  1. Drag the Device from the Palette onto the diagram.
  2. Click the Device.
  3. Open the Properties View.
  4. From the Properties View, change the desired Properties.
  5. Press Ctrl+S to save the changes.

If you want to quickly find a Device in the Palette, you can replace the text type filter text in the text field at the top of the Palette with a keyword to filter the Device list.

Like the Devices tab, any Property modified from the Device section is specific to this Node and does not impact the Device’s execution in other environments.

From the Diagram tab, a user may also use the Find By feature. The Find By feature enables a user to find a resource by name, a Service by name or type, or an Event Channel by name. For more information about the Find By feature, refer to Section 11.4.7.

Connections may be made from input to output Ports by clicking and dragging from one Port to the other. Ports may have more than one connection drawn to or from them. Any unsupported or erroneous connection detected by the IDE is marked with an appropriate indicator. Hovering over the indicator provides information concerning the error.

The dcd.xml tab displays the raw XML data, which describes the Node fully. Although not recommended, manually editing the XML file is supported.

14.4.4 NeXtMidas Plot Editor


PIC

Figure 14.22: NeXtMidas Plot Editor


Any blue files can be opened with the NeXtMidas Plot Editor. Any files in the workspace with the extensions .prm or .tmp are automatically opened in the NeXtMidas Plot Editor.

The NeXtMidas Framework has an in plot menu system and mouse zoom functionality that may be used within the plot window. The full use and features of the plotting menus are beyond the scope of this guide and are explained within the official NeXtMidas documentation.

Interact with the plot in the following ways:

14.4.5 REDHAWK Explorer View


PIC

Figure 14.23: The REDHAWK Explorer View


The REDHAWK Explorer View, shown in Figure 14.23, enables users to navigate the contents of a REDHAWK Domain. It provides capabilities for viewing the contents of the Domain, configuring instantiated resources, and launching Applications in a target SDR. It also provides access to the IDE Sandbox, which is an environment for running Components and Applications without launching a Domain Manager or Device Manager.

Exploring an active Domain using the REDHAWK IDE is discussed in Chapter 17. Using the IDE Sandbox is discussed in Section 3.6.2.

14.4.6 REDHAWK Plot View


PIC

Figure 14.24: The REDHAWK Plot View


When a user plots a Port, the REDHAWK Plot view displays a NeXtMidas Plot.

The NeXtMidas Framework has an in plot menu system and mouse zoom functionality that may be used within the plot window. The following commands are part of the built-in NeXtMidas functionality:

The full use and features of the plotting menus are beyond the scope of this guide and are explained within the official NeXtMidas documentation.

The REDHAWK IDE contains the following controls for interacting with the active plot:

14.4.7 Plot Settings Dialog

The Plot Settings Dialog (Figure 14.26) enables the user to adjust certain plot settings. If the field is NOT adjustable, it is grayed out.


PIC

Figure 14.26: Plot Settings


14.4.7.1 Plot

Selecting Plot in the left-hand navigation pane displays the Plot section. The Plot section enables you to change various settings on how the data is displayed within the plot.

14.4.7.2 Output Port Name

Selecting the Output Port Name in the left-hand navigation pane displays the Output Port Settings dialog (Figure 14.27).


PIC

Figure 14.27: Output Port Settings


The Output Port Settings enable you to modify how the source is being displayed.

Expanding the Output Port Name in the left-hand navigation pane makes the BULKIO and FFT settings available.

14.4.7.3 BULKIO

Selecting BULKIO in the left-hand navigation pane displays the BULKIO settings dialog (Figure 14.29.)


PIC

Figure 14.29: BULKIO settings dialog


The BULKIO settings dialog enables you to modfy how the data is received via the CORBA Bulk Data.

14.4.7.4 FFT

Selecting FFT in the left-hand navigation pane displays the FFT settings dialog (Figure 14.30.)


PIC

Figure 14.30: FFT settings dialog


The FFT section enables you to change various settings on the FFT primitive.

14.4.8 Event Viewer View

The Event Viewer View is used to listen to any Event Channel (the IDM and ODM Channels are present by default). It also provides a means of filtering, sorting, and exporting the event traffic collected.

To listen to a channel from the REDHAWK Explorer View:

  1. Expand the Domain.
  2. Expand the Event Channels folder.
  3. Right-click the desired channel, and select Listen to Event Channel.

    The Event Viewer View for the selected channel is displayed (Figure 14.31) and new events are added to the table.

To listen to a channel from the CORBA Name Browser View:

  1. Expand the Naming Service.
  2. Expand the Domain.
  3. Right-click the desired channel, and select Listen to Event Channel.

    The Event Viewer View for the selected channel is displayed (Figure 14.31), and new events are added to the table.


PIC

Figure 14.31: The Event Viewer View for the ODM Channel


The controls in the upper right of the Event Viewer View provide the following functionality:

The controls at the bottom of the Event Viewer View enable the user to filter and search the event log.

To filter the event log:

To search the event log:

14.4.9 Data List and Statistics View

The Data List and Statistics features are designed for simple runtime debugging of Component Ports.

  1. To open the Data List view, right-click a Port of a started Component.
    PIC
    Figure 14.32: Port Context Menu


  2. From the context menu, select Data List.

    The Data List View is opened. (Figure 14.33)


    PIC
    Figure 14.33: Data List View


  3. Select the preferred capture type:
    • Number of Samples: Select a sample size
    • Indefinitely: Collect until the user stops the process.
  4. Select the Number of Dimensions of the sample data:
    • Real
    • Complex
    • any positive integer number of dimensions
  5. Click Start Acquire.

    After all desired samples have been acquired and displayed in the Data List table, two additional options are displayed:

    • Save
    • Chart
  6. To open a wizard and write the data to a BLUE Midas file or a binary file, click Save.
  7. To open the Statistics View, which features a histogram and basic statistics of the sample data, click Chart. (Figure 14.34)


    PIC
    Figure 14.34: Statistics View


  8. There are two ways to change the dimensions displayed in the Statistics View:
    • In the Data List view, click the column headers.
    • In the Statistics view, click View Menu and select Settings. This opens the Chart Options dialog. In the Chart Options dialog, change the categories displayed in the chart. (Figure 14.35)


      PIC
      Figure 14.35: Statistics View Chart Options Dialog Box


      The chart and basic statistics refresh with each new collection of data in the Data List view.

14.4.10 Port Monitor View

The Port Monitor View enables you to monitor the amount of data flowing out of or in to a particular Port. These link statistics are helpful when debugging and can help identify which Component is slowing down or dropping information during data processing. For more details about how the colors used in the IDE diagrams reflect the statistics displayed in Port Monitor view, refer to Section 17.6.

To open the Port Monitor View, right-click the Port of a started Component and select Monitor Ports from the context menu (Figure 14.36).


PIC

Figure 14.36: The Port Context Menu


The Port Monitor View is opened. (Figure 14.37)


PIC

Figure 14.37: The Port Monitor View with Monitor Ports Selected


The View displays the following information:

The following actions are available in the Port Monitor View.

  1. To Configure the Port Monitor View:
    • Click the View Menu.
    • Select Configure.

    The Port Monitor Configuration dialog box is displayed.


    PIC
    Figure 14.38: The Port Monitor Configuration Dialog Box


    The following options can be configured:

    • Refresh Interval (sec): The time interval between fetching the Port statistics.
    • Column Configuration: Specifies which columns are visible.
  2. To force a refresh of any connection or Port:
    • Right-click the item.
    • Select Refresh.
  3. To stop monitoring:
    • Right-click the item.
    • Select Stop Monitoring.

14.4.11 SRI View

The SRI View enables the user to view the SRI data from a particular Port. For more information on SRI data, refer to Section 5.7.2. The following procedure explains how to open the SRI View.

  1. To open the SRI View, right-click the Port of a started Component and select Display SRI from the context menu (Figure 14.39).


    PIC
    Figure 14.39: The Port Context Menu with Display SRI Selected


    The SRI View is opened (Figure 14.40).


    PIC
    Figure 14.40: The SRI View


  2. The following options are available in the SRI View.
    • To clear the display of specific SRI data once an EOS has been received, click Clear Selected SRI.
    • To clear the display of all SRI data once the respective EOSs have been received, click Clear All SRIs.
    • To pause the SRI data, click Pause Incoming SRI Data.
    • To receive notification when new SRI data is displayed, click Notify on receiving new Push SRI.
    • To change the active SRI data stream between different active Components, click Change Active Stream.
    • To generate both an .xml and a .sri file for each stream being monitored, click Save SRI Data to file.

If a Component is deleted from the Chalkboard, the SRI View closes automatically.

14.4.12 Console View

The Console View is a part of Eclipse and the basic use is well documented by the Eclipse documentation: http://help.eclipse.org/. The REDHAWK IDE uses multiple Console Views for different purposes. Third party plug-ins within REDHAWK have their own Console Views.

The Console Views found in the REDHAWK IDE are:

14.4.13 Properties View

The Properties View, shown in Figure 14.41, displays and enables users to edit REDHAWK Properties of selected REDHAWK resources. The Properties View keys off of the REDHAWK Resource object type and is displayed regardless of where the REDHAWK Resource was selected. Therefore, the Properties View can be used when selecting REDHAWK Resources from either the REDHAWK Explorer, Sandbox, Waveform Diagram, Node Diagram, or any other Editor or View that displays a REDHAWK Resource.


PIC

Figure 14.41: The Properties View


14.5 Creating REDHAWK Projects

This section describes the different types of REDHAWK projects and how to create them using the provided Wizards. Before creating a new project, it is recommended that the IDE be in the REDHAWK Perspective so that the proper menus are available. For guidance on how to switch to the REDHAWK Perspective, refer to Section 14.3.1.

To create a new REDHAWK project, click File > New > Project, and then select the project type.

The IDE displays the Select a wizard window, which prompts the user to select from multiple project types. Each project type has a custom Wizard to guide users through the initial creation process.

Some basic fields within the new project Wizard are common to all project types and include:

14.5.1 REDHAWK Component Project

The New Component Project Wizard is a three page wizard that walks the user through creating a new REDHAWK Component, selecting a programming language, and selecting a code generator. Many of the fields found within the Component project wizard are also found within the Device project wizard. Fields common to all new project wizards are defined in Section 14.5.

Page one of the Component wizard contains:

Page two of the wizard defines the Component’s implementation, the programming language used and the code generation template.

The content found on this page includes:

Page three of the wizard allows the user to customize the properties of the code generator and template.

Wizard page three contains fields for:

Click Finish to complete the new project creation wizard.

14.5.2 REDHAWK Control Panel Project

The New Control Panel Project Wizard is a two to three page wizard that walks the user through creating a new Plug-in project and optionally, generating a fully functioning project based off of supplied template projects. The New Control Panel Project Wizard is taken directly from the Eclipse New Plug-in Project Wizard and contains identical fields. Refer to the Eclipse documentation for more information.

14.5.3 REDHAWK Device Project

The New Device Project Wizard is a three page wizard that walks the user through creating a new REDHAWK Device, selecting a programming language, and selecting a code generator. Many of the fields found within the Device project wizard are also found within the Component project wizard. Fields common to all new project wizards are defined in Section 14.5.

Page one of the wizard contains:

Page two of the wizard defines the Device’s implementation, the programming language used and the code generation template.

Wizard page two contains:

Page three of the wizard allows the user to customize the properties of the code generator and template.

Wizard page three contains:

Click Finish to complete the new project creation wizard.

14.5.4 REDHAWK Front End Device Project

The FEI Wizard enables users to quickly create an FEI compliant RX or TX tuner Device. In the wizard, the user specifies the physical properties of the Device, including whether the Device ingests or outputs GPS and if the Device has digital or analog input and output Ports. Additionally, the user can choose to augment the required tuner status Properties with additional optional Properties. For more information about the FEI Wizard, refer to Section 7.1.1.1.

14.5.5 REDHAWK IDL Project

The IDL Project Wizard is a one page wizard that walks the user through creating a new REDHAWK IDL project. Fields common to all new project wizards are defined in Section 14.5.

Page one of the wizard contains:

Click Finish to complete the new project creation wizard.

If you upgrade to REDHAWK version 2.0, and your custom IDL project references the Core Framework IDLs, compiler errors may be displayed. To resolve the errors, create a new IDL project and import your IDL files into the new project. The new project contains an updated Makefile.am that accounts for changes in the REDHAWK 2.0 IDL files.

14.5.6 REDHAWK Node Project

The New Node Project Wizard is a one to two page wizard that walks the user through creating a new REDHAWK Node and optionally, placing Devices into the new Node. Fields common to all new project wizards are defined in Section 14.5.

Page one of the wizard contains:

The wizard may be completed at this point by clicking Finish or the user may continue to the optional second page.

On page two the user chooses what Devices make up this Node. This may be changed after the Node’s creation from the Node’s Editor.

Select Finish to complete the new project creation wizard.

14.5.7 REDHAWK Octave Project

The Octave Wizard enables users to import existing Octave M-files for easy conversion into REDHAWK C++ Components. The user imports an existing M-file, as well as any required dependent M-files, and then maps the M-file’s inputs and outputs to REDHAWK Ports and Properties. For more information about the Octave Wizard, refer to Section 14.11.

14.5.8 REDHAWK Service Project

The New Service Project Wizard is a three page wizard that walks the user through creating a new REDHAWK Service selecting a programming language, and selecting a code generator. Many of the fields found within the Service project wizard are also found within the Component and Device project wizard. Fields common to all new project wizards are defined in Section 14.5.

Page one of the wizard contains:

Page two of the wizard defines the Service’s implementation, the programming language used and the code generation template.

Wizard page two contains:

Page three of the wizard provides customization to the configuration values of this implementation’s code generation properties and template.

Wizard page three contains:

Select Finish to complete the new project creation wizard.

14.5.9 REDHAWK Shared Library Project

The REDHAWK Shared Library Project Wizard enables users to quickly create a C++ shared library for use in REDHAWK. In the wizard, the user specifies the project name and can then generate a simple set of code files to begin adding in library functions. For more information about the REDHAWK Shared Library Project Wizard, refer to Section 4.7.

14.5.10 REDHAWK Waveform Project

The New Waveform Project Wizard is a one to two page wizard that walks the user through creating a new REDHAWK Waveform and optionally, assigning an Assembly Controller. Fields common to all new project wizards are defined in Section 14.5.

Page one of the wizard contains:

The user may choose to complete the wizard at this point or continue on to the optional second page. Page two allows the user to set an Assembly Controller for the new Waveform. The Assembly Controller may be set, or changed after the Waveforms creation from within the Assembly Controller editor.

Click Finish to complete the new project creation wizard.

14.6 Adding/Changing/Removing REDHAWK Project Namespaces

Existing REDHAWK projects can be renamed to include a namespace. Projects can be namespaced by adding dots in the name. Project names may not begin with a number and may not contain special characters other than dots for the namespace. Namespacing projects provides the ability to uniquely identify projects that share the same base name but have different implementations and also provides a logical grouping of resources. For example, the REDHAWK basic assets are namspaced as rh.xxxx.

The following procedure explains how to rename a project to include a namespace.

The IDE only supports automatic refactoring of project namespaces, not project base-names. If you want to change the base-name of a project, create a new project with the new base-name, and then manually move code into the new project.

  1. In Project Explorer, right-click the project, select Rename.

    The Rename Resource dialog is displayed.


    PIC
    Figure 14.42: Rename Resource Dialog


  2. Enter the new project namespace and click Preview.

    The Rename Resource window is displayed.


    PIC
    Figure 14.43: Rename Resource Window


  3. Click OK.

    The IDE updates all relevant references, directories, and file names to match the new namespace.

14.7 Debugging REDHAWK Components and Devices with Eclipse

The REDHAWK IDE uses the debugging capabilities from the JDT, CDT, Python Development (PyDev), and REDHAWK Sandbox. The debugger provides tools to detect and diagnose errors in an application during execution. The debugger allows control of execution of the program by setting breakpoints, suspending launched programs, stepping through source code, and examining the contents of variables.

For more details on debugging concepts, consult the Eclipse documentation at http://help.eclipse.org/ or view the embedded documentation from within the REDHAWK IDE by selecting Help > Help Contents.

In the Eclipse documentation browser refer to the following sections for additional debugging concepts and details:

14.7.1 Running Unit Tests

Component and Device projects created with the IDE have a tests folder that contains a functional example test case. This test case checks that the resource can be started, stopped, and released without error.

To run the unit test case:

  1. From the Project Explorer View, expand the project folder then the tests folder to display the existing test cases.
  2. Right-click the test script, select Run As > Python run.
  3. Check the test results from the Console View.

14.7.2 Running a Component or Device from the REDHAWK Sandbox

The REDHAWK Sandbox provides an environment to run Components and Devices without the need for a Domain or Device Manager. When running a Component or Device from the Sandbox, it is started as its own forked process. A new Console View is created for logging and error messages.

To launch a REDHAWK Component or Device in the Sandbox:

  1. Open the project’s spd.xml file.
  2. From the Overview tab, in the Testing section, click Launch a local component.
  3. From the REDHAWK Explorer View, expand the Sandbox.
  4. To view a running Component, expand or double click the Chalkboard. To view a running Device, expand the Device Manger.
  5. To display the corresponding console, right-click the Component or Device, select Show Console.

14.7.2.1 Releasing a Component/Device from the REDHAWK Sandbox

There are two ways to release a Component using the IDE and one to release a Device:

14.7.2.2 Terminating a Component from the REDHAWK Sandbox

Sometimes a REDHAWK Component fails to respond to input. In these cases the Component may need to be terminated.

To terminate a Component:

14.7.3 Using the Debugger with the Sandbox

The REDHAWK IDE provides an infrastructure-free way to use, test, and debug a REDHAWK Components. This section describes how to use the debugging features of the IDE.

14.7.3.1 Setting Breakpoints in Component source code

A breakpoint suspends the execution of a program at the location where the breakpoint is set. Breakpoints can be enabled and disabled via the Breakpoints View or from the source code editor.

To set a breakpoint from the source code editor:

  1. Open the source code file.
  2. Choose a line to set the breakpoint.
  3. Directly to the left of the line of code, in the vertical marker bar, perform one of the following actions:
    • Right-click, select Add Breakpoint or Toggle Breakpoint.
    • Double-click in the marker bar.
  4. A small solid blue (for C/C++/Java code) or green (for Python code) circle marks the breakpoint location.

14.7.3.2 Launching a Component in the REDHAWK Sandbox in Debug Mode

To use the REDHAWK IDE’s debugger, a REDHAWK Component can be launched in the Sandbox in debug mode.

A Component can be launched in debug mode in several ways:

There are two ways to confirm that the REDHAWK Component has been launched in debug mode:

The debugger can switch between Python, C++, and Java while debugging. The REDHAWK IDE can also launch other Components in the Sandbox to interact with Components in debug mode.

Note that there are three separate debuggers for C++, Python, and Java. They all support the basic debugging capabilities such as setting breakpoints, stepping through executing code, and viewing variables. However, some debuggers have additional features that are not available to the others. For example, the Java debugger has the ability to hot swap code as it is executing.

If there are breakpoints set and triggered, a Confirm Perspective Switch dialog prompts the user to open the Debug perspective. Clicking Yes rearranges the workbench so it is geared towards debugging source code.

The Debug perspective displays these additional views:

14.8 Deploying Projects to the SDRROOT

The following methods may be used to deploy a REDHAWK project into the target SDRROOT.

14.9 Snapshot Tool

The Snapshot Tool enables users to save data from any BulkIO Port to a file. The following procedure explains how to use the Snapshot Tool.

  1. To open the Snapshot Wizard, right-click an output Port in the Chalkboard or the REDHAWK Explorer and select Snapshot from the context menu (Figure 14.44).


    PIC
    Figure 14.44: The Output Port Context Menu


    If the Component/Waveform has not been started before opening the snapshot, the Start Resource dialog box is displayed, which prompts the user to start the Component/Waveform (Figure 14.45).


    PIC
    Figure 14.45: The Start Resource Dialog Box


    To start the Component/Waveform and open the Snapshot Wizard, click Yes. To continue to the Snapshot Wizard without starting the Component/Waveform, click No .

    The Snapshot Wizard is displayed (Figure 14.46).


    PIC
    Figure 14.46: The Snapshot Wizard


  2. To specifiy how much data is captured, select the capture mode from the first combo box. The following capture modes are supported:
    • Number of Samples: Collects the number of samples specified by the text field to the right.
    • Indefinitely: Collects samples until the user stops the snapshot or an end of stream occurs.
    • Clock Time: Collects samples for a set period of time in real time set by the text field to the right (in seconds).
    • Sample Time: Collects samples for a period of time as specified by the delta and number of samples (time = delta * number of samples), set in the text field to the right.
  3. Optionally, enter a custom Connection ID in the Connection ID (Optional) field.
  4. To specify the the file type to use when saving data, select a file type from the File Type combo box. The supported file types include:
    • Binary files (.bin & .sri): Saves data from the Port to a .bin file and saves the metadata (SRI, start time, end time, data type, and number of samples) to an .sri file.
    • Binary files (.bin & .xml): Saves data from the Port to a .bin file and saves the metadata (SRI, start time, end time, data type, and number of samples) to an .xml file.
    • Midas BLUE File (.tmp): Saves output data and metadata to a BLUE .tmp file.
  5. To specify where to save the file, you have two options.
    • To save the file to a location other than the workspace, deselect the Save to Workspace checkbox, click Browse, navigate to the desired location, and click OK.
    • To save the file in the workspace, select the Save to Workspace checkbox and select the file or directory in the displayed tree of workspace files and folders (Figure 14.47). Saving the file in the workspace automatically refreshes the project, and the files can be accessed in the IDE.


      PIC
      Figure 14.47: The Snapshot Save to Workspace Navigation Tree


      To add folders to the workspace, right-click the existing folder where the new folder is desired. A New Folder window is displayed (Figure 14.48). Enter the name of the folder and click Finish.


      PIC
      Figure 14.48: The Snapshot New Folder Window


      To delete files from the workspace, right-click the item you want to delete and select Delete. When prompted, verify the deletion request.

  6. To be prompted before existing files are overwritten when the new snapshot is created, select the Confirm overwrite checkbox. If this option is not selected, any existing files are automatically overwritten when the new snapshot is created.
  7. Click Finish.
    • If Confirm overwrite was selected, and there are existing files in the directory, the dialog box in Figure 14.49 is displayed.


      PIC
      Figure 14.49: Snapshot - Overwrite Files Dialog


      To start the snapshot and overwrite the files, click Yes, otherwise click No to return to the Snapshot Wizard.

    • If Confirm overwrite was not selected, the snapshot starts.

    The progress view is displayed (Figure 14.50). If the snapshot is unable to open the progress view, instructions are displayed for how to manually open the view. To stop a snapshot prematurely, click Cancel Operation (the red square icon) next to the job in the progress view.


    PIC
    Figure 14.50: Snapshot - Progress View


    When the snapshot completes, the job persists in the progress view (Figure 14.51).


    PIC
    Figure 14.51: Snapshot - Completed Job


  8. To view the results of the snapshot, find the referencing job, and click Finished. The following output message is displayed (Figure 14.52).


    PIC
    Figure 14.52: Snapshot - Results Dialog


    If only a few files are written, then the output message lists all the files created by the snapshot. If a large number of files are written, the output message lists the base name of the files and the number of each type of file made.

  9. Click OK.

14.10 Connect Wizard

The Connect Wizard enables users to manually create a connection between two Ports of compliant types and create a custom Connection ID. The following procedure explains how to use the Connect Wizard.

  1. To open the Connect Wizard, in the Chalkboard or the REDHAWK Explorer, right-click a Port and select Connect from the context menu (Figure 14.53).


    PIC
    Figure 14.53: Port Context Menu in REDHAWK Explorer


    The Connect Wizard is displayed (Figure 14.54).


    PIC
    Figure 14.54: The Connect Wizard


  2. Under Source, select a uses (output) Port.
  3. Under Target, select a compliant provides (input) Port.
  4. In the Connection ID text box, enter a Connection ID.
  5. Click Finish.

14.11 Using the Octave Wizard

The Octave Wizard enables users to import existing Octave M-files for easy conversion into REDHAWK C++ Components. The user imports an existing M-file, as well as any required dependent M-files, and then maps the M-file’s inputs and outputs to REDHAWK Ports and Properties. The following procedure explains how to use the Octave Wizard.

  1. To open the Octave Wizard, select File > New > Other.

    The Select a wizard dialog is displayed (Figure 14.55).


    PIC
    Figure 14.55: Select a Wizard Dialog


  2. Select REDHAWK Octave Project and click Next.

    The Create a REDHAWK Component Project dialog is displayed (Figure 14.56).


    PIC
    Figure 14.56: Create a REDHAWK Component Project Dialog


  3. In the Project name field, enter a project name and click Next.

    The New Implementation dialog is displayed (Figure 14.57).


    PIC
    Figure 14.57: New Implementation Dialog


  4. Enter an ID and a description for this Component implementation and click Next.

    The New M-File dialog is displayed (Figure 14.58).


    PIC
    Figure 14.58: New M-File Dialog


  5. In the Primary M-file field, enter the location of the Octave M-file you want to import or click Browse and navigate to the file. If the primary M-file depends on non-standard methods, select Primary M-file depends on non-standard M-files and select the dependent M-files. Click Next.

    The Map M-file dialog is displayed (Figure 14.59).


    PIC
    Figure 14.59: Map M-file Dialog


  6. The Map M-file dialog enables the user to map the Octave inputs and outputs to REDHAWK Ports or Properties. The Name/ID field contains the names contained in the M-file. You have the following options for both Inputs and Outputs:
    • In the Mapping field, select to map to either a Property (Simple), a Property (Sequence) or a Port.
    • In the Type field, select to map to either a String, a Double (Real) or Double (Complex) variable type.
  7. Click Finish.

    The Octave M-file based Component is created.

14.12 Plot Port Wizard

The Plot Port Wizard enables users to choose the settings for a plot before opening the Plot View. The following procedure explains how to use the Plot Port Wizard.

  1. In the REDHAWK Explorer or any running diagram (Chalkboard or Waveform running on a Domain), to open the Plot Port Wizard, select an output Port, then right-click the selected Port and select Plot Port ... from the context menu (Figure 14.60).


    PIC
    Figure 14.60: Port Context Menu


    The Plot Port Wizard is displayed (Figure 14.61).


    PIC
    Figure 14.61: Plot Port Wizard


  2. Select a Type. The following types are available:
    • DOT
    • LINE
    • POINT
    • RASTER
  3. Select a Mode. The following modes are available:
    • Auto
    • Imaginary
    • Magnitude
    • Phase
    • Real
    • Real and Imaginary
    • Real vs Imaginary
    • 10 Log
    • 20 Log
  4. Select a Frame Size. This enables you to override the value in StreamSRI, which is the default. You may choose one of the existing values or enter a custom value, for example, 16000.
  5. Optionally, enter a value for Refresh Rate (fps):. This enables you to perform smart thinning of the line plot based on screen frames per second. To disable smart thinning, enter 0. The default value of 30 fps will be used if the field is left blank.
  6. Optionally, enter a value for Line Plot Frame Thinning. You may thin the line plot by displaying 1 out of every n frames. For no thinning, enter -1. The default value of 8 will be used if the field is left blank.
  7. Optionally, in the Connection ID field, enter a custom Connection ID.
  8. To override the value in StreamSRI (the default), in the Sample Rate field, enter a custom sample rate.
  9. To select a blocking option for pushPacket when the plot is not able to keep up with the data stream, select one of the radio buttons in Blocking option:
    • non-blocking - Do not block incoming data.
    • blocking - Block incoming data.
    • use SRI.blocking (default) - Set the blocking based on the StreamSRI.blocking field received from the pushSRI() call.
  10. To remove the stream when an EOS is received, select the Remove Stream from Plot on End Of Stream checkbox.
  11. To plot an FFT of the signal, select the Take FFT checkbox. You have six options for the FFT:
    • Select a Transform Size from the list or enter a custom value (Performance is best if the transform size is factorable by 2, 3, 4, and 5).
    • Enter the Percent Overlap.
    • Enter the Num Averages.
    • Enter the Sliding Num Averages.
    • Select the Output Type. The following types are available:
      • Normal
      • Magnitude Squared
      • Power Spectral Density
    • Select a Window. The following windows are available:
      • Bartlett
      • Hanning
      • Hamming
      • Blackman-Harris
      • Blackman
  12. Click Finish.

The Plot View is displayed with the desired settings.


Creative Commons License
REDHAWK Documentation is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.