The Robot Application Programming Interface Delegate Project

ExampleWorkbenchAgent Class Reference

This ensures that there is only 1 RapidAgent for the client.

Inheritance diagram for ExampleWorkbenchAgent:
Collaboration diagram for ExampleWorkbenchAgent:

List of all members.

Public Member Functions

synchronized void writeMessage (DomainParticipant participant, Copyable copyable, String dstAgentName, String topicName, DomainParticipantListener dpListener, PublisherListener publisherListener, DataWriterQos writerQos, int sampleCount)
synchronized void writeMessage (MessageType type, IRapidMessage message, String dstAgentName)
 Calling a direct writeMessage will write the message directly to the RapidAgent as specified in the header.
synchronized void writeMessage (MessageType type, IRapidMessage message, List< String > dstAgents)
void addICommandCompleteListener (ICommandComplete l)

Static Public Member Functions

static ExampleWorkbenchAgent getInstance () throws RapidWorkbenchAgentException
static ExampleWorkbenchAgent getInstance (Agent clientAgent) throws RapidWorkbenchAgentException

Static Public Attributes

static final String P_MULTI_ASSET_MON_TEL_CANVAS = "workbench.canvas.multi.asset"

Protected Member Functions

void registerForAckHandleEvaluation ()
 Register the ExampleWorkbenchAgent with the RapidEventCollector.
void updateICommandCompleteListeners (RapidAckMessage ack, Command cmd)
void monitorAllTrafficFromSource (Agent sourceAgent)
 Listen for the asset configuration for a particular asset.

Protected Attributes

HashMap< String, CommandrapidCommandCache = new HashMap<String, Command>()
ArrayList< ICommandCompletecommandCompleteListeners = new ArrayList<ICommandComplete>()
HashMap< Agent, RapidAssetStatelatestRapidStatus = new HashMap<Agent, RapidAssetState>()
HashMap< Agent, RapidJointSamplelatestRapidArticulation = new HashMap<Agent, RapidJointSample>()

Static Protected Attributes

static final long RESPONSE_TIME_OUT_LIMIT = 20000
static final long RESPONSE_TIME_OUT_WARN = 10000
static HashMap< Agent,
instances = new HashMap<Agent, ExampleWorkbenchAgent>()
static Agent clientAgent = null
static ExampleWorkbenchAgent singleInstance = null

Member Function Documentation

void addICommandCompleteListener ( ICommandComplete  l)
static ExampleWorkbenchAgent getInstance ( ) throws RapidWorkbenchAgentException [static]
static ExampleWorkbenchAgent getInstance ( Agent  clientAgent) throws RapidWorkbenchAgentException [static]
void monitorAllTrafficFromSource ( Agent  sourceAgent) [protected]

If it's already listening, then don't register again with the RapidEventCollector

Update the workbench notification that communication has been established


Here is the call graph for this function:

void registerForAckHandleEvaluation ( ) [protected]

Get callbacks when an Ack is received. That way it can keep track of what commands have started and what commands have completed. If an Ack is received, it checks with the list of commands that the ExampleWorkbenchAgent sent out. If it is a recognized commad, update the listeners that are listening for the completion of the command. Remove that command from the cache.

Here is the call graph for this function:

void updateICommandCompleteListeners ( RapidAckMessage  ack,
Command  cmd 
) [protected]
synchronized void writeMessage ( MessageType  type,
IRapidMessage  message,
String  domainName 

Reimplemented from RapidAgent.

Here is the call graph for this function:

synchronized void writeMessage ( DomainParticipant  participant,
Copyable  copyable,
String  dstAgentName,
String  topicName,
DomainParticipantListener  dpListener,
PublisherListener  publisherListener,
DataWriterQos  writerQos,
int  sampleCount 

Reimplemented from RapidAgent.

synchronized void writeMessage ( MessageType  type,
IRapidMessage  message,
List< String >  dstAgents 

Reimplemented from RapidAgent.

Here is the call graph for this function:

Member Data Documentation

Agent clientAgent = null [static, protected]
ArrayList<ICommandComplete> commandCompleteListeners = new ArrayList<ICommandComplete>() [protected]
HashMap<Agent, ExampleWorkbenchAgent> instances = new HashMap<Agent, ExampleWorkbenchAgent>() [static, protected]
HashMap<Agent, RapidJointSample> latestRapidArticulation = new HashMap<Agent, RapidJointSample>() [protected]
HashMap<Agent, RapidAssetState> latestRapidStatus = new HashMap<Agent, RapidAssetState>() [protected]
final String P_MULTI_ASSET_MON_TEL_CANVAS = "workbench.canvas.multi.asset" [static]
HashMap<String, Command> rapidCommandCache = new HashMap<String, Command>() [protected]
final long RESPONSE_TIME_OUT_LIMIT = 20000 [static, protected]
final long RESPONSE_TIME_OUT_WARN = 10000 [static, protected]
ExampleWorkbenchAgent singleInstance = null [static, protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines