Oc_getbatterystatus, Oc_getbatterystatus -17, Syntax – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 77: Parameters: description, Return value: considerations, Example
Publication 1747-UM002A-US-P - June 2000
Library of Routines 6-17
OC_GetBatteryStatus
OC_GetBatteryStatus gets the current state of the battery of the
scanner.
Syntax:
int
OC_GetBatteryStatus(HANDLE handle, BYTE
*batstate);
Parameters:
Description:
The battery provides backup power for the host retentive data (dual
port RAM).
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE
Handle;
BYTE
batt_sts;
int
retcode;
retcode = OC_GetBatteryStatus( Handle, &batt_sts );
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
batstate
If
batstate
is:
BATTERY_GOOD battery voltage is good
BATTERY_LOW battery voltage has dropped below a reliable level
Name:
Value:
Description:
SUCCESS
0
battery state was read successfully
ERR_OCACCESS
2
handle
does not have access to scanner
ERR_OCINIT
5
scanner has not been initialized, see OC_InitScanner