Detail of function, Iobox_chk, 3 details of function iobox_chk – Casio Cassiopeia PA-2400 User Manual
Page 9
9
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