Public Member Functions | Protected Member Functions | Private Attributes
industrial::typed_message::TypedMessage Class Reference

Message interface for typed messages built from SimpleMessage. More...

#include <typed_message.h>

Inheritance diagram for industrial::typed_message::TypedMessage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int getMessageType () const
 gets message type (enumeration)
virtual bool init (industrial::simple_message::SimpleMessage &msg)=0
 Initializes message from a simple message.
virtual void init ()=0
 Initializes a new empty message.
virtual bool toReply (industrial::simple_message::SimpleMessage &msg, industrial::simple_message::ReplyType reply)
 creates a simple_message reply
virtual bool toRequest (industrial::simple_message::SimpleMessage &msg)
 creates a simple_message request
virtual bool toTopic (industrial::simple_message::SimpleMessage &msg)
 creates a simple_message topic

Protected Member Functions

void setMessageType (int message_type=industrial::simple_message::StandardMsgTypes::INVALID)
 sets message type

Private Attributes

int message_type_
 Message type expected by callback.

Detailed Description

Message interface for typed messages built from SimpleMessage.

This is an interface for a helper class that when implemented is used to create simple messages of the various types (i.e. as defined by the message type enumeration). It also has constructors and initializers that can be used to create a typed message from a simple message.

If the typed message does not support a particular simple message type the "to" method should be overridden to return false. For exmaple, a ping message cannot be a topic, it is always expected to be a request/ reply. A joint trajectory point on the other hand may either be a topic (i.e. asynchronously sent) or a request/reply (i.e. syncrounously sent)

Classes that implement this interface shall include data members for the data payload of the typed message.

Deprecated:
The base function implementations in the class will be removed in a later release. This will force classes that inherit from this class to implement them.

THIS CLASS IS NOT THREAD-SAFE

Definition at line 74 of file typed_message.h.


Member Function Documentation

gets message type (enumeration)

Returns:
message type

Definition at line 137 of file typed_message.h.

virtual void industrial::typed_message::TypedMessage::init ( ) [pure virtual]

sets message type

Returns:
message type

Definition at line 149 of file typed_message.h.

creates a simple_message reply

Returns:
true if message successfully initialized, otherwise false

Definition at line 110 of file typed_message.h.

creates a simple_message request

Returns:
true if message successfully initialized, otherwise false

Definition at line 96 of file typed_message.h.

creates a simple_message topic

Returns:
true if message successfully initialized, otherwise false

Reimplemented in industrial::ping_message::PingMessage.

Definition at line 124 of file typed_message.h.


Member Data Documentation

Message type expected by callback.

Definition at line 160 of file typed_message.h.


The documentation for this class was generated from the following file:


simple_message
Author(s): Shaun Edwards
autogenerated on Sat Jun 8 2019 20:43:24