// OculusMsgMsg.cs
//Do not edit! This file was generated by Unity-ROS MessageGeneration.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Unity.Robotics.ROSTCPConnector.MessageGeneration;
namespace RosMessageTypes.CppPubsub
{
[Serializable]
public class OculusMsgMsg : Message
{
public const string k_RosMessageName = "cpp_pubsub/OculusMsg";
public override string RosMessageName => k_RosMessageName;
public float[] head_euler;
public float[] head_position;
public float[] hmd_position;
public float[] l_controller_rotation;
public float[] r_controller_rotation;
public float[] l_controller_position;
public float[] r_controller_position;
public sbyte a_button;
public sbyte b_button;
public sbyte x_button;
public sbyte y_button;
public float l_triger;
public float r_triger;
public float[] l_stick;
public float[] r_stick;
public OculusMsgMsg()
{
this.head_euler = new float[0];
this.head_position = new float[0];
this.hmd_position = new float[0];
this.l_controller_rotation = new float[0];
this.r_controller_rotation = new float[0];
this.l_controller_position = new float[0];
this.r_controller_position = new float[0];
this.a_button = 0;
this.b_button = 0;
this.x_button = 0;
this.y_button = 0;
this.l_triger = 0.0f;
this.r_triger = 0.0f;
this.l_stick = new float[0];
this.r_stick = new float[0];
}
public OculusMsgMsg(float[] head_euler, float[] head_position, float[] hmd_position, float[] l_controller_rotation, float[] r_controller_rotation, float[] l_controller_position, float[] r_controller_position, sbyte a_button, sbyte b_button, sbyte x_button, sbyte y_button, float l_triger, float r_triger, float[] l_stick, float[] r_stick)
{
this.head_euler = head_euler;
this.head_position = head_position;
this.hmd_position = hmd_position;
this.l_controller_rotation = l_controller_rotation;
this.r_controller_rotation = r_controller_rotation;
this.l_controller_position = l_controller_position;
this.r_controller_position = r_controller_position;
this.a_button = a_button;
this.b_button = b_button;
this.x_button = x_button;
this.y_button = y_button;
this.l_triger = l_triger;
this.r_triger = r_triger;
this.l_stick = l_stick;
this.r_stick = r_stick;
}
public static OculusMsgMsg Deserialize(MessageDeserializer deserializer) => new OculusMsgMsg(deserializer);
private OculusMsgMsg(MessageDeserializer deserializer)
{
deserializer.Read(out this.head_euler, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.head_position, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.hmd_position, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.l_controller_rotation, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.r_controller_rotation, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.l_controller_position, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.r_controller_position, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.a_button);
deserializer.Read(out this.b_button);
deserializer.Read(out this.x_button);
deserializer.Read(out this.y_button);
deserializer.Read(out this.l_triger);
deserializer.Read(out this.r_triger);
deserializer.Read(out this.l_stick, sizeof(float), deserializer.ReadLength());
deserializer.Read(out this.r_stick, sizeof(float), deserializer.ReadLength());
}
public override void SerializeTo(MessageSerializer serializer)
{
serializer.WriteLength(this.head_euler);
serializer.Write(this.head_euler);
serializer.WriteLength(this.head_position);
serializer.Write(this.head_position);
serializer.WriteLength(this.hmd_position);
serializer.Write(this.hmd_position);
serializer.WriteLength(this.l_controller_rotation);
serializer.Write(this.l_controller_rotation);
serializer.WriteLength(this.r_controller_rotation);
serializer.Write(this.r_controller_rotation);
serializer.WriteLength(this.l_controller_position);
serializer.Write(this.l_controller_position);
serializer.WriteLength(this.r_controller_position);
serializer.Write(this.r_controller_position);
serializer.Write(this.a_button);
serializer.Write(this.b_button);
serializer.Write(this.x_button);
serializer.Write(this.y_button);
serializer.Write(this.l_triger);
serializer.Write(this.r_triger);
serializer.WriteLength(this.l_stick);
serializer.Write(this.l_stick);
serializer.WriteLength(this.r_stick);
serializer.Write(this.r_stick);
}
public override string ToString()
{
return "OculusMsgMsg: " +
"\nhead_euler: " + System.String.Join(", ", head_euler.ToList()) +
"\nhead_position: " + System.String.Join(", ", head_position.ToList()) +
"\nhmd_position: " + System.String.Join(", ", hmd_position.ToList()) +
"\nl_controller_rotation: " + System.String.Join(", ", l_controller_rotation.ToList()) +
"\nr_controller_rotation: " + System.String.Join(", ", r_controller_rotation.ToList()) +
"\nl_controller_position: " + System.String.Join(", ", l_controller_position.ToList()) +
"\nr_controller_position: " + System.String.Join(", ", r_controller_position.ToList()) +
"\na_button: " + a_button.ToString() +
"\nb_button: " + b_button.ToString() +
"\nx_button: " + x_button.ToString() +
"\ny_button: " + y_button.ToString() +
"\nl_triger: " + l_triger.ToString() +
"\nr_triger: " + r_triger.ToString() +
"\nl_stick: " + System.String.Join(", ", l_stick.ToList()) +
"\nr_stick: " + System.String.Join(", ", r_stick.ToList());
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod]
#endif
public static void Register()
{
MessageRegistry.Register(k_RosMessageName, Deserialize);
}
}
}