The Robot Application Programming Interface Delegate Project
RAPID Logo

MessageType Class Reference

MessageType encapsulates all information required to publish/subscribe data Implements an interface very similar to Enum.

Inheritance diagram for MessageType:
Collaboration diagram for MessageType:

List of all members.

Public Member Functions

boolean equals (Object o)
int ordinal ()
 analogous to Enum.ordinal() May be used in switch statements
int compareTo (MessageType other)
 compare based on ordinal
MessageType getMessageType (String name)
String getTopic ()
void setTopic (String topic)
String getQosLibrary ()
void setQosLibrary (String qosLibrary)
String getQosProfile ()
void setQosProfile (String qosProfile)
String toString ()
String name ()
String getName ()
Class getDataTypeClass ()
Copyable getDataTypeInstance ()
IRapidMessageFactory getFactory ()
Class getDataTypeSupportClass ()

Static Public Member Functions

static MessageType add (String name, Class dataType, Class<?extends TypeSupportHelper > typeSupport, String topic, String qosLibrary, String qosProfile, IRapidMessageFactory factory) throws MessageTypeExistsException
static MessageType get (String name)
static MessageType valueOf (String name) throws IllegalArgumentException
static boolean remove (String name)
static boolean contains (String name)
static Set< String > getNames ()
static Collection< MessageTypegetMessageTypes ()
static List< MessageTypevalues ()
static MessageType[] valuesArray ()
static MessageType getTypeFromTopic (String topic)

Static Public Attributes

