Introduction

REDHAWK Enterprise Integration is a suite of software for interacting with a REDHAWK Domain in the Java Runtime Environment. The suite includes:

  • REDHAWK Driver: Provides simplified access to REDHAWK via standard Java interfaces. The goal is to streamline all interaction with the underlying REDHAWK Components as well as provide a simplified API for Java developers interacting with a REDHAWK Domain. The driver can be leveraged as a standalone Java ARchive (JAR) file.

  • REDHAWK Connector: Implements OSGi’s Managed Service Factory interface to allow users to register pre-configured instances of REDHAWK connections into a Karaf container.

  • REDHAWK REST: Provides REST Service to command and control a REDHAWK instance.

  • REDHAWK WebSocket: Provides an HTML5-compliant Websocket implementation that enables the ability to stream data from any REDHAWK BulkIO-enabled Port or Event Channel.

  • REDHAWK Camel Component: Provides a Camel Component for interacting with a REDHAWK Domain. This Component can be connected with other Apache Camel Components as a data flow solution.

The suite of software is prepackaged in a custom Karaf distribution to help users easily get started using REDHAWK Enterprise Integration.

All assets have been tested against REDHAWK 2.1.1.

Installing REDHAWK Enterprise Integration

Installing via Tarball

  1. Navigate to the directory where you want to install REDHAWK Enterprise Integration, and untar the tarball:

    tar -xzf redhawk-enterprise-integration.gz
  2. If not already set in your .bashrc/.bash_profile, set the JAVA_HOME environment variable by adding the following:

    JAVA_HOME=[path to java 8]
    export JAVA_HOME
  3. Source your .bashrc/.bash_profile:

    . ~/.bashrc or ~/.bash_profile

Installing via RPM

Important
If installing via RPM, you must be root or have sudo privileges.
  1. Run this command to install the RPM:

     rpm -i redhawk-enterprise-integration-dist-2.1.0-noach.rpm

    By default, the RPM is installed in /usr/local/redhawk. If you resolved the dependency during install, the RPM installs jre-1.8 for you.

  2. If you did not resolve the dependency during install, add a JAVA_HOME environment variable for Karaf to run properly (refer to the previous procedure, Installing via Tarball).

Getting Started

After installing REDHAWK Enterprise Integration, the following directories are displayed:

  • karaf-4.0.8: Directory contains a custom distribution of Karaf prepackaged with all REDHAWK Java Tool assets.

  • shell: Programatic access to REDHAWK Driver via the shell.

  • jacorb-deps: All dependencies needed to configure REDHAWK Driver to use JacORB instead of the default ORB provided by Java.

Working with the Shell

The shell provides a convenient method to use the REDHAWK Driver without an IDE or other development tools. To start the REDHAWK Driver shell environment:

Important
The following commands require access to a REDHAWK Domain and GPP.
  1. Run the jrepl script:

     ./jrepl

    In the console, you have access to the necessary imports for REDHAWK Driver via :eval driver-imports. You also have access to all the classes in REDHAWK Driver.

Tip
For additional instructions and information on trouble shooting, refer to the README.md file in the shell directory.

Example Commands

  • To create an Application:

    driver = new RedhawkDriver();
    application = driver.getDomain("REDHAWK_DEV").createApplication("MyFirstApplication", "/waveforms/rh/FM_mono_demo/FM_mono_demo.sad.xml")
  • To start an Application:

    application.start();
  • To release an Application:

    application.release();

More example commands can be found in the RedhawkDriver Code Examples section.

Working with Karaf

  1. To start Karaf, in the bin directory for Karaf, run the start script:

     ./start
  2. To access the Karaf console, in the bin directory for Karaf, run the client script:

     ./client
  3. Once logged in, run the command 'list' to display the REDHAWK Assets that have been preinstalled. Each asset includes documentation. Refer to the appropriate section in the online documentation for information about interacting with the individual assets. For more details on Karaf, refer to Apache Karaf documentation.

  4. Begin using the bundles provided to interact with REDHAWK or write your own applications that leverage the REDHAWK Enterprise Integration bundles to interact with REDHAWK.

REDHAWK Driver

The REDHAWK Driver asset encompasses several utility interfaces that give users convienent API access to REDHAWK via Java. The goal is to hide any CORBA interaction from programmers so they can focus effort on writing the logic for their application.

Getting Started

If using Maven, add the following to the dependency section of your project’s pom:

        <groupId>redhawk</groupId>
        <artifactId>redhawk-driver</artifactId>
        <version>2.1.0</version>

If familiar with Maven, and you are starting from scratch, you can use the redhawk-driver-bundle-archetype to generate your project structure by running this command:

mvn archetype:generate -DarchetypeGroupId=redhawk \
 -DarchetypeArtifactId=redhawk-driver-bundle-archetype \
 -DarchetypeVersion=1.0.0-SNAPSHOT

After running the command, you are prompted for the following information:

  • groupId

  • artifactId

  • version

  • package

After entering the necessary information, a template project is created that already has the REDHAWK Driver dependency in your pom and a simple main method in App.java that utilizes the REDHAWK Driver asset.

Important

We’re in the process of making the REDHAWK Enterprise Integration dependencies available on a public maven repository. Until then you will need to follow the Build From Source instructions in the readme included with this projects source code to add the redhawk-driver to your local maven repository.

Alternatively, when you installed the redhawk-enterprise-integration tgz/rpm the karaf distribution came with a system maven repository. Add this system maven repository to your settings.xml file. Here is an example profile you could add to your settings.

