Classes | |
interface | onConnectionListener |
Public Member Functions | |
boolean | isConnected () |
boolean | open () |
ROSSerialADK (Context context, Node node) | |
void | setOnConnectonListener (onConnectionListener onConnectionListener) |
void | shutdown () |
Static Public Member Functions | |
static boolean | isAttached (UsbManager man) |
Package Functions | |
TopicInfo[] | getPublications () |
TopicInfo[] | getSubscriptions () |
void | setOnPublicationCB (TopicRegistrationListener listener) |
void | setOnSubscriptionCB (TopicRegistrationListener listener) |
Package Attributes | |
FileDescriptor | fd |
Thread | ioThread |
UsbAccessory | mAccessory |
ParcelFileDescriptor | mFileDescriptor |
FileInputStream | mInputStream |
FileOutputStream | mOutputStream |
boolean | mPermissionRequestPending = false |
Static Package Attributes | |
static final String | TAG = "ROSSerialADK" |
Private Member Functions | |
void | closeAccessory () |
boolean | openAccessory (UsbAccessory accessory) |
Static Private Member Functions | |
static UsbAccessory | getAccessory (UsbManager man) |
Private Attributes | |
onConnectionListener | connectionCB |
Context | mContext |
PendingIntent | mPermissionIntent |
UsbManager | mUsbManager |
final BroadcastReceiver | mUsbReceiver |
Node | node |
ROSSerial | rosserial |
Static Private Attributes | |
static final String | ACTION_USB_PERMISSION = "org.ros.rosserial.action.USB_PERMISSION" |
Definition at line 25 of file ROSSerialADK.java.
org.ros.rosserial.ROSSerialADK.ROSSerialADK | ( | Context | context, |
Node | node | ||
) | [inline] |
Definition at line 60 of file ROSSerialADK.java.
void org.ros.rosserial.ROSSerialADK.closeAccessory | ( | ) | [inline, private] |
Definition at line 177 of file ROSSerialADK.java.
static UsbAccessory org.ros.rosserial.ROSSerialADK.getAccessory | ( | UsbManager | man | ) | [inline, static, private] |
Definition at line 104 of file ROSSerialADK.java.
TopicInfo [] org.ros.rosserial.ROSSerialADK.getPublications | ( | ) | [inline, package] |
Definition at line 209 of file ROSSerialADK.java.
TopicInfo [] org.ros.rosserial.ROSSerialADK.getSubscriptions | ( | ) | [inline, package] |
Definition at line 206 of file ROSSerialADK.java.
static boolean org.ros.rosserial.ROSSerialADK.isAttached | ( | UsbManager | man | ) | [inline, static] |
Definition at line 122 of file ROSSerialADK.java.
boolean org.ros.rosserial.ROSSerialADK.isConnected | ( | ) | [inline] |
Definition at line 201 of file ROSSerialADK.java.
boolean org.ros.rosserial.ROSSerialADK.open | ( | ) | [inline] |
Definition at line 154 of file ROSSerialADK.java.
boolean org.ros.rosserial.ROSSerialADK.openAccessory | ( | UsbAccessory | accessory | ) | [inline, private] |
Definition at line 127 of file ROSSerialADK.java.
void org.ros.rosserial.ROSSerialADK.setOnConnectonListener | ( | onConnectionListener | onConnectionListener | ) | [inline] |
Definition at line 54 of file ROSSerialADK.java.
void org.ros.rosserial.ROSSerialADK.setOnPublicationCB | ( | TopicRegistrationListener | listener | ) | [inline, package] |
Definition at line 219 of file ROSSerialADK.java.
void org.ros.rosserial.ROSSerialADK.setOnSubscriptionCB | ( | TopicRegistrationListener | listener | ) | [inline, package] |
Definition at line 214 of file ROSSerialADK.java.
void org.ros.rosserial.ROSSerialADK.shutdown | ( | ) | [inline] |
Definition at line 196 of file ROSSerialADK.java.
final String org.ros.rosserial.ROSSerialADK.ACTION_USB_PERMISSION = "org.ros.rosserial.action.USB_PERMISSION" [static, private] |
Definition at line 28 of file ROSSerialADK.java.
Definition at line 53 of file ROSSerialADK.java.
FileDescriptor org.ros.rosserial.ROSSerialADK.fd [package] |
Definition at line 44 of file ROSSerialADK.java.
Thread org.ros.rosserial.ROSSerialADK.ioThread [package] |
Definition at line 32 of file ROSSerialADK.java.
UsbAccessory org.ros.rosserial.ROSSerialADK.mAccessory [package] |
Definition at line 40 of file ROSSerialADK.java.
Context org.ros.rosserial.ROSSerialADK.mContext [private] |
Definition at line 35 of file ROSSerialADK.java.
ParcelFileDescriptor org.ros.rosserial.ROSSerialADK.mFileDescriptor [package] |
Definition at line 41 of file ROSSerialADK.java.
FileInputStream org.ros.rosserial.ROSSerialADK.mInputStream [package] |
Definition at line 42 of file ROSSerialADK.java.
FileOutputStream org.ros.rosserial.ROSSerialADK.mOutputStream [package] |
Definition at line 43 of file ROSSerialADK.java.
PendingIntent org.ros.rosserial.ROSSerialADK.mPermissionIntent [private] |
Definition at line 36 of file ROSSerialADK.java.
boolean org.ros.rosserial.ROSSerialADK.mPermissionRequestPending = false [package] |
Definition at line 37 of file ROSSerialADK.java.
UsbManager org.ros.rosserial.ROSSerialADK.mUsbManager [private] |
Definition at line 39 of file ROSSerialADK.java.
final BroadcastReceiver org.ros.rosserial.ROSSerialADK.mUsbReceiver [private] |
new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (ACTION_USB_PERMISSION.equals(action)) { synchronized (this) { UsbAccessory accessory = UsbManager.getAccessory(intent); if (intent.getBooleanExtra( UsbManager.EXTRA_PERMISSION_GRANTED, false)) { openAccessory(accessory); } else { Log.d(TAG, "permission denied for accessory " + accessory); } mPermissionRequestPending = false; } } else if (UsbManager.ACTION_USB_ACCESSORY_DETACHED.equals(action)) { UsbAccessory accessory = UsbManager.getAccessory(intent); if (accessory != null && accessory.equals(mAccessory)) { closeAccessory(); } } } }
Definition at line 76 of file ROSSerialADK.java.
Node org.ros.rosserial.ROSSerialADK.node [private] |
Definition at line 46 of file ROSSerialADK.java.
ROSSerial org.ros.rosserial.ROSSerialADK.rosserial [private] |
Definition at line 31 of file ROSSerialADK.java.
final String org.ros.rosserial.ROSSerialADK.TAG = "ROSSerialADK" [static, package] |
Definition at line 27 of file ROSSerialADK.java.