static final String RAPID_QOS_LIBRARY = "RapidQoSLibrary"
static final String RAPID_DEFAULT_QOS = "RapidDefaultQoS"
static final String RAPID_BEST_EFFORT_QOS = "RapidBestEffortQoS"
static final String RAPID_RELIABLE_QOS = "RapidReliableQoS"
static final String RAPID_RELIABLE_DURABLE_QOS = "RapidReliableDurableQoS"
static final String RAPID_IMAGESENSOR_SAMPLE_QOS = "RapidImageSensorSampleProfile"
static final String ACCESSCONTROL_STATE = "AccessControlState"
static final String ACK = "Ack"
static final String ASSET_CONFIG = "AssetConfig"
static final String ASSET_STATE = "AssetState"
static final String COMMAND = "Command"
static final String COMMAND_CONFIG = "CommandConfig"
static final String FRAMESTORE_CONFIG = "FrameStoreConfig"
static final String FILEANNOUNCE = "FileAnnounce"
static final String FILEQUEUE_SAMPLE = "FileQueuSample"
static final String FILEQUEUE_CONFIG = "FileQueueConfig"
static final String IMAGESENSOR_SAMPLE = "ImageSensorSample"
static final String IMAGESENSOR_STATE = "ImageSensorState"
static final String JOINT_CONFIG = "JointConfig"
static final String JOINT_SAMPLE = "JointSample"
static final String MACRO_CONFIG = "MacroConfig"
static final String POINTCLOUD_CONFIG = "PointCloudConfig"
static final String POINTCLOUD_SAMPLE = "PointCloudSample"
static final String POSITION_CONFIG = "PositionConfig"
static final String POSITION_SAMPLE = "PositionSample"
static final String QUEUE_STATE = "QueueState"
static final String SPHERES_ECHO = "SpheresEcho"
static final String SUBSYSTEM_STATE = "SubsystemState"
static final String TEXTMESSAGE = "TextMessage"
static MessageType ACCESSCONTROL_STATE_TYPE = new MessageType(ACCESSCONTROL_STATE, AccessControlState.class, RapidAccessControlStateTypeSupport.class, ACCESSCONTROL_STATE_TOPIC.VALUE,RAPID_QOS_LIBRARY,RAPID_DEFAULT_QOS, new RapidAccessControlStateFactory())
static MessageType ACK_TYPE = new MessageType(ACK, Ack.class, RapidAckMessageTypeSupport.class, ACK_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidAckFactory())
static MessageType ASSET_CONFIG_TYPE = new MessageType(ASSET_CONFIG, AssetConfig.class, RapidAssetConfigTypeSupport.class, ASSET_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidAssetConfigFactory())
static MessageType ASSET_STATE_TYPE = new MessageType(ASSET_STATE, AssetState.class, RapidAssetStateTypeSupport.class, ASSET_STATE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_DEFAULT_QOS, new RapidAssetStateFactory())
static MessageType COMMAND_TYPE = new MessageType(COMMAND, Command.class, RapidCommandTypeSupport.class, COMMAND_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_DEFAULT_QOS, new RapidCommandFactory(COMMAND_CONFIG))
static MessageType COMMAND_CONFIG_TYPE = new MessageType(COMMAND_CONFIG, CommandConfig.class, RapidCommandConfigTypeSupport.class, COMMAND_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidCommandConfigFactory())
static MessageType FILEANNOUNCE_TYPE = new MessageType(FILEANNOUNCE, FileAnnounce.class, RapidFileAnnounceTypeSupport.class, FILEANNOUNCE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidFileAnnounceFactory())
static MessageType FILEQUEUE_SAMPLE_TYPE = new MessageType(FILEQUEUE_SAMPLE, FileQueueSample.class, RapidFileQueueSampleTypeSupport.class, FILEQUEUE_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidFileQueueSampleFactory())
static MessageType FILEQUEUE_CONFIG_TYPE = new MessageType(FILEQUEUE_CONFIG, FileQueueConfig.class, RapidFileQueueConfigTypeSupport.class, FILEQUEUE_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidFileQueueConfigFactory())
static MessageType FRAMESTORE_CONFIG_TYPE = new MessageType(FRAMESTORE_CONFIG, FrameStoreConfig.class, RapidFrameStoreConfigTypeSupport.class, FRAMESTORE_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidFrameStoreConfigFactory())
static MessageType IMAGESENSOR_SAMPLE_TYPE = new MessageType(IMAGESENSOR_SAMPLE, ImageSensorSample.class, RapidImageSensorSampleTypeSupport.class, IMAGESENSOR_SAMPLE_TOPIC.VALUE,RAPID_QOS_LIBRARY, RAPID_IMAGESENSOR_SAMPLE_QOS, new RapidImageSensorSampleFactory())
static MessageType IMAGESENSOR_STATE_TYPE = new MessageType(IMAGESENSOR_STATE, ImageSensorState.class, RapidImageSensorStateTypeSupport.class, IMAGESENSOR_STATE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_IMAGESENSOR_SAMPLE_QOS, new RapidImageSensorStateFactory())
static MessageType JOINT_CONFIG_TYPE = new MessageType(JOINT_CONFIG, JointConfig.class, RapidJointConfigTypeSupport.class, JOINT_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidJointConfigFactory())
static MessageType JOINT_SAMPLE_TYPE = new MessageType(JOINT_SAMPLE, JointSample.class, RapidJointSampleTypeSupport.class, JOINT_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_BEST_EFFORT_QOS, new RapidJointSampleFactory(JOINT_CONFIG))
static MessageType POINTCLOUD_CONFIG_TYPE = new MessageType(POINTCLOUD_CONFIG, PointCloudConfig.class, RapidPointCloudConfigTypeSupport.class, POINTCLOUD_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidPointCloudConfigFactory())
static MessageType POINTCLOUD_SAMPLE_TYPE = new MessageType(POINTCLOUD_SAMPLE, PointCloudSample.class, RapidPointCloudSampleTypeSupport.class, POINTCLOUD_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_BEST_EFFORT_QOS, new RapidPointCloudSampleFactory(POINTCLOUD_CONFIG))
static MessageType POSITION_CONFIG_TYPE = new MessageType(POSITION_CONFIG, PositionConfig.class, RapidPositionConfigTypeSupport.class, POSITION_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_DURABLE_QOS, new RapidPositionConfigFactory())
static MessageType POSITION_SAMPLE_TYPE = new MessageType(POSITION_SAMPLE, PositionSample.class, RapidPositionSampleTypeSupport.class, POSITION_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_BEST_EFFORT_QOS, new RapidPositionSampleFactory(POSITION_CONFIG))
static MessageType QUEUE_STATE_TYPE = new MessageType(QUEUE_STATE, QueueState.class, RapidQueueStateTypeSupport.class, QUEUE_STATE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_BEST_EFFORT_QOS, new RapidQueueStateFactory())
static MessageType TEXTMESSAGE_TYPE = new MessageType(TEXTMESSAGE, TextMessage.class, RapidTextMessageTypeSupport.class, TEXTMESSAGE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidTextMessageFactory())
static MessageType LOCAL_POINTCLOUD_CONFIG_TYPE = new MessageType("LocalPointCloudConfig", PointCloudConfig.class, RapidPointCloudConfigTypeSupport.class, POINTCLOUD_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, "RapidLocalReliableDurableQoS", new RapidPointCloudConfigFactory())
static MessageType LOCAL_POINTCLOUD_SAMPLE_TYPE = new MessageType("LocalPointCloudSample", PointCloudSample.class, RapidPointCloudSampleTypeSupport.class, POINTCLOUD_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, "RapidLocalBestEffortQoS", new RapidPointCloudSampleFactory("LocalPointCloudConfig"))

