Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next
Chapter 6

Functions

This chapter alphabetically presents each calibration function your loadable module calls to interface with KCMS Calibrator Tool. For each function, the chapter provides its purpose, arguments, and return values.

Once a module is dynamically opened, Calibrator Tool uses dlsym(3DL) to access the module functions by their symbolic names. Then it adds the names to the process symbol space.

KCMSCMonClose()

int
 KCMSCMonClose (void);

Purpose

KCMSCMonClose()performs any cleaning necessary (for example, unlocking the serial port) for the module code.

Arguments

None.

Return Value

Returns 0 if successful; returns any other nonzero value if unsuccessful.

KCMSCMonInit()

int
 KCMSCMonInit (KCMSCVisuals *vis_data);

Purpose

KCMSCMonInit() accepts a pointer to a KCMSCVisuals structure passed to it from the Calibrator Tool main program and is used by the module for initialization. Examples of initialization tasks the module might perform include:

  • Initializing the RS-232 serial port, if a hardware colorimeter is used to take color measurements

  • Starting its own GUI-based application

  • Setting everything necessary to measure monitor data

  • Doing nothing, if the measurements were previously stored in a file by the end user

Arguments

vis_data

Points to a KCMSCVisuals structure. For details on the format of this structure, see KCMSCVisuals in Chapter 5, Data Structures.

Return Value

Returns 0 if successful; returns any other nonzero value if the hardware fails to initialize.

KCMSCMonMeasure()

int
 KCMSCMonMeasure (KCMSCData *measured_data);

Purpose

KCMSCMonMeasure() accepts a pointer to a KCMSCData structure passed to it from the Calibrator Tool main program and performs the following functions:

  • It performs the number of measurement sets specified by the value of the size field in the KCMSCData structure (alternately, it can be programmed to read all the measurements previously created).

  • It uses the measurement values to fill in the appropriate fields in the KCMSCData structure.

Arguments

measured_data

Points to a KCMSCData structure. For details on the format of this structure, seeKCMSCData in Chapter 5, Data Structures.

Return Value

Returns 0 if successful; returns any other nonzero value if the collection of data was interrupted either by the user or by failure of the hardware to measure the data.

Previous Previous     Contents     Index     Next Next
 

Updated: 2003-09-30, 01:47