LogoLogo
AMPS C++ Client 5.3.4
AMPS C++ Client 5.3.4
  • Welcome to the AMPS C / C++ Client
    • Before You Start
    • Introduction
    • Obtaining and Installing the AMPS C / C++ Client
    • Your First AMPS Program
      • Client Identification
      • Connection Strings for AMPS
      • Connection Parameters for AMPS
      • Providing Credentials to AMPS
    • Subscriptions
      • Content Filtering
        • Changing the Filter on a Subscription
      • Understanding Message Objects
      • Synchronous Message Processing
      • Asynchronous Message Processing
        • Understanding Threading
      • Regular Expression Subscriptions
      • Ending Subscriptions
    • Error Handling
      • Exceptions
      • Exception Types
      • Exception Handling and Asynchronous Message Processing
      • Controlling Blocking with Command Timeout
      • Disconnect Handling
        • Using a Heartbeat to Detect Disconnection
        • Managing Disconnection
        • Replacing Disconnect Handling
      • Unexpected Messages
      • Unhandled Exceptions
      • Detecting Write Failures
      • Monitoring Connection State
    • State of the World
      • Performing SOW Queries
        • Samples of Querying a Topic in the SOW
      • SOW and Subscribe
        • Samples of SOW and Subscribe
      • Setting Batch Size
      • Managing SOW Contents
      • Client Side Conflation
    • Using Queues
      • Backlog and Smart Pipelining
      • Returning a Message to the Queue
      • Acknowledgement Batching
      • Manual Acknowledgement
      • Samples of Working With a Queue
    • Delta Publish and Subscribe
      • Delta Subscribe
      • Delta Publish
    • High Availability
    • AMPS Programming: Working with Commands
    • Utility Classes
    • Advanced Topics
    • Exceptions Reference
    • AMPS Server Documentation
    • API Documentation
Powered by GitBook

Get Help

  • FAQ
  • Legacy Documentation
  • Support / Contact Us

Get AMPS

  • Evaluate
  • Develop

60East Resources

  • Website
  • Privacy Policy

Copyright 2013-2024 60East Technologies, Inc.

On this page
  • Obtaining the Client
  • Explore the Client
  • src
  • include
  • samples
  • Build the Client
  • Test Connectivity to AMPS
Export as PDF
  1. Welcome to the AMPS C / C++ Client

Obtaining and Installing the AMPS C / C++ Client

PreviousIntroductionNextYour First AMPS Program

Last updated 1 month ago

Obtaining the Client

The AMPS C/C++ client is available as a download from the website. Download the client from the site, then install it on your development computer.

The client is packaged into a single file,amps-c++-client-<version>.tar.gz, where is replaced by the version of the client (such as amps-c++-client-5.3.0.zip). In the following examples, the version number is omitted from the filename.

Once expanded, the amps-c++-client directory will be created, containing sources, samples and makefiles for the C++ client. You’re welcome to locate this directory anywhere that seems convenient; but for the remainder of this book, we’ll simply refer to this directory as theamps-c++-client directory.

Explore the Client

The client is organized into a number of directories that you’ll be using through this book. Understanding this organization now will save you time in the future. The top level directories are:

src

Sources and makefile for the AMPS C++ client library.

include

Location of include files for C and C++ programs. When building your own program, you’ll add the include directory to your include path.

samples

Getting started with a new C/C++ library can be challenging. For your reference, we provide a number of small samples, along with a makefile.

Build the Client

After unpacking the amps-c++-client directory, you must build the client library for your platform.

To build on Linux, change to the amps-c++-client directory and, from a command prompt, type:

make

to make a static library, or

SHARED=1 make

to make a shared object.

On Windows, from a Visual Studio Command Prompt, change to the amps-c++-client directory and type:

msbuild

Upon successful completion, the AMPS libraries and samples are built in the lib and samples directories, respectively.

To build on OS X, change to the amps-c++-client directory and, from a command prompt, type:

cmake

to make a static library, or

SHARED=1 cmake

to make a shared object.

Test Connectivity to AMPS

Before writing programs in AMPS, make sure connectivity to your AMPS development instance is working from your AMPS development environment.

Launch a terminal window and change the directory to the AMPS directory in your AMPS installation and use spark to test connectivity to your server.

For example:

./bin/spark ping -type fix -server localhost:9004

If spark returns an error, verify that your AMPS server is running and that there is no firewall blocking access (including local firewalls between a host instance and virtual machine or container).

Without connectivity to AMPS, you will be unable to make best use of this guide.

60East Technologies