/
MATES
/ Modular Automatic Test Equipment System API
2.5.0.0
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
mates_test_23.c
#include <stdio.h>
#include "
mates.h
"
int
main(
void
)
{
MATES_HANDLE
h =
mates_open
(
"proxy.mon"
, 1);
int
success = 0;
int
value = 0;
/* Check if node is present. */
if
(
mates_discover_single_node
(h,
mates_dio3_mk1_1
) !=
UOS_STATUS_OK
)
{
mates_close
(h);
return
(0);
}
/* Get the values of all digital inputs. */
if
(
mates_get_din_all
(h,
mates_dio3_mk1_1
, &value) ==
UOS_STATUS_OK
)
{
success++;
printf(
"Successfully got all inputs: 0x%X\n"
, value);
}
mates_close
(h);
return
((success == 1) ? 0 : -1);
}