DTR Driver
2-106
❏
device params ptr
. Enter the name of a DTR_Params structure
declared in your C application code. See the information following
this list for details.
The DTR_Params structure is defined in dtr.h as follows:
/* ======== DTR_Params ======== */
typedef struct { /* device parameters */
struct {
DTR_Scale value; /* scaling factor */
} scale;
struct {
Arg arg; /* user-defined argument */
Fxn fxn; /* user-defined function */
} user;
} DTR_Params;
In the following code example, DTR_PRMS is declared as a
DTR_Params structure:
#include <dtr.h>
...
struct DTR_Params DTR_PRMS = {
10.0,
NULL,
NULL
};
By typing _DTR_PRMS as the Parameters property of a DTR device, the
values above are used as the parameters for this device.
You can also use the default values that the driver assigns to these
parameters by entering _DTR_PARAMS for this property. The default
values are:
DTR_Params DTR_PARAMS = {
{ 1 }, /* scale.value */
{ (Arg)NULL, /* user.arg */
(Fxn)NULL }, /* user.fxn */
};
scale.value is a floating-point quantity multiplied with each data point in
the input or output stream.
If you do not configure one of the built-in scaling functions for the device
ID, use user.fxn and user.arg in the DTR_Params structure to define a
transformation that is applied to inbound or outbound blocks of data,
where buffer is the address of a data block containing size points; if the
value of user.fxn is NULL, no transformation is performed at all.