|
/* This Function Creates a Probe. You must specify what Probe
Type you wish to use: a Motor Probe, or Node Probe (typically
a device will only support one mode, not both). The Probe
number refers to the probe number you wish to refer throughout
the program, where the Probe index is the probe number for that
device (starting with 0). In the case of multiple probes on a
single node, Index = 0, 1, 2, etc. */
long probeInit(MPIControl *control,
MPIProbe *probe,
MPIProbeType probeType,
long intProbeNumber,
long intProbeIndex)
{
MPIProbeParams probeParams; long returnValue;
//Probe Initialization probeParams.type = probeType; if(probeType == MPIProbeTypeMOTOR){ probeParams.number.motor = intProbeNumber; }else{ // == MPIProbeTypeNODE probeParams.number.node = intProbeNumber; } probeParams.probeIndex = intProbeIndex;
*probe = mpiProbeCreate(*control, &probeParams);
returnValue = mpiProbeValidate(*probe); return returnValue; }
|