<profile>
        <id>rei</id>
        <repositories>
                <repository>
                        <id>dev-rei</id>
                        <name>Development REI</name>
                        <url>file://<!-- path to ${karaf.base}/system repo --></url><releases><enabled>true</enabled><updatePolicy>never</updatePolicy></releases><snapshots><enabled>false</enabled><updatePolicy>never</updatePolicy></snapshots>
                </repository>
        </repositories>
</profile>

If using profile make sure you add to your active profiles

If not using Maven, you can add the .jar file to your project’s build path or configure it with your project’s build tool as needed.

The following code examples may be helpful to developers getting started with the REDHAWK Driver.

Note

All code examples are coming directly from actual REDHAWK Driver Integration Tests. For the full imports needed for the code examples and more details refer to the source files where the examples(snippets) are taken from. The source files for all test relevant to the REDHAWK Driver can be found in the src/test/java directory for the REDHAWK Driver module.

RedhawkDriver Code Examples

The following code examples explain how to use the RedhawkDriver class.

Get a REDHAWK Domain

RedhawkDriverIT.java
RedhawkDomainManager domain = driver.getDomain(domainName);

Get a REDHAWK Device Manager

RedhawkDriverIT.java
String pathForDevManager = domainName+"/"+deviceManagerName;
logger.info(pathForDevManager);

RedhawkDeviceManager deviceManager = driver.getDeviceManager(pathForDevManager);

Get a REDHAWK Device

RedhawkDriverIT.java
//Path to device
String pathForDevice = domainName+File.separator+devManager.getName()+File.separator+deviceName;
logger.info(pathForDevice);

RedhawkDevice device = driver.getDevice(pathForDevice);

Get a REDHAWK Application

RedhawkDriverIT.java
RedhawkApplication application = driver.getApplication(domainName+"/"+sampleApp);

Get a REDHAWK Component

RedhawkDriverIT.java
RedhawkComponent component = driver.getComponent(domainName+"/"+sampleApp+"/SigGen_sine.*");

Get a REDHAWK Component’s Port

RedhawkDriverIT.java
RedhawkPort port = driver.getPort(domainName+"/"+sampleApp+"/SigGen_sine.*/dataFloat_out");

Helper Utility Examples

The RedhawkDriver includes helper utilities to enable users to easily access their REDHAWK Domain/REDHAWK Device Managers/REDHAWK Devices. These helper methods only work if there is only one REDHAWK Domain/REDHAWK Device Manager/REDHAWK Device available. If more than one REDHAWK Domain/REDHAWK Device Manager/REDHAWK Device exists, use the methods provided in Get a REDHAWK Domain, Get a REDHAWK Device Manager, or Get a REDHAWK Device to access those resources.

RedhawkDriverIT.java
//Use these utility methods if you only have one REDHAWK Domain/Redhawk Device Manager/Redhawk Device
RedhawkDomainManager domainManager = driver.getDomain();

RedhawkDeviceManager deviceManager = driver.getDeviceManager();

RedhawkDevice device = driver.getDevice();

RedhawkDomainManager Code Examples

The following code examples explain how to use the RedhawkDomainManager interface.

Create an Application

Sample code for creating an Application from a Waveform that is already in your Domain.

RedhawkDomainManagerImplIT.java
RedhawkDomainManager domainManager = driver.getDomain();
String waveformLocation = "/waveforms/rh/basic_components_demo/basic_components_demo.sad.xml";

//Create an application that already exists in your $SDRROOT
RedhawkApplication application = domainManager.createApplication(applicationName, waveformLocation);

Sample code for creating an Application from a SAD file on a file system.

RedhawkComponentImplIT.java
driver.getDomain("REDHAWK_DEV").createApplication(applicationName, new File("src/test/resources/waveforms/rh/testWaveform.sad.xml"));

Get an Application from a REDHAWK Domain

RedhawkDomainManagerImplIT.java
//Retrieve a specific application in your domain
application = domainManager.getApplicationByName(applicationName);

Get a Device from a REDHAWK Domain

RedhawkDomainManagerImplIT.java
//Retrieve a group of devices by regez
devices = domainManager.getDevicesByName("GPP.*");

//Retrieve a device by name
String deviceName = devices.get(0).getName();
RedhawkDevice device = domainManager.getDeviceByName(deviceName);

Get a Device Manager from a REDHAWK Domain

RedhawkDomainManagerImplIT.java
RedhawkDevice device = domainManager.getDeviceByName(deviceName);

//Retrieve all available device managers
List<RedhawkDeviceManager> managers = domainManager.getDeviceManagers();

//Get a specific device manager
RedhawkDeviceManager devManager = domainManager.getDeviceManagerByName(managers.get(0).getName());

RedhawkApplication Code Examples

The following code examples explain how to use the RedhawkApplication interface.

Managing your Application’s Lifecycle

RedhawkApplicationImplIT.java
application.stop();

// Start an application
application.start();

// Check to see if an application is started
if (application.isStarted())
        application.stop();

// Release an application
application.release();

Interacting with Components from Your Application

RedhawkApplicationImplIT.java
List<RedhawkComponent> components = application.getComponents();

// Get a specific component
String componentName = components.get(0).getName();
RedhawkComponent component = application.getComponentByName(componentName);

RedhawkComponent Code Examples

The following code examples explain how to use the RedhawkComponent interface.

Managing Your Component’s Lifecycle

RedhawkComponentImplIT.java
component.stop();

//Start a component
component.start();

//Check if a component is started
if(!component.started())
        component.start();

Interacting with Component Properties on Your Component