Protected Member Functions

 MessageType (String name, Class dataType, Class<?extends TypeSupportHelper > typeSupport, String topic, String qosLibrary, String qosProfile, IRapidMessageFactory factory)
 Default RAPID message types are available, and custom types can be created simply by calling the MessageType constructor.

Protected Attributes

final String name
final Class dataType
final Class typeSupport
String topic
String qosLibrary
String qosProfile
final IRapidMessageFactory factory

Constructor & Destructor Documentation

MessageType ( String  name,
Class  dataType,
Class<?extends TypeSupportHelper typeSupport,
String  topic,
String  qosLibrary,
String  qosProfile,
IRapidMessageFactory  factory 
) [protected]

The new type will be inserted into the type map automatically.

Parameters:
namesymbolic name of the MessageType
dataTypemessage payload data type
typeSupport
topicpub/sub topic
qosLibraryQoS Library
qosProfileQoS profile used by type
factoryclass that will generate IRapidMessage helper objects to carry payload to listeners

Here is the call graph for this function:


Member Function Documentation

static MessageType add ( String  name,
Class  dataType,
Class<?extends TypeSupportHelper typeSupport,
String  topic,
String  qosLibrary,
String  qosProfile,
IRapidMessageFactory  factory 
) throws MessageTypeExistsException [static]

Here is the call graph for this function:

int compareTo ( MessageType  other)
static boolean contains ( String  name) [static]
boolean equals ( Object  o)
static MessageType get ( String  name) [static]
Class getDataTypeClass ( )
Copyable getDataTypeInstance ( )
Class getDataTypeSupportClass ( )
IRapidMessageFactory getFactory ( )
MessageType getMessageType ( String  name)
static Collection<MessageType> getMessageTypes ( ) [static]
Returns:
an unsorted list of the MessageTypes
Deprecated:
Use MessageType.values().
String getName ( )
Deprecated:
Use Enum-like name() instead.
static Set<String> getNames ( ) [static]
Returns:
an unsorted set of MessageType names
Deprecated:
Use MessageType.values().
String getQosLibrary ( )
String getQosProfile ( )
String getTopic ( )
static MessageType getTypeFromTopic ( String  topic) [static]
String name ( )
int ordinal ( )
static boolean remove ( String  name) [static]

Here is the call graph for this function:

void setQosLibrary ( String  qosLibrary)
void setQosProfile ( String  qosProfile)
void setTopic ( String  topic)
String toString ( )
static MessageType valueOf ( String  name) throws IllegalArgumentException [static]

Here is the call graph for this function:

static List<MessageType> values ( ) [static]
Returns:
a sorted list (by ordinal) of the MessageTypes
static MessageType [] valuesArray ( ) [static]

Member Data Documentation

