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:
- Eclipse - Base Eclipse package: http://eclipse.org/
- Eclipse JDT - Java Development Tooling for Eclipse: http://www.eclipse.org/jdt/
- Eclipse CDT - C++ Development Tooling for Eclipse. Includes tools for autoconf, rpm spec file editing, and many debugging tools: https://www.eclipse.org/cdt/
- Eclipse CORBA - IDL Editor for Eclipse: http://eclipsecorba.sourceforge.net/
- PyDev - Python Development Tooling for Eclipse: http://pydev.org/
- Eclipse Git - Git Tooling for Eclipse: https://www.eclipse.org/egit/
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).
- 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:
- Code completion
- Code completion with auto import
- Type hinting
- Code analysis
- Go to definition
- Refactoring
- Debugger
- Interactive console
- Unittest integration
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 Getting Started, http://pydev.org/manual_101_root.html
- PyDev Configuring Interpreter, http://pydev.org/manual_101_interpreter.html
- PyDev Manual, http://pydev.org/manual.html
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:
- Start the REDHAWK IDE by entering the following:
- Select Window > Preferences.
- Select PyDev > Interpreter - Python.
- Select Auto Config.
- 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.
- Select Forced Builtins.
- Select New…
- Enter the following information into the dialog box. Remove any new lines.
- 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:
- Click Open Perspective from the top right of the Workbench.
- Select Window> Open Perspective > Other.
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:
- 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:
- Project Explorer View: Provides a hierarchical view of the resources in the Workbench.
- Outline View: Displays an outline of a structured file that is currently open in the editor area.
- Properties View: Displays Property names and basic Properties of a selected resource.
- Problems View: Automatically logs problems, errors, or warnings when working with various resources in the Workbench.
- Console View: Displays a variety of console types depending on the type of development and the current set of user settings. Specific implementations of the Console View are described in Section 14.4.12.
The following two REDHAWK-specific Views are in the REDHAWK Perspective:
- REDHAWK Explorer View: Allows a user 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
environment. It also provides access to the Sandbox, which is an environment for
running Components and Applications without a Domain Manager or a Device
Manager. Exploring an active Domain using the REDHAWK IDE is discussed in
Chapter 17. The REDHAWK Explorer View is displayed in Figure 14.2.
- CORBA Name Browser View: Maps names to specific CORBA Servants. The CORBA
Name Browser View is used to examine the current contents of the Naming Service as
well as perform basic manipulation of that context. The view displays all currently bound
name contexts (folders) and objects. The CORBA Name Browser View is displayed in
Figure 14.3.
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
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:
- Generate All Implementations Button: This button is used to generate the code
implementation of the SPD file. The generated code is based on the code generator
template that was chosen during the New Project Wizard and the content found
within the SPD, PRF, and SCD files.
The code generators are not exhaustive. There are edge case Port types that may not compile.
- New Control Panel Button: This button is used to generate a new control panel.
The SoftPkg Editor is organized into four main tabs:
- Basic information about the SoftPkg can be edited from the Overview tab
- Properties and messages can be edited from the Properties tab
- Ports can be edited from the Ports tab
- Implementations and code generation settings can be edited from the Implementations tab.
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:
- 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.
- 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.
- The Component Content section displays hyperlinks to navigate to the Properties and Implementations tabs of the SoftPkg Editor.
- 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.
- 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
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:
- In the All Properties Section, click Browse….
- Expand Target SDR.
- Drill down to and select the desired Property.
- 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:
- ID is required, and must be unique within the component or device.
- Name is optional, but if given, is favored over the ID for generated code.
- Kind describes the intended use of the property. The default is property.
- Mode determines whether the property can be read and/or written. The default is readwrite.
- Description is optional; it documents the intended use of the property. User interfaces may present the description as help text.
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:
- Type describes the basic data type of the property (e.g., float). For complex numeric types, select complex in the the combo box next to the type.
- Value is the initial value for the property. If not given, the initial value is undefined.
- Units is strictly informative, but may be displayed in user interfaces.
- Enumerations is a mapping of human-readable string labels to values. User interfaces may use the enumerations to present the labels in place of values.
- Action is only applicable to properties with a kind of allocation.
- Range, if enabled, sets optional lower and upper limits on the value. The range is not enforced by generated code; however, user interfaces may choose to enforce it.
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.
- To add a field, right-click the struct in the All Properties section, select New and then select one of Simple or Simple Sequence.
- To remove a field, select the struct in the All Properties section and click Remove.
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
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:
- Give the Port a Name unique to this Component or Device.
- Select a Direction: either input, output, or bidirectional.
Only Message Consumer ports should be bidirectional; see Section 5.9.3.
- The Type is optional and strictly informative. A Port may have one or more type, defaulting to control if none is selected.
- Select the IDL Interface that this Port implements. Click Browse… to open the selection
dialog.
By default, the interface selection dialog only shows the most common interfaces used in REDHAWK. Select the Show all interfaces checkbox to show the complete list for IDL interfaces within the Core Framework’s install location.
- Optionally, enter a Description of the Port, such as its intended use.
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
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.
- The Implementation section defines the compiler for the selected language and provides a custom description for this implementation.
- The Dependencies section provides the opportunity to place limitations on a resource so that it may only execute on a suitable Device. This is done through the use of Property dependencies. A resource’s execution may be limited to a particular Device by placing a dependency on a device’s Property. To provide compatibility among different sets of users, well known Properties have been created, including different OS and processor types. The OS and processor dependencies sections contain a preset list of Properties to select from.
- The Code section indicates the local file name, priority, and executable for the implementation.
- The Code Generation Details section contains configuration values for the implementation’s code generation. This includes the code template used, output folder location and code generator properties.
14.4.2 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
The Overview tab provides general information about the Waveform, and hyperlinks to additional Waveform-related sections within the IDE.
- The General Information section provides controls to set the ID, Name, Version, Controller and Description for the Waveform.
- The External Ports section provides the ability to designate a particular Component’s
Port as accessible to external Waveform objects. By default, an external Port name is
equal to the name of that Port within the Component, but the external Port can be
renamed. For more information about external Ports, refer to Section 11.4.5.
To change the external Port name:
- In the External Ports section, locate the Port and click the cell in the External Name column in the Port’s row.
- Enter a new value for the name. (Figure 14.10)
- Press Enter.
- The Testing section allows for the launching of local Waveforms. A local Waveform does not require a running Domain or Device Manager and executes within the Sandbox. A local Waveform is similar to launching an individual Component in the Chalkboard and constructs the Waveform within a new Chalkboard instance. You may launch additional Components into the Waveform running in the Chalkboard using the palette. These newly launched Components have standard runtime actions (Plot, Start, Stop, Terminate, and Connect) available. When the local running Waveform is released these newly launched Components are not saved in the Waveform.
- The Exporting section provides a hyperlink to the Export Wizard, which steps through the process of deploying the Waveform into the SDR Root.
14.4.2.2 Waveform Editor Properties Tab
The Properties tab provides access to the Component’s properties within the Waveform. Within the Properties tab, you can:
- Assign an external property ID
- Set the overridden value within the SAD file
- Filter and search for properties
- Compare the overridden value to the original PRF value
- Export the currently displayed table to an html spreadsheet
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:
- Select the Properties tab of the Application’s SAD file.
- 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.
14.4.2.3 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:
- Drag the Component from the Palette onto the diagram.
- Click the Component.
- Open the Properties View.
- From the Properties View, change the desired Properties.
- Press Ctrl+S to save the changes.
To make a Port external:
- Left-click the Port you want to make external, to gain focus on the Port.
- Right-click the Port to open the Port context menu.
- Select Mark External Port.
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):
- 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.
- 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.
- 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.
- Enter the appropriate information and click Next. The Identify Ports dialog is
displayed.
- 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
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
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
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:
- Click Add….
- Select the Device to add.
- Click Finish.
Use the table in the Device section to configure the Nodes Properties.
14.4.3.3 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:
- Drag the Device from the Palette onto the diagram.
- Click the Device.
- Open the Properties View.
- From the Properties View, change the desired Properties.
- Press Ctrl+S to save the changes.
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
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:
- Zoom In: Left-click and drag to form a box to zoom in on a portion of the plot.
- Zoom Out: Right-click to zoom out a single level.
- Open Menu: Center-click to bring up the NeXtMidas plot menu.
- Close Menu: Right-click an open menu to close the pop-up menu.
14.4.5 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
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:
- Zoom In: Left-click and drag to form a box to zoom in on a portion of the plot.
- Zoom Out: Right-click to zoom out a single level.
- Open Menu: Center-click to bring up the NeXtMidas plot menu.
- Close Menu: Right-click an open NeXtMidas plot menu to close the pop-up menu.
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:
- Change Plot Mode: Changes the mode of the current plot. The plot options include:
- Auto
- Imaginary
- Magnitude
- Phase
- Real
- Real and Imaginary
- Real vs Imaginary
- 10 Log
- 20 Log
- Change FFT Size: Changes the FFT size. The options include:
- 1k
- 2k
- 4k
- 8k
- 16k
- 32k
- 64k
- Change Plot Type: Changes the plot type. The types include:
- Dot
- Line
- Point
- Raster
The red icon next to the Change Plot type arrow is a toggle button that when clicked, changes the active plot to display either the Line or the Raster plot.
- The View Menu (Figure 14.25) contains the following options:
- New Plot View: Displays an identical plot view. This option is useful to view both the Line and Raster plots of the same data simultaneously.
- Plot Type: Changes the plot type. Plot types include: Dot, Line, Point and Raster.
- Display SRI: Displays the SRI View (Section 14.4.11).
- Settings...: Displays the Plot Settings Dialog (Section 14.4.7)
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.
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.
- Mode: Select the Mode of the plot.
- Min: Set the minimum value for the plot. The default value is to automatically determine the minimum.
- Max: Set the maximum value for the plot. The default value is to automatically determine the maximum.
- Refresh Rate (fps): Set the desired refresh rate in frames per second (fps) to perform smart thinning of the data. Enter 0 to disable smart thinning. The default value is 30 fps.
- Enable plot configure menu using mouse: This checkbox enables the NeXtMidas plot configure menu using the mouse.
- Enable quick access control widgets: This checkbox enables the quick access control widgets to change plot settings from the View. When enabled, Plot Port FFT has a quick control widget for adjusting the FFT number of averages directly in the View.
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).
The Output Port Settings enable you to modify how the source is being displayed.
- The Show checkbox enables you to turn the plotting of individual data streams on and off.
- The Stream ID displays the Stream ID for each datastream in the plot.
- Clicking on Color brings up the color palette window (Figure 14.28), which enables
you to select a color for the specified stream on the plot.
- Framesize: Enables you to override the displayed default frame size.
- The IF and RF radio buttons enable you to toggle between Intermediate Frequency (IF) and RF frequency values for the x-axis on FFT plots.
- Center Freq: Enables you to override the center frequency value for RF plots. This field is grayed out for IF plots.
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.)
The BULKIO settings dialog enables you to modfy how the data is received via the CORBA Bulk Data.
- Connection ID: Displays the Connection ID of the current connection.
- Sample Rate: Enables you to set a custom sample rate to override the value in StreamSRI. Enter 0, or leave on AUTO, to use the value from StreamSRI.
- Remove on ‘End of Stream’: This checkbox enables you to select whether the stream is removed from the plot when an EOS is received for the selected Stream ID.
- Blocking Option: This enables you to select a blocking option for pushPacket when
the plot is not able to keep up with the data stream by selecting one of the radio
buttons.
- 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.
14.4.7.4 FFT
Selecting FFT in the left-hand navigation pane displays the FFT settings dialog (Figure 14.30.)
The FFT section enables you to change various settings on the FFT primitive.
- Num Averages: Enables you to change the number of averages in the FFT.
- Overlap: Enables you to change the overlap of the FFT.
- Sliding Num Averages: Enables you to change the sliding number averages of the FFT.
- Transform Size: Enables you to change the transform size of the FFT. For best results the entry should be a power of 2.
- Window Type: Enables you to change the window type of the FFT.
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:
- Expand the Domain.
- Expand the Event Channels folder.
- 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:
- Expand the Naming Service.
- Expand the Domain.
- 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.
The controls in the upper right of the Event Viewer View provide the following functionality:
- To clear the logs, click the Clear icon.
- To ensure the view doesn’t scroll automatically to the top as new events are received, click the Scroll Lock icon.
- To customize the Table:
- Click the Customize Table icon.
- Enter the desired changes in the Customize Table Dialog.
- Click OK.
- To stop listening to a channel:
- From the View Menu, select Remove….
- In the Dialog, select the channel listeners to remove.
- Click OK.
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:
- In the Filter field, enter the filter text for the event log.
- To remove the filter, click the Clear icon.
- To enable regular expressions in the Filter field, check the RE checkbox.
To search the event log:
- In the Search field, enter the text for which you want to search.
- To clear the search highlights from the event log, click the Clear icon.
- To enable regular expressions in the Search field, check the RE checkbox.
14.4.9 Data List and Statistics View
The Data List and Statistics features are designed for simple runtime debugging of Component Ports.
- To open the Data List view, right-click a Port of a started Component.
- From the context menu, select Data List.
The Data List View is opened. (Figure 14.33)
- Select the preferred capture type:
- Number of Samples: Select a sample size
- Indefinitely: Collect until the user stops the process.
- Select the Number of Dimensions of the sample data:
- Real
- Complex
- any positive integer number of dimensions
- Click Start Acquire.
After all desired samples have been acquired and displayed in the Data List table, two additional options are displayed:
- Save
- Chart
- To open a wizard and write the data to a BLUE Midas file or a binary file, click Save.
- To open the Statistics View, which features a histogram and basic statistics of the sample
data, click Chart. (Figure 14.34)
- 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)
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).
The Port Monitor View is opened. (Figure 14.37)
The View displays the following information:
- Name: The name of the Port or Port connection.
- Elements/sec: The rate of CORBA elements transferred in the pushPacket data call.
- MBps: Mega Bytes transferred per second.
- calls/sec: Number of push calls per second to the Port.
- Stream IDs: List of all active stream IDs.
- Avg. Queue Depth: For Components that queue data before processing/sending, the average queue depth measured as a percentage. If a Port does not queue data, this value is set to zero.
- Time: The elapsed time, in seconds, since the last packet was transferred via a push packet call.
The following actions are available in the Port Monitor View.
- To Configure the Port Monitor View:
- Click the View Menu.
- Select Configure.
The Port Monitor Configuration dialog box is displayed.
The following options can be configured:
- Refresh Interval (sec): The time interval between fetching the Port statistics.
- Column Configuration: Specifies which columns are visible.
- To force a refresh of any connection or Port:
- Right-click the item.
- Select Refresh.
- 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.
- To open the SRI View, right-click the Port of a started Component and select Display
SRI from the context menu (Figure 14.39).
The SRI View is opened (Figure 14.40).
- 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.
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:
- Domain & Device Manager: When a Domain or Device Manager is launched, a new Console View is created. These new consoles contain an instance of a running nodeBooter. By default, log messages, standard out, and standard error messages for Components and Devices are written to the Device Manager console. Domain Manager related messages, including Waveform creation and resource allocation are written to the Domain Manager’s console.
- C++ builds: Compiling a C++ Device or Component creates a C-build console, which runs the Component/Device build script. While Eclipse does a relatively good job of parsing build output and providing in-context error indicators, it is sometimes helpful to view the output of the build from the console.
- Code Generators: When automatically generating code for a Component or Device, the appropriate code generator console is displayed and contains information pertaining to the code generation.
- Python Sandbox: The Python Sandbox, as described in Section 10.2, is a powerful tool for testing and interacting with Components and Devices. A Python Sandbox may be created from within the IDE to aid in testing.
- Third Party Consoles: Additional consoles (not described in this section) are available, including PyDev Scripting, Concurrent Versions System (CVS), Java Stack Trace, etc. These are part of Eclipse or part of third party plug-ins such as PyDev.
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.
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:
- Project Name: A project name that is unique to the current workspace. 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 Wizard dialog detects errors and informs the user if there is an invalid entry.
- Location: By default the location of the project is set to the current workspace. This may be changed by deselecting the Use default location check box and providing a custom location.
- Working sets: A working set is an Eclipse concept and provides an additional layer of organization to the project workspace. A user may put common projects into a single “working set” to visually organize the Project Explorer. Additional options become available when projects are placed in working sets allowing the user to build, refresh, and search based on a specific working set. While it may resemble a folder, a working set does not create a new directory on the file system and the same project may belong to multiple working sets.
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:
- Contents: A REDHAWK Component is defined by an SPD file. By default, when creating a new Component, the SPD file created is an empty skeleton. A new Component may be based off of a previous Component’s SPD file by selecting it from the file system.
- Component ID: Every softpkg element contains an ID which is used for universally unique identification. The IDE generates a Distributed Computing Environment (DCE) compliant UUID by default.
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:
- Prog. Lang: A Component’s implementation may be written in either C++, Java, or Python.
- Code Generator: The REDHAWK IDE provides a single code generator for each of the programming languages. It is possible to augment the IDE with additional code generators. A user may choose to forgo automatic code generation and instead choose to create their implementation manually.
- ID: Each language implementation has a project unique ID. By default the language chosen is used as the ID.
- Description: A Component’s implementation may contain a description. The description is written into the Component’s SPD file.
Page three of the wizard allows the user to customize the properties of the code generator and template.
Wizard page three contains fields for:
- Generator: A read only label displaying the code generator being configured. This is the code generator that was chosen on the previous wizard page.
- Template: The code generator may provide multiple templates to choose from. Each
template may contain unique properties that may be set from the properties section.
REDHAWK provided templates include:
- Manual Generation: By default this only prepares the project for future development and generates a skeleton outline of methods that need to be implemented. A property exists to toggle skeleton code generation on or off.
- Minimal Implementation: Available only for Python. Generates two files, one that contains Ports and properties and another that can extend their functionality.
- Pull Port Data: The default template auto generates Port files, base classes, and skeleton code with examples for the user’s main file.
- Output Directory: The folder created to house the generated code.
- Package: Available only for Java implementations. The Java package to place auto-generated code within.
- Properties: Different code generation templates may provide configuration properties. Mouse hovering over the individual property provides information about the property.
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:
- Device: The user may select whether this is a standard Device, Loadable Device, or an Executable Device. The checkbox below indicates if this is an Aggregate Device.
- Contents: A REDHAWK Device is defined by an SPD file. By default, when creating a new Device, the SPD file created is an empty skeleton. The new Device may be based off of a previous Device’s SPD file by selecting it from the file system.
- Device ID: Every softpkg element contains an ID which is used for universally unique identification. The IDE generates a DCE compliant UUID by default.
Page two of the wizard defines the Device’s implementation, the programming language used and the code generation template.
Wizard page two contains:
- Prog. Lang: A Device’s implementation may be written in either C++, Java, or Python.
- Code Generator: The REDHAWK IDE provides a single code generator for each of the programming languages. It is possible to augment the IDE with additional code generators. A user may choose to forgo automatic code generation and instead choose to create their implementation manually.
- ID: Each language implementation has a project unique ID, by default the language chosen is used as the ID.
- Description: A description for this implementation may be provided. The description is written into the Device’s SPD file.
Page three of the wizard allows the user to customize the properties of the code generator and template.
Wizard page three contains:
- Generator: A read only label displaying the code generator being configured. This is the code generator that was chosen on the previous wizard page.
- Template: The code generator may provide multiple templates to choose from. Each
template may contain unique properties which may be set in the properties section.
The REDHAWK provided templates include:
- Manual Generation: By default this only prepares the project for future development and generates a skeleton outline of methods that need to be implemented. A property exists to toggle skeleton code generation on or off.
- Minimal Implementation: Available only for Python. Generates two files, one that contains Ports and properties and another where the user can extend their functionality.
- Pull Port Data: The default template, auto generates Port files, base classes, and skeleton code with examples for the main file.
- Output Directory: The folder created to house the generated code.
- Package: Available only for Java implementations. The Java package to place auto-generated code within.
- Properties: Different code generation templates may provide configuration properties. Mouse hovering over the individual property provides information about the property.
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:
- Module Name: The module to place this IDL into.
- Version: IDL Version
- Import existing IDL Files: Specifies IDL files on disk which are included in this new IDL.
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:
- Domain Manager: Select the Domain Manager this Node is assigned.
- Contents: A REDHAWK Node is defined by a DCD file. By default, when creating a new Node, the DCD file created is an empty skeleton. The new Node may be based off of a previous Node’s DCD file by selecting it from the file system.
- Node ID: Every DCD contains an ID which is used for universally unique identification. The IDE generates a DCE compliant UUID by default.
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:
- Service Interface: Select, from the Core Framework’s list of installed IDLs the interface which this Service uses.
- Contents: A REDHAWK Service is defined by an SPD file. By default, when creating a new Service, the SPD file created is an empty skeleton. The new Service may be based off of a previous Service’s SPD file by selecting it from the file system.
- Service ID: Every softpkg element contains an ID which is used for universally unique identification. The IDE generates a DCE compliant UUID by default.
Page two of the wizard defines the Service’s implementation, the programming language used and the code generation template.
Wizard page two contains:
- Prog. Lang: The Service’s implementation may be written in either C++, Java, or Python.
- Code Generator: A Python code generator is available for REDHAWK Service code generation. It is possible to augment the IDE with additional code generators.
- ID: Each language implementation has a project unique ID, by default the language chosen is used as the ID.
- Description: A description may be provided for this implementation. The description is written into the Service’s SPD file.
Page three of the wizard provides customization to the configuration values of this implementation’s code generation properties and template.
Wizard page three contains:
- Generator: A read only label displaying the code generator being configured. This is the code generator that was chosen on the previous wizard page.
- Template: The code generator may provide multiple templates to choose from. Each
template may contain unique properties which may be set in the properties section.
The REDHAWK provided templates for Python Services include:
- Manual Generation: By default this only prepares the project for future development and generates a skeleton outline of methods that need to be implemented. A property exists to toggle skeleton code generation on or off.
- Minimal Implementation: Generates a minimal Service implementation.
- Output Directory: The folder created to house the generated code.
- Properties: Different code generation templates may provide configuration properties. Mouse hovering over the individual property provides information about the property.
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:
- Contents: An Waveform is defined by an SAD file. By default, when creating a new Waveform, the SAD file created is an empty skeleton. The new Waveform may be based off of a previous Waveform’s SAD file by selecting it from the file system.
- REDHAWK Waveform ID: Every SAD file contains an ID which is used for universally unique identification. The IDE generates a DCE compliant UUID by default.
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.
- In Project Explorer, right-click the project, select Rename.
The Rename Resource dialog is displayed.
- Enter the new project namespace and click Preview.
The Rename Resource window is displayed.
- 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:
- Java development user guide > Concepts > Debugger
- Java development user guide > Concepts > Breakpoints
- Java development user guide > Tasks > Running and Debugging
- C/C++ Development User Guide > Concepts > Debug
- C/C++ Development User Guide > Tasks > Running and debugging projects > Debugging
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:
- From the Project Explorer View, expand the project folder then the tests folder to display the existing test cases.
- Right-click the test script, select Run As > Python run.
- 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:
- Open the project’s spd.xml file.
- From the Overview tab, in the Testing section, click Launch a local component.
- From the REDHAWK Explorer View, expand the Sandbox.
- To view a running Component, expand or double click the Chalkboard. To view a running Device, expand the Device Manger.
- 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:
- Releasing using REDHAWK Explorer View:
- In the REDHAWK Explorer View, expand Sandbox > Chalkboard to display the running Component or Sandbox > Device Manager to display a running Device.
- Right-click the Component/Device, select Release.
- Releasing using Chalkboard Diagram:
- In the REDHAWK Explorer View, expand the Sandbox, double-click Chalkboard.
- In the Chalkboard Diagram, right-click the REDHAWK Component, select Release.
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:
- Terminating using REDHAWK Explorer:
- In the REDHAWK Explorer View, expand the Sandbox > Chalkboard.
- Right-click the REDHAWK Component, select Terminate.
- Terminating using the Chalkboard:
- In the REDHAWK Explorer View, expand the Sandbox, double-click Chalkboard.
- In the Chalkboard Diagram, right-click the REDHAWK Component, select Terminate.
- Terminating using the Console View:
- In the Console View, click the Display Selected Console drop down.
- Select the launched REDHAWK Component from the drop-down list to switch to its console.
- Click the Terminate icon, indicated by a red square.
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:
- Open the source code file.
- Choose a line to set the breakpoint.
- 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.
- 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:
- From the SPD file Editor:
- From the Project Explorer:
- In the Project Explorer View, expand the project.
- Right-click project’s spd.xml file and select Debug As > 1 Launch Component in Sandbox.
- The REDHAWK Component is now launched in the Sandbox in debug mode.
There are two ways to confirm that the REDHAWK Component has been launched in debug mode:
- From the Chalkboard Diagram, there is a small bug icon at the top right corner of the REDHAWK Component.
- From the REDHAWK Explorer View, expand the Sandbox > Chalkboard and a <DEBUGGING> decorator is displayed to the right of the REDHAWK Component.
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:
- Debug View: The Debug View displays the stack frame for the suspended threads in debug mode. Each thread in the program appears as a Node in the tree. It displays the process for each target that is running. Refer to Help > Help Contents or the Eclipse documentation for more details.
- Variables View: The Variables View displays information about the variables associated with the stack frame selected in the Debug View. New values can be assigned to variables while stepping through the source code. Refer to Help > Help Contents or the Eclipse documentation for more details.
- Breakpoints View: The Breakpoints View lists all the breakpoints currently set in the workspace. Double-click a breakpoint to display its location in the Editor. Breakpoints can be enabled, disabled, deleted, created, grouped by working set, triggered by a user supplied hit count, triggered only in certain conditions, or triggered by exceptions. Refer to Help > Help Contents or the Eclipse documentation for more details.
14.8 Deploying Projects to the SDRROOT
The following methods may be used to deploy a REDHAWK project into the target SDRROOT.
- Drag-and-drop from the Project Explorer:
- In the Project Explorer View, drag the top-level REDHAWK project onto the Target SDR in the REDHAWK Explorer View.
- In the REDHAWK Explorer View, expand Target SDR, then expand the appropriate sub-area: Components, Devices, Nodes, Services, or Waveforms, to display the deployed project.
- From the Project Menu:
- In the Project Explorer View, select the top-level REDHAWK project.
- From the Project menu, select Export to SDR.
- From the Context Menu:
- In the Project Explorer View, right-click the top-level REDHAWK project.
- Select Export to SDR.
- From the Overview page of the SPD Editor:
- Open the project’s spd.xml file.
- From the Overview tab of the SoftPkg Editor, in the Exporting section, click Export Wizard.
- In the Export Wizard, from the Available REDHAWK Projects section, check the desired projects to deploy.
- The Destination directory is prepopulated with the Target SDR.
- Click Finish to deploy selected projects into the Target SDR.
- From the File Menu:
- From the File menu, select Export.
- From the Export Wizard, expand REDHAWK Development and select Deployable REDHAWK Project.
- Click Next.
- From the Available REDHAWK Projects section, check the desired projects to deploy.
- The Destination directory is prepopulated with the Target SDR.
- Click Finish to deploy the selected projects into the Target SDR.
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.
- 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).
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).
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).
- 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.
- Optionally, enter a custom Connection ID in the Connection ID (Optional) field.
- 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.
- 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.
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.
To delete files from the workspace, right-click the item you want to delete and select Delete. When prompted, verify the deletion request.
- 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.
- Click Finish.
- If Confirm overwrite was selected, and there are existing files in the directory,
the dialog box in Figure 14.49 is displayed.
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.
When the snapshot completes, the job persists in the progress view (Figure 14.51).
- If Confirm overwrite was selected, and there are existing files in the directory,
the dialog box in Figure 14.49 is displayed.
- To view the results of the snapshot, find the referencing job, and click Finished. The
following output message is displayed (Figure 14.52).
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.
- 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.
- 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).
The Connect Wizard is displayed (Figure 14.54).
- Under Source, select a uses (output) Port.
- Under Target, select a compliant provides (input) Port.
- In the Connection ID text box, enter a Connection ID.
- 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.
- To open the Octave Wizard, select File > New > Other.
The Select a wizard dialog is displayed (Figure 14.55).
- Select REDHAWK Octave Project and click Next.
The Create a REDHAWK Component Project dialog is displayed (Figure 14.56).
- In the Project name field, enter a project name and click Next.
The New Implementation dialog is displayed (Figure 14.57).
- Enter an ID and a description for this Component implementation and click Next.
The New M-File dialog is displayed (Figure 14.58).
- 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).
- 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:
- 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.
- 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).
The Plot Port Wizard is displayed (Figure 14.61).
- Select a Type. The following types are available:
- DOT
- LINE
- POINT
- RASTER
- Select a Mode. The following modes are available:
- Auto
- Imaginary
- Magnitude
- Phase
- Real
- Real and Imaginary
- Real vs Imaginary
- 10 Log
- 20 Log
- 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.
- 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.
- 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.
- Optionally, in the Connection ID field, enter a custom Connection ID.
- To override the value in StreamSRI (the default), in the Sample Rate field, enter a custom sample rate.
- 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.
- To remove the stream when an EOS is received, select the Remove Stream from Plot on End Of Stream checkbox.
- 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
- Click Finish.
The Plot View is displayed with the desired settings.

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