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
-
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.
-
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:).
-
If the environment variables are not set automatically, issue the following command to set them:
for /F "tokens=* USEBACKQ" %F in (`"%PROGRAMFILES(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath`) do set VSPATH=%F call "%VSPATH%\Common7\Tools\VsDevCmd.bat"
-
Start Visual Studio:
devenv CimplicityAPI.sln
- Right click tlkittst_dll in the Solution Explorer.
- Select Build on the Popup menu.
-
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
-
Now update or create the domain.cfg file in %SITE_ROOT%\master. You need to do one of the following:
- 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
- From Notepad, copy the information from %BSM_ROOT%\api\dc_api\domain.cfg into the opened file.
- 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
- If you currently have a %SITE_ROOT%\master\domain.cfg file, issue the following commands to merge the domain information for the demo:
-
Issue the following command to copy the updated domain.cfg file to %SITE_ROOT%\data:
copy domain.cfg %SITE_ROOT%\data
- Create the TLKITTST key in the Registry .
-
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
The demonstration communication enabler should now be able to run.