Exemplo n.º 1
0
        public void SetBoolean(int value)
        {
            ControlIntegerChange boolean = new ControlIntegerChange()
            {
                Params = new ControlIntegerParams()
                {
                    Name = cName, Value = value
                }
            };

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(boolean, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));
        }
Exemplo n.º 2
0
        public void SetInteger(int value)
        {
            double newValue = QsysProcessor.ScaleDown(value);

            ControlIntegerChange integer = new ControlIntegerChange()
            {
                Params = new ControlIntegerParams()
                {
                    Name = cName, Position = newValue
                }
            };

            QsysProcessor.Enqueue(JsonConvert.SerializeObject(integer, Formatting.None, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            }));
        }
Exemplo n.º 3
0
        public void SetBoolean(int value)
        {
            if (registered)
            {
                ControlIntegerChange boolean = new ControlIntegerChange()
                {
                    Params = new ControlIntegerParams()
                    {
                        Name = cName, Value = value
                    }
                };

                QsysCoreManager.Cores[coreId].Enqueue(JsonConvert.SerializeObject(boolean, Formatting.None, new JsonSerializerSettings {
                    NullValueHandling = NullValueHandling.Ignore
                }));
            }
        }
Exemplo n.º 4
0
        public void SetInteger(int value, int scaled)
        {
            if (registered)
            {
                double newValue;
                ControlIntegerChange integer;

                if (scaled == 1)
                {
                    newValue = QsysCoreManager.ScaleDown(value);
                    integer  = new ControlIntegerChange()
                    {
                        Params = new ControlIntegerParams()
                        {
                            Name = cName, Position = newValue
                        }
                    };
                }
                else
                {
                    newValue = value;
                    integer  = new ControlIntegerChange()
                    {
                        Params = new ControlIntegerParams()
                        {
                            Name = cName, Value = newValue
                        }
                    };
                }



                QsysCoreManager.Cores[coreId].Enqueue(JsonConvert.SerializeObject(integer, Formatting.None, new JsonSerializerSettings {
                    NullValueHandling = NullValueHandling.Ignore
                }));
            }
        }