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

List of all members.

Classes

enum  Action
class  ConnectNodeThread
interface  FailureHandler

Public Member Functions

void getAppInfo (final MasterId masterId, final int hash)
void getAppsForRole (final MasterId masterId, final String role)
GraphName getDefaultNodeName ()
void init (String interactionsNamespace)
 InteractionsManager (FailureHandler failureCallback)
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 setRemoconName (String remocon_name)
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
String remocon_name
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 InteractionsManager.java.


Constructor & Destructor Documentation

Definition at line 101 of file InteractionsManager.java.


Member Function Documentation

Definition at line 135 of file InteractionsManager.java.

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 203 of file InteractionsManager.java.

Definition at line 267 of file InteractionsManager.java.

Definition at line 147 of file InteractionsManager.java.

Definition at line 226 of file InteractionsManager.java.

Definition at line 338 of file InteractionsManager.java.

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 113 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.onError ( Node  node,
Throwable  throwable 
) [inline]

Definition at line 394 of file InteractionsManager.java.

Definition at line 379 of file InteractionsManager.java.

Definition at line 389 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.onStart ( final ConnectedNode  connectedNode) [inline]

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

Parameters:
connectedNode

Definition at line 348 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.requestAppUse ( final MasterId  masterId,
final String  role,
final rocon_interaction_msgs.Interaction  app 
) [inline]

Definition at line 170 of file InteractionsManager.java.

Definition at line 247 of file InteractionsManager.java.

Definition at line 117 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.setupAppInfoService ( ServiceResponseListener< GetInteractionResponse >  serviceResponseListener) [inline]

Definition at line 130 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.setupGetInteractionsService ( ServiceResponseListener< GetInteractionsResponse >  serviceResponseListener) [inline]

Definition at line 126 of file InteractionsManager.java.

void com.github.rosjava.android_remocons.common_tools.rocon.InteractionsManager.setupRequestService ( ServiceResponseListener< RequestInteractionResponse >  serviceResponseListener) [inline]

Definition at line 122 of file InteractionsManager.java.

Definition at line 140 of file InteractionsManager.java.


Member Data Documentation

Definition at line 88 of file InteractionsManager.java.

Definition at line 89 of file InteractionsManager.java.

Definition at line 90 of file InteractionsManager.java.

Definition at line 98 of file InteractionsManager.java.

Definition at line 93 of file InteractionsManager.java.

Definition at line 92 of file InteractionsManager.java.

Definition at line 95 of file InteractionsManager.java.

Definition at line 97 of file InteractionsManager.java.

Definition at line 87 of file InteractionsManager.java.

Definition at line 94 of file InteractionsManager.java.

Definition at line 91 of file InteractionsManager.java.

Definition at line 96 of file InteractionsManager.java.

Definition at line 84 of file InteractionsManager.java.


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