public ItemValue Post([FromBody]object value)
 {
     JsonRequestOpc oJson;
     try
     {
         oJson = JsonConvert.DeserializeObject<JsonRequestOpc>(value.ToString());
     }
     catch (Exception)
     {
         throw new Exception("Nem sikerült értelmezni a JSON adatot. A helyes formátum pl: {serverUrl:'opc.tcp://servername:49320',action:'list_sessions',pars:{sid:'0',machineid:'1'}}");
     }
     //addTokenToPars(ref oJson);
     if (_opc == null || !_opc.Server.IsConnected)
     {
         _opc = new Opc(oJson.serverUrl);
     }
     try
     {
         ItemValue val = _opc.Read(oJson.tags[0], oJson.maxAge);
         return val;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
        public void ReadTest()
        {
            ItemValue val;

            Opc opc = new Opc("opc.tcp://10.0.0.99:49310");
            val = opc.Read("Channel1.Device1.Tag1",0);
            Trace.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Trace.WriteLine("Hello World");
            Assert.AreEqual(true, val.Quality.IsGood);
        }
 public void OpcTest()
 {
     Opc opc = new Opc("opc.tcp://10.0.0.99:49310");
 }