Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
edu.nimbus.glass.TopicManager Class Reference
Inheritance diagram for edu.nimbus.glass.TopicManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

String getField (String field)
String getOriginalMessage ()
String getText ()
void onClose (int code, String reason)
void onOpen ()
void onTextMessage (String payload)
void start ()
void stop ()
 TopicManager (String topic, String url, WebSocketConnection mConnection)

Static Public Member Functions

static String performFormatting (String string)

Private Member Functions

StringBuilder buildRecursiveList (JSONObject msg, int tab_level) throws JSONException
String getJSONMessageRec (JSONObject obj, String[] subfields, int index) throws JSONException
String parseMessage (String msg)

Private Attributes

Map< String, String > fieldMap
WebSocketConnection mConnection
String originalPayload
String text
String topic
String url

Static Private Attributes

static final String tabs = "\t\t\t\t\t"

Detailed Description

Definition at line 30 of file TopicManager.java.


Constructor & Destructor Documentation

edu.nimbus.glass.TopicManager.TopicManager ( String  topic,
String  url,
WebSocketConnection  mConnection 
) [inline]

Definition at line 41 of file TopicManager.java.


Member Function Documentation

StringBuilder edu.nimbus.glass.TopicManager.buildRecursiveList ( JSONObject  msg,
int  tab_level 
) throws JSONException [inline, private]

This method builds the string represenation of the message based on the current level within the message.

Parameters:
msg: JSONObject - The message information of the current level.
tab_level: int - How deep into the message we are.
Returns:
StringBuilder : the string representation of the message formatted correctly.
Exceptions:
JSONException: Thrown in the message is malformed.

Definition at line 153 of file TopicManager.java.

String edu.nimbus.glass.TopicManager.getField ( String  field) [inline]

Get the desired field from the message that is currently being stored.

Parameters:
field: String - Which field should be parsed.
Returns:
Text message contained in the field.

Definition at line 81 of file TopicManager.java.

String edu.nimbus.glass.TopicManager.getJSONMessageRec ( JSONObject  obj,
String[]  subfields,
int  index 
) throws JSONException [inline, private]

Definition at line 185 of file TopicManager.java.

Get the raw message that was returned from the ROS server.

Returns:
raw ros json string.

Definition at line 108 of file TopicManager.java.

Get the text value currently in the topic Manager. Updated on every message recieved.

Definition at line 99 of file TopicManager.java.

void edu.nimbus.glass.TopicManager.onClose ( int  code,
String  reason 
) [inline]

Definition at line 71 of file TopicManager.java.

Definition at line 50 of file TopicManager.java.

void edu.nimbus.glass.TopicManager.onTextMessage ( String  payload) [inline]

Definition at line 66 of file TopicManager.java.

String edu.nimbus.glass.TopicManager.parseMessage ( String  msg) [inline, private]

Parse a message and return the string represenation of it.

Parameters:
msgString : The message recieved over the topic.
Returns:
String rep of the message.

Definition at line 125 of file TopicManager.java.

static String edu.nimbus.glass.TopicManager.performFormatting ( String  string) [inline, static]

Format a string as a double and return that string.

Parameters:
stringString to format or leeave alone
Returns:
String : The string formated as a double or a the string itself.

Definition at line 204 of file TopicManager.java.

Definition at line 112 of file TopicManager.java.

Definition at line 116 of file TopicManager.java.


Member Data Documentation

Map<String, String> edu.nimbus.glass.TopicManager.fieldMap [private]

Definition at line 39 of file TopicManager.java.

WebSocketConnection edu.nimbus.glass.TopicManager.mConnection [private]

Definition at line 36 of file TopicManager.java.

Definition at line 38 of file TopicManager.java.

final String edu.nimbus.glass.TopicManager.tabs = "\t\t\t\t\t" [static, private]

Definition at line 32 of file TopicManager.java.

Definition at line 37 of file TopicManager.java.

Definition at line 34 of file TopicManager.java.

Definition at line 35 of file TopicManager.java.


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


ros_glass_tools
Author(s):
autogenerated on Thu Aug 27 2015 14:47:21