The Robot Application Programming Interface Delegate Project
RAPID Logo

RapidAgent Class Reference

A RAPID Agent is an entity that can be monitored and/or controlled through the RAPID system of messages and services. More...

Inheritance diagram for RapidAgent:
Collaboration diagram for RapidAgent:

List of all members.

Public Member Functions

 RapidAgent (Agent agent) throws NullPointerException
 RapidAgent (Agent agent, DomainParticipant participant) throws NullPointerException
 RapidAgent (Agent agent, DomainParticipant participant, int domainId)
String getAgentName ()
Agent getAgent ()
int getDomainId ()
DomainParticipant getDomainParticipant ()
synchronized void writeMessage (MessageType type, IRapidMessage message, String domainName)
 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 > agentNames)
synchronized void writeMessage (MessageType type, IRapidMessage message, String...agentNames)
synchronized void writeMessage (MessageType type, IRapidMessage message)
 FIXME mallan 05/06/2010: this method is broken and should be replaced the signature should be reused, however.
synchronized void writeMessage (DomainParticipant participant, Copyable copyable, String domainName, String topicName, DomainParticipantListener dpListener, PublisherListener publisherListener, DataWriterQos writerQos, int sampleCount)
synchronized void writeMessage (DomainParticipant participant, Copyable copyable, String dstAgentName, String topicName, DomainParticipantListener dpListener, PublisherListener publisherListener, String dataWriterQosLibName, String dataWriterQosProfileName, int sampleCount)
 MAE-4191: use the profiles from the XML.
synchronized void writeMessage (DomainParticipant participant, IRapidMessage message, String dstAgentName, String topicName, DomainParticipantListener dpListener, PublisherListener publisherListener, String dataWriterQosLibName, String dataWriterQosProfileName, int sampleCount)
 This is the main method that works in sending messages.
String toString ()
void connectionException ()
 This method is invoked by the system at the first hint of a DDS connection error.
Agent[] getCommandableAgentsArray ()
 Return the list of commandable agents, the list does not include any client consoles.
synchronized void sendMessageInThread (final MessageType type, final IRapidMessage msg, final List< String > dstAgents)
 Message sending needs to be thread safe.
synchronized void sendMessageInThread (final MessageType type, final IRapidMessage msg)

Static Public Member Functions

static boolean isConnected ()

Public Attributes

DomainParticipant participant

Static Public Attributes

static final int DEFAULT_DOMAIN_ID = DDSParticipant.getDomainId()
static final int DEFAULT_SAMPLE_COUNT = 1

Protected Attributes

Agent agent
RapidPositionSample position

Detailed Description

RAPID agents have included actual and simulated rovers, web cameras, and even Astronauts. RAPID Agents are specific articles: ATHLETE SDM-B or Robonaut 2A. RAPID Agents are classified by Agent Type, which identifies the general capabilities of the Agent: Astronaut, K10, ATHLETE, Camera. The RapidAgent class is aided by the Rapid and Agent classes.


Constructor & Destructor Documentation

RapidAgent ( Agent  agent) throws NullPointerException
RapidAgent ( Agent  agent,
DomainParticipant  participant 
) throws NullPointerException
RapidAgent ( Agent  agent,
DomainParticipant  participant,
int  domainId 
)

Here is the call graph for this function:


Member Function Documentation

void connectionException ( )
Agent getAgent ( )

Reimplemented in RapidClient.

String getAgentName ( )

Here is the call graph for this function:

Agent [] getCommandableAgentsArray ( )
Returns:
Agent[]

Here is the call graph for this function:

int getDomainId ( )
DomainParticipant getDomainParticipant ( )
static boolean isConnected ( ) [static]
synchronized void sendMessageInThread ( final MessageType  type,
final IRapidMessage  msg,
final List< String >  dstAgents 
)

Is it better to have a thread already created if you will be streaming telemetry?

This could be a huge memory leak -> Look at SingleTaskThread / ThreadQueue / ThreadUtils

Here is the call graph for this function:

synchronized void sendMessageInThread ( final MessageType  type,
final IRapidMessage  msg 
)

Here is the call graph for this function:

String toString ( )

Here is the call graph for this function:

synchronized void writeMessage ( MessageType  type,
IRapidMessage  message,
String  domainName 
)
Parameters:
type
message
domainName

Reimplemented in RapidClient, and ExampleWorkbenchAgent.

Here is the call graph for this function:

synchronized void writeMessage ( MessageType  type,
IRapidMessage  message,
String...  agentNames 
)

Here is the call graph for this function:

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

Reimplemented in RapidClient, and ExampleWorkbenchAgent.

Here is the call graph for this function:

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

Reimplemented in RapidClient, and ExampleWorkbenchAgent.

Here is the call graph for this function:

synchronized void writeMessage ( DomainParticipant  participant,
IRapidMessage  message,
String  dstAgentName,
String  topicName,
DomainParticipantListener  dpListener,
PublisherListener  publisherListener,
String  dataWriterQosLibName,
String  dataWriterQosProfileName,
int  sampleCount 
)

This signature will be able to take in IRapidMessage objects.

Here is the call graph for this function:

synchronized void writeMessage ( MessageType  type,
IRapidMessage  message 
)

Attempting to send a message results in a DDS error. Also, Task should be treated differently and Broadcast is no longer a valid pattern.

Check to see if the message is a Task and contains a Command if it contains a Command, grab the cmdDst from the command otherwise the message is telemetry and can be sent through broadcast FIXME checking RapidTask and Broadast should be moved somewhere else

Parameters:
type
message

Here is the call graph for this function:

synchronized void writeMessage ( DomainParticipant  participant,
Copyable  copyable,
String  dstAgentName,
String  topicName,
DomainParticipantListener  dpListener,
PublisherListener  publisherListener,
String  dataWriterQosLibName,
String  dataWriterQosProfileName,
int  sampleCount 
)

Here is the call graph for this function:


Member Data Documentation

Agent agent [protected]
final int DEFAULT_DOMAIN_ID = DDSParticipant.getDomainId() [static]
final int DEFAULT_SAMPLE_COUNT = 1 [static]
DomainParticipant participant

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