M1x22_measure_stop, Section 6.6.3 – Maxim Integrated 73M1822/73M1922 Control Module User Manual
Page 49

UG_1x22_053
73M1822/73M1922 Control Module User Guide
Rev. 1.0
49
6.6.2 M1X22_MEASURE_STOP
Description
Stops an on-going measurement (current or voltage). The param parameter points to a structure that
contains the requested stop measuring entity.
#define M1X22_MEASURE_STOP _IOWR(0xA4, 0xE6, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1X22_MEASURE_STOP,
unsigned long param );
Parameters
Data Type
Name
Description
int
chan_fd
Channel descriptor.
int
M1X22_MEASURE_STOP I/O control identifier for this operation.
unsigned long
param
Pointer to M1X22_MEASURE_START_STOP_t.
Return Values
Data Type
Description
unsigned long
0 – Successful.
-1 – Failed to stop measurement.
Example
The following example code illustrates the stopping of an on-going voltage measurement process.
M1X22_MEASURE_START_t voltage;
int ret;
voltage.entity = M1X22_MEASURE_ENTITY_VOLTAGE; /* stop voltage monitor */
ret = ioctl (fd, M1X22_MEASURE_STOP, &voltage);
if (ret < 0)
printf (“Failed to stop line voltage monitoring”);
else
printf (“Successful”);