Public Member Functions | |
AppManager (final String appName, NameResolver resolver) | |
AppManager (final String appName) | |
AppManager () | |
void | continuouslyListApps () |
GraphName | getDefaultNodeName () |
void | listApps () |
void | onStart (final ConnectedNode connectedNode) |
void | setAppListSubscriber (MessageListener< AppList > appListListener) |
void | setAppName (String appName) |
void | setFunction (String function) |
void | setListService (ServiceResponseListener< GetAppListResponse > listServiceResponseListener) |
void | setStartService (ServiceResponseListener< StartAppResponse > startServiceResponseListener) |
void | setStopService (ServiceResponseListener< StopAppResponse > stopServiceResponseListener) |
void | startApp () |
void | stopApp () |
Static Public Attributes | |
static final String | PACKAGE = "com.github.rosjava.android_apps.application_management.AppManager" |
Private Attributes | |
MessageListener< AppList > | appListListener |
String | appName |
ConnectedNode | connectedNode |
String | function = null |
ServiceResponseListener < GetAppListResponse > | listServiceResponseListener |
NameResolver | resolver |
ServiceResponseListener < StartAppResponse > | startServiceResponseListener |
ServiceResponseListener < StopAppResponse > | stopServiceResponseListener |
Subscriber< AppList > | subscriber |
Static Private Attributes | |
static final String | listService = "list_apps" |
static final String | startTopic = "start_app" |
static final String | stopTopic = "stop_app" |
This class implements the services and topics required to communicate with the robot app manager. Typically to use this class its a three step process:
1) provide a callback via one of the setXXX methods 2) set the function type you want to call (e.g. start_app, platform_info) 3) execute the app manager instance.
INSTANCES MAY ONLY EVER BE EXECUTED ONCE!
Essentially you are creating a node when creating an instance, and rosjava isolates each service/topic to each 'node'.
See the RosAppActivity or RobotActivity (in android_remocons) for examples.
TODO: (DJS) move these into the .rapp_manager module as separate classes. Since these can only be executed once, there is no real advantage to having them together and ultimately just makes it difficult to follow the code.
Definition at line 64 of file AppManager.java.
com.github.rosjava.android_apps.application_management.AppManager.AppManager | ( | final String | appName, |
NameResolver | resolver | ||
) | [inline] |
Definition at line 83 of file AppManager.java.
com.github.rosjava.android_apps.application_management.AppManager.AppManager | ( | final String | appName | ) | [inline] |
Definition at line 88 of file AppManager.java.
Definition at line 92 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.continuouslyListApps | ( | ) | [inline] |
Definition at line 123 of file AppManager.java.
GraphName com.github.rosjava.android_apps.application_management.AppManager.getDefaultNodeName | ( | ) | [inline] |
Definition at line 182 of file AppManager.java.
Definition at line 164 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.onStart | ( | final ConnectedNode | connectedNode | ) | [inline] |
This provides a few ways to create and execute service/topic nodes with an app manager object.
Note - you should only ever call (via NodeMainExecutor.execute() this once! It will fail due to this instance being non-unique in the set of rosjava nodemains for this activity.
connectedNode |
Definition at line 195 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setAppListSubscriber | ( | MessageListener< AppList > | appListListener | ) | [inline] |
Definition at line 104 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setAppName | ( | String | appName | ) | [inline] |
Definition at line 100 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setFunction | ( | String | function | ) | [inline] |
Definition at line 96 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setListService | ( | ServiceResponseListener< GetAppListResponse > | listServiceResponseListener | ) | [inline] |
Definition at line 118 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setStartService | ( | ServiceResponseListener< StartAppResponse > | startServiceResponseListener | ) | [inline] |
Definition at line 108 of file AppManager.java.
void com.github.rosjava.android_apps.application_management.AppManager.setStopService | ( | ServiceResponseListener< StopAppResponse > | stopServiceResponseListener | ) | [inline] |
Definition at line 113 of file AppManager.java.
Definition at line 128 of file AppManager.java.
Definition at line 146 of file AppManager.java.
MessageListener<AppList> com.github.rosjava.android_apps.application_management.AppManager.appListListener [private] |
Definition at line 77 of file AppManager.java.
Definition at line 72 of file AppManager.java.
ConnectedNode com.github.rosjava.android_apps.application_management.AppManager.connectedNode [private] |
Definition at line 80 of file AppManager.java.
String com.github.rosjava.android_apps.application_management.AppManager.function = null [private] |
Definition at line 81 of file AppManager.java.
final String com.github.rosjava.android_apps.application_management.AppManager.listService = "list_apps" [static, private] |
Definition at line 70 of file AppManager.java.
ServiceResponseListener<GetAppListResponse> com.github.rosjava.android_apps.application_management.AppManager.listServiceResponseListener [private] |
Definition at line 76 of file AppManager.java.
final String com.github.rosjava.android_apps.application_management.AppManager.PACKAGE = "com.github.rosjava.android_apps.application_management.AppManager" [static] |
Definition at line 67 of file AppManager.java.
NameResolver com.github.rosjava.android_apps.application_management.AppManager.resolver [private] |
Definition at line 73 of file AppManager.java.
ServiceResponseListener<StartAppResponse> com.github.rosjava.android_apps.application_management.AppManager.startServiceResponseListener [private] |
Definition at line 74 of file AppManager.java.
final String com.github.rosjava.android_apps.application_management.AppManager.startTopic = "start_app" [static, private] |
Definition at line 68 of file AppManager.java.
ServiceResponseListener<StopAppResponse> com.github.rosjava.android_apps.application_management.AppManager.stopServiceResponseListener [private] |
Definition at line 75 of file AppManager.java.
final String com.github.rosjava.android_apps.application_management.AppManager.stopTopic = "stop_app" [static, private] |
Definition at line 69 of file AppManager.java.
Subscriber<AppList> com.github.rosjava.android_apps.application_management.AppManager.subscriber [private] |
Definition at line 78 of file AppManager.java.