About the Sample Program

The Alarm Interested Process API contains a sample program that demonstrates the use of this API. You can find the source file and make file for this program in the %BSM_ROOT%api\AMIPSAMPLE directory. It contains:

amipsample.cpp

the sample application source code

makefile

makefile that creates the sample executable

This sample program receives alarm messages from the Alarm Manager and writes the data to the sample.log file in the root directory of the drive where the program is run.

You can run this program in synchronous or asynchronous mode.

In synchronous mode, the program waits in CAMIPSample until it receives an alarm message, then processes the message.

In asynchronous mode, the program places the call in CAMIPSample, then is free to do other things until a message is received.

You can use the makefile provided with the sample as a basis for constructing makefiles for your own applications.

Note: Depending on how you install Visual C++, the INCLUDE, LIB, and PATH environment variables may not be automatically set when you install MSDEV. If they are not set, you will have to set them manually or run Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat to set them before building any user programs.

You can use the CIMPDEMO project to create and run the executable for the sample program.

More information

Use the Alarm Interested Process (AMIP) API.