Main Content

definition

Retrieve definition of ROS message type

Since R2019b

Description

example

def = definition(msg) returns the ROS definition of the message type associated with the message object, msg. The details of the message definition include the structure, property data types, and comments from the authors of that specific message.

Examples

collapse all

Create a Point Message.

point = rosmessage('geometry_msgs/Point');

Access the definition.

def = definition(point)
def = 
    '% This contains the position of a point in free space
     double X
     double Y
     double Z
     '

Input Arguments

collapse all

ROS message, specified as a Message object handle. This message can be created using the rosmessage function.

Output Arguments

collapse all

Details of the information inside the ROS message definition, returned as a character vector.

Version History

Introduced in R2019b

See Also

|