RedhawkComponentImplIT.java
RedhawkComponent component = application.getComponentByName("SigGen.*");

//Retrieve properties that are avaiable
Map<String, RedhawkProperty> propertiesMap = component.getProperties();

//Change a specific property
String propertyName = "sample_rate";
RedhawkSimple simpleProp = (RedhawkSimple) propertiesMap.get(propertyName);
simpleProp.setValue(1000);

RedhawkPort Code Examples

Below are code examples for using the RedhawkPort interface.

Consuming Messages from a REDHAWK Port

MessageConsumerPortIT.java
MessageConsumerPort msgConsumerPort = new MessageConsumerPort("message_out");
InMsgHandler msgHandler = new InMsgHandler();

//Appropriate Message Id is important!!!!!
msgConsumerPort.registerMessage("myMessage", myMessage_struct.class, msgHandler);
POA rootPOA = POAHelper.narrow(driver.getOrb().resolve_initial_references("RootPOA"));

rootPOA.the_POAManager().activate();
rootPOA.activate_object(msgConsumerPort);

RedhawkPort messageConsumer = rhApplication.getComponents().get(0).getPorts().get(0);

CF.Port messageConsumerPort = CF.PortHelper.narrow(messageConsumer.getCorbaObject());

try {
        messageConsumerPort.connectPort(msgConsumerPort._this(), "test-message-processing");

        Thread.sleep(5000l);
        assertTrue(msgHandler.getMessageCount()>0);
} catch (InvalidPort e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
} catch (OccupiedPort e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
}

RedhawkDevice Code Examples

Below are code examples for using the RedhawkDevice interface.

Allocate and Deallocate a Device

Sample code for allocating and deallocating a frontend device.

RedhawkDeviceImplMT.java
//Get Device Manager
RedhawkDeviceManager deviceManager = driver.getDomain().getDeviceManagerByName("SimulatorNode");

//Get Device you want
RedhawkDeviceImpl device = (RedhawkDeviceImpl) deviceManager.getDeviceByName("FmRdsSimulator.*");

//Create Allocation Map
Map<String, Object> newAlloc = new HashMap<>();

//Section 7.1 REDHAWK Manual for these properties
/*Example tuner status.
 * {
 * FRONTEND::tuner_status::rf_flow_id=,
 * FRONTEND::tuner_status::bandwidth=2280000.0,
 * FRONTEND::tuner_status::stream_id=MyStreamID,
 * FRONTEND::tuner_status::center_frequency=1.011E8,
 * FRONTEND::tuner_status::group_id=,
 * FRONTEND::tuner_status::gain=0.0,
 * FRONTEND::tuner_status::enabled=true,
 * FRONTEND::tuner_status::sample_rate=285000.0,
 * FRONTEND::tuner_status::allocation_id_csv=default:55d211b1-c35c-44a8-837c-96a7470089f0,
 * FRONTEND::tuner_status::tuner_type=RX_DIGITIZER
 * }
 *
 * params from IDE:
 *
*/
String allocId = "myTestAllocationId";
newAlloc.put("FRONTEND::tuner_allocation::allocation_id", allocId);
newAlloc.put("FRONTEND::tuner_allocation::tuner_type", "RX_DIGITIZER");
newAlloc.put("FRONTEND::tuner_allocation::center_frequency", 101100000d);//101.1e6
newAlloc.put("FRONTEND::tuner_allocation::sample_rate", 256000d);//256e3
newAlloc.put("FRONTEND::tuner_allocation::bandwidth_tolerance", 20.0);
newAlloc.put("FRONTEND::tuner_allocation::sample_rate_tolerance", 20.0);

//Allocate Device
device.allocate(newAlloc);

//Should now have a used tuner
assertEquals(false, device.getUsedTuners().isEmpty());

//Should now be no unused tuners
assertEquals(true, device.getUnusedTuners().isEmpty());

//Check to make sure center frequency is correct
assertEquals(101100000d, device.getUsedTuners().get(0).get("FRONTEND::tuner_status::center_frequency"));

//Deallocate Device
device.deallocate(allocId);

RedhawkEventChannelManager Code Examples

The following code examples explain how to use the RedhawkEventChannelManager interface.

Interacting with the EventChannelManager

RedhawkEventChannelManagerIT.java
        //Get the event channels in your domain
        List<RedhawkEventChannel> eventChannels = ecManager.getEventChannels();

        //Create an Event Channel
        String eventChannelName  = "myEventChannel";
        ecManager.createEventChannel(eventChannelName);

        //Retrieve an Event Channel
        RedhawkEventChannel ec = ecManager.getEventChannel(eventChannelName);

        //Release an Event Channel
        ecManager.releaseEventChannel(eventChannelName);
}

REDHAWK Connector

Overview

Using the REDHAWK Connector to create a Redhawk Connection results in the following:

  • A REDHAWK Driver instance is registered in the OSGi Service Registry.

  • A REDHAWK Camel Component is resolved with the Connection Name configured.

  • A Websocket service is available for the connection.

  • A REST Endpoint is available for the connection.

Configuring REDHAWK Connector

Table 1. Configuration Table

Name

Key

Required

Default

Description

Connection Name

connectionName

Yes

null

Unique name used to identify this connection.

Server Name

host

Yes

localhost

Hostname or IP Address of the CORBA Naming Service.

Port

port

Yes

2809

Port where the CORBA naming service is listening.

Domain Manager Location

domainManager

No

null

Optional name of the REDHAWK Domain Manager (as found in the CORBA Naming Service).

Device Manager Name

deviceManagerName

No

null

