예제 #1
0
        public override String ToString()
        {
            String value = null;

            switch (What)
            {
            case LightingWhat.DimmerDown:
            case LightingWhat.DimmerUp:
            case LightingWhat.LightOFF:
            case LightingWhat.LightON:
                value = String.Format(CMD_BUS, Who.GetStringValue(), What.GetStringValue(), Where);
                break;

            case LightingWhat.DimmerStrenght:
                value = String.Format(CMD_BUS, Who.GetStringValue(), DimmerStrenght / 10, Where);
                break;

            case LightingWhat.LightOnAtSpeed:
            case LightingWhat.LightOffAtSpeed:
                value = String.Format(CMD_BUS, Who.GetStringValue(), String.Format(What.GetStringValue(), Speed), Where);
                break;

            case LightingWhat.GetStatus:
                value = String.Format(GET_STATE, Who.GetStringValue(), Where);
                break;
            }

            return(value);
        }
예제 #2
0
        public override string ToString()
        {
            String value = null;

            switch (What)
            {
            case AlarmWhat.GetZoneStatus:
                value = String.Format(GET_STATE, Who.GetStringValue(), String.Format(What.GetStringValue(), Zone));
                break;

            case AlarmWhat.GetCentralUnitStatusFromWebServer:
                value = String.Format(GET_STATE_NO_WHERE, Who.GetStringValue());
                break;

            case AlarmWhat.GetCentralUnitStatusFromCentralUnit:
                value = String.Format(GET_STATE, Who.GetStringValue(), What.GetStringValue());
                break;

            case AlarmWhat.GetAuxiliaresStatusFromWebServer:
                value = String.Format(GET_STATE_NO_WHERE, WHO.Auxiliaries.GetStringValue());
                break;
            }

            return(value);
        }
예제 #3
0
        public override String ToString()
        {
            String value = null;

            switch (What)
            {
            case AutomationWhat.AutomationUp:
            case AutomationWhat.AutomationDown:
            case AutomationWhat.AutomationStop:
                value = String.Format(CMD_BUS, Who.GetStringValue(), What.GetStringValue(), Where);
                break;

            case AutomationWhat.GetStatus:
                value = String.Format(GET_STATE, Who.GetStringValue(), Where);
                break;
            }

            return(value);
        }