public UsbEndpointAssert hasAttributes(int attributes) { isNotNull(); int actualAttributes = actual.getAttributes(); assertThat(actualAttributes) // .overridingErrorMessage("Expected attributes <%s> but was <%s>.", attributes, actualAttributes) // .isEqualTo(attributes); return this; }
public UsbEndpointAssert hasAttributes(int attributes) { isNotNull(); int actualAttributes = actual.getAttributes(); assertThat(actualAttributes) // .overridingErrorMessage("Expected attributes <%s> but was <%s>.", attributes, actualAttributes) // .isEqualTo(attributes); return this; }
+ " attributes: " + usbEndpointIN.getAttributes() + " direction: " + usbEndpointIN.getDirection() + " max_packet_size: " + usbEndpointIN.getMaxPacketSize()); Log.i(logTag,"constructor: [endpoint 1 (OUT)] address: " + usbEndpointOUT.getAddress() + " attributes: " + usbEndpointOUT.getAttributes() + " direction: " + usbEndpointOUT.getDirection() + " max_packet_size: " + usbEndpointOUT.getMaxPacketSize());
private String getEndpointText(final UsbEndpoint endpoint, final int index) { final String addressInBinary = padLeft(Integer.toBinaryString(endpoint.getAddress()), "0", 8); final String addressInHex = padLeft(Integer.toHexString(endpoint.getAddress()), "0", 2); final String attributesInBinary = padLeft(Integer.toBinaryString(endpoint.getAttributes()), "0", 8); String endpointText = "#" + index + "\n"; endpointText += getString(R.string.address_) + "0x" + addressInHex + " (" + addressInBinary + ")\n"; endpointText += getString(R.string.number_) + endpoint.getEndpointNumber() + "\n"; endpointText += getString(R.string.direction_) + UsbConstantResolver.resolveUsbEndpointDirection(endpoint.getDirection()) + "\n"; endpointText += getString(R.string.type_) + UsbConstantResolver.resolveUsbEndpointType(endpoint.getType()) + "\n"; endpointText += getString(R.string.poll_interval_) + endpoint.getInterval() + "\n"; endpointText += getString(R.string.max_packet_size_) + endpoint.getMaxPacketSize() + "\n"; endpointText += getString(R.string.attributes_) + attributesInBinary; return endpointText; }
Log.i(TAG," ++++ ++++ ++++"); Log.i(TAG," Endpoint index: " + epi); Log.i(TAG," Attributes: " + mEndpoint.getAttributes()); Log.i(TAG," Direction: " + mEndpoint.getDirection()); Log.i(TAG," Number: " + mEndpoint.getEndpointNumber());