User Manual

73M1822/73M1922 Control Module User Guide UG_1x22_053
50 Rev. 1.0
6.6.3 M1X22_MEASURE_UPDATE
Description
Reads an IET entry or updates an IET entry based on provided parameters. The param parameter points
to a structure that contains the requested action (GET or SET), the measuring entity (current or voltage),
the IET table index, and its attributes, if used in the SET operation. For GET operations the IET attributes
will be read from the driver.
#define M1X22_MEASURE_UPDATE _IOWR(0xA4, 0xE7, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1X22_MEASURE_UPDATE,
unsigned long param );
Parameters
Data Type Name Description
int
chan_fd
Channel descriptor.
int
M1X22_MEASURE_UPDATE
I/O control identifier for this operation.
unsigned long
param
Pointer to
M1X22_MEASURE_UPDATE_t
.
Return Values
Data Type Description
unsigned int
0 – Successful.
-1 Failed to update IET entry.
Example
The following example code illustrates an update to a line current IET table entry.
M1X22_MEASURE_UPDATE_t update;
int ret;
update.row = 3; /* update row 3 of current IET table */
update.action = M1X22_MEASURE_ACTION_SET; /* request for SET operation */
update.entity = M1X22_MEASURE_ENTITY_CURRENT; /* measuring entity= current */
update.interval_min = 15; /* lower bound current = 15ma */
update.interval_max = 21; /* upper bound current = 21ma */
update.event = 0x000E1521; /* this event to be emitted */
ret = ioctl (fd, M1X22_MEASURE_UPDATE, &update);
if (ret < 0)
printf (“Failed to update current IET entry”);
else
printf (“Successful”);