Table of Contents NMS Glossary Previous Page Next Page Version


Chapter 11

Demonstration Program and Utility


11.1 Introduction
11.2 TIK Service Test Program - tiktst
11.3 Parameter File Generation Utility - pf2src

11.1 IntroductionTop of Page

This chapter presents the tiktst demonstration program and pf2src utility shipped with the Natural Access Service Writer's Developer's Kit.

The TIK service, TICK server, and test program are shipped as source only. To build each of the components:

  1. Build the TICK server:

    • For Windows NT:

          cd nms\ctaccess\demos\tiksvr
      nmake
    • For UNIX:

          cd /nms/ctaccess/demos/tiksvr
      make
    • Build the TIK service:

      • For Windows NT:

            cd nms\ctaccess\demos\tiksvc
        nmake
      • For UNIX:

            cd /nms/ctaccess/demos/tiksvc
        make
      • Build the TIK test program:

        • For Windows NT:

              cd \nms\ctaccess\demos\tiktst
          nmake
        • For UNIX:

              cd /nms/ctaccess/demos/tiktst/
          make

        11.2 TIK Service Test Program - tiktstTop of Page

        Name

        tiktst

        Purpose

        Exercises the various features of the TIK service.

        Usage

        tiktst [options]

        where options are:

        Option

        Description

        -m n

        Specifies test mode. The supported test modes are:

        · n=1 one Natural Access event queue; 10 contexts registered with that queue.

        · n=2 two Natural Access events queues; 1 context registered per queue.

        -t

        Enables tracing on a per-context basis. Set the per-context tracemask to trace DRIVER_EVENTS, DRIVER_COMMANDS, and DEBUG_BIT_0.

        -n numTicks

        Specifies the number of tick strings to request from the TIK server. This overrides the default TIK_START_PARM numTicks parameter.

        -f frequency

        Specifies the frequency of tick strings from the TIK server. This overrides the default TIK_START_PARM frequency parameter.

        Description

        tiktst is a TIK service demonstration program that uses the TIK service to interact with the TIK server. It will use Natural Access and TIK APIs to start a timer on the TIK server and receive "tick strings" at a specified frequency. As each "tick string" is received, it will be printed to stdout.

        Procedure

        Ensure that both the TIK server and TIK service have been built. Then ensure that the TIK server is executing. To start the TIK server, execute tiksvr. You can change the value of the tick string by using the -m string option.

        If executing with the -t option, ensure that the ctdaemon is running and has been initialized with the TIK,TIMGR service/service manager pair.

        11.3 Parameter File Generation Utility - pf2srcTop of Page

        Name

        pf2src

        Purpose

        Converts a .pf file to the corresponding C source and header files containing required Natural Access compliant parameter data structures.

        Usage

        pf2src [options] ParameterFileName.pf

        where options are:

        Option

        Description

        -w

        Specifies not to overwrite existing source and header files.

        -x

        Specifies that an Extension parameter table should be generated (rather than a standard parameter table)

        -s filename

        Specifies the file name for both the generated C source file and header file. The default is to use the same file name as the .pf file.

        Description

        pf2src converts a .pf parameter description file to the corresponding C source and header files. These files contain data structures needed by the call to dispRegisterService to be registered as either a standard parameter table or an extension parameter table.

        For a standard parameter table, the generated C label is _xxxParmDescTable.

        For an extension parameter table, the generated C label is _xxxExtParmDescTable.

        To create a .pf file, refer to the Natural Access Developer's Reference Manual.

        Procedure

            1. Create a .pf file. For example, tikparm.pf.

              
              
            2. Run pf2src to create the associated source and header file. For example:

                   pf2src tikparm.pf
              
              
          This example creates the files tikparm.c and tikparm.h.

          In the call to dispRegisterService in xxxDefineService, use the appropriate parameter table argument. For example, in tikDefineService, the call to dispRegisterService will contain a _tikParmDescTable as the standard parameter table argument.

          Note: Typically, the call to pf2src is embedded in the makefile for your service. Refer to the makefile for the TIK service.



        Table of Contents NMS Glossary Previous Page Next Page Version


        Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
        Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.