MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_09.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Viresco.Mates;
namespace unit_tests
{
[TestClass]
public class mates_test_09
{
[TestMethod]
public void TestMethod()
{
using (Mates mates = new Mates("mates_REMOTE.mon", 1))
{
try
{
Dio3Node dio = mates.NewDio3Node(NodeId.mates_dio3_mk1_1);
// Enumerate all inputs.
for (Mates.MatesInput input = Mates.MatesInput.IN01;
input <= Mates.MatesInput.IN20;
input++)
{
Console.Write("Input {0}: {1}\n", input, dio.GetDin((int)input));
}
}
catch
{
Console.Write("Cannot discover node.\n");
}
}
}
}
}