Package org.ugate.wireless.data

Examples of org.ugate.wireless.data.RxTxRemoteNodeDTO


            log.info("Removed remote node at address: " + rn.getAddress());
          }
        } else if (event.getType() == UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS) {
          final RemoteNode rn = (RemoteNode) event.getSource();
          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);
              ndto.getRemoteNode().setDeviceSynchronized(false);
              final NodeStatusView nsv = getNodeStatusView(rn.getAddress());
              if (nsv != null) {
                // blink status to indicate the a remote device is out of sync
                nsv.updateLastCommand(event.getCommand(), true);
                controlBar.setHelpText(RS.rbLabel(
View Full Code Here


          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);
              ndto.getRemoteNode().setDeviceSynchronized(false);
              if (rn.getDeviceAutoSynchronize() == 1) {
                // automatically send the changes to the remote node
                // (consume event so no other notifications for the
                // event will be processed)
                event.setConsumed(true);
View Full Code Here

    if (!isConnected()) {
      return allSuccess;
    }
    try {
      for (final RemoteNode rn : remoteNode) {
        final RxTxRemoteNodeDTO sd = new RxTxRemoteNodeDTO(rn);
        final int[] sendData = sd.getData();
        log.info(String.format("Attempting to send: %s", sd));
        final UGateEvent<RemoteNode, int[]> event = new UGateEvent<>(
            rn, UGateEvent.Type.INITIALIZE, false, null,
            Command.SENSOR_SEND_SETTINGS, null, sendData);
        if (sendData(event, timeout, throwRuntimeException)) {
View Full Code Here

TOP

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

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.