title: OPC UA-.net Standard C# simple console client
body: <p>I am trying out the SampleApplication NetCoreConsoleClient from OPC UA Foundation GitHub page <a href="https://github.com/OPCFoundation/UA-.NETStandard" rel="noreferrer">OPC-UA.net Standard</a>
  and I came to several problems along the way.</p>
  <p>I wanted to use this library to simply read the data sent by the server (i am using Prosys OPC UA Server) and write it out in the console. I have struggled to get to the actual data variables that I am sending with the server. I manage to connect to it and subscribe but I can't get the desired MonitoredItem values to be written out with the <code>onNotification</code> method.</p>
  <pre><code>Console.WriteLine(&quot;6 - Add a list of items (server current time and status) to the subscription.&quot;);
  exitCode = ExitCode.ErrorMonitoredItem;
  var list = new List&lt;MonitoredItem&gt; 
  {
      new MonitoredItem(subscription.DefaultItem)
      {
          DisplayName = &quot;ServerStatusCurrentTime&quot;, StartNodeId = &quot;i=&quot;+Variables.Server_ServerStatus_CurrentTime.ToString()
      }
  };
  list.ForEach(i =&gt; i.Notification += OnNotification);
  subscription.AddItems(list);
  </code></pre>
  <p>here the sample adds a new MonitoredItem to the list. When I tried adding my own item I never got any response from it even though the Server is all the time sending changed values and so it should trigger the <code>onNotification</code> method.</p>
  <p>I get the DisplayName and StartNodeId of desired value from this part:</p>
  <pre><code>foreach (var rd in references)
  {
      Console.WriteLine(&quot; {0}, {1}, {2}&quot;, rd.DisplayName, rd.BrowseName, rd.NodeClass);
      ReferenceDescriptionCollection nextRefs;
      byte[] nextCp;
      session.Browse(
      null,
      null,
      ExpandedNodeId.ToNodeId(rd.NodeId, session.NamespaceUris),
                  0u,
                  BrowseDirection.Forward,
                  ReferenceTypeIds.HierarchicalReferences,
                  true,
                  (uint)NodeClass.Variable | (uint)NodeClass.Object | (uint)NodeClass.Method,
                  out nextCp,
                  out nextRefs);
  
      foreach (var nextRd in nextRefs)
      {
          Console.WriteLine(&quot;   + {0}, {1}, {2}&quot;, nextRd.DisplayName, nextRd.BrowseName, nextRd.NodeClass);
      }
  }
  </code></pre>
  <p>and so:</p>
  <pre><code>var list = new List&lt;MonitoredItem&gt;
  {
      new MonitoredItem(subscription.DefaultItem)
      {
          DisplayName = &quot;Simulation&quot;, StartNodeId = &quot;ns=2;s=85\:Simulation&quot;
      } 
  };
  </code></pre>
  <p>I never get any value returned. I am somehow confused with the OPC UA standard and its way of packaging the data.</p>