Package rospy :: Module msg :: Class AnyMsg

Class AnyMsg

            object --+    
                     |    
roslib.message.Message --+
                         |
                        AnyMsg

Message class to use for subscribing to any topic regardless of type. Incoming messages are not deserialized. Instead, the raw serialized data can be accssed via the buff property.

This class is meant to be used by advanced users only.

Instance Methods
 
__eq__(self, other) (Inherited from roslib.message.Message)
 
__getstate__(self)
support for Python pickling (Inherited from roslib.message.Message)
 
__init__(self, *args)
Constructor.
 
__repr__(self)
repr(x) (Inherited from roslib.message.Message)
 
__setstate__(self, state)
support for Python pickling (Inherited from roslib.message.Message)
 
__str__(self)
str(x) (Inherited from roslib.message.Message)
 
deserialize(self, str)
Copies raw buffer into self._buff
 
serialize(self, buff)
AnyMsg provides an implementation so that a node can forward messages w/o (de)serialization

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, *args)
(Constructor)

 

Constructor. Does not accept any arguments.

Overrides: object.__init__

deserialize(self, str)

 

Copies raw buffer into self._buff

Parameters:
  • str - serialized data
Overrides: roslib.message.Message.deserialize

serialize(self, buff)

 

AnyMsg provides an implementation so that a node can forward messages w/o (de)serialization

Parameters:
  • buff - buffer
Overrides: roslib.message.Message.serialize