Manuals >Reference >OMI and C++ Glossary
Print version of this Book (PDF file)
prevnext

OMI and C++ Glossary

This glossary provides definitions of terminology particular to the programming environment for the Open Measurement Interface and C++. For more information on C++ and its syntax, refer to Syntax.

base class    A class from which another class inherits data and functions. For example:

 // base_class is inherited by derived class
class derived_class : public base_class { ... } ; 
// example from user_meas.hxx:
class cvu_4194 : public user_unit { ... } ;

Calibrate    A menu function to calibrate instruments used by a Setup.

class    An extension of struct declarations from C. Like a struct declaration in C, a C++ class declaration can list a series of data members. In addition, a class can declare functions to operate on the data members. When only these functions manipulate the data members, the integrity of the data is better protected. This protection of data members is often termed encapsulation. Another important extension beyond struct declarations is the following: a class declaration can automatically contain all the data members from another class, and can reuse all the functions declared in the other class. This capability is termed inheritance, and is discussed below. See also object.

const    Indicates that a function won't change an argument, or acts like #define. For example:

 // neither char array subject to change below:
int strcmp(const char*, const char*); 
// like #define, but without global scope:
const int select_code=7; 

constructor    Function to initialize an object's members. For example, hp4194::hp4194 in user_meas.cxx. Note the special function naming convention, in which the class name appears twice.

dat    Class name associated with IC-CAP Setups.

delete    A C++ statement used to release memory obtained by new.

derive    To make a new class that inherits data and functions from a base class. In the base class example, the class derived_class is derived from the class base_class.

derived class    Opposite of base class. A derived class generally adds data and functions beyond what it inherits from its base class.

destructor    Opposite of constructor. Often critical for using delete to release memory obtained with new during constructor execution. For example, hp4194::~hp4194 in user_meas.cxx. Note the special function naming convention, in which the class name appears twice.

device file    A special UNIX file for which reads and writes are done through I/O cards, like a GPIB card. In the OMI, device file access (instrument I/O, in other words) is encapsulated within the hpib_io_port class.

Driver Generation Scripts     refer to mk_unit, mk_instr, and mk_instr_ui.

friend class    A class able to access the private members of another class. It is often convenient for an instrument class and its associated unit classes to do this. Examples are presented in Running the Scripts on Windows.

Hardware Manager    The single IC-CAP object responsible for the functionality on the main menu of the Hardware Editor.

hpib_io_port    A class providing an interface to I/O cards and instruments that supports reading, writing, serial polling, and other functions. Declared in io_port.h.

hwmanager    Class name associated with Hardware Manager.

inherit    Obtain data and functions not by declaring them explicitly, but by telling C++ you want the data and functions from another class, in addition to any explicitly declared for a new class. See the example with base class, in which derived_class inherits base_class.

inheritance    A C++ feature allowing 1 class to inherit the data and functions of another class. This is valuable because a class can reuse existing functionality, while adding to it.

instr[ument]     The common base class for all instrument objects is instr (declared in instr.h). See user_instr.h.

instr_options    Common base class for all instrument options editors. See user_instr_options.

instrument data    Refers to data members declared in the classes instr, user_instr, hp4194, or the instrument class created with the mk_instr script.

instrument function    Refers to functions declared in the classes instr, user_instr, hp4194, or the instrument class created with the mk_instr script.

internal sweep    A main sweep in which an instrument unit is programmed to acquire a series of data points without IC-CAP directing the acquisition of each individual point. Opposite of user sweep.

main sweep    The innermost sweep in a measurement. The opposite of a step sweep. In an IC-CAP Input editor, a main sweep has Sweep Order set to 1.

Measure    A menu function to execute the measurement specified by a Setup.

Measurer    The single IC-CAP object with overall responsibility for Measure and Calibrate.

member data    The variables declared in a class. When an object is created it gets its own copies of these variables. For example, in user_meas.hxx, the class hp4194 declares a pointer to a cvu_4194 object as part of the hp4194's member data.

member functions    The functions declared in a class. For example, in user_meas.hxx, the class cvu_4194 declares zero_supply().

mk_instr    A script to generate declarations for the instrument part of a driver.

mk_instr_ui    A script to generate all necessary code for the instrument options editor for a driver.

mk_unit    A script to generate declarations for the unit part of a driver.

new    A C++ statement that replaces the C malloc function. The new statement dynamically allocates memory, and calls a constructor if one is defined. For example:

 // from hp4194::build_units in user_meas.cxx:
cv_unit = new cvu_4194 (CM,this,1) ;
// array of 1000 double precision numbers:
double* big_array = new double[1000] ; 

object    A data structure containing the variables listed in a class declaration. An object also contains (due to inheritance) all the variables declared in any base class. An object and its components can be manipulated by the functions in its own class declaration, as well as by the functions in any base class declarations.

out    Class name associated with IC-CAP Outputs.

overload    Give 2 functions the same name, but different argument lists. The compiler distinguishes which one to call by checking the argument lists.

override    Declares a function in a derived class, when it was already declared in a base class, in order to specialize the behavior of the function for the derived class.

private    Used as a keyword in a class declaration to indicate that subsequently declared member data (and sometimes member functions) can only be accessed by the class member functions. Private is the default policy in a class declaration, until one of the keywords protected or public is used.

protected    Similar to private, though not as strict. It permits derived class member functions to have access to the members listed below this keyword.

public    Used in 2 senses. First, it is used like private but with the opposite effect. It permits any other C++ code to access the members listed below it. Second, it is used in inheritance declarations as follows:

 class cvu_4194 : public user_unit { ... } ;

Although the language permits public to be replaced or absent in the declaration above, in OMI programming it should always be present. The role of public in the statement above is explained in such books as Stanley Lippman's C++ Primer.

Rebuild Active List    A menu function in the Hardware Editor that locates all supported GPIB instruments.

redeclare    Same as override.

reference argument    An argument whose address is passed to a function, to reduce function call overhead, or to permit a called function to directly modify data belonging to the caller. See the explanation for & in Understanding C++ and its Syntax, subsection New Symbols and Operators.

sweep    Class name associated with IC-CAP Inputs. Also a synonym for an IC-CAP Input.

sweep order    An integer from 1 or higher. The main sweep has sweep order 1. Any step sweeps, if present, have order 2 and higher.

sweep mode    The physical dimension associated with a sweep, such as Voltage or Time.

sweep type    The type of numerical calculation used to determine the step values in a sweep, such as LIN (linear spacing), or LOG.

unit     The common base class for all unit objects is unit (declared in unit.h). See user_unit.h.

unit data    Refers to data members declared in the classes unit, user_unit, cvu_4194, or any unit classes created with the mk_unit script.

unit function    Refers to functions declared in the classes unit, user_unit, cvu_4194, or any unit classes created with the mk_unit script.

user sweep    The opposite of internal sweep. A sweep in which the associated unit is not completely programmed beforehand, but instead forces and measures each point under explicit supervision by IC-CAP. Unless an instrument supports 2 internal sweeps, any non-main sweep is a user sweep. Often called spot mode.

user_instr_options     Class from which OMI instrument options editors are directly derived, as in:

 class hp4194_table : public user_instr_options {...};

virtual function    The effect of the virtual keyword is that when Measurer invokes zero_supply() for a unit, the actual function executed depends on the unit. If the unit is a cvu_4194, the code that executes is cvu_4194::zero_supply(). This feature is often termed dynamic binding. An example from unit.h is:

 virtual int zero_supply() { return 0; }

void    In C++ and ANSI/C, a function can be declared to return nothing, using the special type void. For example:

 void wait_delay_time() ; // from user_meas.hxx

prevnext