The name of the Device Manager to register with REDHAWK.

Device Manager File System

deviceManagerFileSystemRoot

No

null

The filesystem root of the Device Manager.

Creating a REDHAWK Connector Configuration

To create a REDHAWK Connector configuration in the Karaf web console:

  1. Open a browser to /system/console/configMgr of your running Karaf instance. For example:

    http://127.0.0.1:8181/system/console/configMgr

    You are prompted to enter a username and password.

  2. Enter a username and password. (The default username is karaf, and the default password is karaf.)

    Tip
    To change the default username or password, refer to the Apache Karaf documentation.
  3. In the list of configurable services displayed on the Apache Karaf Web Console Configuration page, locate REDHAWK Connector.

  4. To add a new configuration, click the '+' button.

    The REDHAWK Connector page is displayed.

    KarafConfiguration
  5. Enter the appropriate information for the new configuration and click Save.

    The new configuration is displayed in the list of configurable services.

To create a REDHAWK Connector configuration using a file:

  • In the $karaf.base/etc directory, add a file with this prefix: redhawk.datasource.factory and append a unique string with a leading dash (for example, -myConfig.cfg).

Example config file
connectionName=localRH
port=2809
host=localhost
domainManager=REDHAWK_DEV

Using Connection in blueprint

To inject the Redhawk Driver instance into your application, add the following lines in your blueprint.xml file:

<reference id="myRedhawkService" interface="redhawk.Redhawk" filter="(connectionName='insert connection name'"/>)

<bean id="myApplicationBean" class="com.example.MyApplicationBeanImpl">
        <property name="redhawk" ref="myRedhawkService" />
</bean>

REDHAWK REST

Overview

Version information

Version : 2.1.0

URI scheme

Host : 127.0.0.1
BasePath : cxf/redhawk
Schemes : HTTP

Tags

  • {nameserver}domains

  • {nameserver}domains{domain}applications

  • {nameserver}domains{domain}applications{applicationId}components

  • {nameserver}domains{domain}applications{applicationId}components{componentId}ports

  • {nameserver}domains{domain}applications{applicationId}components{componentId}softwarecomponent

  • {nameserver}domains{domain}devicemanagers

  • {nameserver}domains{domain}devicemanagers{devmanager}devices

  • {nameserver}domains{domain}devicemanagers{devmanager}devices{deviceId}ports

  • {nameserver}domains{domain}eventchannels

  • {nameserver}domains{domain}waveforms

Paths

GET REDHAWK Domains

GET /{nameserver}/domains
Parameters
Type Name Schema Default

Query

fetch
optional

enum (EAGER, LAZY)

"EAGER"

Responses
HTTP Code Description Schema

200

successful operation

DomainContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains

GET REDHAWK Domain

GET /{nameserver}/domains/{domain}
Parameters
Type Name Description Schema

Path

domain
required

Name of REDHAWK Domain

string

Responses
HTTP Code Description Schema

200

successful operation

Domain

Produces
  • application/json

  • application/xml

  • text/plain

Tags
  • {nameserver}domains

GET Applications for a REDHAWK Domain

GET /{nameserver}/domains/{domain}/applications
Parameters
Type Name Schema Default

Query

fetch
optional

enum (EAGER, LAZY)

"EAGER"

Responses
HTTP Code Description Schema

200

successful operation

ApplicationContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

Stop/Start Application

POST /{nameserver}/domains/{domain}/applications/{applicationId}
Parameters
Type Name Description Schema

Path

applicationId
required

ID for Application

string

Body

body
optional

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

Tags
  • {nameserver}domains{domain}applications

GET Application for a REDHAWK Domain

GET /{nameserver}/domains/{domain}/applications/{applicationId}
Parameters
Type Name Schema

Path

applicationId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

Release Application from a REDHAWK Domain

DELETE /{nameserver}/domains/{domain}/applications/{applicationId}
Parameters
Type Name Description Schema

Path

applicationId
required

ID for Application

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

GET Application Components

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components
Parameters
Type Name Schema Default

Query

fetch
optional

enum (EAGER, LAZY)

"EAGER"

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components

GET Application Component

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}
Parameters
Type Name Description Schema

Path

componentId
required

Name of Component

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components

GET REDHAWK Component Ports

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/ports
Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components{componentId}ports

GET REDHAWK Component Port

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/ports/{portId}
Parameters
Type Name Schema

Path

portId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components{componentId}ports

GET REDHAWK Component Port Statistics

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/ports/{portId}/statistics
Parameters
Type Name Schema

Path

portId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components{componentId}ports

GET Application Component Properties

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/properties
Parameters
Type Name Schema

Path

componentId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components

GET Application Component Property

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/properties/{propId}
Parameters
Type Name Description Schema

Path

componentId
required

Name of Component

string

Path

propId
required

Name of Property

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components

Set Application Component Property

PUT /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/properties/{propId}
Parameters
Type Name Schema

Path

componentId
required

string

Path

propId
required

string

Body

body
optional

FullProperty

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components

GET SCD for REDHAWK Component

GET /{nameserver}/domains/{domain}/applications/{applicationId}/components/{componentId}/softwarecomponent
Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications{applicationId}components{componentId}softwarecomponent

GET Application ports

GET /{nameserver}/domains/{domain}/applications/{applicationId}/ports
Parameters
Type Name Description Schema

Path

applicationId
required

ID/Name for Application

string

Responses
HTTP Code Description Schema

200

successful operation

ExternalPortContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

GET Application port

GET /{nameserver}/domains/{domain}/applications/{applicationId}/ports/{portId}
Parameters
Type Name Description Schema

