Testing the Hot Standby link

White Papers:
Prev | Hot Standby for InTouch | Next

# 5. Testing the Hot Standby link

### Test InTouch Application

We recommend you develop a small test application for InTouch that displays the value of the tags discussed in this example. We created a display that listed the following points:

Before running this InTouch application, you should make sure that the two Cascade DataHub are running on the QNX computers. If you do not have both QNX computers available, you can test hot standby in InTouch using one QNX and one Windows computer. You simply need to run both Cascade DataHub on the same QNX computer.

### Test from QNX

1. If you have not already done so, you must first run both the Cascade DataHub by issuing the following commands:

           datahub -d a
           datahub -d b

2. Once these datahubs are running, you can start the InTouch application in Windows.

3. You should see the InTouch application start and two Cascade Connect windows appear (one on top of the other).

4. Once the InTouch application is running you should see something similar to this:

   input1 will be blank because the point does not exist in either of the two Cascade DataHub.

   domain will display the Cascade DataHub domain that was first to attach to the Cascade Connect programs as they initiated. Due to the very slight difference in timing between Windows and QNX, Cascade Connect may attach to either of the two datahubs first. The first to attach will be the first to send a `db_domain_name_up` message to InTouch and so will be the first to set the value of the domain InTouch tag.

   tcp_link_up is a digital type tag sent to InTouch by each Cascade Connect to indicate that the TCP link to QNX has been established. 1 indicates a link and 0 indicates no link.

   db_a_up is a digital type tag sent to InTouch by Cascade Connect to indicate that the link to the Cascade DataHub (with the domain name a) has been established. `1` indicates a link and `0` indicates no link.

   db_b_up is a digital type tag sent to InTouch by Cascade Connect to indicate that the link to the Cascade DataHub (with the domain name b) has been established. `1` indicates a link and `0` indicates no link.

5. At the QNX prompt type:

           writept a:input1 24
           writept b:input1 24

   This simulates a driver sending the same point value to both datahub `a` and datahub `b`. The colon character (`:`) is the domain separator character used by Cascade DataHub in QNX. In our example above, the InTouch application is communicating with datahub `b` so you should see no value until you write a new value to datahub `b`.

6. To help demonstrate the switch over from one datahub to the other, change the value for `input1` in one of the datahubs. For example:

           writept a:input1 55

7. Now try slaying the Cascade DataHub on QNX that is currently supplying data to InTouch.

8. You should see a change in the db_b_up message in the InTouch display, indicating that datahub `b` went down.

9. You should also see the screen display change the value for `input1` to the last value that you wrote to datahub `a`. This shows that InTouch switched from datahub `b` to datahub `a`.

10. If you now restart datahub `b` (`datahub -d b`) then you should see the message for db_b_up change to reflect the fact that a link to datahub `b` was re-established. The InTouch application does not switch back to using datahub `b` because datahub `a` is still available.

11. You can repeat the test by slaying the other datahub, and you should see InTouch switch to the other available datahub. In actual practice, both datahub `a` and datahub `b` would contain a mirror image of the points to be sent to InTouch, because so the user should not notice the switch over from one datahub to the other.

Prev | Home | Next
Cascade Connect Configuration | Up | Example of the Cascade DataHub Configuration File

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