final String ACCESSCONTROL_STATE = "AccessControlState" [static]
final String ACK = "Ack" [static]
MessageType ACK_TYPE = new MessageType(ACK, Ack.class, RapidAckMessageTypeSupport.class, ACK_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidAckFactory()) [static]
final String ASSET_CONFIG = "AssetConfig" [static]
final String ASSET_STATE = "AssetState" [static]
MessageType ASSET_STATE_TYPE = new MessageType(ASSET_STATE, AssetState.class, RapidAssetStateTypeSupport.class, ASSET_STATE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_DEFAULT_QOS, new RapidAssetStateFactory()) [static]
final String COMMAND = "Command" [static]
final String COMMAND_CONFIG = "CommandConfig" [static]
final Class dataType [protected]
final IRapidMessageFactory factory [protected]
final String FILEANNOUNCE = "FileAnnounce" [static]
MessageType FILEANNOUNCE_TYPE = new MessageType(FILEANNOUNCE, FileAnnounce.class, RapidFileAnnounceTypeSupport.class, FILEANNOUNCE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidFileAnnounceFactory()) [static]
final String FILEQUEUE_CONFIG = "FileQueueConfig" [static]
final String FILEQUEUE_SAMPLE = "FileQueuSample" [static]
final String FRAMESTORE_CONFIG = "FrameStoreConfig" [static]
final String IMAGESENSOR_SAMPLE = "ImageSensorSample" [static]
final String IMAGESENSOR_STATE = "ImageSensorState" [static]
final String JOINT_CONFIG = "JointConfig" [static]
final String JOINT_SAMPLE = "JointSample" [static]
MessageType LOCAL_POINTCLOUD_CONFIG_TYPE = new MessageType("LocalPointCloudConfig", PointCloudConfig.class, RapidPointCloudConfigTypeSupport.class, POINTCLOUD_CONFIG_TOPIC.VALUE, RAPID_QOS_LIBRARY, "RapidLocalReliableDurableQoS", new RapidPointCloudConfigFactory()) [static]
MessageType LOCAL_POINTCLOUD_SAMPLE_TYPE = new MessageType("LocalPointCloudSample", PointCloudSample.class, RapidPointCloudSampleTypeSupport.class, POINTCLOUD_SAMPLE_TOPIC.VALUE, RAPID_QOS_LIBRARY, "RapidLocalBestEffortQoS", new RapidPointCloudSampleFactory("LocalPointCloudConfig")) [static]
final String MACRO_CONFIG = "MacroConfig" [static]
final String name [protected]
final String POINTCLOUD_CONFIG = "PointCloudConfig" [static]
final String POINTCLOUD_SAMPLE = "PointCloudSample" [static]
final String POSITION_CONFIG = "PositionConfig" [static]
final String POSITION_SAMPLE = "PositionSample" [static]
String qosLibrary [protected]
String qosProfile [protected]
final String QUEUE_STATE = "QueueState" [static]
final String RAPID_BEST_EFFORT_QOS = "RapidBestEffortQoS" [static]
final String RAPID_DEFAULT_QOS = "RapidDefaultQoS" [static]
final String RAPID_IMAGESENSOR_SAMPLE_QOS = "RapidImageSensorSampleProfile" [static]
final String RAPID_QOS_LIBRARY = "RapidQoSLibrary" [static]
final String RAPID_RELIABLE_DURABLE_QOS = "RapidReliableDurableQoS" [static]
final String RAPID_RELIABLE_QOS = "RapidReliableQoS" [static]
final String SPHERES_ECHO = "SpheresEcho" [static]
final String SUBSYSTEM_STATE = "SubsystemState" [static]
final String TEXTMESSAGE = "TextMessage" [static]
MessageType TEXTMESSAGE_TYPE = new MessageType(TEXTMESSAGE, TextMessage.class, RapidTextMessageTypeSupport.class, TEXTMESSAGE_TOPIC.VALUE, RAPID_QOS_LIBRARY, RAPID_RELIABLE_QOS, new RapidTextMessageFactory()) [static]
String topic [protected]
final Class typeSupport [protected]

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