Oc_readhostretentive data, Oc_readhostretentivedata -46, Example – Rockwell Automation 1747-PCIS API Software - Open Controller User Manual
Page 106: Syntax, Parameters: description
Publication 1747-UM002A-US-P - June 2000
6-46 Library of Routines
Example:
HANDLE
Handle;
MSGBUF
msgbuf;
int
retcode;
retcode = OC_PollScanner( Handle, OCMSG_ANY, &msgbuf );
/* Check msgbuf.MsgID for what message is available */
OC_ReadHostRetentive
Data
OC_ReadHostRetentiveData reads the host-retentive-data partition of
the scanner.
Syntax:
int
OC_ReadHostRetentiveData(HANDLE handle, BYTE
*buf, WORD offset, WORD len);
Parameters:
Description:
Data is not read past the end of the host-retentive-data partition.
It is recommended that you verify the integrity of the data stored in
the host-retentive-data partition. You can use the OC_CalculateCRC
function to generate a 16-bit CRC.
Parameter:
Description:
handle
Must be a valid handle returned from OC_OpenScanner
buf
Contains the data that is read
offset
The data is read
offset
bytes from the beginning of the data
partition
If the number of bytes from
offset
to the end of the partition is
smaller than
len
, no bytes will be read and ERR_OCPARAM is
returned.
len
Defines how many bytes to read
IMPORTANT
On the 1747-PCIS only, the jumper for the
battery-backup dual-port memory is disabled by
default. You must switch the jumper to enable the
battery-backup feature.
The 1747-OCF dual port is NOT battery-backed.