Class: DimService
Library: DIM
Author: Ph. Charpentier  
Version: v1.0 Update :Thu Feb 11 15:52:46 1999

Description :

    To be used by DIM Servers - Implements Service creation.
    DimService constructors add a DIM Service to the list of known services.
    The DimServices will only be registered (published) and served after "Starting" the DimServer.
    Please refer to Usage for examples of DimServices.

Constructors :

   First parameter is the Service Name.  Since the clients might request the service at regular time
   intervals the value parameter should be the address of a variable that has a live time similar to the
   DimService itself.

Destructors : Public Functions :

    Update Methods
        All update methods return the number of clients updated. 

    Selective Update Methods

        Like the Update methods but do not update all clients.

            - Update only the current client (if inside a Command callback) - clientIds = 0

            - Update the list of clients specified by an array of client Ids (terminated by 0).

                Client Ids can be obtained by DimServer::getClientId() inside a Command callback

    Methods for Time Stamping and Quality flag (only meaningfull when the client requests it
    by using DimStampedInfo ). The Server time stamps the service and sets the quality flag to zero
    when this feature is requested by the client but the following methods allow the user to override the default.
    These settings will be sent to the client with the next update of service data.

Usage :

    DimService creation example:

- The Server Updates the service (i.e. sends it to the client) whenever the contents change

            int run = 123;
            DimService runNumber("DELPHI/RUN_NUMBER",run);
            DimServer::start("DelphiServer");
            ...
            run++;
            runNumber.updateService();

- The Server Does not explicitly Update the service: it will get updated (i.e. sent to the client)
              with the current contents at the time interval specified by each client.

            float trigger_rate;
            DimService runNumber("DELPHI/TRIGGER_RATE",trigger_rate);
            DimServer::start("DelphiServer");
            ...
            trigger_rate = calculate_trigger_rate();


Last update : 02/11/99 15:53:02 by MkHelp 1.1.0