Binary Clustering API
Jump to navigation
Jump to search
Under construction
- Warning: This page is under construction
The Clustering API
This API is defined in the clusteringapi.h file.
- Typical usage
- 1.a Load the Pixet core using the pxpClLoadPixetCore("pxcore.dll").
- 1.b Or normally start the application using the Pixet core API pxcInitialize() function, get the core pointer using pxcGetIPixet(), set the core pointer to the Clustering API using pxpClSetIPixet(iPixet);
- 2. Get the clustering instance handle using pxpClCreate(device_index);
- 3. Set-up the callbacks (not required).
- 4. Load the calibration (not required).
- 5. Start the measurement or repaly your data.
- 6. Use the data via one of NewClusters callbacks or from saved clog file.
LoadPixetCore and UnloadPixetCore
pxpClLoadPixetCore
- Loads the pixet core library (pxcore.dll/so). When the measurement with a device is intented the user has to either load pixet core with this function, or if the core is already loaded in the application (pxcore.dll/so was loaded separatelly), the setIPixet function has to be called.
- Definition
PXCLAPI int pxpClLoadPixetCore(const char* pxCoreLiPath);
Parameters
- pxCoreLiPath – path to the pxcore library
- Return value
- 0 if successful, otherwise the return value is a PXCLERR_XXX code.
Example
int rc = pxpClLoadPixetCore("pxcore.dll");
errorToList("pxpClLoadPixetCore", rc);
pxpClUnloadPixetCore
- Deinitializes and unloads the Pixet core.
- Definition
PXCLAPI void pxpClUnloadPixetCore();
Parameters
- (no pars)
- Return value
- (void)
Example
pxpClUnloadPixetCore();
SetIPixet and GetIPixet
pxpClSetIPixet
- Sets the internal Pixet API pointer. This is used when pxcore library is loaded separatelly in application. The use must pointer obtained via function pxcGetIPixet and should not load the pixet core with pxpSiLoadPixetCore function.
- Definition
PXCLAPI void pxpClSetIPixet(void* pixet);
Parameters
- (no pars)
- Return value
- (void)
Example
iPixet = pxcGetIPixet(); // Warning: Use the pxcGetIPixet from pxcapi.h,
// not pxpClGetIPixet from clusteringapi.h
if (iPixet==0) msgToList("pxcGetIPixet=NULL"); else msgToList("pxcGetIPixet OK");
pxpClSetIPixet(iPixet);
pxpClGetIPixet
- Return internal Pixet structure pointer or 0 if not set.
Can be used if you want use functions of the pxcore API if the program was started using pxpClLoadPixetCore.
- Definition
PXCLAPI void* pxpClGetIPixet();
Parameters
- (no pars)
- Return value
- internal Pixet structure pointer or 0 if not set
Warning
- Do not confuse this with the pxcGetIPixet() function of the pxcore API.