예제 #1
0
        public override async Task EnableVariableValueChangedEvents(SubOptions options, params ObjectRef[] idsOfEnabledTreeRoots)
        {
            JObject request = MakeSessionRequest();

            request["options"] = new JRaw(StdJson.ObjectToString(options));
            request["idsOfEnabledTreeRoots"] = new JRaw(StdJson.ValueToString(idsOfEnabledTreeRoots));
            await PostJObject("EnableVariableValueChangedEvents", request);
        }
예제 #2
0
        public override async Task EnableVariableValueChangedEvents(SubOptions options, params VariableRef[] variables)
        {
            JObject request = MakeSessionRequest();

            request["options"]   = new JRaw(StdJson.ObjectToString(options));
            request["variables"] = new JRaw(StdJson.ObjectToString(variables));
            await PostJObject("EnableVariableValueChangedEvents", request);
        }
예제 #3
0
        public override async Task EnableVariableValueChangedEvents(SubOptions options, params ObjectRef[] idsOfEnabledTreeRoots)
        {
            if (idsOfEnabledTreeRoots == null)
            {
                throw new ArgumentNullException(nameof(idsOfEnabledTreeRoots));
            }
            var request = MakeSessionRequest <EnableVariableValueChangedEventsReq>();

            request.Options = options;
            request.IdsOfEnabledTreeRoots = idsOfEnabledTreeRoots;
            await PostVoid(request);
        }
예제 #4
0
        public override async Task EnableVariableValueChangedEvents(SubOptions options, params VariableRef[] variables)
        {
            if (variables == null)
            {
                throw new ArgumentNullException(nameof(variables));
            }
            var request = MakeSessionRequest <EnableVariableValueChangedEventsReq>();

            request.Options   = options;
            request.Variables = variables;
            await PostVoid(request);
        }
예제 #5
0
 /// <summary>
 /// Enables receiving notifications about value changes of specific variables.
 /// The notifications are received by <see cref="EventListener.OnVariableValueChanged"/>.
 /// </summary>
 /// <param name="options">Specifies what kind of changes to listen for and whether the new value will be sent in the notification</param>
 /// <param name="variables">The variable references to register for changes</param>
 public abstract Task EnableVariableValueChangedEvents(SubOptions options, params VariableRef[] variables);
예제 #6
0
 /// <summary>
 /// Enables receiving notifications about value changes of all variables contained in the set
 /// of objects as specified by the given object tree roots. The notifications are received by
 /// <see cref="EventListener.OnVariableValueChanged"/>.
 /// </summary>
 /// <param name="options">Specifies what kind of changes to listen for and whether the new value
 /// will be sent in the notification</param>
 /// <param name="idsOfEnabledTreeRoots">The roots of object trees to register</param>
 public abstract Task EnableVariableValueChangedEvents(SubOptions options, params ObjectRef[] idsOfEnabledTreeRoots);
예제 #7
0
 public override Task EnableVariableValueChangedEvents(SubOptions options, params VariableRef[] variables)
 {
     throw new InvalidOperationException("EnableVariableValueChangedEvents on closed connection");
 }
예제 #8
0
 public override Task EnableVariableValueChangedEvents(SubOptions options, params ObjectRef[] idsOfEnabledTreeRoots)
 {
     throw new InvalidOperationException("EnableVariableValueChangedEvents on closed connection");
 }