The CPD Interface Using Legacy API
The CPD has a generic interface that offers vendors the freedom to deploy custom devices, locations, or databases for storing persistence data based on their needs.
It consists of the following two layers:
>The CPD Configuration API
>The CPD Callback API
As a part of the solution, certain Sentinel RMS libraries are enhanced to expose the CPD Configuration API layer. These functions—in the respective libraries and License Manager—determine whether a CPD handler routine defined by the software vendor will be used to store the persistence data as opposed to the RMS-managed default persistence scheme.
Refer to the below diagram for a pictorial overview of the CPD interface. The CPD workflow is outlined with the red color.

Figure 1: CPD Interface
The below table lists the functions and the libraries they belong to, along with their brief description:
CPD Configuration API | ||
---|---|---|
Function Name | Libraries | Description |
sntlSetPersistenceDevice |
System Initialization |
>Configures the system for using the CPD storage (known as the CPD mode). Can also be used for disabling the persistence storage mechanism altogether (known as No device mode). The default behavior is to store the persistence data as per the RMS-managed default persistence scheme. >This function is available at ...\<version>\Legacy\Development\C\Lib and must be called before the system initialization call (i.e. sntlInitStandaloneSystem). >After the successful system initialization call, the persistence data objects for different types of licensing models will be created. |
VLSsetPersistenceDevice |
>Licensing >Isolated License Manager |
>Configures the licensing libraries (standalone and integrated) and the License Manager for storing the persistence data to the CPD storage. >In the case of licensing library, this function must be called before any licensing call (like VLSinitialize). >In the case of License Manager, software vendor needs to call VLSsetPersistenceDevice from VLSenableVendorIsolation in the isolated License Manager library. |
VLScleanSetPersistenceDevice |
Persistence Cleaning |
>Configures the cleaning operations in the CPD storage. >This function is available at ...\<version>\Legacy\Development\C\Lib and must be called before the persistence cleaning call (VLScleanStandalonePersistenceInfo or VLScleanNetworkPersistenceInfo) is made. |
The second part of the solution consists of a set of functions that provide read/write mechanisms to perform persistence storage operations. These are the callback API to be implemented by the software vendor in the native code and registered in the VLScpdIfImpl structure as pointers to individual implementation of the API. The major tasks to be performed by the software vendor are:
>Provide the definition of each callback API to send/receive data over the interface.
>Initialization and cleanup of device resources (such as establishing DB connection) is software vendor’s responsibility.
>The implementation has to be specific to every device—using each device‘s native support (for example, using OCI in the case of Oracle).
>Translation of interface data types to the device data types and vice versa is software vendor’s responsibility.
>Execution of device specific I\O commands is required (for example, execution of SQL queries to insert/fetch/modify data in the case of RDBMS).
The below table provides a brief description of all the callback API functions.
CPD Callback API | |
---|---|
VLScpdInitializeDevice |
This callback API is to be implemented by the software vendor for initializing the target device. It also allocates system resources for further CPD operations. |
VLScpdExitDevice |
This callback API is to be defined by the software vendor to perform cleanup tasks whilst disconnecting from the target device. |
VLScpdCreateObject |
This callback API creates and initializes device specific objects. It is also used to verify the presence of pre-created objects. |
VLScpdReadRecord |
This callback API reads the data as per the input parameter specified. |
VLScpdWriteRecord |
This callback API writes new data or modifies existing data as per the input parameter specified. |
VLScpdDeleteRecord |
This callback API deletes one or more records from the target device/location. |
VLScpdReadNextRecord |
This callback API reads all data records, one by one. |
Refer to the Chapter - Custom Persistence Device API of the Sentinel RMS SDK API Reference Guide for complete information about both the configuration and callback API and the related sample program (included in the SDK installation).