.

cacheServiceCreate

Declaration

 
CacheService cacheServiceCreate(MPIControl          control,
				CacheServiceConfig *config);	
 

Required Header: apputil.h
Change History:
Added in 03.04.11

Description

cacheServiceCreate creates a thread for a controller to periodically update the MPI controller status cache.

control The MPIControl object for which the CacheService object will update the MPI controller status cache.
config

The configuration structure used at creation of the CacheService object.

If config is null, then CacheServiceConfigDEFAULT will be used to initialize the CacheSerive object.


Return Values  
MPIHandleVOID Caching has not been enabled.
Valid CacheService object A valid CacheService object is returned on success.

Sample Code

Using CacheServiceConfigDEFAULT to initialize a CacheSeriveConfig variable.

MPIControl         control;
CacheService       cacheService;
CacheServiceConfig cacheServiceConfig = CacheServiceConfigDEFAULT;

/* create and initialize controller */

cacheServiceConfig.sleepTime = 20; /* milliseconds */

cacheService = CacheServiceCreate(control, &cacheServiceConfig);

See Also

CacheServiceConfig | CacheServiceConfigDEFAULT | cacheServiceDelete

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering