Sound Function; Status Code Macros - Intermec 5055 Reference Manual

Programmer's software kit
Hide thumbs Also See for 5055:
Table of Contents

Advertisement

5055 Programmer's Software Kit Reference Manual

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
IM_ISERROR(status)
IM_ISSUCCESS(status)
IM_ISGOOD(status)
IM_ISWARN
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."
2-6
Return Value
Meaning
nonzero
error
zero (0)
success or warning
nonzero
success or warning
zero (0)
error
nonzero
success
zero (0)
warning or error
nonzero
warning
zero (0)
success or error

Advertisement

Table of Contents
loading

Table of Contents