The Robot Application Programming Interface Delegate Project
|
![]() |
A RAPID Agent is an entity that can be monitored and/or controlled through the RAPID system of messages and services. More...
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 |
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.
RapidAgent | ( | Agent | agent | ) | throws NullPointerException |
RapidAgent | ( | Agent | agent, |
DomainParticipant | participant | ||
) | throws NullPointerException |
RapidAgent | ( | Agent | agent, |
DomainParticipant | participant, | ||
int | domainId | ||
) |
void connectionException | ( | ) |
Agent getAgent | ( | ) |
Reimplemented in RapidClient.
String getAgentName | ( | ) |
Agent [] getCommandableAgentsArray | ( | ) |
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
synchronized void sendMessageInThread | ( | final MessageType | type, |
final IRapidMessage | msg | ||
) |
String toString | ( | ) |
synchronized void writeMessage | ( | MessageType | type, |
IRapidMessage | message, | ||
String | domainName | ||
) |
type | |
message | |
domainName |
Reimplemented in RapidClient, and ExampleWorkbenchAgent.
synchronized void writeMessage | ( | MessageType | type, |
IRapidMessage | message, | ||
String... | agentNames | ||
) |
synchronized void writeMessage | ( | DomainParticipant | participant, |
Copyable | copyable, | ||
String | domainName, | ||
String | topicName, | ||
DomainParticipantListener | dpListener, | ||
PublisherListener | publisherListener, | ||
DataWriterQos | writerQos, | ||
int | sampleCount | ||
) |
synchronized void writeMessage | ( | MessageType | type, |
IRapidMessage | message, | ||
List< String > | agentNames | ||
) |
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.
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
type | |
message |
synchronized void writeMessage | ( | DomainParticipant | participant, |
Copyable | copyable, | ||
String | dstAgentName, | ||
String | topicName, | ||
DomainParticipantListener | dpListener, | ||
PublisherListener | publisherListener, | ||
String | dataWriterQosLibName, | ||
String | dataWriterQosProfileName, | ||
int | sampleCount | ||
) |
final int DEFAULT_DOMAIN_ID = DDSParticipant.getDomainId() [static] |
final int DEFAULT_SAMPLE_COUNT = 1 [static] |
DomainParticipant participant |
RapidPositionSample position [protected] |