Chapter 1. Introduction

Table of Contents

1.1. When to use the different Cogent APIs
1.2. Preliminaries
1.3. C++ Programming
1.4. Java Programming
1.5. .NET Programming

1.1. When to use the different Cogent APIs

There are four Cogent APIs, grouped as:

    DataHub APIs for C++, Java, and .NET

    Cogent C API

The DataHub APIs for C++, Java, and .NET

These three APIs share, as much as possible, common methods and syntax. For this reason they are distributed in one package and documented in a single book.

    The DataHub API for C++ lets you write programs in C++ that connect to the DataHub over TCP, namely LAN, WAN, or the Internet.

    The DataHub API for Java lets you write programs in Java that connect to the DataHub over TCP, namely LAN, WAN, or the Internet. In addition, it lets you create web browser applications that receive and display live data from the DataHub.

    The DataHub API for .NET lets you write programs in .NET that connect to the DataHub over TCP, namely LAN, WAN, or the Internet. This API is implemented in C#, but can be used with any .NET language.

The following table shows the availability and support for these APIs in Windows, Linux, and QNX:

LanguageWindowsLinuxQNX 6QNX 4
C++supportedsupportedsupportedunsupported
Javasupportedunsupportedunsupportednot available
.NETsupportedmay be available using Mononot availablenot available
[Note]

The C++ API that runs in Linux and QNX is included in the Cogent C API archive.

The Cogent C API

This API lets you write high-speed clients that can interact with the Cascade DataHub, Cascade Historian, Cascade TextLogger, CIF Driver, DVN Driver, PFB Driver, and Gamma. It works in Linux, QNX 6, and QNX 4. Interprocess communication relies on Send/Receive/Reply message passing. In Linux, this is supported by Cogent's SRR Module. In QNX, this is supported by QNX's own Send/Receive/Reply protocol.

[Note]

For more information on this API, please refer to the Cogent C API manual.