The Robot Application Programming Interface Delegate Project
|
Classes | |
class | JointConfigHolder |
Public Member Functions | |
void | addConfigImpl (JointConfig config) |
void | rapidEventReceived (Agent agent, MessageType type, IRapidMessage msg) |
Static Public Member Functions | |
static JointConfigHolder | getSubscribedConfig (final Agent agent, final MessageType configType, JointSample data) |
Matches the serial number in JointSample to the latest JointConfig and returns it if true. | |
static JointConfigHolder | getConfig (final Agent agent, final MessageType configType) |
static synchronized void | createCache (final Agent agent, final MessageType configType) |
static void | addConfig (Agent agent, MessageType configType, JointConfig config) |
Manually add Config to cache. | |
Protected Member Functions | |
JointConfigHolder | getLatestConfig () |
JointConfigHolder | getLatestMatchingConfig (Header hdr) |
Map< String, DataTypeIndex > | getFrameMap (JointConfig config) |
The key will be the name of the frame. | |
Package Attributes | |
ArrayList< JointConfigHolder > | history = new ArrayList<JointConfigHolder>() |
static void addConfig | ( | Agent | agent, |
MessageType | configType, | ||
JointConfig | config | ||
) | [static] |
Used for client Configs.
agent | |
configType | |
config |
void addConfigImpl | ( | JointConfig | config | ) |
static synchronized void createCache | ( | final Agent | agent, |
final MessageType | configType | ||
) | [static] |
static JointConfigHolder getConfig | ( | final Agent | agent, |
final MessageType | configType | ||
) | [static] |
Map<String, DataTypeIndex> getFrameMap | ( | JointConfig | config | ) | [protected] |
An ATHLETE example would be: For Leg 1, Hip Yaw motor the frame name would be: Leg1/HipYaw Leg 2,
config |
JointConfigHolder getLatestConfig | ( | ) | [protected] |
JointConfigHolder getLatestMatchingConfig | ( | Header | hdr | ) | [protected] |
static JointConfigHolder getSubscribedConfig | ( | final Agent | agent, |
final MessageType | configType, | ||
JointSample | data | ||
) | [static] |
If false, null is returned
TODO: match against history of JointConfig messages
If the client would like to subscribe to the Config message to receive the initial JointSample, the following should be done at the calling class:
JointConfig.getConfig(agent, new JointSample());
This will return null, but the JointConfig has been registered to listen for events.
agent | |
configType | |
data |
|
RapidEventCollectorException |
void rapidEventReceived | ( | Agent | agent, |
MessageType | type, | ||
IRapidMessage | msg | ||
) |
ArrayList<JointConfigHolder> history = new ArrayList<JointConfigHolder>() [package] |