public void Monitor(RemoteObject remoteObject) { remoteObject.Execute(() => { var invoker = new RemoteHelper(remoteObject); return(invoker.WriteVariable(this)); }); }
public Variant Write(RemoteObject remoteObject) { return(remoteObject.Execute(() => { var invoker = new RemoteHelper(remoteObject); return invoker.WriteVariable(this); })); }
public void Announce(RemoteObject remoteObject) { remoteObject.Execute(() => { var remoteHelper = new RemoteHelper(remoteObject); remoteHelper.MonitorDataChange(this, remoteObject); return(Variant.Null); }); }
public void Monitor(Dictionary <string, Action <Variant> > monitors) { Execute(() => { var rh = new RemoteHelper(this); rh.MonitorDataChanges(monitors.Keys.Select(name => new RemoteDataMonitor { Name = name, Value = Variant.Null, Callback = monitors[name] }) .ToList(), this); return(Variant.Null); }); }
public Variant Invoke(RemoteObject remoteObject) { var methodNodeId = NodeId.Null; if (remoteObject.NodeIdCache.ContainsKey(Name)) { methodNodeId = remoteObject.NodeIdCache[Name]; } var result = remoteObject.Execute(() => { var invoker = new RemoteHelper(remoteObject); return(invoker.CallMethod(this, ref methodNodeId)); }); if (methodNodeId != NodeId.Null && !remoteObject.NodeIdCache.ContainsKey(Name)) { remoteObject.NodeIdCache[Name] = methodNodeId; } return(result); }