MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_24.c
#include <stdio.h>
#include "mates.h"
int main(void)
{
MATES_HANDLE h = mates_open("proxy.mon", 1);
int success = 0;
unsigned int value = 0;
/* Check if node is present. */
{
return (0);
}
/* Get the values of all digital outputs. */
{
success++;
printf("Successfully got all outputs: 0x%X\n", value);
}
/* Now negate. */
value = (~value) & 0xFFFFF;
{
success++;
printf("Successfully set outputs: 0x%X\n", value);
}
/* Read back. */
{
success++;
printf("Successfully got all outputs: 0x%X\n", value);
}
/* If we have loopback between inputs and outputs, we can also verify
the outputs. */
{
success++;
printf("Successfully got all inputs: 0x%X\n", value);
}
return ((success == 4) ? 0 : -1);
}