Functions for accessing retentive memory, Retmemlock, Syntax – Rockwell Automation 6182 SDK User Manual
Page 90: Remarks, Return value, Portability, See also
4–50
RAC6182-Specific Extensions to the CE API
Publication 6182-UM002B-EN-P
The RAC6182 software includes a Retentive Memory driver that can be
called by applications to read and write to the RAC6182’s battery-backed
RAM. The driver is implemented as a dynamic link library ().
Retentive Memory driver functions available to applications include
functions to lock and unlock the battery-backed RAM. When an
application holds a lock on this RAM, no other application can read or
write data. There are also functions that allow applications to verify
memory contents using a checksum.
The functions exported by the RetentiveMem driver are listed below.
RetMemLock
This function locks retentive memory. It is prototyped in
RetentiveMemAPI.h.
Syntax
#include
#include
BOOL RetMemLock(DWORD dwTimeout)
Remarks
This function locks the entire retentive memory (battery-backed RAM),
preventing other applications from reading and writing. An application
must have the lock on retentive memory before any other retentive
memory function will complete successfully; thus, this function should
always be called, and its return value checked, before any other function
retentive memory function is called.
Parameter
Description
DwTimeout
Number of milliseconds to wait for lock before failing.
Return Value
Returns TRUE if the lock request succeeded. Returns FALSE if the lock
request failed because another application did not release the lock within
dwTimeout milliseconds.
Portability
This function is specific to the RAC6182 hardware.
See Also
RetMemUnlock
Functions for Accessing
Retentive Memory