Oc_getbatterystatus -21 – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual

Page 75

Advertising
background image

OC_GetBatteryStatus

Library of Routines

6–21

Publication 1747-6.5.3 June 1998

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

Advertising
This manual is related to the following products: