Programming Style Of Test Method Api - Agilent Technologies 93000 SOC Series Training Manual

Mixed-signal training
Hide thumbs Also See for 93000 SOC Series:
Table of Contents

Advertisement

1-4
N OT E
Programming Style of Test Method
API
There are two styles in the test method APIs. One is C function
style, and another is C++ class style. The difference between the
two is a style of writing as follows:
C Function Style
This style test method API is provided as C function so that the
function has the programming style similar to a generic C
function.
EXECUTE_TEST(timeout, &timeout_flag);
DSP_FFT(source_arrary, result_array, window);
TEST(pin, testname, value);
C++ Class Style
To change any conditions for a specified hardware resource, or to
retrieve measurement data from a specified hardware resource,
test method APIs have this programming style.
The C++ class style APIs are used mainly to change hardware settings
and retrieve measurement result. Hence, the C function style APIs are
used in almost portions of your test method program.
This style API has the following characteristics.
•The Setup APIs and Result APIs are mainly in the typical C++
class style.
•An API is constructed by a data container specifier and
function(s) such below:
Primary.level(3);
Specifier
Function
Analog.AWG("Ain").vOffset(0.5 V);
Specifier
•A data container specifier points to a data container that has a
variety of data or a sub-container in a data container.
•A data container is called an object in the C++ world.
And a specifier is an object name.
•A function can access to data in the specified container.
Lesson 1 – Test Method Structure
Function
409

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents