Examples of processPDU()


Examples of modbuspal.slave.ModbusPduProcessor.processPDU()

            ModbusPalRecorder.recordOutgoing(slaveID,buffer,offset,length);
            modbusPalProject.notifyExceptionResponse();
            return length;
        }

        int length = mspp.processPDU(functionCode, slaveID, buffer, offset, modbusPalProject.isLeanModeEnabled());
        if(length<0)
        {
            System.err.println("Illegal function code "+functionCode);
            length = makeExceptionResponse(functionCode,XC_ILLEGAL_FUNCTION, buffer, offset);
        }
View Full Code Here

Examples of modbuspal.slave.ModbusPduProcessor.processPDU()

            req.notifyExceptionResponse();
            modbusPalProject.notifyExceptionResponse();
            return false;
        }

        boolean result = mspp.processPDU(req, slaveID, buffer, offset, modbusPalProject.isLeanModeEnabled());
        if(result==false)
        {
            System.err.println("Illegal function code "+functionCode);
            req.notifyPDUnotServiced();
            modbusPalProject.notifyPDUnotServiced();
View Full Code Here

Examples of org.nfctools.llcp.pdu.Connect.processPdu()

  }

  @Test
  public void testConnectUnavailableService() throws Exception {
    Connect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP));
    AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager);
    assertTrue(processPdu instanceof DisconnectedMode);
    assertEquals(2, ((DisconnectedMode)processPdu).getReason());
  }

  @Test
View Full Code Here

Examples of org.nfctools.llcp.pdu.Connect.processPdu()

  }

  @Test
  public void testConnectUnavailableAddress() throws Exception {
    Connect connect = new Connect(0x02, 0x32, new ServiceName(COM_ANDROID_NPP));
    AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager);
    assertTrue(processPdu instanceof DisconnectedMode);
    assertEquals(2, ((DisconnectedMode)processPdu).getReason());
  }

  @Test
View Full Code Here

Examples of org.nfctools.llcp.pdu.Connect.processPdu()

  public void testConnectWellKnownServiceWithServiceUnavailable() throws Exception {
    DummyServiceAccessPoint serviceAccessPoint = new DummyServiceAccessPoint(COM_ANDROID_NPP);
    serviceAccessPoint.setAcceptConnections(false);
    connectionManager.registerWellKnownServiceAccessPoint(COM_ANDROID_NPP, serviceAccessPoint);
    Connect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP));
    AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager);
    assertTrue(processPdu instanceof DisconnectedMode);
    assertEquals(3, ((DisconnectedMode)processPdu).getReason());
  }

  @Test
View Full Code Here

Examples of org.nfctools.llcp.pdu.Connect.processPdu()

  @Test
  public void testConnectWellKnownService() throws Exception {
    connectionManager.registerWellKnownServiceAccessPoint(COM_ANDROID_NPP, new DummyServiceAccessPoint());
    Connect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP));
    AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager);
    assertTrue(processPdu instanceof ConnectComplete);
  }

  @Test
  public void testWellKnownServiceConnectWithSendAndDisconnect() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.