home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / som / somd / cpp / event / readme.txt < prev    next >
Encoding:
Text File  |  1996-02-16  |  5.8 KB  |  127 lines

  1. #   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994,1996
  2. #   All Rights Reserved
  3. #   Licensed Materials - Property of IBM
  4. #   US Government Users Restricted Rights - Use, duplication or
  5. #   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6.  
  7.  **********************************************************************
  8.  * DISCLAIMER OF WARRANTIES.
  9.  * The following [enclosed] code is sample code created by IBM
  10.  * Corporation. This sample code is not part of any standard or IBM
  11.  * product and is provided to you solely for the purpose of assisting
  12.  * you in the development of your applications.  The code is provided
  13.  * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
  14.  * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  15.  * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
  16.  * THIS CODE.  IBM shall not be liable for any damages arising out of
  17.  * your use of the sample code, even if they have been advised of the
  18.  * possibility of such damages.
  19.  *
  20.  * DISTRIBUTION.
  21.  * This sample code can be freely distributed, copied, altered, and
  22.  * incorporated into other software, provided that it bears the above
  23.  * Copyright notice and DISCLAIMER intact.
  24.  **********************************************************************
  25.  
  26. EVENT
  27.  
  28.    DESCRIPTION:
  29.      This sample demonstrates sending/receiving events between
  30.      supplier/consumer.
  31.  
  32.    CONCEPT/FEATURE:
  33.  
  34.      This directory contains the DSOM/C "Event Services" sample.  
  35.      The Event Service interface definitions are in eventch.idl and 
  36.      eventcom.idl.  The Event Service sample program is based on the 
  37.      Consumer-Supplier paradigm for events.  The Supplier generates events 
  38.      and pushes them onto an Event Channel.  The Consumer polls the Event 
  39.      Channel and when an appropriate event appears, it is processed.
  40.  
  41.      In this sample, the Supplier updates the value of a spreadsheet cell 
  42.      and puts the updated value in the Event Channel. The Consumer, which 
  43.      is polling the Event Channel for a change in the cell value, pulls 
  44.      the new value from the Event Channel and displays it.
  45.  
  46.      The Consumer, in this example, picks up only the last update to the cell
  47.      value.  If the Supplier makes several cell updates between two Consumer
  48.      polling cycles only the latest value of the cell is passed on to 
  49.      the Consumer.
  50.  
  51.  
  52.    HOW TO RUN THE PROJECT FROM THE COMMAND LINE:
  53.  
  54.      To build the sample:
  55.       - "nmake -f vac.mak all".
  56.  
  57.      To clean up the directory and implementation repository after running
  58.      the samples:
  59.  
  60.       - "nmake -f vac.mak clean".
  61.  
  62.      You can also make specific pieces of the example programs.  The following
  63.      targets have been defined in the Makefile:
  64.  
  65.        event.lib  -- builds the DLL (dynamic link library) and the compile-time
  66.        "import library" for the example.
  67.  
  68.        eventsvr.exe -- builds the persistent Event Channel server
  69.  
  70.        eventcli.exe -- builds the client program which acts as a Supplier 
  71.                        for events
  72.  
  73.        consumer.exe -- builds the Consumer part of the example.
  74.  
  75.        som.ir      -- builds the Interface Repository for the examples,
  76.                       in a local file called "som.ir".  The Interface
  77.                       Repository is a database containing all the interface
  78.                       definitions for the classes in the library.
  79.  
  80.        somdimpl    -- builds the Implementation Repository for the examples,
  81.                       at a location determined by the environment variable
  82.                       SOMDDIR.  The Implementation Repository is a
  83.                       database containing a description of a server
  84.                       ("cellServer2") which will load the event.dll, and
  85.                       will hold instances of the Cell and all Event Service
  86.                       interface instances.
  87.  
  88.       RUNNING THE SAMPLE
  89.       ==================
  90.       If "somdd" is currently running, you must first kill it and
  91.       restart it from this directory.  Execute "run.bat" to run the sample. 
  92.       It will start "somdd", "eventsvr",  "eventcli", and "consumer"
  93.       
  94.       When the cell value is incremented from the "eventcli" program,
  95.       eventcli will post the event to the consumer.  When the consumer
  96.       polls the event channel for a notification, the value will be
  97.       updated in the consumer's window.  If the consumer polls the event
  98.       channel but no notification has been sent (if the cell value has not
  99.       been incremented by eventcli), then the consumer will wait until a
  100.       notification is sent (when the value is incremented).
  101.  
  102.       You can continue to go back and forth between eventcli and consumer to
  103.       experiment with the sample.
  104.  
  105.       To terminate the sample, terminate both consumer and eventcli, then
  106.       terminate eventsvr and finally somdd.
  107.  
  108.    HOW TO RUN THE PROJECT FROM WITHIN THE WORKFRAME ENVIRONMENT:
  109.     -Open the project "event.iwp" in the sample directory.
  110.     -To make the project:
  111.         from the "Project" menu, select "Make",
  112.         or from the pop-up menu for the icon "vac.mak", select "Make"
  113.     -Kill "somdd" if it is currently running.
  114.     -Click the "Run" icon to run the project. Refer to RUNNING THE SAMPLE
  115.      above to interact with the producer (eventcli) and the consumer (consumer).
  116.     -From the command line or Project Monitor, "nmake -f vac.mak clean" 
  117.      to cleanup.
  118.  
  119.    VisualAge for C++ SAMPLES INFORMATION:
  120.      A complete listing of samples shipped with the VisualAge for C++
  121.      product can be found in the online GUIDE TO SAMPLES.  To access
  122.      this notebook, simply:
  123.  
  124.      -  Open the VisualAge for C++ program group in the Program
  125.         Manager window, then
  126.      -  Open the GUIDE TO SAMPLES notebook in the program group.
  127.