예제 #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));
            }
        }
예제 #2
0
 protected RoleBatteryLevel()
 {
     SetName(RoleName);
     _instance = this;
 }
예제 #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));
            }
        }
예제 #4
0
 protected RoleLuminositySensor()
 {
     SetName(RoleName);
     _instance = this;
 }
예제 #5
0
 protected RoleHumiditySensor()
 {
     SetName(RoleName);
     _instance = this;
 }
예제 #6
0
 protected RoleTemperatureSensor()
 {
     SetName(RoleName);
     _instance = this;
 }
예제 #7
0
 protected RolePowerSensor()
 {
     SetName(RoleName);
     _instance = this;
 }
예제 #8
0
파일: Role.cs 프로젝트: smosgin/labofthings
        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));
            }
        }