Intermec 5055 Reference Guide

Page of 216
5055 Programmer’s Software Kit Reference Manual
2-6
Sound Function
Use the im_sound function anytime to make the 5055 beep. You can use this function
to control the volume, pitch, and duration of the 5055 beep.
Example: Sound
// This segment beeps a high note, pauses 5 seconds, and then beeps a low note.
#include "im5055.h"
void main()
{
im_sound( IM_HIGH_PITCH, IM_BEEP_DURATION, IM_NORMAL_VOLUME);
im_standby_wait(5000);
im_sound( IM_LOW_PITCH, IM_BEEP_DURATION, IM_NORMAL_VOLUME);
}
Status Code Macros
Use the status code macros to determine the success of a function without testing for an
explicit value. Each PSK library function returns a specific status value. For most
functions, you only need to know if the result was a success or failure.
Your program is easier to maintain, update, and port to another 5055 type when you
check for success or failure instead of checking for a specific value.
Status Code Macro
Return Value
Meaning
IM_ISERROR(status)
nonzero
zero (0)
error
success or warning
IM_ISSUCCESS(status)
nonzero
zero (0)
success or warning
error
IM_ISGOOD(status)
nonzero
zero (0)
success
warning or error
IM_ISWARN
nonzero
zero (0)
warning
success or error
For more information, see Chapter 5, “PSK Function Descriptions.”
Note:
 For compatibility with other Intermec products, use the status code macros. You
can use the exact status code for debugging programs, but you need to adjust the
routines before you attempt porting the application to a JANUS device. For help, see
Chapter 4, “Converting Trakker Antares, 6400, and JANUS Applications to 5055
Applications.”