The Robot Application Programming Interface Delegate Project
|
This ensures that there is only 1 RapidAgent for the client.
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, Command > | rapidCommandCache = new HashMap<String, Command>() |
ArrayList< ICommandComplete > | commandCompleteListeners = new ArrayList<ICommandComplete>() |
HashMap< Agent, RapidAssetState > | latestRapidStatus = new HashMap<Agent, RapidAssetState>() |
HashMap< Agent, RapidJointSample > | latestRapidArticulation = 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, ExampleWorkbenchAgent > | instances = new HashMap<Agent, ExampleWorkbenchAgent>() |
static Agent | clientAgent = null |
static ExampleWorkbenchAgent | singleInstance = null |
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
sourceAgent |
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.
void updateICommandCompleteListeners | ( | RapidAckMessage | ack, |
Command | cmd | ||
) | [protected] |
synchronized void writeMessage | ( | MessageType | type, |
IRapidMessage | message, | ||
String | domainName | ||
) |
type | |
message | |
domainName |
Reimplemented from RapidAgent.
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 | ||
) |
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] |