Beispiel #1
0
        protected RoleLightColor()
        {
            SetName(RoleName);
            _instance = this;

            {
                //the three parameters are red, green, and blue
                List<VParamType> args = new List<VParamType>() { new ParamType(0), new ParamType(0), new ParamType(0) };
                List<VParamType> retVals = new List<VParamType>();
                AddOperation(new Operation(OpSetName, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                //the three parameters are red, green, and blue
                List<VParamType> retVals = new List<VParamType>() { new ParamType(0), new ParamType(0), new ParamType(0) };
                AddOperation(new Operation(OpGetName, args, retVals, true));
            }
        }
Beispiel #2
0
 protected RoleBatteryLevel()
 {
     SetName(RoleName);
     _instance = this;
 }
Beispiel #3
0
        protected RoleSwitchMultiLevel()
        {
            SetName(RoleName);
            _instance = this;

            {
                List<VParamType> args = new List<VParamType>() { new ParamType(0.0) };
                List<VParamType> retVals = new List<VParamType>();
                AddOperation(new Operation(OpSetName, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                List<VParamType> retVals = new List<VParamType>() {new ParamType(0.0)};
                AddOperation(new Operation(OpGetName, args, retVals, true));
            }
        }
Beispiel #4
0
 protected RoleLuminositySensor()
 {
     SetName(RoleName);
     _instance = this;
 }
Beispiel #5
0
 protected RoleHumiditySensor()
 {
     SetName(RoleName);
     _instance = this;
 }
Beispiel #6
0
 protected RoleTemperatureSensor()
 {
     SetName(RoleName);
     _instance = this;
 }
Beispiel #7
0
 protected RolePowerSensor()
 {
     SetName(RoleName);
     _instance = this;
 }
Beispiel #8
0
        public RoleHueBridge()
            : base(RoleName)
        {
            SetName(RoleName);
            _instance = this;

            {
                List<VParamType> args = new List<VParamType>();

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpToggleAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpTurnOffAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpTurnOnAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpResetAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpUnlockAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpSetColorAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpSetBrightnessAll, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpToggleBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpTurnOffBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpTurnOnBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpResetBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpUnlockBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpSetColorBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));
                retVals.Add(new ParamType(0));
                retVals.Add(new ParamType(0));
                retVals.Add(new ParamType(0));

                AddOperation(new Operation(OpGetColorBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpSetBrightnessBulb, args, retVals));
            }

            {
                List<VParamType> args = new List<VParamType>();
                args.Add(new ParamType(0));

                List<VParamType> retVals = new List<VParamType>();
                retVals.Add(new ParamType(false));

                AddOperation(new Operation(OpBumpBulb, args, retVals));
            }
        }