Casio PA-2400W User Manual

PA-2400W
C Library Manual
(V ersion 1.00)
CASIO Computer Co., Ltd.
Copyright ©1999. All rights reserved.
July 1999
Table of Contents
Chapter 1 Supported Files 5
1.1 Dedicated Library and Utility 7
1.1.1 System Library 7
1.1.2 SIPanel Library 7
1.1.3 I/O Bootup Library 7
1.1.4 File Tra ns fer Utility 8
1.1.5 File Ch eck U tility 8 Chapter 2 Development Environment 9 Chapter 3 System Library 10
3.1 Overview 10
3.2 Details of Function 11
CA_BacklightOn 11 CA_BacklightOff 12 CA_BacklightCheck 13 SyncPowerOff 14 DisablePowerOff 15 EnablePowerOff 16 StatusPowerOff 17 ApoCountReset 18 SoftReset 19 SetPowerOnAlarm 20 GetPowerOnA larm 21 SetPowerEventStat 22 GetPowerEventStat 24
Chapter 4 SIPanel Library 25
4.1 Overview 25
4.2 Use of SIPanel Library 26
4.3 Restrictions 26
4.4 Details of Function 27
SIP_ExecutePanel 27 SIP_ShowPanel 28
4.5 SIPANEL .EXE 34
4.5.1 Overview 34
4.5.2 Options of Command Line 34 Chapter 5 I/O Bo otup L ibrary 35
5.1 Overview 35
5.2 Function 35
5.3 Details of Function 36
iobox_chk 36
5.4 Use of iobox_chk 37
5.5 Sample Program 38 Chapter 6 Registry of Libraries 42
6.1 System Library 42
6.2 SIPanel Library 42 Chapter 7 File T ran sfer U tility 43
7.1 Overview 43
7.2 List of Supported Commands 44
7.3 Use of FLCE 45
7.4 Termination of FLCE 45
7.5 Restrictions 46
7.6 Communication Commands 47
2
Chapter
7.7 Method of Describing Pathname 48
7.8 Conditions at Communication Partner 50
7.8.1 Rules of Naming File and Directory Pathname 50
7.9 Setting Up Registry 51
7.9.1 Setting Up Items 51
7.9.2 Setting Up Registry with User Application 52
7.10 Termination Codes 54
7.11 Log File 56
7.12 Precautions 57
7.13 Details of Command and Option 58
FLCE /Y 58 FLCE /S 59 FLCE /R 60 FLCE /A 61 FLCE /D 62 FLCE /N 63 FLCE /T 64 FLCE (Idle Start) 65
7.14 Command and Status 66
7.15 Retry Process When Downloading File 67
7.15.1 Overview 67
7.15.2 Retry Method 67
7.15.3 Restriction 68
8 File Check U tility 69
8.1 Overview 69
8.2 List of Commands 69
8.3 Operation Method 70
8.4 Describing Method 72
8.4.1 Pathname 72
8.4.2 Rules of Naming File and Directory Pathname 72
8.5 Details about Command and Option 73
8.6 Command of FCHKCE 74
8.6.1 Generation of List File 74
8.6.2 Comparison by List File 75
8.7 Format of List File 76
8.8 Syntax Analysis of Script File 77
8.9 Error Messages/Codes 79
8.10 Restriction 80
8.11 Details of Command and Option 81
FCHKCE /G 81 FCHKCE /C 83
Microsoft, MS-DOS, and Windows are registered trademarks of Microsoft Corporation in the USA. Other company, product and service names used in this manual may also be trademarks or service marks of respective companies.
3
Preface
This manual describes the C language-dedicated library functions and utilities that run on the CASIO PA-2400W (hereinafter referred to as "H/PC", which stands for Handheld PC). The PA-2400W uses the Windows CE operating system (Ver. 2.11), and uses the Win32 API functions to generate user application programs. However, more functions may be required if generating a business application, etc. The C language-dedicated library functions and utilities described in this manual are used to support functions that are not supported by the API functions. Information about the Win32 API functions can be retrieved using the Help function in the Windows 95 system .
Win32 API Function
C language dedicated library, utility
(I/O bootup, FLCE, FCHKCE)
Available from Microsoft
Available from CASIO
4
1. Supported Files
The following files will be supported by the C-library functions and utilities described in this manual.
Table 1.1
File Function Description
System Library
CasioSys.lib CasioSys.h
CA_BacklightOn CA_BacklightOff CA_BacklightCheck SyncPowerOff DisablePowerOff EnablePowerOff StatusPowerOff
ApoCountRese t SoftReset SetPowerOnAlarm GetPowerOnAlarm
SetPowerEventStat GetPowerEventStat
Turns on the backlight. Turns off the backlight. Acquires the status of the backlight. Turns off the power after completion of access to card. Disables power off with the power button. Enables power off with the power button. Acquires the status of enable/disable power off with the power button. Resets the APO’s counter. Performs soft-reset (warm-bootup). Enables or disables power on with the alarm. Acquires the status of enable/disable power on with the alarm. Enables or disables power-on notification. Acquires the status of enable/disable power-on notification.
SIPanel Library
SIPanel.lib SIPanel.h SIPanel.dll (note 1) SIPanel.ex e (for individual executi on)
SIP_ExecutePan el SIP_ShowPanel
Starts up the SIPanel. Displays the SIPanel on the LCD screen or erases it from the screen.
I/O Bootup Library
Iobox1.lib Iobox1.h
iobox_chk Checks the condition of connection between PA-2400W
and I/O Box, and acquires a result of the status.
Iobox1.dll
File Transfer Utility
FLCE.EXE Execution file SND.LNK Shortcut for PA-2400W-to-PA-2400W communication RCV.LNK Shortcut for PA-2400W-to-PA-2400W communication IDLE.LNK Shortcut for idle
File Check Utility
FCHKCE.EXE Execution file MAKE.LNK Shortcut for PA-2400W-to-PA-2400W communication CHECK.LNK Shortcut for downloading AP
5
Notes:
py
1. Since the “SIPanel.dll” and “SIPanel.exe” in English version are pre-installed in the ROM, you do not
need to install it every time you use the software input panel. However, if you use other language versions of the SIPanel, you need to replace them.
2. Each library function or utility command can be made available to the user when the DLL/EXE file is
copied into the Windows directory on the PA-2400W (see the figure below).
Host PC
PA-2400W
Co
Fig. 1.1 System configuration
6
1.1 Dedicated Library and Utility
1.1.1 System Library
Table 1.2
No. Function Description Page
CA_BacklightOn
1
CA_BacklightOff
2
CA_BacklightCheck
3
SyncPow e r O f f
4
DisablePowerOff
5
EnablePowerOff
6
StatusPowerOff
7
ApoCountReset
8
SoftReset
9
SetPowerOnAlarm
10
GetPowerOnAlarm
11
SetPowerEventStat
12
GetPowerEventStat
13
Turns on the backlight. 11 Turns off the backlight. 12 Acquires the status of backlight. 13 Turns off after completion of access to a card. 14 Disables power off with the power button. 15 Enables power on with the power button. 16 Acquires the status of enable/disable power off with the power button. Resets the APO’s counter. 18 Resets the system and then starts up warm bootup. 19 Enables or disables automatic power on with the alarm. 20 Acquires the status of automatic power on with the alarm. 21 Enables or disables power on event notification. 22 Acquires the status of enable/disable power on event notification.
17
24
1.1.2 SIPanel Library
Table 1.3
No. Function Description Page
SIP_ExecutePanel
1 2
SIP_Sh ow Pa n e l
Starts up the SIPanel. 27 Displays the SIP or erases it from the LCD screen. 28
1.1.3 I/O Bootup Library
Table 1.4 I/O Bootup library function
No. Function Description Page
iobox_chk
1
Monitoring the connection status of PA-2400W with I/O Box 36
7
1.1.4 File Transfer Utility
Table 1.5 File transfer utility
No. Command Description Page
1 FLCE /Y Communication environment setup/Idle start 58 2 FLCE /S File transmission 59 3 FLCE /R File reception 60 4 FLCE /A File transmission (append) 61 5 FLCE /D File deletion 62 6 FLCE /N File move/F il e name m odifi ca tion 63 7 FLCE /T Time transmission 64 8 FLCE Idle start 65
1.1.5 File Check Utility
Table 1.6 File check utility
No. Command Description Page
1 FCHKCE /G Generation of a list file 81 2 FCHKCE /C Comparison of list files 83
8
2. Development Environment
Your own application program can be developed by implementing the CASIO’s dedicated library functions and utility commands listed in the previous pages under the following software development environment.
Microsoft Visual C/C++ version 6.0
Microsoft Windows CE Toolkit for Visual C/C++ 6.0
Windows CE version 2.11 SDK (US version)
9
3. System Libr ary
3.1 Overview
This System Library functions can provide you with various dedicated functions such as backlight control, power OFF supplement control, power-ON control with alarm, etc. These functions to be described in the next pages are developed only for the PA-2400W and therefore not guaranteed for use with other hardware platforms. Also, please note that it is not a Windows CE general­purpose library.
10
3.2 Details of Function
g
Title Function
Turns on the backlight. If this function is called while the backlight is already on, nothing will happen.
C Language Interface
Calling Sequence
BOOL CA_BacklightOn ()
Parameters
Return Values
Header
Remarks The automatic backlight off will be remained active after this function is called. Duration of the automatic backli at the control panel, the function cannot be activated. During an event of low battery, the backlight still can be turned on. However, because of inrush current at a time of turning on the backlight, the power of PA-2400W may be turned off. Always observe the battery condition before activation of the backlight.
None
TRUE : Normal end
#include <CasioSys.h>
ht off can be set at the control panel. For example, if the automatic backlight off is se t to “disa bl e mo de”
CA_BacklightOn
11
Title Function
Turns off the backlight.
C Language Interface
Calling Sequence
BOOL CA_BacklightOff()
Parameters
None
Return Values
TRUE : Normal end
Header
#include <CasioSys.h>
Remarks
This function can turn off the backlight which is turned on by a keyboard operation.
CA_BacklightOff
12
Title Function
Acquires the status of the backlight if it is set to on or off.
C Language Interface
Calling Sequence
BOOL CA_BacklightCheck()
Parameters
None
Return Values
TRUE : Backlight is on. FALSE : Backlight is off.
Header
#include <CasioSys.h>
Remarks
CA_BacklightCheck
13
Title Function
Turns off the power after access to an installed card is complete.
C Language Interface
Calling Sequence
BOOL SyncPowerOff()
Parameters
None
Return Values
TRUE : Normal end.
Header
#include <CasioSys. h>
Remarks
SyncPow e r Of f
14
Title Function
DisablePowerOff
Disables power-off with the power button. This setting is cleared when the power is turned on.
C Language Interface
Calling Sequence
BOOL DisablePowerOff()
Parameters
None
Return Values
TRUE : Normal end.
Header
#include <CasioSys. h>
Remarks
15
Title Function
Enables the power to be turned off with the power button.
C Language Interface
Calling Sequence
BOOL EnablePowerOff()
Parameters
None
Return Values
TRUE : Normal end.
Header
#include <CasioSys. h>
Remarks
EnablePowerOff
16
Title Function
StatusPowerOff
Acquires the status of “enable/disable the power to be turned off with the power button”.
C Language Interface
Calling Sequence
BOOL StatusPowerOff()
Parameters
None
Return Values
FALSE : Disable “the power to be turned off with the power button.” TRUE : Enable “the power to be turned off with the power button.”
Header
#include <CasioSys. h>
Remarks
17
Title Function
ApoCountReset
Resets the counter of APO time. By calling this function before elapse of the APO time set at the control panel, APO can be disabled.
C Language Interface
Calling Sequence
BOOL ApoCountReset()
Parameters
None
Return Values
TRUE : Normal end.
Header
#include <CasioSys. h>
Remarks
18
Title Function
SoftReset
Resets the system. After this function is called, a worm-bootup is performed.
C Language Interface
Calling Sequence
void SoftReset()
Parameters
None
Return Values
None
Header
#include <CasioSys. h>
Remarks
When this function is called, a warm-bootup is immediately performed. This will cause file and data being accessed to be erased. All files and devices being currently opened must be closed before this function is activated.
19
Title Function
SetPowerOnAlarm
Enables or disables “the automatic power-on to be activated with the alarm”.
C Language Interface
Calling Sequence
BOOL SetPowerOnAlarm ( BOOL bMode);
Parameters
BOOL bMode
FALSE : Disables “automatic power-on with the alarm”. TRUE : Enables “automatic power-on with the alarm”. (default)
Return Values
TRUE : Normal end FALSE : Internal error
Header
#include <CasioSys. h>
Remarks
Related operations to the “automatic power-on” after this function is implemented are as follows. Table 3.1
Setup of
“SetPowerOnAlarm” disable d enabled
Setup at Control
panel
When the power of PA-
2400W is turned on
When the power of PA-
2400W is off Alarm off Alarm cannot be activated. No “automatic power-on”“automatic power-on” Alarm on Alarm can be activated. No “automatic power-on” Alarm off Alarm cannot be activated. No “automatic power-on”“automatic power-on” Alarm on Alarm can be activated. Yes “automatic power-on”
20
Title Function
GetPowerOnAlarm
Acquires the status of “automatic power-on with the alarm” if it is disabled or enabled.
C Language Interface
Calling Sequence
BOOL GetPowerOnAlarm()
Parameters
None
Return Values
TRUE : Enable “automatic power-on with the alarm”. FALSE : Disable “automatic power-on with the alarm”.
Header
#include <CasioSys. h>
Remarks
21
Title Function
Sets “power-on event notification” enabled or disabled.
C Language Interface
Calling Sequence
BOOL SetPowerEventStat( BOOL bMode)
Parameters
BOOL bMode
TRUE : Enable “power-on event notification”. FALSE : Disable “power-on event notification”. (default)
Return Values
TRUE : Normal end FALSE : Failure in opening registry
Header
#include <CasioSys. h>
SetPowerEventStat
Remarks
Settings by using this function remain active even after a RESET is performed.
22
Sample program to acquire power-on event notification
#include <windows.h>
static HANDLE hEv en tOn = NULL; static HANDLE h Threa dOn = NUL L ;
DWORD WINA PI On Th r ea d() {
LONG WaitReturn;
While (1 ) {
WaitRetu rn = W aitF orS ingl eOb ject(h Ev en ton, INF INITE ); If (WaitReturn == WAIT_OBJECT_0) {
MessageBox(NULL, TEXT(“PowerONEvent”), TEXT(“Event”), MB_OK); } ResetEvent(hEventOn);
} return 0;
}
BOOL Initialize() {
DWORD ThreadIDOn;
hEventOn = CreateEvent(NULL, TRUE, FALSE, TEXT(“PA_OnEvent”)); if( !hEventOn ) {
return(FALSE);
} hThreadOn = CreateThread(NULL, 0, OnThread, 0, 0, &ThreadIDOn); if(!hThreadOn) {
return(FALSE);
} return(TRUE);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
if(Initialize() ) {
MessageBox(NULL, TEXT(“Initialize Success”), TEXT(“Initialize”), MB_OK); While (1 ) {
Sleep(1000); } return(TRUE);
} else {
MessageBox(NULL, TEXT(“Initialize Error”), TEXT(“Initialize”), MB_OK); return(FALSE);
}
}
23
Title Function
Acquires the status of “power-on event notification” if it is enabled or disabled.
C Language Interface
Calling Sequence
BOOL GetPowerEventStat()
Parameters
None
Return Values
TRUE : Enable notification. FALSE : Disable notification.
Header
#include <CasioSys. h>
Remarks
GetPowerEventStat
24
4. SIPanel Library
4.1 Overview
In this chapter, the SIPanel which is executed on the Windows CE Ver.2.11 (on PA-2400W), and the DLL (Dynamic Link Library) which is called from a user application are described.
Fig. 4.1 System configuration (Windows CE Ver. 2.11)
User application
SIPANEL.DLL
SIPANEL.EXE
Operation of this library requires the following files:
Table 4.1
File Name Operation environment Description sipanel.dll Windows CE ver. 2.11 (SH3) Execution management library for starting up SIPanel sipanel.exe Windows CE ver. 2.11 (SH3) Execution program for starting up SIPanel
Use the following files if developing a user application that controls the SIPanel with the execution management library of this system.
Output to windows with forcus
SIPanel keyboard screen
Input by tapping
Table 4.2
File Name Operation environment Description sipanel.lib sipanel.h
Windows CE ver. 2.11 (SH3) Import library and header file for calling sipanel.dll
25
Loading...
+ 58 hidden pages