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:

  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.

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