Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
com.github.rosjava.android_remocons.common_tools.rocon.AppsManager Class Reference
Inheritance diagram for com.github.rosjava.android_remocons.common_tools.rocon.AppsManager:
Inheritance graph
[legend]

List of all members.

Classes

enum  Action
class  ConnectNodeThread
interface  FailureHandler

Public Member Functions

 AppsManager (FailureHandler failureCallback)
void getAppInfo (final MasterId masterId, final int hash)
void getAppsForRole (final MasterId masterId, final String role)
GraphName getDefaultNodeName ()
void init (String interactionsNamespace)
void onError (Node node, Throwable throwable)
void onShutdown (Node node)
void onShutdownComplete (Node node)
void onStart (final ConnectedNode connectedNode)
void requestAppUse (final MasterId masterId, final String role, final rocon_interaction_msgs.Interaction app)
void setupAppInfoService (ServiceResponseListener< GetInteractionResponse > serviceResponseListener)
void setupGetInteractionsService (ServiceResponseListener< GetInteractionsResponse > serviceResponseListener)
void setupRequestService (ServiceResponseListener< RequestInteractionResponse > serviceResponseListener)
void shutdown ()

Protected Member Functions

void finalize () throws Throwable

Private Member Functions

void getAppInfo ()
void getAppsForRole ()
void requestAppUse ()

Private Attributes

Action action = Action.NONE
rocon_interaction_msgs.Interaction app
int app_hash
ServiceResponseListener
< GetInteractionResponse > 
appInfoServiceResponseListener
ConnectedNode connectedNode
ConnectNodeThread connectThread
FailureHandler failureCallback
ServiceResponseListener
< GetInteractionsResponse > 
getAppsServiceResponseListener
String interactionsNamespace
NodeMainExecutorService nodeMainExecutorService
ServiceResponseListener
< RequestInteractionResponse > 
requestServiceResponseListener
String role

Detailed Description

This class has been derived from the original turtlebot robot app manager but now tuned for interactions.

The original is quite messy, and this is not much better, so maybe needs extra refactoring. Also RobotAppsManager claims that it can be executed once, but I modified this to execute arbitrary times. It looks to work, but mechanism is a bit brittle. Apps manager implements the services and topics required to interact with the concert roles manager. Typically to use this class its a three step process:

1) instantiate and provide a general failure handler 2) provide a callback via one of the setupXXXservice methods 3) call the service you want; there's a public method per service 4) wait for service response.

Essentially you are creating a node when creating an instance, and rosjava isolates each service/topic to each 'node'.

Author:
jorge@yujinrobot.com (Jorge Santos Simon)

Definition at line 74 of file src/main/java/com/github/rosjava/android_remocons/common_tools/rocon/AppsManager.java.


Constructor & Destructor Documentation


Member Function Documentation

void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.getAppInfo ( final MasterId  masterId,
final int  hash 
) [inline]

This is called from the headless launcher where the only thing it knows is the master id (for connection purposes and the hash stored in an nfc tag (or other). We need to save this hash for later service calls.

Parameters:
masterId
hash

Definition at line 197 of file src/main/java/com/github/rosjava/android_remocons/common_tools/rocon/AppsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.getAppsForRole ( final MasterId  masterId,
final String  role 
) [inline]
void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.init ( String  interactionsNamespace) [inline]

This is done outside of the constructor to save it from having to be continually reinstantiated in the rocon remocons. That does mean it requires some black magic, i.e. construction -> init & setupXYZ -> execute

Parameters:
interactionsNamespace

Definition at line 112 of file src/main/java/com/github/rosjava/android_remocons/common_tools/rocon/AppsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.onError ( Node  node,
Throwable  throwable 
) [inline]
void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.onStart ( final ConnectedNode  connectedNode) [inline]

Node started by NodeMainExecutor.execute(). Execute the requested action.

Parameters:
connectedNode

Definition at line 341 of file src/main/java/com/github/rosjava/android_remocons/common_tools/rocon/AppsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.requestAppUse ( final MasterId  masterId,
final String  role,
final rocon_interaction_msgs.Interaction  app 
) [inline]
void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.setupAppInfoService ( ServiceResponseListener< GetInteractionResponse >  serviceResponseListener) [inline]
void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.setupGetInteractionsService ( ServiceResponseListener< GetInteractionsResponse >  serviceResponseListener) [inline]
void com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.setupRequestService ( ServiceResponseListener< RequestInteractionResponse >  serviceResponseListener) [inline]

Member Data Documentation

rocon_interaction_msgs.Interaction com.github.rosjava.android_remocons.common_tools.rocon.AppsManager.app [private]

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


android_remocons
Author(s): Daniel Stonier, Kazuto Murase
autogenerated on Sat Jun 8 2019 19:32:24