| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions
CMeasProgramSet Class Reference

## Description

Measurement program set class.

## Public Member Functions
long | AddMeasurementProgram (string stMeasProgName)
| Adds a new measurement programs. More...
long | AddPreFilterParameter (string stMeasProgName, MeasurementPreFilterType FilterType, void *pParameter, bool bClear=false)
| Adds a prefilter parameter set to the list. More...
long | AddPreFilterParameterDef (MeasurementPreFilterType FilterType, void *pParameter, bool bClear=false)
| Adds a prefilter parameter set to the default set list. More...
void | Assign (CMeasProgramSet *pMeasProgset)
| Assign from an other measurement program set.
void | Clear ()
| Deletes all measurement programs.
| CMeasProgramSet ()
| Constructor.
void | DeleteMeasurementProgram (string stMeasProgName)
| Deletes a new measurement programs. More...
bool | FromBuffer (PBYTE &pbyBuffer, DWORD &dwCurrBufferSize)
| Read from buffer pbyBuffer - Pointer to buffer (Pointer will incremented !!!) dwCurrBufferSize - Current buffer size (will decremented) More...
bool | FromIniFile ()
| Read settings from INI file, filename is default ini file name. More...
bool | FromIniFile (string stIniFileName)
| Read settings from INI file, filename is default ini file name. More...
unsigned long | GetBufferSize ()
| Returns the buffer size in byte.
string | GetCurrentMeasurementProgram ()
| Get current measurement program ("" - Default measurement program)
long | GetCurrentMeasurementProgramIndex ()
| Get current measurement program index (< 0 - Default measurement program)
string | GetDefaultMeasProgramName ()
| Which measuring program is identical to the default measuring program. More...
TMeasurementParameterSet * | GetMeasurementParameter (string stMeasProgName="")
| Returns a pointer to measurement parameter stMeasProgName - Measurement program name (not case sensitive) - "" - selected program.
unsigned long | GetNumParameterSets ()
| Returns the number of measurement parameter sets.
bool | GetOnSensorFlag ()
| Height image calculation on sensor or sensor DLL if possible. More...
string | GetParameterSetName (unsigned long dwIndex)
| Returns the name of the measurement parameter set on index.
TDataAcquPreFilterSetData * | GetPreFilterParameter (string stMeasProgName="")
| Returns a pointer to prefilter parameter. More...
unsigned long | GetThesholdPowerSpectrum (string stMeasProgName="")
| Returns threshold for power spectrum. More...
long | LoadFromBinaryFile (CDataFile *pFile)
| Load from binary file. More...
long | SaveToBinaryFile (CDataFile *pFile)
| Save to binary file. More...
long | SelectCurrentMeasurementProgram (string stMeasProgName="")
| Selects the current measurement program. More...
long | SetMeasurementParameter (string stMeasProgName, MeasurementMode MeasMode, void *pParameter)
| Sets the measurement parameter. More...
long | SetMeasurementParameterDef (MeasurementMode MeasMode, void *pParameter)
| Sets the measurement parameter for the default set. More...
void | SetOnSensorFlag (bool bOnSenor)
| Set height image calculation on sensor or sensor DLL if possible. More...
void | SetThesholdPowerSpectrum (unsigned long dwThres, string stMeasProgName="")
| Sets threshold for power spectrum. More...
bool | ToBuffer (PBYTE &pbyBuffer, DWORD &dwCurrBufferSize)
| Write to buffer. More...
bool | ToIniFile ()
| Write settings to INI file, filename is default ini file name. More...
bool | ToIniFile (string stIniFileName)
| Write settings to INI file, filename is default ini file name. More...
virtual | ~CMeasProgramSet ()
| Destructor.

## Static Public Member Functions
static unsigned long | GetCurrentVersion ()
| Returns the current version.

## Member Function Documentation

long CMeasProgramSet::AddMeasurementProgram | ( | string | stMeasProgName | ) |

Adds a new measurement programs.

Parameters

  stMeasProgName | Measurement program name (not case sensitive)

Returns
  Error code

long CMeasProgramSet::AddPreFilterParameter | ( | string | stMeasProgName,
|  | MeasurementPreFilterType | FilterType,
|  | void * | pParameter,
|  | bool | bClear = `false`
| ) |  |

Adds a prefilter parameter set to the list.

Parameters

  stMeasProgName | Measurement program name (not case sensitive)
  FilterType | Filter type
  pParameter | Pointer to prefilter parameter (typ depends on filter type)
  bClear | Delete list?

Returns
  Error code

long CMeasProgramSet::AddPreFilterParameterDef | ( | MeasurementPreFilterType | FilterType,
|  | void * | pParameter,
|  | bool | bClear = `false`
| ) |  |

Adds a prefilter parameter set to the default set list.

