4.10Details of Functions54
FCHKCE /G54
FCHKCE /C56
3
Preface
This manual describes the C language-dedicated library functions and utilities that run on the Casio
PA-2400 (hereinafter referred to as "H/PC", which stands for Handheld PC).
The PA-2400 uses the Windows CE operating system, 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
document.
I/O Bootup Library
1) IOBOX1.H Function header file
2) IOBOX1.LIB Import library for linking
File Transfer Utility
1) FLCE.EXE Execution file
2) SND.LNK Shortcut for PA-2400-to-PA-2400 communication
3) RCV.LNK Shortcut for PA-2400-to-PA-2400 communication
4) IDLE.LNK Shortcut for idle
File Check Utility
1) FCHKCE.EXE Execution file
2) MAKE.LNK Shortcut for PA-2400-to-PA-2400 communication
3) CHECK.LNK Shortcut for downloading AP
Files that can be placed in any directory (shortcut)
Files that are required for building
Each library function or utility can be made available to the user when the DLL/EXE file is copied
into the Windows directory on the PA-2400 (see the figure below).
Host PC
PA-2400
Copy
Fig.1.1 System configuration
5
1.1 List of Dedicated Libraries
1.1.1 I/O Bootup Library Function
Table 1.1 I/O Bootup libraru function
No. Function Description Page
1 iobox_chk Monitoring the connection status of I/O BOX 9
1 FCHKCE /G Generation of a list file 54
2 FCHKCE /C Comparison of list files 56
6
2. I/O Bootup Library
2.1 Overview
The I/O bootup library monitors the connection status of the dedicated I/O Box and notifies the user
of the status.
2.2 Function
This library supports only one function, iobox_chk(). The iobox_chk() function monitors and
detects, for a specified period, whether I/O Box is mounted, and returns the result (mounting
detected, time-out error, or error). Each time this function is used, it is necessary to also execute
"Permit interrupt, Wait for interrupt and time-out, and Prohibit interrupt". The following diagram
shows the range covered by this library.
Fig. 2.1
PA-2400
User Application
(1) iobox_chk ( TIME_OUT_SEC ) ;
(5) Return
Detection, Timeout
Error
IOBOX1.DLL
I/O PORT: 0
(2) Mounting
(4) Timeout
I/O Box
(3) I/O Box ON Signal
7
Because the interrupt signals are detected by their signal levels, they can be detected even if the
order of and 2) is changed. (The connection status can be detected whether this function is
called before or after I/O Box is mounted, unless a time-out occurs.)
8
2.3 Details of Function
iobox_chk
< Description >
Monitors the connection status between two PA-2400 terminals and I/O Box for a specified period
of time and returns the result.
< Format >
int iobox_chk ( DWORD time_out );
< Parameter >
DWORD time_out : Maximum time to monitor the connection status (1 to 4,294,967,295 (ms) )
No time-out = INFINITE
(4,294,967,295 (ms) equals to INFINITE.)
< Return value >
int
< Return code >
0 : Connection detected
1 : Time-out
-1 : Used exclusively by other program
Other : Function call fails.
< Include file >
iobox1.h
< Remarks >
If the main program calls this function, it must subsequently acquire a return from this function.
If the main program is terminated without acquiring a return, it can no longer be called on and
after the next call, since the interrupt event object of I/O Box that has been generated in this
function is not closed. (In order to restore it to normal operation, it is necessary to reset the
whole system.)
To avoid this problem set a short time-out for this function call and always receive the return of
time-out, then execute the cancellation process if, for example, programming the cancellation
process after waiting for connection.
If the system power is turned off while this function is in the process of waiting for connection to I/O
Box , the monitoring operation can be resumed from the state that immediately preceded the point
9
where the system power was turned off by the Power-ON resume function.
A disconnection from I/O Box should be judged by means of a communication error that is detected
by the user application or a time-out return error with this function after the PA-2400 is connected to
I/O Box.
Always include iobox1.lib with the import library to be used for developing user applications.
10
2.4 Source List
This section introduces the IOBOX1.C program and its reference sources, and show a list of
environment variables.
This file utility performs file transfer either between a PC and PA-2400 or between two PA-2400
terminals. The dedicated up/download utility should be running on this PC. As a result, functions
that can be implemented by this utility depend on the up/download utility dedicated for the host PC,
as well as the file transfer protocol used between two FLCEs.
For this operation the following I/O interfaces can be used:
(For more information about the hardware configuration of the I/O Box system, refer to the
Hardware Manual.)
1) RS-232C
Interface via the 16-pin cable (using the communication cable supplied with PA-2400)
Direct interface to the host PC
2) IrDA 1.0
Interface to the host PC via the master or satellite I/O Box
Interface between two H/PCs
15
3.2 List of Functions
With this file transfer utility the following functions related to the file transfer protocol can be
specified:
Table 3.1 List of Functions
FunctionDescription
Communication
environment setup
File transmissionTransfers a file from the local machine to the communication partner.
File receptionReceives a file from the communication partner.
File transmission
(append)
File deletionDeletes a file or directory existing on the communication partner.
File move/File name
modification
Time transmissionSets the system date and time of the communication partner.
Sets the device, baud rate, and communication mode to be used for
communication.
Appends a file existing on the local machine to a file existing on the
communication partner.
Moves or modifies the name of a file existing on the communication
partner.
16
3.3 Communication Functions
Operational specifications for the FLCE should be made by initiating an appropriate command
together with the following arguments. A maximum of twenty commands can be described at one
time, and they will be processed sequentially in the order in which they are described. If a command
encounters an error, communication is immediately terminated from the error and subsequent
commands will no longer be processed.
When the communication environment setup command is not specified, the default value is used.
Table 3.2 Types of Arguments
TypeFunctionCommandApplicable OptionExample of Input
Setup
command
Operation
command
Communication
environment setup
File transmission/ SO, R/ SOR
File reception/ RO, R/ ROR
File transmission
(append)
File deletion/ DO, R/ D
File move/ NNone/ N
Time transmission/ TNone/ T
Idle startNoneScript file name
/Y={device, baud
rate, mode}
/ ANone/ A
None/Y={IrDA,
115200, }
Outline of Options
O (Overwrite) : Specification of forced overwrite of a read-only file
If this option is specified, even a read-only file will be overwritten.
If an overwrite of a read-only file is attempted and this option is not specified, this function will
be abnormally terminated.
The attribute of a source file will be duplicated onto a target file which has been overwritten.
R (Recursive call):
All the files that exist under the specified directory are used as the objective of processing. If the
specified directory has any sub-directories, the files in these sub-directories are also included as
the objective of processing. The hierarchical directory system has a maximum depth of sixteen
levels.If this option is not specified, only a file that is designated by its pathname will be the
objective of processing.
17
Loading...
+ 39 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.