Maxim Integrated 73M1822/73M1922 Control Module User Manual

Page 51

Advertising
background image

UG_1x22_053

73M1822/73M1922 Control Module User Guide

Rev. 1.0

51

The following example code illustrates a reading of a line voltage IET table entry.

M1X22_MEASURE_UPDATE_t

read;

int ret;

read.row = 5; /* read row 5 of voltage IET table */
read.action = M1X22_MEASURE_ACTION_GET; /* request for GET operation */
read.entity = M1X22_MEASURE_ENTITY_VOLTAGE; /* measuring entity= voltage */

ret = ioctl (fd, M1X22_MEASURE_UPDATE, &read);
if (ret < 0)
printf (“Failed to read voltage IET entry”);
else {
printf (“\nReading voltage IET table entry row: %d”, read.row);
printf (“\nInterval min: %d”, read.interval_min);
printf (“\nInterval max: %d”, read.interval_max);
printf (“\nEvent : 0x%08X”, read.event);
}

Advertising