Intermec ck1 Guida Di Riferimento

Pagina di 390
Chapter 2 — Configuring the CK1 System 
CK1 SDK Programmer’s Reference Manual 
55 
 char 
dest[256]; 
 
 
if( signal(SIGUSR1, sig_usr1_hdr) == SIG_ERR ) 
  return 
-1; 
 
 
 
 
 
printf("                   auto=\t%d\n", devApmIsAuto()); 
 
printf("             el off sec=\t%d\n", devApmGetBacklightOffTime()); 
 
printf("               idle sec=\t%d\n", devApmGetIdleTime()); 
 
printf("               standby sec=\t%d\n", devApmGetStandbyTime()); 
 
printf("     Mbatt life percent=\t%d\n", 
devApmGetMainBatteryLifePercent()); 
 
printf("     Bbatt life percent=\t%d\n", 
devApmGetBackupBatteryLifePercent()); 
 
printf("     Mbatt good limit(%%)=\t%d\n", devApmGetMainBatteryGood()); 
 
printf("     Mbatt low limit(%%)=\t%d\n", devApmGetMainBatteryLow()); 
 
printf("Mbatt very low limit=(%%)=\t%d\n", 
devApmGetMainBatteryVeryLow()); 
 
printf("     Bbatt good limit(%%)=\t%d\n", 
devApmGetBackupBatteryGood()); 
 
printf("     Bbatt low limit(%%)=\t%d\n", devApmGetBackupBatteryLow()); 
 
printf("Bbatt very low limit(%%)=\t%d\n", 
devApmGetBackupBatteryVeryLow()); 
 
printf("          ACline status=\t%d\n", devApmGetAClineStat()); 
 
printf("          EL control status=\t%d\n", 
devApmGetBacklightStatus()); 
 
 
printf("\nSet apm Auto: "); 
 devApmAuto(); 
 for(i=0;i<50000000;i++); 
 printf("done.\n"); 
 
 
 
printf("Does APM enable? %s\n", (devApmIsAuto() ? "Yes" : "No") ); 
 
 
 
printf("pressed the power key to continue or wait for resume to 
normal...\n"); 
 
printf("Set apm Idle: "); 
 devApmIdle(); 
 sleep(1); 
 
 printf("done.\n"); 
 
 
printf("Set apm Normal: "); 
 devApmNormal(); 
 printf("done.\n"); 
 sleep(2); 
 
 
 
printf("pressed the power key to continue...\n"); 
        printf("Set apm Standby: "); 
 devApmStandby(); 
 sleep(2); 
 
 printf("done.\n"); 
 
 
 
 
        printf("\nSet apm Manual: "); 
 devApmManual();