MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_03.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Viresco.Mates;
namespace unit_tests
{
[TestClass]
public class mates_test_03
{
[TestMethod]
public void TestMethod()
{
using (Mates mates = new Mates("mates_REMOTE.mon", 1))
{
try
{
Dac5Node dac = mates.NewDac5Node(NodeId.mates_dac5_mk1_1);
Adc5Node adc = mates.NewAdc5Node(NodeId.mates_adc5_mk1_1);
// Assume there is loopback between DAC and ADC.
dac.SetDac(5, 1.0);
double check = adc.GetAdc(5);
Assert.IsTrue(check >= 0.99 && check <= 1.01);
}
catch
{
Console.Write("Cannot discover node.\n");
}
}
}
}
}