Path

applicationId
required

ID/Name for Application

string

Path

portId
required

External name for port

string

Responses
HTTP Code Description Schema

200

successful operation

ExternalPort

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

GET Application Properties

GET /{nameserver}/domains/{domain}/applications/{applicationId}/properties
Parameters
Type Name Description Schema

Path

applicationId
required

ID for Application

string

Responses
HTTP Code Description Schema

200

successful operation

PropertyContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

GET Application Property

GET /{nameserver}/domains/{domain}/applications/{applicationId}/properties/{propId}
Parameters
Type Name Description Schema

Path

applicationId
required

ID/Name for Application

string

Path

propId
required

ID/Name for Property

string

Responses
HTTP Code Description Schema

200

successful operation

Property

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

Set Application Property

PUT /{nameserver}/domains/{domain}/applications/{applicationId}/properties/{propId}
Parameters
Type Name Description Schema

Path

applicationId
required

ID for Application

string

Path

propId
required

ID/Name for Property

string

Body

body
optional

FullProperty

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

Launch Application

PUT /{nameserver}/domains/{domain}/applications/{instanceName}
Parameters
Type Name Description Schema

Path

instanceName
required

Name for Application

string

Body

body
optional

WaveformInfo

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}applications

GET REDHAWK Device Managers

GET /{nameserver}/domains/{domain}/devicemanagers
Parameters
Type Name Schema Default

Query

fetch
optional

enum (EAGER, LAZY)

"EAGER"

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

GET REDHAWK Device Manager

GET /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}
Parameters
Type Name Schema

Path

devMgrId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

DELETE REDHAWK Device Manager

DELETE /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}
Parameters
Type Name Schema

Path

devMgrId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

Set REDHAWK Device Manager properties

POST /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}/properties
Parameters
Type Name Schema

Path

devMgrId
required

string

Body

body
optional

< FullProperty > array

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

GET REDHAWK Device Manager Properties

GET /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}/properties
Parameters
Type Name Schema

Path

devMgrId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

GET REDHAWK Device Manager Property

GET /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}/properties/{propId}
Parameters
Type Name Schema

Path

devMgrId
required

string

Path

propId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

Set REDHAWK Device Manager Property

PUT /{nameserver}/domains/{domain}/devicemanagers/{devMgrId}/properties/{propId}
Parameters
Type Name Schema

Path

devMgrId
required

string

Path

propId
required

string

Body

body
optional

FullProperty

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers

GET REDHAWK Devices

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices
Parameters
Type Name Schema Default

Query

fetch
optional

enum (EAGER, LAZY)

"EAGER"

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Device

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}
Parameters
Type Name Schema

Path

deviceId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

Allocate a REDHAWK Device

POST /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/allocate
Parameters
Type Name Schema

Path

deviceId
required

string

Body

body
optional

< string, object > map

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

Deallocate a REDHAWK Device

POST /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/deallocate
Parameters
Type Name Schema

Path

deviceId
required

string

Body

body
optional

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Device Ports

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/ports
Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices{deviceId}ports

GET REDHAWK Device Port

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/ports/{portId}
Parameters
Type Name Schema

Path

portId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices{deviceId}ports

GET REDHAWK Port Statistics for a Device

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/ports/{portId}/statistics
Parameters
Type Name Schema

Path

portId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices{deviceId}ports

Set REDHAWK Device Properties

POST /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/properties
Parameters
Type Name Schema

Path

deviceId
required

string

Body

body
optional

< FullProperty > array

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Device Properties

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/properties
Parameters
Type Name Schema

Path

deviceId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Device Property

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/properties/{propId}
Parameters
Type Name Schema

Path

deviceId
required

string

Path

propId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

Set REDHAWK Device Property

PUT /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/properties/{propId}
Parameters
Type Name Schema

Path

deviceId
required

string

Path

propId
required

string

Body

body
optional

FullProperty

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Device by tuner mode

GET /{nameserver}/domains/{domain}/devicemanagers/{devmanager}/devices/{deviceId}/tuners/{tunerMode}
Parameters
Type Name Schema

Path

deviceId
required

string

Path

tunerMode
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}devicemanagers{devmanager}devices

GET REDHAWK Event Channels

GET /{nameserver}/domains/{domain}/eventchannels
Responses
HTTP Code Description Schema

200

successful operation

EventChannelContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}eventchannels

GET REDHAWK Event Channel

GET /{nameserver}/domains/{domain}/eventchannels/{eventchannel}
Parameters
Type Name Schema

Path

eventchannel
required

string

Responses
HTTP Code Description Schema

200

successful operation

EventChannel

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}eventchannels

Create REDHAWK Event Channel

PUT /{nameserver}/domains/{domain}/eventchannels/{eventchannel}
Parameters
Type Name Schema

Path

eventchannel
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}eventchannels

DELETE REDHAWK Event Channel

DELETE /{nameserver}/domains/{domain}/eventchannels/{eventchannel}
Parameters
Type Name Schema

Path

eventchannel
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}eventchannels

DELETE REDHAWK Event Channel Registrant

DELETE /{nameserver}/domains/{domain}/eventchannels/{eventchannel}/registrant/{id}
Parameters
Type Name Schema

Path

eventchannel
required

string

Path

id
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}eventchannels

Set Properties on a REDHAWK Domain

POST /{nameserver}/domains/{domain}/properties
Parameters
Type Name Description Schema

Path

domain
required

Name of REDHAWK Domain

string

Body

body
optional

List of Properties to set

