Loading files
68c592872This file is pinned to the selected release. Download the original to open it in your design tool.
//Do not edit! This file was generated by com.unity.simulationpro MessageGeneration.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Unity.SimulationPro.Foundation;
namespace Unity.SimulationPro.Foundation.MoveitMessages
{
[Serializable]
public class AllowedCollisionMatrixMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/AllowedCollisionMatrix";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// The list of entry names in the matrix
public string[] entry_names;
// The individual entries in the allowed collision matrix
// square, symmetric, with same order as entry_names
public AllowedCollisionEntryMsg[] entry_values;
// In addition to the collision matrix itself, we also have
// the default entry value for each entry name.
// If the allowed collision flag is queried for a pair of names (n1, n2)
// that is not found in the collision matrix itself, the value of
// the collision flag is considered to be that of the entry (n1 or n2)
// specified in the list below. If both n1 and n2 are found in the list
// of defaults, the result is computed with an AND operation
public string[] default_entry_names;
public bool[] default_entry_values;
public AllowedCollisionMatrixMsg()
{
this.entry_names = new string[0];
this.entry_values = new AllowedCollisionEntryMsg[0];
this.default_entry_names = new string[0];
this.default_entry_values = new bool[0];
}
public AllowedCollisionMatrixMsg(string[] entry_names, AllowedCollisionEntryMsg[] entry_values, string[] default_entry_names, bool[] default_entry_values)
{
this.entry_names = entry_names;
this.entry_values = entry_values;
this.default_entry_names = default_entry_names;
this.default_entry_values = default_entry_values;
}
static string[] s_FieldNames = { "entry_names", "entry_values", "default_entry_names",
"default_entry_values" };
public static AllowedCollisionMatrixMsg Deserialize(IMessageDeserializer deserializer) => new AllowedCollisionMatrixMsg(deserializer);
private AllowedCollisionMatrixMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.entry_names);
deserializer.Read(out this.entry_values);
deserializer.Read(out this.default_entry_names);
deserializer.Read(out this.default_entry_values);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.entry_names);
serializer.Write(this.entry_values);
serializer.Write(this.default_entry_names);
serializer.Write(this.default_entry_values);
serializer.EndMessage();
}
public override string ToString()
{
return "AllowedCollisionMatrixMsg: " +
"\nentry_names: " + System.String.Join(", ", entry_names.ToList()) +
"\nentry_values: " + System.String.Join(", ", entry_values.ToList()) +
"\ndefault_entry_names: " + System.String.Join(", ", default_entry_names.ToList()) +
"\ndefault_entry_values: " + System.String.Join(", ", default_entry_values.ToList());
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}