MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_15.cs
using System;
using System.IO;
using System.Xml;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Viresco.Mates;
using Viresco.uOS_monitor.Config;
using Viresco.Utils.Xml;
namespace unit_tests
{
[TestClass]
public class mates_test_15
{
[TestMethod]
public void TestMethod()
{
Configuration cfg = new Configuration();
cfg.LocalAddress = 1;
var pipe = new NamedPipe();
pipe.Name = @"\\RAKIETA\pipe\MATES_PROXY_PIPE";
pipe.Timeout = 5000;
pipe.Map = 1;
cfg.NamedPipe.Add(pipe);
using (Mates mates = Mates.FromBuffer(Serialization.ClassToXmlString(cfg), 1))
{
try
{
UccNode ucc = mates.NewUccNode(NodeId.mates_ucc_mk1_1);
ucc.AlcdWrite(0, 0, "mates_open_buffer");
}
catch (Exception ex)
{
Console.Write("Cannot discover node: " + ex + "\n");
}
}
}
}
}