OpenECHO
 All Classes Namespaces Files Functions Variables
GeneralLighting.java
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Sony Computer Science Laboratories, Inc. <info@kadecot.net>
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.sonycsl.echo.eoj.device.housingfacilities;
17 
25 
26 public abstract class GeneralLighting extends DeviceObject {
27 
28  public static final short ECHO_CLASS_CODE = (short)0x0290;
29 
30  public static final byte EPC_ILLUMINANCE_LEVEL = (byte)0xB0;
31  public static final byte EPC_LIGHT_COLOR_SETTING = (byte)0xB1;
32  public static final byte EPC_ILLUMINANCE_LEVEL_STEP_SETTING = (byte)0xB2;
33  public static final byte EPC_LIGHT_COLOR_STEP_SETTING = (byte)0xB3;
34  public static final byte EPC_MAXIMUM_SPECIFIABLE_VALUES = (byte)0xB4;
35  public static final byte EPC_MAXIMUM_VALUE_OF_SETTABLE_LEVEL_FOR_NIGHT_LIGHTING = (byte)0xB5;
36  public static final byte EPC_LIGHTING_MODE_SETTING = (byte)0xB6;
37  public static final byte EPC_ILLUMINANCE_LEVEL_SETTING_FOR_MAIN_LIGHTING = (byte)0xB7;
38  public static final byte EPC_ILLUMINANCE_LEVEL_STEP_SETTING_FOR_MAIN_LIGHTING = (byte)0xB8;
39  public static final byte EPC_ILLUMINANCE_LEVEL_SETTING_FOR_NIGHT_LIGHTING = (byte)0xB9;
40  public static final byte EPC_ILLUMINANCE_LEVEL_STEP_SETTING_FOR_NIGHT_LIGHTING = (byte)0xBA;
41  public static final byte EPC_LIGHT_COLOR_SETTING_FOR_MAIN_LIGHTING = (byte)0xBB;
42  public static final byte EPC_LIGHT_COLOR_LEVEL_STEP_SETTING_FOR_MAIN_LIGHTING = (byte)0xBC;
43  public static final byte EPC_LIGHT_COLOR_SETTING_FOR_NIGHT_LIGHTING = (byte)0xBD;
44  public static final byte EPC_LIGHT_COLOR_LEVEL_STEP_SETTING_FOR_NIGHT_LIGHTING = (byte)0xBE;
45  public static final byte EPC_LIGHTING_MODE_STATUS_IN_AUTO_MODE = (byte)0xBF;
46  public static final byte EPC_RGB_SETTING_FOR_COLOR_LIGHTING = (byte)0xC0;
47  public static final byte EPC_ON_TIMER_RESERVATION_SETTING = (byte)0x90;
48  public static final byte EPC_ON_TIMER_SETTING = (byte)0x91;
49  public static final byte EPC_OFF_TIMER_RESERVATION_SETTING = (byte)0x94;
50  public static final byte EPC_OFF_TIMER_SETTING = (byte)0x95;
51 
52  @Override
53  protected void setupPropertyMaps() {
54  super.setupPropertyMaps();
55 
61  }
62 
63  @Override
64  public void onNew() {
65  super.onNew();
66  Echo.getEventListener().onNewGeneralLighting(this);
67  }
68 
69  @Override
70  public short getEchoClassCode() {
71  return ECHO_CLASS_CODE;
72  }
73 
98  protected abstract boolean setOperationStatus(byte[] edt);
123  protected abstract byte[] getOperationStatus();
146  protected boolean setIlluminanceLevel(byte[] edt) {return false;}
169  protected byte[] getIlluminanceLevel() {return null;}
192  protected boolean isValidIlluminanceLevel(byte[] edt) {
193  if(edt == null || !(edt.length == 1)) return false;
194  return true;
195  }
219  protected boolean setLightColorSetting(byte[] edt) {return false;}
243  protected byte[] getLightColorSetting() {return null;}
267  protected boolean isValidLightColorSetting(byte[] edt) {
268  if(edt == null || !(edt.length == 1)) return false;
269  return true;
270  }
294  protected boolean setIlluminanceLevelStepSetting(byte[] edt) {return false;}
318  protected byte[] getIlluminanceLevelStepSetting() {return null;}
342  protected boolean isValidIlluminanceLevelStepSetting(byte[] edt) {
343  if(edt == null || !(edt.length == 1)) return false;
344  return true;
345  }
369  protected boolean setLightColorStepSetting(byte[] edt) {return false;}
393  protected byte[] getLightColorStepSetting() {return null;}
417  protected boolean isValidLightColorStepSetting(byte[] edt) {
418  if(edt == null || !(edt.length == 1)) return false;
419  return true;
420  }
446  protected byte[] getMaximumSpecifiableValues() {return null;}
472  protected boolean isValidMaximumSpecifiableValues(byte[] edt) {
473  if(edt == null || !(edt.length == 2)) return false;
474  return true;
475  }
503  protected byte[] getMaximumValueOfSettableLevelForNightLighting() {return null;}
532  if(edt == null || !(edt.length == 2)) return false;
533  return true;
534  }
558  protected abstract boolean setLightingModeSetting(byte[] edt);
582  protected abstract byte[] getLightingModeSetting();
606  protected boolean isValidLightingModeSetting(byte[] edt) {
607  if(edt == null || !(edt.length == 1)) return false;
608  return true;
609  }
632  protected boolean setIlluminanceLevelSettingForMainLighting(byte[] edt) {return false;}
655  protected byte[] getIlluminanceLevelSettingForMainLighting() {return null;}
678  protected boolean isValidIlluminanceLevelSettingForMainLighting(byte[] edt) {
679  if(edt == null || !(edt.length == 1)) return false;
680  return true;
681  }
704  protected boolean setIlluminanceLevelStepSettingForMainLighting(byte[] edt) {return false;}
727  protected byte[] getIlluminanceLevelStepSettingForMainLighting() {return null;}
751  if(edt == null || !(edt.length == 1)) return false;
752  return true;
753  }
776  protected boolean setIlluminanceLevelSettingForNightLighting(byte[] edt) {return false;}
799  protected byte[] getIlluminanceLevelSettingForNightLighting() {return null;}
822  protected boolean isValidIlluminanceLevelSettingForNightLighting(byte[] edt) {
823  if(edt == null || !(edt.length == 1)) return false;
824  return true;
825  }
848  protected boolean setIlluminanceLevelStepSettingForNightLighting(byte[] edt) {return false;}
871  protected byte[] getIlluminanceLevelStepSettingForNightLighting() {return null;}
895  if(edt == null || !(edt.length == 1)) return false;
896  return true;
897  }
920  protected boolean setLightColorSettingForMainLighting(byte[] edt) {return false;}
943  protected byte[] getLightColorSettingForMainLighting() {return null;}
966  protected boolean isValidLightColorSettingForMainLighting(byte[] edt) {
967  if(edt == null || !(edt.length == 1)) return false;
968  return true;
969  }
992  protected boolean setLightColorLevelStepSettingForMainLighting(byte[] edt) {return false;}
1015  protected byte[] getLightColorLevelStepSettingForMainLighting() {return null;}
1039  if(edt == null || !(edt.length == 1)) return false;
1040  return true;
1041  }
1064  protected boolean setLightColorSettingForNightLighting(byte[] edt) {return false;}
1087  protected byte[] getLightColorSettingForNightLighting() {return null;}
1110  protected boolean isValidLightColorSettingForNightLighting(byte[] edt) {
1111  if(edt == null || !(edt.length == 1)) return false;
1112  return true;
1113  }
1136  protected boolean setLightColorLevelStepSettingForNightLighting(byte[] edt) {return false;}
1159  protected byte[] getLightColorLevelStepSettingForNightLighting() {return null;}
1183  if(edt == null || !(edt.length == 1)) return false;
1184  return true;
1185  }
1208  protected boolean setLightingModeStatusInAutoMode(byte[] edt) {return false;}
1231  protected byte[] getLightingModeStatusInAutoMode() {return null;}
1254  protected boolean isValidLightingModeStatusInAutoMode(byte[] edt) {
1255  if(edt == null || !(edt.length == 1)) return false;
1256  return true;
1257  }
1283  protected boolean setRgbSettingForColorLighting(byte[] edt) {return false;}
1309  protected byte[] getRgbSettingForColorLighting() {return null;}
1335  protected boolean isValidRgbSettingForColorLighting(byte[] edt) {
1336  if(edt == null || !(edt.length == 3)) return false;
1337  return true;
1338  }
1362  protected boolean setOnTimerReservationSetting(byte[] edt) {return false;}
1386  protected byte[] getOnTimerReservationSetting() {return null;}
1410  protected boolean isValidOnTimerReservationSetting(byte[] edt) {
1411  if(edt == null || !(edt.length == 1)) return false;
1412  return true;
1413  }
1438  protected boolean setOnTimerSetting(byte[] edt) {return false;}
1463  protected byte[] getOnTimerSetting() {return null;}
1488  protected boolean isValidOnTimerSetting(byte[] edt) {
1489  if(edt == null || !(edt.length == 2)) return false;
1490  return true;
1491  }
1515  protected boolean setOffTimerReservationSetting(byte[] edt) {return false;}
1539  protected byte[] getOffTimerReservationSetting() {return null;}
1563  protected boolean isValidOffTimerReservationSetting(byte[] edt) {
1564  if(edt == null || !(edt.length == 1)) return false;
1565  return true;
1566  }
1591  protected boolean setOffTimerSetting(byte[] edt) {return false;}
1616  protected byte[] getOffTimerSetting() {return null;}
1641  protected boolean isValidOffTimerSetting(byte[] edt) {
1642  if(edt == null || !(edt.length == 2)) return false;
1643  return true;
1644  }
1645 
1646  @Override
1647  protected synchronized boolean setProperty(EchoProperty property) {
1648  boolean success = super.setProperty(property);
1649  if(success) return success;
1650 
1651  switch(property.epc) {
1652  case EPC_ILLUMINANCE_LEVEL : return setIlluminanceLevel(property.edt);
1653  case EPC_LIGHT_COLOR_SETTING : return setLightColorSetting(property.edt);
1656  case EPC_LIGHTING_MODE_SETTING : return setLightingModeSetting(property.edt);
1668  case EPC_ON_TIMER_SETTING : return setOnTimerSetting(property.edt);
1670  case EPC_OFF_TIMER_SETTING : return setOffTimerSetting(property.edt);
1671  default : return false;
1672  }
1673  }
1674 
1675  @Override
1676  protected synchronized byte[] getProperty(byte epc) {
1677  byte[] edt = super.getProperty(epc);
1678  if(edt != null) return edt;
1679 
1680  switch(epc) {
1699  case EPC_ON_TIMER_SETTING : return getOnTimerSetting();
1701  case EPC_OFF_TIMER_SETTING : return getOffTimerSetting();
1702  default : return null;
1703  }
1704  }
1705 
1706  @Override
1707  protected synchronized boolean isValidProperty(EchoProperty property) {
1708  boolean valid = super.isValidProperty(property);
1709  if(valid) return valid;
1710 
1711  switch(property.epc) {
1712  case EPC_ILLUMINANCE_LEVEL : return isValidIlluminanceLevel(property.edt);
1713  case EPC_LIGHT_COLOR_SETTING : return isValidLightColorSetting(property.edt);
1730  case EPC_ON_TIMER_SETTING : return isValidOnTimerSetting(property.edt);
1732  case EPC_OFF_TIMER_SETTING : return isValidOffTimerSetting(property.edt);
1733  default : return false;
1734  }
1735  }
1736 
1737  @Override
1738  public Setter set() {
1739  return set(true);
1740  }
1741 
1742  @Override
1743  public Setter set(boolean responseRequired) {
1744  return new Setter(getEchoClassCode(), getInstanceCode()
1745  , getNode().getAddressStr(), responseRequired);
1746  }
1747 
1748  @Override
1749  public Getter get() {
1750  return new Getter(getEchoClassCode(), getInstanceCode()
1751  , getNode().getAddressStr());
1752  }
1753 
1754  @Override
1755  public Informer inform() {
1756  return inform(isSelfObject());
1757  }
1758 
1759  @Override
1760  protected Informer inform(boolean multicast) {
1761  String address;
1762  if(multicast) {
1763  address = EchoSocket.MULTICAST_ADDRESS;
1764  } else {
1765  address = getNode().getAddressStr();
1766  }
1767  return new Informer(getEchoClassCode(), getInstanceCode()
1768  , address, isSelfObject());
1769  }
1770 
1771  public static class Receiver extends DeviceObject.Receiver {
1772 
1773  @Override
1774  protected boolean onSetProperty(EchoObject eoj, short tid, byte esv,
1775  EchoProperty property, boolean success) {
1776  boolean ret = super.onSetProperty(eoj, tid, esv, property, success);
1777  if(ret) return true;
1778 
1779  switch(property.epc) {
1780  case EPC_ILLUMINANCE_LEVEL :
1781  onSetIlluminanceLevel(eoj, tid, esv, property, success);
1782  return true;
1783  case EPC_LIGHT_COLOR_SETTING :
1784  onSetLightColorSetting(eoj, tid, esv, property, success);
1785  return true;
1787  onSetIlluminanceLevelStepSetting(eoj, tid, esv, property, success);
1788  return true;
1790  onSetLightColorStepSetting(eoj, tid, esv, property, success);
1791  return true;
1793  onSetLightingModeSetting(eoj, tid, esv, property, success);
1794  return true;
1796  onSetIlluminanceLevelSettingForMainLighting(eoj, tid, esv, property, success);
1797  return true;
1799  onSetIlluminanceLevelStepSettingForMainLighting(eoj, tid, esv, property, success);
1800  return true;
1802  onSetIlluminanceLevelSettingForNightLighting(eoj, tid, esv, property, success);
1803  return true;
1805  onSetIlluminanceLevelStepSettingForNightLighting(eoj, tid, esv, property, success);
1806  return true;
1808  onSetLightColorSettingForMainLighting(eoj, tid, esv, property, success);
1809  return true;
1811  onSetLightColorLevelStepSettingForMainLighting(eoj, tid, esv, property, success);
1812  return true;
1814  onSetLightColorSettingForNightLighting(eoj, tid, esv, property, success);
1815  return true;
1817  onSetLightColorLevelStepSettingForNightLighting(eoj, tid, esv, property, success);
1818  return true;
1820  onSetLightingModeStatusInAutoMode(eoj, tid, esv, property, success);
1821  return true;
1823  onSetRgbSettingForColorLighting(eoj, tid, esv, property, success);
1824  return true;
1826  onSetOnTimerReservationSetting(eoj, tid, esv, property, success);
1827  return true;
1828  case EPC_ON_TIMER_SETTING :
1829  onSetOnTimerSetting(eoj, tid, esv, property, success);
1830  return true;
1832  onSetOffTimerReservationSetting(eoj, tid, esv, property, success);
1833  return true;
1834  case EPC_OFF_TIMER_SETTING :
1835  onSetOffTimerSetting(eoj, tid, esv, property, success);
1836  return true;
1837  default :
1838  return false;
1839  }
1840  }
1841 
1842  @Override
1843  protected boolean onGetProperty(EchoObject eoj, short tid, byte esv,
1844  EchoProperty property, boolean success) {
1845  boolean ret = super.onGetProperty(eoj, tid, esv, property, success);
1846  if(ret) return true;
1847 
1848  switch(property.epc) {
1849  case EPC_ILLUMINANCE_LEVEL :
1850  onGetIlluminanceLevel(eoj, tid, esv, property, success);
1851  return true;
1852  case EPC_LIGHT_COLOR_SETTING :
1853  onGetLightColorSetting(eoj, tid, esv, property, success);
1854  return true;
1856  onGetIlluminanceLevelStepSetting(eoj, tid, esv, property, success);
1857  return true;
1859  onGetLightColorStepSetting(eoj, tid, esv, property, success);
1860  return true;
1862  onGetMaximumSpecifiableValues(eoj, tid, esv, property, success);
1863  return true;
1865  onGetMaximumValueOfSettableLevelForNightLighting(eoj, tid, esv, property, success);
1866  return true;
1868  onGetLightingModeSetting(eoj, tid, esv, property, success);
1869  return true;
1871  onGetIlluminanceLevelSettingForMainLighting(eoj, tid, esv, property, success);
1872  return true;
1874  onGetIlluminanceLevelStepSettingForMainLighting(eoj, tid, esv, property, success);
1875  return true;
1877  onGetIlluminanceLevelSettingForNightLighting(eoj, tid, esv, property, success);
1878  return true;
1880  onGetIlluminanceLevelStepSettingForNightLighting(eoj, tid, esv, property, success);
1881  return true;
1883  onGetLightColorSettingForMainLighting(eoj, tid, esv, property, success);
1884  return true;
1886  onGetLightColorLevelStepSettingForMainLighting(eoj, tid, esv, property, success);
1887  return true;
1889  onGetLightColorSettingForNightLighting(eoj, tid, esv, property, success);
1890  return true;
1892  onGetLightColorLevelStepSettingForNightLighting(eoj, tid, esv, property, success);
1893  return true;
1895  onGetLightingModeStatusInAutoMode(eoj, tid, esv, property, success);
1896  return true;
1898  onGetRgbSettingForColorLighting(eoj, tid, esv, property, success);
1899  return true;
1901  onGetOnTimerReservationSetting(eoj, tid, esv, property, success);
1902  return true;
1903  case EPC_ON_TIMER_SETTING :
1904  onGetOnTimerSetting(eoj, tid, esv, property, success);
1905  return true;
1907  onGetOffTimerReservationSetting(eoj, tid, esv, property, success);
1908  return true;
1909  case EPC_OFF_TIMER_SETTING :
1910  onGetOffTimerSetting(eoj, tid, esv, property, success);
1911  return true;
1912  default :
1913  return false;
1914  }
1915  }
1916 
1939  protected void onSetIlluminanceLevel(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1962  protected void onGetIlluminanceLevel(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1986  protected void onSetLightColorSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2010  protected void onGetLightColorSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2034  protected void onSetIlluminanceLevelStepSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2058  protected void onGetIlluminanceLevelStepSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2082  protected void onSetLightColorStepSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2106  protected void onGetLightColorStepSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2132  protected void onGetMaximumSpecifiableValues(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2160  protected void onGetMaximumValueOfSettableLevelForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2184  protected void onSetLightingModeSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2208  protected void onGetLightingModeSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2231  protected void onSetIlluminanceLevelSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2254  protected void onGetIlluminanceLevelSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2277  protected void onSetIlluminanceLevelStepSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2300  protected void onGetIlluminanceLevelStepSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2323  protected void onSetIlluminanceLevelSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2346  protected void onGetIlluminanceLevelSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2369  protected void onSetIlluminanceLevelStepSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2392  protected void onGetIlluminanceLevelStepSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2415  protected void onSetLightColorSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2438  protected void onGetLightColorSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2461  protected void onSetLightColorLevelStepSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2484  protected void onGetLightColorLevelStepSettingForMainLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2507  protected void onSetLightColorSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2530  protected void onGetLightColorSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2553  protected void onSetLightColorLevelStepSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2576  protected void onGetLightColorLevelStepSettingForNightLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2599  protected void onSetLightingModeStatusInAutoMode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2622  protected void onGetLightingModeStatusInAutoMode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2648  protected void onSetRgbSettingForColorLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2674  protected void onGetRgbSettingForColorLighting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2698  protected void onSetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2722  protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2747  protected void onSetOnTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2772  protected void onGetOnTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2796  protected void onSetOffTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2820  protected void onGetOffTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2845  protected void onSetOffTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2870  protected void onGetOffTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
2871  }
2872 
2873  public static class Setter extends DeviceObject.Setter {
2874  public Setter(short dstEchoClassCode, byte dstEchoInstanceCode
2875  , String dstEchoAddress, boolean responseRequired) {
2876  super(dstEchoClassCode, dstEchoInstanceCode
2877  , dstEchoAddress, responseRequired);
2878  }
2879 
2880  @Override
2881  public Setter reqSetProperty(byte epc, byte[] edt) {
2882  return (Setter)super.reqSetProperty(epc, edt);
2883  }
2884 
2885  @Override
2886  public Setter reqSetOperationStatus(byte[] edt) {
2887  return (Setter)super.reqSetOperationStatus(edt);
2888  }
2889  @Override
2890  public Setter reqSetInstallationLocation(byte[] edt) {
2891  return (Setter)super.reqSetInstallationLocation(edt);
2892  }
2893  @Override
2894  public Setter reqSetCurrentLimitSetting(byte[] edt) {
2895  return (Setter)super.reqSetCurrentLimitSetting(edt);
2896  }
2897  @Override
2898  public Setter reqSetPowerSavingOperationSetting(byte[] edt) {
2899  return (Setter)super.reqSetPowerSavingOperationSetting(edt);
2900  }
2901  @Override
2902  public Setter reqSetRemoteControlSetting(byte[] edt) {
2903  return (Setter)super.reqSetRemoteControlSetting(edt);
2904  }
2905  @Override
2906  public Setter reqSetCurrentTimeSetting(byte[] edt) {
2907  return (Setter)super.reqSetCurrentTimeSetting(edt);
2908  }
2909  @Override
2910  public Setter reqSetCurrentDateSetting(byte[] edt) {
2911  return (Setter)super.reqSetCurrentDateSetting(edt);
2912  }
2913  @Override
2914  public Setter reqSetPowerLimitSetting(byte[] edt) {
2915  return (Setter)super.reqSetPowerLimitSetting(edt);
2916  }
2917 
2940  public Setter reqSetIlluminanceLevel(byte[] edt) {
2941  reqSetProperty(EPC_ILLUMINANCE_LEVEL, edt);
2942  return this;
2943  }
2967  public Setter reqSetLightColorSetting(byte[] edt) {
2968  reqSetProperty(EPC_LIGHT_COLOR_SETTING, edt);
2969  return this;
2970  }
2994  public Setter reqSetIlluminanceLevelStepSetting(byte[] edt) {
2995  reqSetProperty(EPC_ILLUMINANCE_LEVEL_STEP_SETTING, edt);
2996  return this;
2997  }
3021  public Setter reqSetLightColorStepSetting(byte[] edt) {
3022  reqSetProperty(EPC_LIGHT_COLOR_STEP_SETTING, edt);
3023  return this;
3024  }
3048  public Setter reqSetLightingModeSetting(byte[] edt) {
3049  reqSetProperty(EPC_LIGHTING_MODE_SETTING, edt);
3050  return this;
3051  }
3074  public Setter reqSetIlluminanceLevelSettingForMainLighting(byte[] edt) {
3076  return this;
3077  }
3100  public Setter reqSetIlluminanceLevelStepSettingForMainLighting(byte[] edt) {
3102  return this;
3103  }
3126  public Setter reqSetIlluminanceLevelSettingForNightLighting(byte[] edt) {
3128  return this;
3129  }
3152  public Setter reqSetIlluminanceLevelStepSettingForNightLighting(byte[] edt) {
3154  return this;
3155  }
3178  public Setter reqSetLightColorSettingForMainLighting(byte[] edt) {
3179  reqSetProperty(EPC_LIGHT_COLOR_SETTING_FOR_MAIN_LIGHTING, edt);
3180  return this;
3181  }
3204  public Setter reqSetLightColorLevelStepSettingForMainLighting(byte[] edt) {
3206  return this;
3207  }
3230  public Setter reqSetLightColorSettingForNightLighting(byte[] edt) {
3231  reqSetProperty(EPC_LIGHT_COLOR_SETTING_FOR_NIGHT_LIGHTING, edt);
3232  return this;
3233  }
3256  public Setter reqSetLightColorLevelStepSettingForNightLighting(byte[] edt) {
3258  return this;
3259  }
3282  public Setter reqSetLightingModeStatusInAutoMode(byte[] edt) {
3283  reqSetProperty(EPC_LIGHTING_MODE_STATUS_IN_AUTO_MODE, edt);
3284  return this;
3285  }
3311  public Setter reqSetRgbSettingForColorLighting(byte[] edt) {
3312  reqSetProperty(EPC_RGB_SETTING_FOR_COLOR_LIGHTING, edt);
3313  return this;
3314  }
3338  public Setter reqSetOnTimerReservationSetting(byte[] edt) {
3339  reqSetProperty(EPC_ON_TIMER_RESERVATION_SETTING, edt);
3340  return this;
3341  }
3366  public Setter reqSetOnTimerSetting(byte[] edt) {
3367  reqSetProperty(EPC_ON_TIMER_SETTING, edt);
3368  return this;
3369  }
3393  public Setter reqSetOffTimerReservationSetting(byte[] edt) {
3394  reqSetProperty(EPC_OFF_TIMER_RESERVATION_SETTING, edt);
3395  return this;
3396  }
3421  public Setter reqSetOffTimerSetting(byte[] edt) {
3422  reqSetProperty(EPC_OFF_TIMER_SETTING, edt);
3423  return this;
3424  }
3425  }
3426 
3427  public static class Getter extends DeviceObject.Getter {
3428  public Getter(short dstEchoClassCode, byte dstEchoInstanceCode
3429  , String dstEchoAddress) {
3430  super(dstEchoClassCode, dstEchoInstanceCode
3431  , dstEchoAddress);
3432  }
3433 
3434  @Override
3435  public Getter reqGetProperty(byte epc) {
3436  return (Getter)super.reqGetProperty(epc);
3437  }
3438 
3439  @Override
3440  public Getter reqGetOperationStatus() {
3441  return (Getter)super.reqGetOperationStatus();
3442  }
3443  @Override
3444  public Getter reqGetInstallationLocation() {
3445  return (Getter)super.reqGetInstallationLocation();
3446  }
3447  @Override
3448  public Getter reqGetStandardVersionInformation() {
3449  return (Getter)super.reqGetStandardVersionInformation();
3450  }
3451  @Override
3452  public Getter reqGetIdentificationNumber() {
3453  return (Getter)super.reqGetIdentificationNumber();
3454  }
3455  @Override
3456  public Getter reqGetMeasuredInstantaneousPowerConsumption() {
3457  return (Getter)super.reqGetMeasuredInstantaneousPowerConsumption();
3458  }
3459  @Override
3460  public Getter reqGetMeasuredCumulativePowerConsumption() {
3461  return (Getter)super.reqGetMeasuredCumulativePowerConsumption();
3462  }
3463  @Override
3464  public Getter reqGetManufacturersFaultCode() {
3465  return (Getter)super.reqGetManufacturersFaultCode();
3466  }
3467  @Override
3468  public Getter reqGetCurrentLimitSetting() {
3469  return (Getter)super.reqGetCurrentLimitSetting();
3470  }
3471  @Override
3472  public Getter reqGetFaultStatus() {
3473  return (Getter)super.reqGetFaultStatus();
3474  }
3475  @Override
3476  public Getter reqGetFaultDescription() {
3477  return (Getter)super.reqGetFaultDescription();
3478  }
3479  @Override
3480  public Getter reqGetManufacturerCode() {
3481  return (Getter)super.reqGetManufacturerCode();
3482  }
3483  @Override
3484  public Getter reqGetBusinessFacilityCode() {
3485  return (Getter)super.reqGetBusinessFacilityCode();
3486  }
3487  @Override
3488  public Getter reqGetProductCode() {
3489  return (Getter)super.reqGetProductCode();
3490  }
3491  @Override
3492  public Getter reqGetProductionNumber() {
3493  return (Getter)super.reqGetProductionNumber();
3494  }
3495  @Override
3496  public Getter reqGetProductionDate() {
3497  return (Getter)super.reqGetProductionDate();
3498  }
3499  @Override
3500  public Getter reqGetPowerSavingOperationSetting() {
3501  return (Getter)super.reqGetPowerSavingOperationSetting();
3502  }
3503  @Override
3504  public Getter reqGetRemoteControlSetting() {
3505  return (Getter)super.reqGetRemoteControlSetting();
3506  }
3507  @Override
3508  public Getter reqGetCurrentTimeSetting() {
3509  return (Getter)super.reqGetCurrentTimeSetting();
3510  }
3511  @Override
3512  public Getter reqGetCurrentDateSetting() {
3513  return (Getter)super.reqGetCurrentDateSetting();
3514  }
3515  @Override
3516  public Getter reqGetPowerLimitSetting() {
3517  return (Getter)super.reqGetPowerLimitSetting();
3518  }
3519  @Override
3520  public Getter reqGetCumulativeOperatingTime() {
3521  return (Getter)super.reqGetCumulativeOperatingTime();
3522  }
3523  @Override
3524  public Getter reqGetStatusChangeAnnouncementPropertyMap() {
3525  return (Getter)super.reqGetStatusChangeAnnouncementPropertyMap();
3526  }
3527  @Override
3528  public Getter reqGetSetPropertyMap() {
3529  return (Getter)super.reqGetSetPropertyMap();
3530  }
3531  @Override
3532  public Getter reqGetGetPropertyMap() {
3533  return (Getter)super.reqGetGetPropertyMap();
3534  }
3535 
3558  public Getter reqGetIlluminanceLevel() {
3559  reqGetProperty(EPC_ILLUMINANCE_LEVEL);
3560  return this;
3561  }
3585  public Getter reqGetLightColorSetting() {
3586  reqGetProperty(EPC_LIGHT_COLOR_SETTING);
3587  return this;
3588  }
3612  public Getter reqGetIlluminanceLevelStepSetting() {
3613  reqGetProperty(EPC_ILLUMINANCE_LEVEL_STEP_SETTING);
3614  return this;
3615  }
3639  public Getter reqGetLightColorStepSetting() {
3640  reqGetProperty(EPC_LIGHT_COLOR_STEP_SETTING);
3641  return this;
3642  }
3668  public Getter reqGetMaximumSpecifiableValues() {
3669  reqGetProperty(EPC_MAXIMUM_SPECIFIABLE_VALUES);
3670  return this;
3671  }
3699  public Getter reqGetMaximumValueOfSettableLevelForNightLighting() {
3701  return this;
3702  }
3726  public Getter reqGetLightingModeSetting() {
3727  reqGetProperty(EPC_LIGHTING_MODE_SETTING);
3728  return this;
3729  }
3752  public Getter reqGetIlluminanceLevelSettingForMainLighting() {
3754  return this;
3755  }
3778  public Getter reqGetIlluminanceLevelStepSettingForMainLighting() {
3780  return this;
3781  }
3804  public Getter reqGetIlluminanceLevelSettingForNightLighting() {
3806  return this;
3807  }
3830  public Getter reqGetIlluminanceLevelStepSettingForNightLighting() {
3832  return this;
3833  }
3856  public Getter reqGetLightColorSettingForMainLighting() {
3858  return this;
3859  }
3882  public Getter reqGetLightColorLevelStepSettingForMainLighting() {
3884  return this;
3885  }
3908  public Getter reqGetLightColorSettingForNightLighting() {
3910  return this;
3911  }
3934  public Getter reqGetLightColorLevelStepSettingForNightLighting() {
3936  return this;
3937  }
3960  public Getter reqGetLightingModeStatusInAutoMode() {
3961  reqGetProperty(EPC_LIGHTING_MODE_STATUS_IN_AUTO_MODE);
3962  return this;
3963  }
3989  public Getter reqGetRgbSettingForColorLighting() {
3990  reqGetProperty(EPC_RGB_SETTING_FOR_COLOR_LIGHTING);
3991  return this;
3992  }
4016  public Getter reqGetOnTimerReservationSetting() {
4017  reqGetProperty(EPC_ON_TIMER_RESERVATION_SETTING);
4018  return this;
4019  }
4044  public Getter reqGetOnTimerSetting() {
4045  reqGetProperty(EPC_ON_TIMER_SETTING);
4046  return this;
4047  }
4071  public Getter reqGetOffTimerReservationSetting() {
4072  reqGetProperty(EPC_OFF_TIMER_RESERVATION_SETTING);
4073  return this;
4074  }
4099  public Getter reqGetOffTimerSetting() {
4100  reqGetProperty(EPC_OFF_TIMER_SETTING);
4101  return this;
4102  }
4103  }
4104 
4105  public static class Informer extends DeviceObject.Informer {
4106  public Informer(short echoClassCode, byte echoInstanceCode
4107  , String dstEchoAddress, boolean isSelfObject) {
4108  super(echoClassCode, echoInstanceCode
4109  , dstEchoAddress, isSelfObject);
4110  }
4111 
4112  @Override
4113  public Informer reqInformProperty(byte epc) {
4114  return (Informer)super.reqInformProperty(epc);
4115  }
4116  @Override
4117  public Informer reqInformOperationStatus() {
4118  return (Informer)super.reqInformOperationStatus();
4119  }
4120  @Override
4121  public Informer reqInformInstallationLocation() {
4122  return (Informer)super.reqInformInstallationLocation();
4123  }
4124  @Override
4125  public Informer reqInformStandardVersionInformation() {
4126  return (Informer)super.reqInformStandardVersionInformation();
4127  }
4128  @Override
4129  public Informer reqInformIdentificationNumber() {
4130  return (Informer)super.reqInformIdentificationNumber();
4131  }
4132  @Override
4133  public Informer reqInformMeasuredInstantaneousPowerConsumption() {
4134  return (Informer)super.reqInformMeasuredInstantaneousPowerConsumption();
4135  }
4136  @Override
4137  public Informer reqInformMeasuredCumulativePowerConsumption() {
4138  return (Informer)super.reqInformMeasuredCumulativePowerConsumption();
4139  }
4140  @Override
4141  public Informer reqInformManufacturersFaultCode() {
4142  return (Informer)super.reqInformManufacturersFaultCode();
4143  }
4144  @Override
4145  public Informer reqInformCurrentLimitSetting() {
4146  return (Informer)super.reqInformCurrentLimitSetting();
4147  }
4148  @Override
4149  public Informer reqInformFaultStatus() {
4150  return (Informer)super.reqInformFaultStatus();
4151  }
4152  @Override
4153  public Informer reqInformFaultDescription() {
4154  return (Informer)super.reqInformFaultDescription();
4155  }
4156  @Override
4157  public Informer reqInformManufacturerCode() {
4158  return (Informer)super.reqInformManufacturerCode();
4159  }
4160  @Override
4161  public Informer reqInformBusinessFacilityCode() {
4162  return (Informer)super.reqInformBusinessFacilityCode();
4163  }
4164  @Override
4165  public Informer reqInformProductCode() {
4166  return (Informer)super.reqInformProductCode();
4167  }
4168  @Override
4169  public Informer reqInformProductionNumber() {
4170  return (Informer)super.reqInformProductionNumber();
4171  }
4172  @Override
4173  public Informer reqInformProductionDate() {
4174  return (Informer)super.reqInformProductionDate();
4175  }
4176  @Override
4177  public Informer reqInformPowerSavingOperationSetting() {
4178  return (Informer)super.reqInformPowerSavingOperationSetting();
4179  }
4180  @Override
4181  public Informer reqInformRemoteControlSetting() {
4182  return (Informer)super.reqInformRemoteControlSetting();
4183  }
4184  @Override
4185  public Informer reqInformCurrentTimeSetting() {
4186  return (Informer)super.reqInformCurrentTimeSetting();
4187  }
4188  @Override
4189  public Informer reqInformCurrentDateSetting() {
4190  return (Informer)super.reqInformCurrentDateSetting();
4191  }
4192  @Override
4193  public Informer reqInformPowerLimitSetting() {
4194  return (Informer)super.reqInformPowerLimitSetting();
4195  }
4196  @Override
4197  public Informer reqInformCumulativeOperatingTime() {
4198  return (Informer)super.reqInformCumulativeOperatingTime();
4199  }
4200  @Override
4201  public Informer reqInformStatusChangeAnnouncementPropertyMap() {
4202  return (Informer)super.reqInformStatusChangeAnnouncementPropertyMap();
4203  }
4204  @Override
4205  public Informer reqInformSetPropertyMap() {
4206  return (Informer)super.reqInformSetPropertyMap();
4207  }
4208  @Override
4209  public Informer reqInformGetPropertyMap() {
4210  return (Informer)super.reqInformGetPropertyMap();
4211  }
4212 
4235  public Informer reqInformIlluminanceLevel() {
4236  reqInformProperty(EPC_ILLUMINANCE_LEVEL);
4237  return this;
4238  }
4262  public Informer reqInformLightColorSetting() {
4263  reqInformProperty(EPC_LIGHT_COLOR_SETTING);
4264  return this;
4265  }
4289  public Informer reqInformIlluminanceLevelStepSetting() {
4290  reqInformProperty(EPC_ILLUMINANCE_LEVEL_STEP_SETTING);
4291  return this;
4292  }
4316  public Informer reqInformLightColorStepSetting() {
4317  reqInformProperty(EPC_LIGHT_COLOR_STEP_SETTING);
4318  return this;
4319  }
4345  public Informer reqInformMaximumSpecifiableValues() {
4346  reqInformProperty(EPC_MAXIMUM_SPECIFIABLE_VALUES);
4347  return this;
4348  }
4376  public Informer reqInformMaximumValueOfSettableLevelForNightLighting() {
4378  return this;
4379  }
4403  public Informer reqInformLightingModeSetting() {
4404  reqInformProperty(EPC_LIGHTING_MODE_SETTING);
4405  return this;
4406  }
4429  public Informer reqInformIlluminanceLevelSettingForMainLighting() {
4431  return this;
4432  }
4455  public Informer reqInformIlluminanceLevelStepSettingForMainLighting() {
4457  return this;
4458  }
4481  public Informer reqInformIlluminanceLevelSettingForNightLighting() {
4483  return this;
4484  }
4507  public Informer reqInformIlluminanceLevelStepSettingForNightLighting() {
4509  return this;
4510  }
4533  public Informer reqInformLightColorSettingForMainLighting() {
4534  reqInformProperty(EPC_LIGHT_COLOR_SETTING_FOR_MAIN_LIGHTING);
4535  return this;
4536  }
4559  public Informer reqInformLightColorLevelStepSettingForMainLighting() {
4561  return this;
4562  }
4585  public Informer reqInformLightColorSettingForNightLighting() {
4586  reqInformProperty(EPC_LIGHT_COLOR_SETTING_FOR_NIGHT_LIGHTING);
4587  return this;
4588  }
4611  public Informer reqInformLightColorLevelStepSettingForNightLighting() {
4613  return this;
4614  }
4637  public Informer reqInformLightingModeStatusInAutoMode() {
4638  reqInformProperty(EPC_LIGHTING_MODE_STATUS_IN_AUTO_MODE);
4639  return this;
4640  }
4666  public Informer reqInformRgbSettingForColorLighting() {
4667  reqInformProperty(EPC_RGB_SETTING_FOR_COLOR_LIGHTING);
4668  return this;
4669  }
4693  public Informer reqInformOnTimerReservationSetting() {
4694  reqInformProperty(EPC_ON_TIMER_RESERVATION_SETTING);
4695  return this;
4696  }
4721  public Informer reqInformOnTimerSetting() {
4722  reqInformProperty(EPC_ON_TIMER_SETTING);
4723  return this;
4724  }
4748  public Informer reqInformOffTimerReservationSetting() {
4749  reqInformProperty(EPC_OFF_TIMER_RESERVATION_SETTING);
4750  return this;
4751  }
4776  public Informer reqInformOffTimerSetting() {
4777  reqInformProperty(EPC_OFF_TIMER_SETTING);
4778  return this;
4779  }
4780  }
4781 
4782  public static class Proxy extends GeneralLighting {
4783  public Proxy(byte instanceCode) {
4784  super();
4785  mEchoInstanceCode = instanceCode;
4786  }
4787  @Override
4788  public byte getInstanceCode() {
4789  return mEchoInstanceCode;
4790  }
4791  @Override
4792  protected byte[] getOperationStatus() {return null;}
4793  @Override
4794  protected boolean setInstallationLocation(byte[] edt) {return false;}
4795  @Override
4796  protected byte[] getInstallationLocation() {return null;}
4797  @Override
4798  protected byte[] getStandardVersionInformation() {return null;}
4799  @Override
4800  protected byte[] getFaultStatus() {return null;}
4801  @Override
4802  protected byte[] getManufacturerCode() {return null;}
4803  @Override
4804  protected boolean setOperationStatus(byte[] edt) {return false;}
4805  @Override
4806  protected boolean setLightingModeSetting(byte[] edt) {return false;}
4807  @Override
4808  protected byte[] getLightingModeSetting() {return null;}
4809  }
4810 
4811  public static Setter setG() {
4812  return setG((byte)0);
4813  }
4814 
4815  public static Setter setG(byte instanceCode) {
4816  return setG(instanceCode, true);
4817  }
4818 
4819  public static Setter setG(boolean responseRequired) {
4820  return setG((byte)0, responseRequired);
4821  }
4822 
4823  public static Setter setG(byte instanceCode, boolean responseRequired) {
4824  return new Setter(ECHO_CLASS_CODE, instanceCode
4825  , EchoSocket.MULTICAST_ADDRESS, responseRequired);
4826  }
4827 
4828  public static Getter getG() {
4829  return getG((byte)0);
4830  }
4831 
4832  public static Getter getG(byte instanceCode) {
4833  return new Getter(ECHO_CLASS_CODE, instanceCode
4835  }
4836 
4837  public static Informer informG() {
4838  return informG((byte)0);
4839  }
4840 
4841  public static Informer informG(byte instanceCode) {
4842  return new Informer(ECHO_CLASS_CODE, instanceCode
4843  , EchoSocket.MULTICAST_ADDRESS, false);
4844  }
4845 
4846 }
synchronized boolean isValidProperty(EchoProperty property)
final void addStatusChangeAnnouncementProperty(byte epc)
Definition: EchoObject.java:71
final void addGetProperty(byte epc)
final void addSetProperty(byte epc)
Definition: EchoObject.java:93
synchronized boolean setProperty(EchoProperty property)
static Setter setG(byte instanceCode, boolean responseRequired)
abstract boolean setInstallationLocation(byte[] edt)
static final String MULTICAST_ADDRESS
Definition: EchoSocket.java:53