The Robot Application Programming Interface Delegate Project
RAPID Logo

CommandConfigCache Class Reference

Inheritance diagram for CommandConfigCache:
Collaboration diagram for CommandConfigCache:

List of all members.

Classes

class  CommandConfigHolder

Public Member Functions

void addConfigImpl (CommandConfig config)
void rapidEventReceived (Agent agent, MessageType type, IRapidMessage msg)

Static Public Member Functions

static CommandConfigHolder getSubscribedConfig (final Agent agent, final MessageType configType, Command data)
 Matches the serial number in Command message to the latest CommandConfig and returns it if true.
static CommandConfigHolder getConfig (final Agent agent, final MessageType configType)
static synchronized void createCache (final Agent agent, MessageType configType)
static void addConfig (Agent agent, MessageType configType, CommandConfig config)
 Manually add Config to cache.
static void addConfig (String agentName, MessageType configType, CommandConfig config)

Protected Member Functions

CommandConfigHolder getLatestConfig ()
CommandConfigHolder getLatestMatchingConfig (Header hdr)

Package Attributes

ArrayList< CommandConfigHolderhistory = new ArrayList<CommandConfigHolder>()

Member Function Documentation

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

Used for client Configs.

Parameters:
agent
configType
config

Here is the call graph for this function:

static void addConfig ( String  agentName,
MessageType  configType,
CommandConfig  config 
) [static]

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

CommandConfigHolder getLatestConfig ( ) [protected]
CommandConfigHolder getLatestMatchingConfig ( Header  hdr) [protected]
static CommandConfigHolder getSubscribedConfig ( final Agent  agent,
final MessageType  configType,
Command  data 
) [static]

If false, null is returned

TODO: match against history of CommandConfig messages

If the client would like to subscribe to the Config message to receive the initial Command message, the following should be done at the calling class:

CommandConfig.getSubscribedConfig(agent, new Command());

This will return null, but the CommandConfig has been registered to listen for events.

Parameters:
agent
configType
data
  • should never be null
Returns:
CommandConfigHolder
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<CommandConfigHolder> history = new ArrayList<CommandConfigHolder>() [package]

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