The Robot Application Programming Interface Delegate Project
RAPID Logo

JointConfigCache Class Reference

Inheritance diagram for JointConfigCache:
Collaboration diagram for JointConfigCache:

List of all members.

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, DataTypeIndexgetFrameMap (JointConfig config)
 The key will be the name of the frame.

Package Attributes

ArrayList< JointConfigHolderhistory = new ArrayList<JointConfigHolder>()

Member Function Documentation

static void addConfig ( Agent  agent,
MessageType  configType,
JointConfig  config 
) [static]

Used for client Configs.

Parameters:
agent
configType
config

Here is the call graph for this function:

void addConfigImpl ( JointConfig  config)

Here is the call graph for this function:

static synchronized void createCache ( final Agent  agent,
final MessageType  configType 
) [static]

Here is the call graph for this function:

static JointConfigHolder getConfig ( final Agent  agent,
final MessageType  configType 
) [static]

Here is the call graph for this function:

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,

Parameters:
config
Returns:
Map<String,DataTypeIndex>
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.

Parameters:
agent
configType
data
  • should never be null
Returns:
JointConfigHolder
Exceptions:
RapidEventCollectorException

Here is the call graph for this function:

void rapidEventReceived ( Agent  agent,
MessageType  type,
IRapidMessage  msg 
)

Implements IRapidEventListener.

Here is the call graph for this function:


Member Data Documentation

ArrayList<JointConfigHolder> history = new ArrayList<JointConfigHolder>() [package]

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