#========================================================================= 
#          Copyright © 2001-2004 QUALCOMM Incorporated.
#                     All Rights Reserved.
#========================================================================= 

# Perl5 script for testing simple example
#! /usr/local/bin/perl -w 

#Please keep these two lines in all the sample scripts that you are writing for this version of Grinder
use GrinderPl;
use enum qw( AVK_ASTERISK=1000 AVK_NUMBER_SIGN AVK_SELECT AVK_UP AVK_DOWN AVK_LEFT AVK_RIGHT AVK_SEND AVK_CLR AVK_END);
################################################################################################

################################################################################################
#
# Sample perl application to illustrate Grinder on the Phone
#
#	1) It initializes the perl module.
#	2) Loads the default settings.
#	3) Sets the start and the end seeds.
#	4) Sets the number of events per grind and the event interval. 
#	5) These settings can also be changed through the Grinder's GUI on the phone.
#	6) Runs the Grinder on the phone.
#	7) The Grinder can be started on the emulator by passing the StartGrinder
#	   with "Emulator" as argument.
#	8) Later, it releases the perl module.
#
################################################################################################

#Initialize the perl module. This should be the first function to be called.
GrinderPl::InitPerlModule();

#Load the default settings. 
GrinderPl::LoadSettings(0);

#Set the start and end seeds. 
GrinderPl::SetStartSeed(2);
GrinderPl::SetEndSeed(5);

#Set the number of events per grind and the event interval. 
GrinderPl::SetEventsPerGrind(10);
GrinderPl::SetEventInterval(100);

#Run Grinder on the emulator
GrinderPl::StartGrinder("COM1");

#Release the perl module. This should be called after using GrinderPl.
GrinderPl::ReleasePerlModule();
