Class JoyFeedbackMsg
ROS sensor_msgs/JoyFeedback message.
Implements
Inherited Members
Namespace: Unity.SimulationPro.Foundation.SensorMessages
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
[Serializable]
public class JoyFeedbackMsg : IMessage
Constructors
JoyFeedbackMsg()
Initializes a new instance with default values.
Declaration
public JoyFeedbackMsg()
JoyFeedbackMsg(byte, byte, float)
Initializes a new instance with default values.
Declaration
public JoyFeedbackMsg(byte type, byte id, float intensity)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | type | Integer type code specifying the variant or category. |
| byte | id | Unique integer identifier. |
| float | intensity | Measured intensity value. |
Fields
TYPE_BUZZER
Constant value for TYPE_BUZZER.
Declaration
public const byte TYPE_BUZZER = 2
Field Value
| Type | Description |
|---|---|
| byte |
TYPE_LED
Declare of the type of feedback
Declaration
public const byte TYPE_LED = 0
Field Value
| Type | Description |
|---|---|
| byte |
TYPE_RUMBLE
Constant value for TYPE_RUMBLE.
Declaration
public const byte TYPE_RUMBLE = 1
Field Value
| Type | Description |
|---|---|
| byte |
id
This will hold an id number for each type of each feedback. Example, the first led would be id=0, the second would be id=1
Declaration
public byte id
Field Value
| Type | Description |
|---|---|
| byte |
intensity
Intensity of the feedback, from 0.0 to 1.0, inclusive. If device is actually binary, driver should treat 0<=x<0.5 as off, 0.5<=x<=1 as on.
Declaration
public float intensity
Field Value
| Type | Description |
|---|---|
| float |
k_MessageTypeId
Identifier for this message type.
Declaration
public static readonly MessageTypeId k_MessageTypeId
Field Value
| Type | Description |
|---|---|
| MessageTypeId |
k_MessageTypeName
The ROS message type name string used for serialization and topic matching.
Declaration
public const string k_MessageTypeName = "sensor_msgs/JoyFeedback"
Field Value
| Type | Description |
|---|---|
| string |
type
Type field.
Declaration
public byte type
Field Value
| Type | Description |
|---|---|
| byte |
Properties
MessageTypeId
Gets the unique runtime identifier for this message type.
Declaration
public MessageTypeId MessageTypeId { get; }
Property Value
| Type | Description |
|---|---|
| MessageTypeId |
MessageTypeName
Gets the ROS message type name for this message.
Declaration
public string MessageTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(IMessageDeserializer)
Deserializes a JoyFeedbackMsg from the given deserializer.
Declaration
public static JoyFeedbackMsg Deserialize(IMessageDeserializer deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageDeserializer | deserializer | The deserializer. |
Returns
| Type | Description |
|---|---|
| JoyFeedbackMsg | A new JoyFeedbackMsg instance. |
Register()
Registers this message type with the MessageTypeRegistry.
Declaration
[InitializeOnLoadMethod]
public static void Register()
ToString()
Returns a human-readable string representation of this message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of this instance. |
Overrides
WriteTo(IMessageSerializer)
Serializes this message to the given serializer.
Declaration
public void WriteTo(IMessageSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageSerializer | serializer | The serializer. |