Classes | Public Member Functions | Static Public Member Functions | Package Functions | Package Attributes | Static Package Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
org.ros.rosserial.ROSSerialADK Class Reference

List of all members.

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"

Detailed Description

Definition at line 25 of file ROSSerialADK.java.


Constructor & Destructor Documentation

org.ros.rosserial.ROSSerialADK.ROSSerialADK ( Context  context,
Node  node 
) [inline]

Definition at line 60 of file ROSSerialADK.java.


Member Function Documentation

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.

Definition at line 209 of file ROSSerialADK.java.

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.

Definition at line 201 of file ROSSerialADK.java.

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.

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.

Definition at line 196 of file ROSSerialADK.java.


Member Data Documentation

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.

Definition at line 32 of file ROSSerialADK.java.

Definition at line 40 of file ROSSerialADK.java.

Definition at line 35 of file ROSSerialADK.java.

ParcelFileDescriptor org.ros.rosserial.ROSSerialADK.mFileDescriptor [package]

Definition at line 41 of file ROSSerialADK.java.

Definition at line 42 of file ROSSerialADK.java.

Definition at line 43 of file ROSSerialADK.java.

Definition at line 36 of file ROSSerialADK.java.

Definition at line 37 of file ROSSerialADK.java.

Definition at line 39 of file ROSSerialADK.java.

final BroadcastReceiver org.ros.rosserial.ROSSerialADK.mUsbReceiver [private]
Initial value:
 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.

Definition at line 46 of file ROSSerialADK.java.

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.


The documentation for this class was generated from the following file:


rosserial_android
Author(s): Adam Stambler
autogenerated on Mon Dec 2 2013 12:02:05