Chapter 2. Using the Cascade DataHub

Table of Contents
2.1. Running the Cascade DataHub
2.2. Using the Cascade DataHub Viewer
2.3. Features

2.1. Running the Cascade DataHub

This section describes the steps necessary to start the Cascade DataHub.

  1. Ensure /usr/cogent/bin is in your PATH (check this using the set command).

  2. Start the Cascade QueueServer and Cascade NameServer (no ampersand '&' is required) using the qserve and nserve commands:

        [sh]$  qserve
        [sh]$  nserve
        	  
    Important

    The qserve program must always be started before nserve. In QNX, qserve and nserve should both be started before TCP/IP to avoid a connection race condition.

  3. Start the Cascade DataHub using the datahub command with the appropriate arguments, (no ampersand '&' is required). For example:

        [sh]$  datahub
        	  
        The example above would start the datahub in the
    default domain (called "default"). Another example
    is:
        	  
        [sh]$  datahub -d test
        
        This second example starts the datahub in an application
    domain called "test".

Since these commands are generally given together you may wish to group them in a batch file and call that batch file from the /etc/config/sysinit.<node> file.

Once these command are run you can check which tasks are running by using the nsnames command. For example:

    [sh]$  nsnames
    Task         Queue       Domain    Node      TaskID
    sc/nserve    sc/nserve             1         72
    /db/default  datahub_3c58  default   1 15367

Note that the datahub Queue and the Task ID's shown in the example will be different for every user.

2.1.2. Testing the Cascade DataHub installation

Cogent has provided three programs that you can use to test your Cascade DataHub installation.

2.1.2.2. Reading data from the datahub

The readpt utility allows you to read data values from the datahub. See readpt for details about the syntax for readpt, and see the source code for this program in Reading from the Cascade DataHub appendix of the Cogent API manual.

2.1.2.3. Registering for exceptions with the datahub

The waiter utility registers for exceptions with a datahub and displays any new point values that it receives. The source code for this example will help you develop applications that effectively utilize the datahub. See waiter for details about the syntax for waiter, and see its source code in Registering for exceptions from the Cascade DataHub appendix of the Cogent API manual.

Important

If you are using Cascade Connect with the Cascade DataHub then you should start the Cascade DataHub before you initiate the Cascade Connect connection from the MS-Windows computer. This allows Cascade Connect to identify the Cascade DataHub as a client on start up, and to register for exceptions with the datahub.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.