Parameters

  FilterType | Filter type
  pParameter | Pointer to prefilter parameter (typ depends on filter type)
  bClear | Delete list?

Returns
  Error code

void CMeasProgramSet::DeleteMeasurementProgram | ( | string | stMeasProgName | ) |

Deletes a new measurement programs.

Parameters

  stMeasProgName | Measurement program name (not case sensitive)

bool CMeasProgramSet::FromBuffer | ( | PBYTE & | pbyBuffer,
|  | DWORD & | dwCurrBufferSize
| ) |  |

Read from buffer pbyBuffer - Pointer to buffer (Pointer will incremented !!!) dwCurrBufferSize - Current buffer size (will decremented)

Returns
  Success - true

bool CMeasProgramSet::FromIniFile | ( |  | ) |

Read settings from INI file, filename is default ini file name.

Returns
  Success

bool CMeasProgramSet::FromIniFile | ( | string | stIniFileName | ) |

Read settings from INI file, filename is default ini file name.

Parameters

  stIniFileName | Ini file name (with path)

Returns
  Success

string CMeasProgramSet::GetDefaultMeasProgramName | ( |  | ) |

Which measuring program is identical to the default measuring program.

Returns
  Measurement program name or -1, if no measurement program is identical

bool CMeasProgramSet::GetOnSensorFlag | ( |  | ) |
| inline

Height image calculation on sensor or sensor DLL if possible.

Always true for normal cases, false for development or tests

Returns
  True if height image calculation is done on the sensor, otherwise false

TDataAcquPreFilterSetData* CMeasProgramSet::GetPreFilterParameter | ( | string | stMeasProgName = `""` | ) |

Returns a pointer to prefilter parameter.

Parameters

  stMeasProgName | Measurement program name (not case sensitive) - "" - selected program

unsigned long CMeasProgramSet::GetThesholdPowerSpectrum | ( | string | stMeasProgName = `""` | ) |

Returns threshold for power spectrum.

Parameters

  stMeasProgName | Measurement program name (not case sensitive) - "" - selected program

long CMeasProgramSet::LoadFromBinaryFile | ( | CDataFile * | pFile | ) |

Load from binary file.

Parameters

  pFile | Pointer to file

Returns
  Error code

long CMeasProgramSet::SaveToBinaryFile | ( | CDataFile * | pFile | ) |

Save to binary file.

Parameters

  pFile | Pointer to file

Returns
  Error code

long CMeasProgramSet::SelectCurrentMeasurementProgram | ( | string | stMeasProgName = `""` | ) |

Selects the current measurement program.

Parameters

  stMeasProgName | Measurement program name (not case sensitive) - "" - default program

Returns
  Error code

long CMeasProgramSet::SetMeasurementParameter | ( | string | stMeasProgName,
|  | MeasurementMode | MeasMode,
|  | void * | pParameter
| ) |  |

Sets the measurement parameter.

Parameters

  stMeasProgName | Measurement program name (not case sensitive)
  MeasMode | Measurement mode
  pParameter | Pointer to measurement parameter (typ depends on measurement mode)

Returns
  Error code

long CMeasProgramSet::SetMeasurementParameterDef | ( | MeasurementMode | MeasMode,
|  | void * | pParameter
| ) |  |

Sets the measurement parameter for the default set.

Parameters

  MeasMode | Measurement mode
  pParameter | Pointer to measurement parameter (typ depends on measurement mode)

Returns
  Error code

void CMeasProgramSet::SetOnSensorFlag | ( | bool | bOnSenor | ) |
| inline

Set height image calculation on sensor or sensor DLL if possible.

For development or tests.

Parameters

  bOnSenor | True if height image calculation is done on the sensor, otherwise false

void CMeasProgramSet::SetThesholdPowerSpectrum | ( | unsigned long | dwThres,
|  | string | stMeasProgName = `""`
| ) |  |

Sets threshold for power spectrum.

Parameters

  dwThres | Threshold (1...200)
  stMeasProgName | Measurement program name (not case sensitive) - "" - selected program

bool CMeasProgramSet::ToBuffer | ( | PBYTE & | pbyBuffer,
|  | DWORD & | dwCurrBufferSize
| ) |  |

Write to buffer.

Parameters

  pbyBuffer | Pointer to buffer (Pointer will incremented)
  dwCurrBufferSize | Current buffer size (will decremented)

Returns
  Success - true

bool CMeasProgramSet::ToIniFile | ( |  | ) |

Write settings to INI file, filename is default ini file name.

Returns
  Success

bool CMeasProgramSet::ToIniFile | ( | string | stIniFileName | ) |

Write settings to INI file, filename is default ini file name.

Parameters

  stIniFileName | - Ini file name (with path)

Returns
  Success

The documentation for this class was generated from the following file:

- MeasProgram.h