< FullProperty > array

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains

GET REDHAWK Domain Properties

GET /{nameserver}/domains/{domain}/properties
Parameters
Type Name Description Schema

Path

domain
required

Name of REDHAWK Domain

string

Responses
HTTP Code Description Schema

200

successful operation

PropertyContainer

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains

GET REDHAWK Domain Property

GET /{nameserver}/domains/{domain}/properties/{propId}
Parameters
Type Name Description Schema

Path

domain
required

Name of REDHAWK Domain

string

Path

propId
required

Property name/ID

string

Responses
HTTP Code Description Schema

200

successful operation

Property

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains

Set a Property on a REDHAWK Domain

PUT /{nameserver}/domains/{domain}/properties/{propId}
Parameters
Type Name Description Schema

Path

domain
required

Name of REDHAWK Domain

string

Path

propId
required

Property name/ID

string

Body

body
optional

Property to set

FullProperty

Responses
HTTP Code Description Schema

default

successful operation

No Content

Consumes
  • application/json

  • application/xml

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains

GET Waveforms in a REDHAWK Domain

GET /{nameserver}/domains/{domain}/waveforms
Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}waveforms

Returns a Specific Waveform in a REDHAWK Domain

GET /{nameserver}/domains/{domain}/waveforms/{waveformId}
Parameters
Type Name Schema

Path

waveformId
required

string

Responses
HTTP Code Description Schema

default

successful operation

No Content

Produces
  • application/json

  • application/xml

Tags
  • {nameserver}domains{domain}waveforms

Definitions

Action

Name Schema

type
optional

enum (GE, GT, EXTERNAL, LE, LT, NE, EQ)

Application

Name Description Schema

components
optional

< Component > array

externalPorts
optional

< ExternalPort > array

identifier
optional

string

name
optional

string

properties
optional

< Property > array

started
optional

Default : false

boolean

ApplicationContainer

Name Schema

applications
optional

< Application > array

Component

Name Description Schema

configuration
optional

Properties

name
optional

string

ports
optional

< Port > array

properties
optional

< Property > array

softwareComponent
optional

Softwarecomponent

started
optional

Default : false

boolean

ComponentFeatures

Name Schema

ports
required

Ports

supportsinterfaces
optional

< SupportsInterface > array

ComponentRepId

Name Schema

repid
optional

string

ConfigurationKind

Name Schema

kindtype
optional

enum (CONFIGURE, ALLOCATION, FACTORYPARAM, TEST, EVENT, MESSAGE, PROPERTY)

Device

Name Description Schema

identifier
optional

string

label
optional

string

properties
optional

< Property > array

started
optional

Default : false

boolean

DeviceManager

Name Schema

devices
optional

< Device > array

identifier
optional

string

label
optional

string

properties
optional

< Property > array

services
optional

< Service > array

Domain

Name Schema

applications
optional

< Application > array

deviceManagers
optional

< DeviceManager > array

eventChannels
optional

< EventChannel > array

identifier
optional

string

name
optional

string

properties
optional

< Property > array

DomainContainer

Name Schema

domains
optional

< Domain > array

Enumeration

Name Schema

label
optional

string

value
optional

string

Enumerations

Name Schema

enumerations
required

< Enumeration > array

EventChannel

Name Schema

name
optional

string

registrantIds
optional

< string > array

EventChannelContainer

Name Schema

eventChannels
optional

< EventChannel > array

ExternalPort

Name Schema

componentRefId
optional

string

description
optional

string

externalname
optional

string

name
optional

string

repId
optional

string

type
optional

string

ExternalPortContainer

Name Schema

ports
optional

< ExternalPort > array

FullProperty

Name Schema

action
optional

Action

attributes
optional

< object > array

commandline
optional

enum (FALSE, TRUE)

complex
optional

enum (FALSE, TRUE)

configurationKinds
optional

< ConfigurationKind > array

dataType
optional

string

description
optional

string

enumerations
optional

Enumerations

id
optional

string

kinds
optional

< Kind > array

mode
optional

enum (WRITEONLY, READONLY, READWRITE)

name
optional

string

optional
optional

enum (FALSE, TRUE)

propertyValueType
optional

enum (STRING, BOOLEAN, ULONG, OBJREF, SHORT, FLOAT, OCTET, CHAR, USHORT, DOUBLE, LONG, LONGLONG, ULONGLONG)

range
optional

Range

structs
optional

< object > array

type
optional

string

units
optional

string

value
optional

string

values
optional

< object > array

InheritsInterface

Name Schema

repid
optional

string

Interface

Name Schema

inheritsinterfaces
optional

< InheritsInterface > array

name
optional

string

repid
optional

string

Interfaces

Name Schema

interfaces
required

< Interface > array

Kind

Name Schema

kindtype
optional

enum (CONFIGURE, EXECPARAM, ALLOCATION, FACTORYPARAM, TEST, EVENT, MESSAGE, PROPERTY)

LocalFile

Name Schema

name
optional

string

Port

Name Schema

name
optional

string

repId
optional

string

type
optional

string

Ports

Name Schema

providesAndUses
optional

< object > array

Properties

Name Schema

description
optional

string

simplesAndSimplesequencesAndTests
optional

< object > array

Property

Name Schema

description
optional

string

externalId
optional

string

id
optional

string

mode
optional

enum (WRITEONLY, READONLY, READWRITE)

name
optional

string

type
optional

string

PropertyContainer

Name Schema

properties
optional

< Property > array

PropertyFile

Name Schema

localfile
required

LocalFile

type
optional

string

Range

Name Schema

