OpenECHO
 All Classes Namespaces Files Functions Variables
DeviceObject.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;
17 
23 
24 public abstract class DeviceObject extends EchoObject {
25 
26  public static final byte EPC_OPERATION_STATUS = (byte)0x80;
27  public static final byte EPC_INSTALLATION_LOCATION = (byte)0x81;
28  public static final byte EPC_STANDARD_VERSION_INFORMATION = (byte)0x82;
29  public static final byte EPC_IDENTIFICATION_NUMBER = (byte)0x83;
30  public static final byte EPC_MEASURED_INSTANTANEOUS_POWER_CONSUMPTION = (byte)0x84;
31  public static final byte EPC_MEASURED_CUMULATIVE_POWER_CONSUMPTION = (byte)0x85;
32  public static final byte EPC_MANUFACTURERS_FAULT_CODE = (byte)0x86;
33  public static final byte EPC_CURRENT_LIMIT_SETTING = (byte)0x87;
34  public static final byte EPC_FAULT_STATUS = (byte)0x88;
35  public static final byte EPC_FAULT_DESCRIPTION = (byte)0x89;
36  public static final byte EPC_MANUFACTURER_CODE = (byte)0x8A;
37  public static final byte EPC_BUSINESS_FACILITY_CODE = (byte)0x8B;
38  public static final byte EPC_PRODUCT_CODE = (byte)0x8C;
39  public static final byte EPC_PRODUCTION_NUMBER = (byte)0x8D;
40  public static final byte EPC_PRODUCTION_DATE = (byte)0x8E;
41  public static final byte EPC_POWER_SAVING_OPERATION_SETTING = (byte)0x8F;
42  public static final byte EPC_REMOTE_CONTROL_SETTING = (byte)0x93;
43  public static final byte EPC_CURRENT_TIME_SETTING = (byte)0x97;
44  public static final byte EPC_CURRENT_DATE_SETTING = (byte)0x98;
45  public static final byte EPC_POWER_LIMIT_SETTING = (byte)0x99;
46  public static final byte EPC_CUMULATIVE_OPERATING_TIME = (byte)0x9A;
47  public static final byte EPC_STATUS_CHANGE_ANNOUNCEMENT_PROPERTY_MAP = (byte)0x9D;
48  public static final byte EPC_SET_PROPERTY_MAP = (byte)0x9E;
49  public static final byte EPC_GET_PROPERTY_MAP = (byte)0x9F;
50 
51  public static final byte[] EDT_OPERATION_STATUS_ON = {(byte)0x30};
52  public static final byte[] EDT_OPERATION_STATUS_OFF = {(byte)0x31};
53 
54  public static final byte[] EDT_STANDARD_VERSION_INFORMATION = {(byte)0x00, (byte)0x00, (byte)0x41, (byte)0x00};
55 
56  protected byte mEchoInstanceCode = 0;
57 
58  @Override
59  public byte getInstanceCode() {
60  return mEchoInstanceCode;
61  }
62 
64  mEchoInstanceCode = EchoUtils.allocateSelfDeviceInstanceCode(getEchoClassCode());
65  }
66 
67 
68  @Override
69  public void onNew() {
70  super.onNew();
71  Echo.getEventListener().onNewDeviceObject(this);
72  }
73 
74  @Override
75  protected void setupPropertyMaps() {
76  super.setupPropertyMaps();
77 
81 
83 
92  }
93 
94  @Override
95  protected synchronized boolean setProperty(EchoProperty property) {
96  boolean success = super.setProperty(property);
97  if(success) return success;
98 
99  switch(property.epc) {
100  case EPC_OPERATION_STATUS : return setOperationStatus(property.edt);
101  case EPC_INSTALLATION_LOCATION : return setInstallationLocation(property.edt);
102  case EPC_CURRENT_LIMIT_SETTING : return setCurrentLimitSetting(property.edt);
105  case EPC_CURRENT_TIME_SETTING : return setCurrentTimeSetting(property.edt);
106  case EPC_CURRENT_DATE_SETTING : return setCurrentDateSetting(property.edt);
107  case EPC_POWER_LIMIT_SETTING : return setPowerLimitSetting(property.edt);
108  default : return false;
109  }
110  }
111 
112  @Override
113  protected synchronized byte[] getProperty(byte epc) {
114  byte[] edt = super.getProperty(epc);
115  if(edt != null) return edt;
116 
117  switch(epc) {
126  case EPC_FAULT_STATUS : return getFaultStatus();
130  case EPC_PRODUCT_CODE : return getProductCode();
132  case EPC_PRODUCTION_DATE : return getProductionDate();
140  case EPC_SET_PROPERTY_MAP : return getSetPropertyMap();
141  case EPC_GET_PROPERTY_MAP : return getGetPropertyMap();
142  default : return null;
143  }
144  }
145 
146  @Override
147  protected synchronized boolean isValidProperty(EchoProperty property) {
148  boolean valid = super.isValidProperty(property);
149  if(valid) return valid;
150 
151  switch(property.epc) {
152  case EPC_OPERATION_STATUS : return isValidOperationStatus(property.edt);
160  case EPC_FAULT_STATUS : return isValidFaultStatus(property.edt);
161  case EPC_FAULT_DESCRIPTION : return isValidFaultDescription(property.edt);
162  case EPC_MANUFACTURER_CODE : return isValidManufacturerCode(property.edt);
164  case EPC_PRODUCT_CODE : return isValidProductCode(property.edt);
165  case EPC_PRODUCTION_NUMBER : return isValidProductionNumber(property.edt);
166  case EPC_PRODUCTION_DATE : return isValidProductionDate(property.edt);
171  case EPC_POWER_LIMIT_SETTING : return isValidPowerLimitSetting(property.edt);
174  case EPC_SET_PROPERTY_MAP : return isValidSetPropertyMap(property.edt);
175  case EPC_GET_PROPERTY_MAP : return isValidGetPropertyMap(property.edt);
176  default : return false;
177  }
178  }
179 
194  protected boolean setOperationStatus(byte[] edt) {
195  return false;
196  }
197 
212  protected abstract byte[] getOperationStatus();
213 
214 
215  protected boolean isValidOperationStatus(byte[] edt) {
216  if(edt == null || !(edt.length == 1)) return false;
217  if(edt[0] != EDT_OPERATION_STATUS_ON[0] && edt[0] != EDT_OPERATION_STATUS_OFF[0]) return false;
218  return true;
219  }
235  protected abstract boolean setInstallationLocation(byte[] edt);
236 
252  protected abstract byte[] getInstallationLocation();
253 
254  protected boolean isValidInstallationLocation(byte[] edt) {
255  if(edt == null || !(edt.length == 1)) return false;
256  return true;
257  }
275 
276 
277  protected boolean isValidStandardVersionInformation(byte[] edt) {
278  if(edt == null || !(edt.length == 4)) return false;
279  return true;
280  }
281 
310  protected byte[] getIdentificationNumber() {
311  return null;
312  }
313 
314  protected boolean isValidIdentificationNumber(byte[] edt) {
315  if(edt == null || !(edt.length == 9 || edt.length == 17)) return false;
316  return true;
317  }
318 
333  return null;
334  }
335 
336  protected boolean isValidMeasuredInstantaneousPowerConsumption(byte[] edt) {
337  if(edt == null || !(edt.length == 2)) return false;
338  return true;
339  }
340 
355  return null;
356  }
357 
358  protected boolean isValidMeasuredCumulativePowerConsumption(byte[] edt) {
359  if(edt == null || !(edt.length == 4)) return false;
360  return true;
361  }
362 
378  protected byte[] getManufacturersFaultCode() {
379  return null;
380  }
381 
382  protected boolean isValidManufacturersFaultCode(byte[] edt) {
383  if(edt == null || !(edt.length <= 255)) return false;
384  return true;
385  }
386 
399  protected boolean setCurrentLimitSetting(byte[] edt) {
400  return false;
401  }
402 
416  protected byte[] getCurrentLimitSetting() {
417  return null;
418  }
419 
420  protected boolean isValidCurrentLimitSetting(byte[] edt) {
421  if(edt == null || !(edt.length == 1)) return false;
422  return true;
423  }
424 
440  protected abstract byte[] getFaultStatus();
441 
442  protected boolean isValidFaultStatus(byte[] edt) {
443  if(edt == null || !(edt.length == 1)) return false;
444  return true;
445  }
446 
460  protected byte[] getFaultDescription() {
461  return null;
462  }
463 
464  protected boolean isValidFaultDescription(byte[] edt) {
465  if(edt == null || !(edt.length == 2)) return false;
466  return true;
467  }
468 
482  protected abstract byte[] getManufacturerCode();
483 
484  protected boolean isValidManufacturerCode(byte[] edt) {
485  if(edt == null || !(edt.length == 3)) return false;
486  return true;
487  }
488 
502  protected byte[] getBusinessFacilityCode() {
503  return null;
504  }
505 
506  protected boolean isValidBusinessFacilityCode(byte[] edt) {
507  if(edt == null || !(edt.length == 3)) return false;
508  return true;
509  }
510 
523  protected byte[] getProductCode() {
524  return null;
525  }
526 
527  protected boolean isValidProductCode(byte[] edt) {
528  if(edt == null || !(edt.length == 12)) return false;
529  return true;
530  }
531 
545  protected byte[] getProductionNumber() {
546  return null;
547  }
548 
549  protected boolean isValidProductionNumber(byte[] edt) {
550  if(edt == null || !(edt.length == 12)) return false;
551  return true;
552  }
553 
570  protected byte[] getProductionDate() {
571  return null;
572  }
573 
574  protected boolean isValidProductionDate(byte[] edt) {
575  if(edt == null || !(edt.length == 4)) return false;
576  return true;
577  }
578 
593  protected boolean setPowerSavingOperationSetting(byte[] edt) {
594  return false;
595  }
596 
611  protected byte[] getPowerSavingOperationSetting() {
612  return null;
613  }
614 
615  protected boolean isValidPowerSavingOperationSetting(byte[] edt) {
616  if(edt == null || !(edt.length == 1)) return false;
617  return true;
618  }
619 
635  protected boolean setRemoteControlSetting(byte[] edt) {
636  return false;
637  }
638 
654  protected byte[] getRemoteControlSetting() {
655  return null;
656  }
657 
658  protected boolean isValidRemoteControlSetting(byte[] edt) {
659  if(edt == null || !(edt.length == 1)) return false;
660  return true;
661  }
662 
676  protected boolean setCurrentTimeSetting(byte[] edt) {
677  return false;
678  }
679 
693  protected byte[] getCurrentTimeSetting() {
694  return null;
695  }
696 
697  protected boolean isValidCurrentTimeSetting(byte[] edt) {
698  if(edt == null || !(edt.length == 2)) return false;
699  return true;
700  }
701 
715  protected boolean setCurrentDateSetting(byte edt[]) {
716  return false;
717  }
718 
732  protected byte[] getCurrentDateSetting() {
733  return null;
734  }
735 
736  protected boolean isValidCurrentDateSetting(byte[] edt) {
737  if(edt == null || !(edt.length == 4)) return false;
738  return true;
739  }
740 
754  protected boolean setPowerLimitSetting(byte[] edt) {
755  return false;
756  }
757 
771  protected byte[] getPowerLimitSetting() {
772  return null;
773  }
774 
775  protected boolean isValidPowerLimitSetting(byte[] edt) {
776  if(edt == null || !(edt.length == 2)) return false;
777  return true;
778  }
779 
796  protected byte[] getCumulativeOperatingTime() {
797  return null;
798  }
799 
800  protected boolean isValidCumulativeOperatingTime(byte[] edt) {
801  if(edt == null || !(edt.length == 5)) return false;
802  return true;
803  }
804 
817  return EchoUtils.propertiesToPropertyMap(getStatusChangeAnnouncementProperties());
818  }
819 
820  protected boolean isValidStatusChangeAnnouncementPropertyMap(byte[] edt) {
821  if(edt == null || !(edt.length <= 17)) return false;
822  return true;
823  }
824 
836  protected byte[] getSetPropertyMap() {
837  return EchoUtils.propertiesToPropertyMap(getSetProperties());
838  }
839 
840  protected boolean isValidSetPropertyMap(byte[] edt) {
841  if(edt == null || !(edt.length <= 17)) return false;
842  return true;
843  }
844 
856  protected byte[] getGetPropertyMap() {
857  return EchoUtils.propertiesToPropertyMap(getGetProperties());
858  }
859 
860  protected boolean isValidGetPropertyMap(byte[] edt) {
861  if(edt == null || !(edt.length <= 17)) return false;
862  return true;
863  }
864 
865  @Override
866  public Setter set() {
867  return set(true);
868  }
869 
870  @Override
871  public Setter set(boolean responseRequired) {
872  return new Setter(getEchoClassCode(), getInstanceCode()
873  , getNode().getAddressStr(), responseRequired);
874  }
875 
876  @Override
877  public Getter get() {
878  return new Getter(getEchoClassCode(), getInstanceCode()
879  , getNode().getAddressStr());
880  }
881 
882  @Override
883  public Informer inform() {
884  return inform(isSelfObject());
885  }
886 
887  @Override
888  protected Informer inform(boolean multicast) {
889  String address;
890  if(multicast) {
892  } else {
893  address = getNode().getAddressStr();
894  }
895  return new Informer(getEchoClassCode(), getInstanceCode()
896  , address, isSelfObject());
897  }
898 
899 
900  public static class Receiver extends EchoObject.Receiver {
901 
902  @Override
903  protected boolean onSetProperty(EchoObject eoj, short tid, byte esv,
904  EchoProperty property, boolean success) {
905  boolean ret = super.onSetProperty(eoj, tid, esv, property, success);
906  if(ret) return true;
907 
908  switch(property.epc) {
909  case EPC_OPERATION_STATUS :
910  onSetOperationStatus(eoj, tid, esv, property, success);
911  return true;
913  onSetInstallationLocation(eoj, tid, esv, property, success);
914  return true;
916  onSetCurrentLimitSetting(eoj, tid, esv, property, success);
917  return true;
919  onSetPowerSavingOperationSetting(eoj, tid, esv, property, success);
920  return true;
922  onSetRemoteControlSetting(eoj, tid, esv, property, success);
923  return true;
925  onSetCurrentTimeSetting(eoj, tid, esv, property, success);
926  return true;
928  onSetCurrentDateSetting(eoj, tid, esv, property, success);
929  return true;
931  onSetPowerLimitSetting(eoj, tid, esv, property, success);
932  return true;
933  default :
934  return false;
935  }
936  }
937 
938  @Override
939  protected boolean onGetProperty(EchoObject eoj, short tid, byte esv,
940  EchoProperty property, boolean success) {
941  boolean ret = super.onGetProperty(eoj, tid, esv, property, success);
942  if(ret) return true;
943 
944  switch(property.epc) {
945  case EPC_OPERATION_STATUS :
946  onGetOperationStatus(eoj, tid, esv, property, success);
947  return true;
949  onGetInstallationLocation(eoj, tid, esv, property, success);
950  return true;
952  onGetStandardVersionInformation(eoj, tid, esv, property, success);
953  return true;
955  onGetIdentificationNumber(eoj, tid, esv, property, success);
956  return true;
958  onGetMeasuredInstantaneousPowerConsumption(eoj, tid, esv, property, success);
959  return true;
961  onGetMeasuredCumulativePowerConsumption(eoj, tid, esv, property, success);
962  return true;
964  onGetManufacturersFaultCode(eoj, tid, esv, property, success);
965  return true;
967  onGetCurrentLimitSetting(eoj, tid, esv, property, success);
968  return true;
969  case EPC_FAULT_STATUS :
970  onGetFaultStatus(eoj, tid, esv, property, success);
971  return true;
972  case EPC_FAULT_DESCRIPTION :
973  onGetFaultDescription(eoj, tid, esv, property, success);
974  return true;
975  case EPC_MANUFACTURER_CODE :
976  onGetManufacturerCode(eoj, tid, esv, property, success);
977  return true;
979  onGetBusinessFacilityCode(eoj, tid, esv, property, success);
980  return true;
981  case EPC_PRODUCT_CODE :
982  onGetProductCode(eoj, tid, esv, property, success);
983  return true;
984  case EPC_PRODUCTION_NUMBER :
985  onGetProductionNumber(eoj, tid, esv, property, success);
986  return true;
987  case EPC_PRODUCTION_DATE :
988  onGetProductionDate(eoj, tid, esv, property, success);
989  return true;
991  onGetPowerSavingOperationSetting(eoj, tid, esv, property, success);
992  return true;
994  onGetRemoteControlSetting(eoj, tid, esv, property, success);
995  return true;
997  onGetCurrentTimeSetting(eoj, tid, esv, property, success);
998  return true;
1000  onGetCurrentDateSetting(eoj, tid, esv, property, success);
1001  return true;
1003  onGetPowerLimitSetting(eoj, tid, esv, property, success);
1004  return true;
1006  onGetCumulativeOperatingTime(eoj, tid, esv, property, success);
1007  return true;
1009  onGetStatusChangeAnnouncementPropertyMap(eoj, tid, esv, property, success);
1010  return true;
1011  case EPC_SET_PROPERTY_MAP :
1012  onGetSetPropertyMap(eoj, tid, esv, property, success);
1013  return true;
1014  case EPC_GET_PROPERTY_MAP :
1015  onGetGetPropertyMap(eoj, tid, esv, property, success);
1016  return true;
1017  default :
1018  return false;
1019  }
1020  }
1021 
1031  protected void onSetOperationStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1032 
1042  protected void onGetOperationStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1043 
1053  protected void onSetInstallationLocation(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1054 
1064  protected void onGetInstallationLocation(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1065 
1077  protected void onGetStandardVersionInformation(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1078 
1102  protected void onGetIdentificationNumber(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1103 
1112  protected void onGetMeasuredInstantaneousPowerConsumption(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1113 
1122  protected void onGetMeasuredCumulativePowerConsumption(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1123 
1134  protected void onGetManufacturersFaultCode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1135 
1144  protected void onSetCurrentLimitSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1145 
1154  protected void onGetCurrentLimitSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1155 
1165  protected void onGetFaultStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1166 
1175  protected void onGetFaultDescription(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1176 
1185  protected void onGetManufacturerCode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1186 
1195  protected void onGetBusinessFacilityCode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1196 
1205  protected void onGetProductCode(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1206 
1215  protected void onGetProductionNumber(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1216 
1228  protected void onGetProductionDate(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1229 
1239  protected void onSetPowerSavingOperationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1240 
1250  protected void onGetPowerSavingOperationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1251 
1259  protected void onSetRemoteControlSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1260 
1268  protected void onGetRemoteControlSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1269 
1278  protected void onSetCurrentTimeSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1279 
1288  protected void onGetCurrentTimeSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1289 
1298  protected void onSetCurrentDateSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1299 
1308  protected void onGetCurrentDateSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1309 
1318  protected void onSetPowerLimitSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1319 
1328  protected void onGetPowerLimitSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1329 
1341  protected void onGetCumulativeOperatingTime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1342 
1350  protected void onGetStatusChangeAnnouncementPropertyMap(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1351 
1359  protected void onGetSetPropertyMap(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1360 
1368  protected void onGetGetPropertyMap(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}
1369  }
1370 
1371  public static class Setter extends EchoObject.Setter {
1372  public Setter(short dstEchoClassCode, byte dstEchoInstanceCode
1373  , String dstEchoAddress, boolean responseRequired) {
1374  super(dstEchoClassCode, dstEchoInstanceCode
1375  , dstEchoAddress, responseRequired);
1376  }
1377 
1378 
1379  @Override
1380  public Setter reqSetProperty(byte epc, byte[] edt) {
1381  return (Setter)super.reqSetProperty(epc, edt);
1382  }
1383 
1393  public Setter reqSetOperationStatus(byte[] edt) {
1394  reqSetProperty(EPC_OPERATION_STATUS, edt);
1395  return this;
1396  }
1406  public Setter reqSetInstallationLocation(byte[] edt) {
1407  reqSetProperty(EPC_INSTALLATION_LOCATION, edt);
1408  return this;
1409  }
1418  public Setter reqSetCurrentLimitSetting(byte[] edt) {
1419  reqSetProperty(EPC_CURRENT_LIMIT_SETTING, edt);
1420  return this;
1421  }
1431  public Setter reqSetPowerSavingOperationSetting(byte[] edt) {
1432  reqSetProperty(EPC_POWER_SAVING_OPERATION_SETTING, edt);
1433  return this;
1434  }
1435 
1443  public Setter reqSetRemoteControlSetting(byte[] edt) {
1444  reqSetProperty(EPC_REMOTE_CONTROL_SETTING, edt);
1445  return this;
1446  }
1455  public Setter reqSetCurrentTimeSetting(byte[] edt) {
1456  reqSetProperty(EPC_CURRENT_TIME_SETTING, edt);
1457  return this;
1458  }
1467  public Setter reqSetCurrentDateSetting(byte[] edt) {
1468  reqSetProperty(EPC_CURRENT_DATE_SETTING, edt);
1469  return this;
1470  }
1479  public Setter reqSetPowerLimitSetting(byte[] edt) {
1480  reqSetProperty(EPC_POWER_LIMIT_SETTING, edt);
1481  return this;
1482  }
1483  }
1484 
1485  public static class Getter extends EchoObject.Getter {
1486 
1487  public Getter(short dstEchoClassCode, byte dstEchoInstanceCode
1488  , String dstEchoAddress) {
1489  super(dstEchoClassCode, dstEchoInstanceCode
1490  , dstEchoAddress);
1491  }
1492  @Override
1493  public Getter reqGetProperty(byte epc) {
1494  return (Getter)super.reqGetProperty(epc);
1495  }
1505  public Getter reqGetOperationStatus() {
1506  reqGetProperty(EPC_OPERATION_STATUS);
1507  return this;
1508  }
1518  public Getter reqGetInstallationLocation() {
1519  reqGetProperty(EPC_INSTALLATION_LOCATION);
1520  return this;
1521  }
1533  public Getter reqGetStandardVersionInformation() {
1534  reqGetProperty(EPC_STANDARD_VERSION_INFORMATION);
1535  return this;
1536  }
1560  public Getter reqGetIdentificationNumber() {
1561  reqGetProperty(EPC_IDENTIFICATION_NUMBER);
1562  return this;
1563  }
1572  public Getter reqGetMeasuredInstantaneousPowerConsumption() {
1574  return this;
1575  }
1584  public Getter reqGetMeasuredCumulativePowerConsumption() {
1586  return this;
1587  }
1598  public Getter reqGetManufacturersFaultCode() {
1599  reqGetProperty(EPC_MANUFACTURERS_FAULT_CODE);
1600  return this;
1601  }
1610  public Getter reqGetCurrentLimitSetting() {
1611  reqGetProperty(EPC_CURRENT_LIMIT_SETTING);
1612  return this;
1613  }
1623  public Getter reqGetFaultStatus() {
1624  reqGetProperty(EPC_FAULT_STATUS);
1625  return this;
1626  }
1635  public Getter reqGetFaultDescription() {
1636  reqGetProperty(EPC_FAULT_DESCRIPTION);
1637  return this;
1638  }
1647  public Getter reqGetManufacturerCode() {
1648  reqGetProperty(EPC_MANUFACTURER_CODE);
1649  return this;
1650  }
1659  public Getter reqGetBusinessFacilityCode() {
1660  reqGetProperty(EPC_BUSINESS_FACILITY_CODE);
1661  return this;
1662  }
1671  public Getter reqGetProductCode() {
1672  reqGetProperty(EPC_PRODUCT_CODE);
1673  return this;
1674  }
1683  public Getter reqGetProductionNumber() {
1684  reqGetProperty(EPC_PRODUCTION_NUMBER);
1685  return this;
1686  }
1698  public Getter reqGetProductionDate() {
1699  reqGetProperty(EPC_PRODUCTION_DATE);
1700  return this;
1701  }
1711  public Getter reqGetPowerSavingOperationSetting() {
1712  reqGetProperty(EPC_POWER_SAVING_OPERATION_SETTING);
1713  return this;
1714  }
1722  public Getter reqGetRemoteControlSetting() {
1723  reqGetProperty(EPC_REMOTE_CONTROL_SETTING);
1724  return this;
1725  }
1734  public Getter reqGetCurrentTimeSetting() {
1735  reqGetProperty(EPC_CURRENT_TIME_SETTING);
1736  return this;
1737  }
1746  public Getter reqGetCurrentDateSetting() {
1747  reqGetProperty(EPC_CURRENT_DATE_SETTING);
1748  return this;
1749  }
1758  public Getter reqGetPowerLimitSetting() {
1759  reqGetProperty(EPC_POWER_LIMIT_SETTING);
1760  return this;
1761  }
1773  public Getter reqGetCumulativeOperatingTime() {
1774  reqGetProperty(EPC_CUMULATIVE_OPERATING_TIME);
1775  return this;
1776  }
1784  public Getter reqGetStatusChangeAnnouncementPropertyMap() {
1786  return this;
1787  }
1795  public Getter reqGetSetPropertyMap() {
1796  reqGetProperty(EPC_SET_PROPERTY_MAP);
1797  return this;
1798  }
1806  public Getter reqGetGetPropertyMap() {
1807  reqGetProperty(EPC_GET_PROPERTY_MAP);
1808  return this;
1809  }
1810  }
1811 
1812  public static class Informer extends EchoObject.Informer {
1813 
1814 
1815  public Informer(short echoClassCode, byte echoInstanceCode
1816  , String dstEchoAddress, boolean isSelfObject) {
1817  super(echoClassCode, echoInstanceCode
1818  , dstEchoAddress, isSelfObject);
1819  }
1820 
1821  @Override
1822  public Informer reqInformProperty(byte epc) {
1823  return (Informer)super.reqInformProperty(epc);
1824  }
1825 
1835  public Informer reqInformOperationStatus() {
1836  reqInformProperty(EPC_OPERATION_STATUS);
1837  return this;
1838  }
1848  public Informer reqInformInstallationLocation() {
1849  reqInformProperty(EPC_INSTALLATION_LOCATION);
1850  return this;
1851  }
1863  public Informer reqInformStandardVersionInformation() {
1864  reqInformProperty(EPC_STANDARD_VERSION_INFORMATION);
1865  return this;
1866  }
1890  public Informer reqInformIdentificationNumber() {
1891  reqInformProperty(EPC_IDENTIFICATION_NUMBER);
1892  return this;
1893  }
1902  public Informer reqInformMeasuredInstantaneousPowerConsumption() {
1904  return this;
1905  }
1914  public Informer reqInformMeasuredCumulativePowerConsumption() {
1915  reqInformProperty(EPC_MEASURED_CUMULATIVE_POWER_CONSUMPTION);
1916  return this;
1917  }
1928  public Informer reqInformManufacturersFaultCode() {
1929  reqInformProperty(EPC_MANUFACTURERS_FAULT_CODE);
1930  return this;
1931  }
1940  public Informer reqInformCurrentLimitSetting() {
1941  reqInformProperty(EPC_CURRENT_LIMIT_SETTING);
1942  return this;
1943  }
1953  public Informer reqInformFaultStatus() {
1954  reqInformProperty(EPC_FAULT_STATUS);
1955  return this;
1956  }
1965  public Informer reqInformFaultDescription() {
1966  reqInformProperty(EPC_FAULT_DESCRIPTION);
1967  return this;
1968  }
1977  public Informer reqInformManufacturerCode() {
1978  reqInformProperty(EPC_MANUFACTURER_CODE);
1979  return this;
1980  }
1989  public Informer reqInformBusinessFacilityCode() {
1990  reqInformProperty(EPC_BUSINESS_FACILITY_CODE);
1991  return this;
1992  }
2001  public Informer reqInformProductCode() {
2002  reqInformProperty(EPC_PRODUCT_CODE);
2003  return this;
2004  }
2013  public Informer reqInformProductionNumber() {
2014  reqInformProperty(EPC_PRODUCTION_NUMBER);
2015  return this;
2016  }
2028  public Informer reqInformProductionDate() {
2029  reqInformProperty(EPC_PRODUCTION_DATE);
2030  return this;
2031  }
2041  public Informer reqInformPowerSavingOperationSetting() {
2042  reqInformProperty(EPC_POWER_SAVING_OPERATION_SETTING);
2043  return this;
2044  }
2052  public Informer reqInformRemoteControlSetting() {
2053  reqInformProperty(EPC_REMOTE_CONTROL_SETTING);
2054  return this;
2055  }
2064  public Informer reqInformCurrentTimeSetting() {
2065  reqInformProperty(EPC_CURRENT_TIME_SETTING);
2066  return this;
2067  }
2076  public Informer reqInformCurrentDateSetting() {
2077  reqInformProperty(EPC_CURRENT_DATE_SETTING);
2078  return this;
2079  }
2088  public Informer reqInformPowerLimitSetting() {
2089  reqInformProperty(EPC_POWER_LIMIT_SETTING);
2090  return this;
2091  }
2103  public Informer reqInformCumulativeOperatingTime() {
2104  reqInformProperty(EPC_CUMULATIVE_OPERATING_TIME);
2105  return this;
2106  }
2114  public Informer reqInformStatusChangeAnnouncementPropertyMap() {
2116  return this;
2117  }
2125  public Informer reqInformSetPropertyMap() {
2126  reqInformProperty(EPC_SET_PROPERTY_MAP);
2127  return this;
2128  }
2136  public Informer reqInformGetPropertyMap() {
2137  reqInformProperty(EPC_GET_PROPERTY_MAP);
2138  return this;
2139  }
2140  }
2141 
2142 
2143  public static class Proxy extends DeviceObject {
2144  private short mEchoClassCode;
2145  public Proxy(short echoClassCode, byte instanceCode) {
2146  super();
2147  mEchoClassCode = echoClassCode;
2148  mEchoInstanceCode = instanceCode;
2149  }
2150 
2151  @Override
2152  public short getEchoClassCode() {
2153  return mEchoClassCode;
2154  }
2155  @Override
2156  public byte getInstanceCode() {
2157  return mEchoInstanceCode;
2158  }
2159  @Override
2160  protected byte[] getOperationStatus() {return null;}
2161  @Override
2162  protected boolean setInstallationLocation(byte[] edt) {return false;}
2163  @Override
2164  protected byte[] getInstallationLocation() {return null;}
2165  @Override
2166  protected byte[] getStandardVersionInformation() {return null;}
2167  @Override
2168  protected byte[] getFaultStatus() {return null;}
2169  @Override
2170  protected byte[] getManufacturerCode() {return null;}
2171  }
2172 
2173 }
boolean isValidMeasuredInstantaneousPowerConsumption(byte[] edt)
Informer inform(boolean multicast)
synchronized byte[] getProperty(byte epc)
static final byte EPC_STATUS_CHANGE_ANNOUNCEMENT_PROPERTY_MAP
final byte[] getStatusChangeAnnouncementProperties()
Definition: EchoObject.java:84
final void addStatusChangeAnnouncementProperty(byte epc)
Definition: EchoObject.java:71
static final byte EPC_POWER_SAVING_OPERATION_SETTING
boolean isValidStatusChangeAnnouncementPropertyMap(byte[] edt)
final void addGetProperty(byte epc)
static final byte EPC_MEASURED_CUMULATIVE_POWER_CONSUMPTION
Setter set(boolean responseRequired)
static final byte EPC_MEASURED_INSTANTANEOUS_POWER_CONSUMPTION
synchronized boolean setProperty(EchoProperty property)
final void addSetProperty(byte epc)
Definition: EchoObject.java:93
boolean isValidMeasuredCumulativePowerConsumption(byte[] edt)
static final byte EPC_STANDARD_VERSION_INFORMATION
boolean setPowerSavingOperationSetting(byte[] edt)
boolean isValidStandardVersionInformation(byte[] edt)
boolean isValidCumulativeOperatingTime(byte[] edt)
synchronized boolean isValidProperty(EchoProperty property)
static final byte[] EDT_STANDARD_VERSION_INFORMATION
abstract boolean setInstallationLocation(byte[] edt)
static final String MULTICAST_ADDRESS
Definition: EchoSocket.java:53
boolean isValidPowerSavingOperationSetting(byte[] edt)
abstract short getEchoClassCode()
boolean isValidManufacturersFaultCode(byte[] edt)