Package org.ugate.wireless.data

Examples of org.ugate.wireless.data.RxTxRemoteNodeReadingDTO


            settingsSetTimeline.stop();
          }
        } else if (event.getType() == UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS) {
          final RemoteNode rn = (RemoteNode) event.getSource();
          if (event.getNewValue() instanceof RxTxRemoteNodeReadingDTO) {
            final RxTxRemoteNodeReadingDTO sr = (RxTxRemoteNodeReadingDTO) event.getNewValue();
            ServiceProvider.IMPL.getRemoteNodeService().saveReading(sr.getRemoteNodeReading());
          } else if (event.getNewValue() instanceof RxTxRemoteNodeDTO) {
            final RxTxRemoteNodeDTO ndto = (RxTxRemoteNodeDTO) event.getNewValue();
            if (!RemoteNodeType.remoteEquivalent(rn, ndto.getRemoteNode())) {
              // remote device values do not match the local device values
              rn.setDeviceSynchronized(false);
View Full Code Here


      sr.setSonarInches(Double.valueOf(Math.random() * (11 - 0)).intValue());
      sr.setMicrowaveCycleCount(Double.valueOf(Math.random() * (50 - 0)).intValue());
      sr.setPirIntensity(Double.valueOf(Math.random() * (25 - 0)).intValue());
      sr.setReadDate(cal.getTime());
     
      final RxTxRemoteNodeReadingDTO srdto = new RxTxRemoteNodeReadingDTO(sr, RxData.Status.NORMAL);
      UGateKeeper.DEFAULT.notifyListeners(new UGateEvent<RemoteNode, RxTxRemoteNodeReadingDTO>(
          srdto.getRemoteNode(), UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS, true, null,
           Command.SENSOR_GET_READINGS, null, srdto));
    }
  }
View Full Code Here

                    jsonData));
          }
          notifyMembers(jsonData);
        } else if (event.getType() == UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS
            && event.getNewValue() instanceof RxTxRemoteNodeReadingDTO) {
          final RxTxRemoteNodeReadingDTO sr = (RxTxRemoteNodeReadingDTO) event
              .getNewValue();
          final RemoteNodeReading rnr = sr.getRemoteNodeReading();
          String jsonData = jsonRemoteNode
              .toJSON(rnr.getRemoteNode());
          final String rnrJsonData = jsonRemoteNodeReading
              .toJSON(rnr);
          final String rnrsKey = '"'
View Full Code Here

      public void handle(final UGateEvent<?, ?> event) {
        if (event.getType() == UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS) {
          final RemoteNode rn = (RemoteNode) event.getSource();
          if (event.getNewValue() instanceof RxTxRemoteNodeReadingDTO &&
              rn.getAddress().equalsIgnoreCase(cb.getRemoteNode().getAddress())) {
            final RxTxRemoteNodeReadingDTO sr = (RxTxRemoteNodeReadingDTO) event.getNewValue();
            remoteNodeReadingShow(sr.getRemoteNodeReading());
          }
        } else if (event.getType() == UGateEvent.Type.APP_DATA_LOADED ||
            event.getType() == UGateEvent.Type.WIRELESS_REMOTE_NODE_CHANGED) {
          remoteNodeReadingShow(true);
        }
View Full Code Here

TOP

Related Classes of org.ugate.wireless.data.RxTxRemoteNodeReadingDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.