rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.msg.AnyMsg Class Reference

Stand-in for `rospy.AnyMsg`. More...

Inheritance diagram for rosros.rospify.msg.AnyMsg:
Inheritance graph

Public Member Functions

 __init__ (self, *args)
 Constructor.
 
 __subclasshook__ (cls, C)
 Returns true if C is AnyMsg or descendant, else `NotImplemented`.
 
 deserialize (self, str)
 Copies raw buffer into self._buff, returns self.
 
 serialize (self, buff)
 AnyMsg provides an implementation so that a node can forward messages w/o (de)serialization.
 
 __subclasshook__ (cls, C)
 Returns true if C is a ROS2 message class, else `NotImplemented`.
 

Protected Attributes

 _buff
 

Static Protected Attributes

str _full_text
 
bool _has_header
 
str _md5sum
 
str _type
 

Detailed Description

Stand-in for `rospy.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 accessed via the buff property.

Caveat in ROS2: subscription will be made with the first available published type on this topic, creation will fail if no publisher is available. Will not provide messages of different types.

Definition at line 34 of file msg.py.

Constructor & Destructor Documentation

◆ __init__()

rosros.rospify.msg.AnyMsg.__init__ (   self,
args 
)

Constructor.

Does not accept any arguments.

Definition at line 56 of file msg.py.

Member Function Documentation

◆ __subclasshook__()

rosros.rospify.msg.AnyMsg.__subclasshook__ (   cls,
  C 
)

Returns true if C is AnyMsg or descendant, else `NotImplemented`.

Reimplemented from rosros.rospify.topics.Message.

Definition at line 73 of file msg.py.

◆ deserialize()

rosros.rospify.msg.AnyMsg.deserialize (   self,
  str 
)

Copies raw buffer into self._buff, returns self.

Definition at line 67 of file msg.py.

◆ serialize()

rosros.rospify.msg.AnyMsg.serialize (   self,
  buff 
)

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

Definition at line 61 of file msg.py.

Member Data Documentation

◆ _buff

rosros.rospify.msg.AnyMsg._buff
protected

Definition at line 59 of file msg.py.

◆ _full_text

rosros.rospify.msg.AnyMsg._full_text
staticprotected

Definition at line 50 of file msg.py.

◆ _has_header

rosros.rospify.msg.AnyMsg._has_header
staticprotected

Definition at line 46 of file msg.py.

◆ _md5sum

rosros.rospify.msg.AnyMsg._md5sum
staticprotected

Definition at line 38 of file msg.py.

◆ _type

rosros.rospify.msg.AnyMsg._type
staticprotected

Definition at line 42 of file msg.py.


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