max
optional

string

min
optional

string

Service

Name Schema

name
optional

string

Softwarecomponent

Name Schema

componentfeatures
required

ComponentFeatures

componentrepid
required

ComponentRepId

componenttype
required

string

corbaversion
required

string

interfaces
required

Interfaces

propertyfile
optional

PropertyFile

SupportsInterface

Name Schema

repid
optional

string

supportsname
optional

string

WaveformInfo

Name Schema

id
optional

string

name
optional

string

sadLocation
optional

string

REDHAWK WebSocket

Overview

Provides an HTML5-compliant WebSocket implementation that enables the ability to stream data from any REDHAWK BulkIO-enabled Port or Event Channel.

Connecting to the REDHAWK WebSocket

The WebSocket servlet resides at ws://{hostname}:8181/redhawk.

  • To connect to a specific REDHAWK installation, provide the hostname/address along with the Port of the REDHAWK Name Server.

ws://localhost:8181/redhawk/localhost:2809
  • If you are using the REDHAWK Connector, you can replace the address and Port with the connection name you specified when you created the connection.

ws://localhost:8181/redhawk/redhawk-connect-name

REDHAWK Component Port Connection

To connect to a Component Port, use this syntax:

application/{applicationName}/components/{componentName}/ports/{portName}

The applicationName, componentName and portName variables all support matching on regular expressions. The following example is a complete Component Port url:

ws://localhost:8181/redhawk/localRH/domains/REDHAWK_DEV/applications/myApplication/components/SigGen.*/ports/dataFloat_out.json

REDHAWK Device Port Connection

To connect to a Device Port, use this syntax:

devicemanagers/{deviceManagerName}/devices/{deviceLabel}/ports/{portName}

The deviceManagerName, deviceLabel, portName variables all support matching on regular expressions.

REDHAWK Event Channel Connection

To connect to an Event Channel, use this syntax: eventchannels/{eventChannelName}. The following example is a complete url for an Event Channel:

ws://localhost:8181/redhawk/localRH/domains/REDHAWK_DEV/eventchannels/ODM_Channel

Code Example

The following example is a complete javascript example to connect to a REDHAWK Websocket:

var webSocket = new WebSocket('ws://localhost:8181/redhawk/localRH/domains/REDHAWK_DEV/applications/myApplication/components/SigGen.*/ports/dataFloat_out.json')

webSocket.onopen = function(evt){ console.log('connected');}
webSocket.onmessage = function(evt){ console.log('message received '+evt.data);}

REDHAWK Camel Component

The REDHAWK Camel Component provides a convenient method to integrate REDHAWK Domain functionality in a Camel Context. Apache Camel is a tool for solving any routing (data flow) or mediation problems within your system. Using Apache Camel provides access to 100+ Components to solve routing/mediation problems. For example, if your system needs to persist data from an Event Channel, rather than writing more code, you can reuse the Components already provided by Camel to store your data in NoSQL/SQL data stores. Another possible use case is if your system needs to send data from the REDHAWK Corba File System to a JMS solution for distribution, rather than writing more code, you can integrate with one of the Camel Components for JMS. For additional information about using Apache Camel with your product, refer to the Apache Camel documentation.

REDHAWK Data Endpoint

Enables direct interaction between REDHAWK Component Ports and your Apache Camel Context.

URI Format

redhawk://data:<nameserver host>:<nameserver port>:<domain name>?waveformName=<waveform name>&componentName=<component name>&portName=<port name>&portType=<port type>

Endpoint Options

Enables direct interaction between a REDHAWK Corba FileSystem and your Apache Camel Context.

The REDHAWK Data endpoint options are described in the following table.

Name

Default Value

Description

bufferSize

2000

Size of buffer for holding queued packets waiting to be processed.

decimateTo

-1

Sample size to take from the packets.

REDHAWK File Endpoint

Enables direct interaction between a REDHAWK Event Channel and your Apache Camel Context.

URI Format

redhawk://file-manager:<nameserver host>:<nameserver port>:<domain name>?directory=<directory on FS>

Endpoint Options

Enables direct interaction between a REDHAWK Corba FileSystem and your Apache Camel Context.

The REDHAWK File endpoint options are described in the following table.

Name

Default Value

Description

fileManagerType

domain

Location of the root of Corba FileSystem. If domain, then root is $SDROOT/dom . If dev, then root is root of the Device Manager you set.

deviceManagerName

n/a

Name of the Device Manager. Only used if the fileManagerType is device.

REDHAWK Event Channel Endpoint

URI Format

redhawk://event-channel:<nameserver host>:<nameserver port>:<domain name>?eventChannelName=<event channel name>&dataTypeName=<type of message>

Endpoint Options

Enables direct interaction between a REDHAWK Corba FileSystem and your Apache Camel Context.

The REDHAWK Event Channel endpoint options are described in the following table.

Name

Default Value

Description

eventChannelName

n/a

Name of the event channel to be used.

dataTypeName

n/a

Type of message for which to listen. Options are messages, properties, logEvent, propertyChanges.

REDHAWK Enterprise Integration Demos

The REDHAWK Enterprise Integration Demos provide users with an example of how they can use each asset to interact with a REDHAWK Domain. The following sections explain how to use the demos.

The demos are available via tar.gz or RPM. The RPM has a dependency on REDHAWK Enterprise Integration artifact.

REDHAWK Demo Webapp

The REDHAWK Demo Webapp is an example web application that enables users to interact with a REDHAWK Domain via the web. The web application uses REDHAWK REST, REDHAWK WebSocket, and REDHAWK Driver. The jetty running in the Karaf Container serves as the web server.

