Download RTI Core Libraries and Utilities Getting Started Guide

Transcript
Chapter 3
Getting Started with Connext
This chapter gets you up and running with Connext. First, you will build and run your first Connext-based application. Then we'll take a step back to learn about the general concepts in the
middleware and show how they are applied in the example application you ran.
This chapter includes:
❏ Building and Running “Hello, World” (Section 3.1)
❏ Building and Running a Request-Reply Example (Section 3.2)
❏ An Introduction to Connext (Section 3.3)
Next Chapter —> Chapter 4: Capabilities and Performance
3.1
Building and Running “Hello, World”
Let’s start by compiling and running Hello World, a basic program that publishes information
over the network.
For now, do not worry about understanding the code (we start covering it in Chapter 4: Capabilities and Performance). Use the following instructions to run your first middleware program
using Connext.
3.1.1
Step 1: Set Up the Environment
There are a few things to take care of before you start working with the example code.
3.1.1.1
Set Up the Environment on Your Development Machine
a. Set the NDDSHOME environment variable.
Set the environment variable NDDSHOME to the Connext install directory. (Connext
itself does not require that you set this environment variable. It is used in the scripts used
to build and run the example code because it is a simple way to locate the install directory. You may or may not choose to use the same mechanism when you create scripts to
build and/or run your own applications.)
•
•
On UNIX-based systems: This location may be /opt/rti/ndds.5.0.x.
On Windows systems: This location may be C:\Program Files\RTI\ndds.5.0.x.
3-1