Build the Device Communications API Sample Program

About this task

A sample Microsoft C++ project, tlkittst_dll.vcxproj, is provided to build the demonstration program.

Use this project as a basis for constructing projects for your own application.

Perform the following steps to build the executable:

Procedure

  1. Select Tools>Command Prompt on your project's Workbench menu bar.

    This will ensure that your environment variables (in particular %BSM_ROOT% and %SITE_ROOT% ) are set correctly.

  2. Issue the following commands in the Command Prompt… window, :

    <drive>

    cd %BSM_ROOT%\api

    Where <drive> is the disk where your CIMPLICITY software is installed (for example, C:).

  3. (If the environment variables are not set automatically) issue the following command to set them:

     ..\<Program Files Install Directory>\Microsoft Visual Studio 11.0\Common7\Tools\vsvars32.bat

  4. Start Visual Studio

    devenv CimplicityAPI.sln

  5. Right click tlkittst_dll in the Solution Explorer.
  6. Select Build on the Popup menu.
  7. Issue the following commands to copy files to the correct directories:

    copy dc_api\TLKITTST.PROTO %BSM_ROOT%\bsm_data

    copy dc_api\TLKITTST.MODEL %BSM_ROOT%\bsm_data

  8. Now update or create the domain.cfg file in %SITE_ROOT%\master . You need to do one of the following:
    1. If you currently have a %SITE_ROOT%\master\domain.cfg file, issue the following commands to merge the domain information for the demo:

    cd %SITE_ROOT%\master

    notepad domain.cfg

    A Notepad opens.

    1. Copy the information from %BSM_ROOT%\api\dc_api\domain.cfg into the opened file.
    2. Close and save the modified domain.cfg file.

    If you do not have a %SITE_ROOT%\master\domain.cfg file, then:

    copy domain.cfg %SITE_ROOT%\master

  9. Issue the following command to copy the updated domain.cfg file to %SITE_ROOT%\data:

    copy domain.cfg %SITE_ROOT%\data

  10. Create the TLKITTST key in the Registry .
  11. Under the TLKITTST key, create a Value Name of Name with the string TLKITTST Devcom and the Value Name of Type with the string Protocol

Results

The demonstration communication enabler should now be able to run.