Instructions

To use this application, copy redhawk-demo-webapp.jar into the $karaf.base/deploy directory, which deploys the web application into Karaf. After the application is deployed, you can view the path of the webapp by entering the following command:

web:list

Example output:

karaf@root()> web:list
ID  | State       | Web-State   | Level | Web-ContextPath | Name
------------------------------------------------------------------------------------------------------
158 | Active      | Deployed    | 80    | /redhawkwebdemo | REDHAWK :: DEMO :: WEBAPP (2.0.4.SNAPSHOT)

View the web application at:

http://{hostname}:8181/redhawkwebdemo  #hostname is the hostname of the server with your karaf instance

After opening the web application, to add a Domain, click the '+' button. Enter the information, and then click the 'view' button on the Domain you added. You have access to command and control your configured Domain from the web.

Screenshot:

Screen Shot of Demo Webapp

Camel REDHAWK Demo

This example Application illustrates how to use a Camel REDHAWK Component to subscribe to an Event Channel and publish that data to a JMS Topic.

Set Up

  1. To run this demo, setup the example Component that will publish data to a REDHAWK Event Channel.

  2. Launch the Waveform to run the Component.

  3. Import each of the following projects into REDHAWK using the REDHAWK Import Wizard in the IDE.

    • EventSpitter: Sends out a struct every second.

    • SpitToChannel: Uses the EventSpitter Component to send data to the Event Channel, EventsSpat.

  4. After launching the SpitToChannel Waveform, ensure it is started by running the following command to see the event messages from your Component:

    eventviewer REDHAWK_DEV EventsSpat
  5. To publish events to an ActiveMQ instance, install ActiveMQ on your machine or any machine to which your machine has access. For more information about ActiveMQ, refer to the following links:

Example Output

eventviewer REDHAWK_DEV EventsSpat
Receiving events. Press 'enter' key to exit
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-04edebfc-6a8b-4f56-b018-25bbc46a842a'}, {'id': 'bar', 'value': 1.6000000238418579}]}]
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-09df6252-15fc-4af8-8e6e-5c6db2dbe3b5'}, {'id': 'bar', 'value': 1.6000000238418579}]}]
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-0c34db0e-4dae-4315-a344-73d50b8d2a8f'}, {'id': 'bar', 'value': 1.6000000238418579}]}]
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-38d514f1-29bc-4939-8b34-0e8e7246c0cb'}, {'id': 'bar', 'value': 1.6000000238418579}]}]
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-5cb7f365-1488-4130-8917-8b9b3f03430e'}, {'id': 'bar', 'value': 1.6000000238418579}]}]
[{'id': 'properties', 'value': [{'id': 'foo', 'value': 'foo-a5ecffae-39dc-43a9-80ee-f3902dcd0929'}, {'id': 'bar', 'value': 1.6000000238418579}]}]

Instructions

  1. Start Karaf by running the start script in the KARAF bin directory:

    ./start
  2. Add a configuration for REDHAWK by moving redhawk.datasource.factory-localRH.cfg into the etc directory of your Karaf install.

  3. Add the Camel route to the deploy directory of Karaf.

  4. Start the SpitToChannel Waveform.

    The Karaf log displays the messages being sent to the Event Channel.

	2017-02-23 14:35:19,417 | INFO  | eadpool; w: Idle | eventTest                        | 31 - org.apache.camel.camel-core - 2.17.5 | Exchange[ExchangePattern: InOnly, BodyType: java.util.HashMap, Body: {bar=1.6, foo=foo-beff745f-6ab1-4d75-b5e3-a29a0c4e9a3d}]
	2017-02-23 14:35:20,548 | INFO  | eadpool; w: Idle | eventTest                        | 31 - org.apache.camel.camel-core - 2.17.5 | Exchange[ExchangePattern: InOnly, BodyType: java.util.HashMap, Body: {bar=1.6, foo=foo-fcda80f5-3b6b-46fb-8ada-80859ff7fcef}]
	2017-02-23 14:35:21,678 | INFO  | eadpool; w: Idle | eventTest                        | 31 - org.apache.camel.camel-core - 2.17.5 | Exchange[ExchangePattern: InOnly, BodyType: java.util.HashMap, Body: {bar=1.6, foo=foo-0dc62388-5dee-43b5-8c1b-7bfa91f2bc39}]
	2017-02-23 14:35:22,808 | INFO  | eadpool; w: Idle | eventTest                        | 31 - org.apache.camel.camel-core - 2.17.5 | Exchange[ExchangePattern: InOnly, BodyType: java.util.HashMap, Body: {bar=1.6, foo=foo-090be096-49ba-4943-ae65-3a4ae1438398}]
	2017-02-23 14:35:23,938 | INFO  | eadpool; w: Idle | eventTest                        | 31 - org.apache.camel.camel-core - 2.17.5 | Exchange[ExchangePattern: InOnly, BodyType: java.util.HashMap, Body: {bar=1.6, foo=foo-0dcc5772-0759-4122-ba11-fc7fe10c697f}]

ActiveMQ Integration

  1. Login to your Karaf console and run the following commands:

    feature:repo-add mvn:org.apache.activemq/activemq-karaf/5.14.3/xml/features
    feature:install activemq-camel

    ActiveMQ is available to use as a Camel Component.

  2. Uncomment the sections relevant to ActiveMQ in your route.

    After saving the file, the Camel Context will be redeployed automatically with your changes.

  3. To confirm messages are being sent to the topic, look at your ActiveMQ Admin console.