// Autogenerated C# message buffer code. // Source: clad/gateway/messageExternalToRobot.clad // Full command line: victor-clad/tools/message-buffers/emitters/CSharp_emitter.py -C src -I clad/src lib/util/source/anki/clad robot/clad/src coretech/vision/clad_src coretech/common/clad_src -o generated/cladCSharp clad/gateway/messageExternalToRobot.clad namespace Anki { namespace Vector { namespace Gateway { public partial class UiDeviceConnectionWrongVersion { private string _placeHolder; // string[uint_8] public string placeHolder { get { return _placeHolder; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("placeHolder string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _placeHolder = value; } } /**** Constructors ****/ public UiDeviceConnectionWrongVersion() { } public UiDeviceConnectionWrongVersion(string placeHolder) { this.placeHolder = placeHolder; } public UiDeviceConnectionWrongVersion(System.IO.Stream stream) { Unpack(stream); } public UiDeviceConnectionWrongVersion(System.IO.BinaryReader reader) { Unpack(reader); } public UiDeviceConnectionWrongVersion Initialize(string placeHolder) { this.placeHolder = placeHolder; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { int _placeHolder_length = (int)reader.ReadByte(); byte[] _placeHolder_bytes = reader.ReadBytes(_placeHolder_length); _placeHolder = System.Text.Encoding.UTF8.GetString(_placeHolder_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_placeHolder != null) { byte[] _placeHolder_bytes = System.Text.Encoding.UTF8.GetBytes(_placeHolder); writer.Write((byte)_placeHolder_bytes.Length); writer.Write(_placeHolder_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (placeHolder != null) { result += System.Text.Encoding.UTF8.GetByteCount(placeHolder); } return result; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(UiDeviceConnectionWrongVersion a, UiDeviceConnectionWrongVersion b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(UiDeviceConnectionWrongVersion a, UiDeviceConnectionWrongVersion b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as UiDeviceConnectionWrongVersion); } public bool Equals(UiDeviceConnectionWrongVersion p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._placeHolder.Equals(p._placeHolder); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class MoveHead { private float _speed_rad_per_sec; // float_32 public float speed_rad_per_sec { get { return _speed_rad_per_sec; } set { _speed_rad_per_sec = value; } } /**** Constructors ****/ public MoveHead() { } public MoveHead(float speed_rad_per_sec) { this.speed_rad_per_sec = speed_rad_per_sec; } public MoveHead(System.IO.Stream stream) { Unpack(stream); } public MoveHead(System.IO.BinaryReader reader) { Unpack(reader); } public MoveHead Initialize(float speed_rad_per_sec) { this.speed_rad_per_sec = speed_rad_per_sec; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _speed_rad_per_sec = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_speed_rad_per_sec); } public int Size { get { return 4; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(MoveHead a, MoveHead b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MoveHead a, MoveHead b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MoveHead); } public bool Equals(MoveHead p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed_rad_per_sec.Equals(p._speed_rad_per_sec); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed_rad_per_sec.GetHashCode(); return hash; } } } public partial class MoveLift { private float _speed_rad_per_sec; // float_32 public float speed_rad_per_sec { get { return _speed_rad_per_sec; } set { _speed_rad_per_sec = value; } } /**** Constructors ****/ public MoveLift() { } public MoveLift(float speed_rad_per_sec) { this.speed_rad_per_sec = speed_rad_per_sec; } public MoveLift(System.IO.Stream stream) { Unpack(stream); } public MoveLift(System.IO.BinaryReader reader) { Unpack(reader); } public MoveLift Initialize(float speed_rad_per_sec) { this.speed_rad_per_sec = speed_rad_per_sec; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _speed_rad_per_sec = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_speed_rad_per_sec); } public int Size { get { return 4; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(MoveLift a, MoveLift b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MoveLift a, MoveLift b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MoveLift); } public bool Equals(MoveLift p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed_rad_per_sec.Equals(p._speed_rad_per_sec); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed_rad_per_sec.GetHashCode(); return hash; } } } public partial class DriveArc { private float _speed; // float_32 private float _accel; // float_32 private short _curvatureRadius_mm; // int_16 public float speed { get { return _speed; } set { _speed = value; } } public float accel { get { return _accel; } set { _accel = value; } } public short curvatureRadius_mm { get { return _curvatureRadius_mm; } set { _curvatureRadius_mm = value; } } /**** Constructors ****/ public DriveArc() { } public DriveArc(float speed, float accel, short curvatureRadius_mm) { this.speed = speed; this.accel = accel; this.curvatureRadius_mm = curvatureRadius_mm; } public DriveArc(System.IO.Stream stream) { Unpack(stream); } public DriveArc(System.IO.BinaryReader reader) { Unpack(reader); } public DriveArc Initialize(float speed, float accel, short curvatureRadius_mm) { this.speed = speed; this.accel = accel; this.curvatureRadius_mm = curvatureRadius_mm; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _speed = reader.ReadSingle(); _accel = reader.ReadSingle(); _curvatureRadius_mm = reader.ReadInt16(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_speed); writer.Write((float)_accel); writer.Write((short)_curvatureRadius_mm); } public int Size { get { return 10; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DriveArc a, DriveArc b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DriveArc a, DriveArc b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DriveArc); } public bool Equals(DriveArc p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed.Equals(p._speed) && this._accel.Equals(p._accel) && this._curvatureRadius_mm.Equals(p._curvatureRadius_mm); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed.GetHashCode(); hash = hash * 23 + this._accel.GetHashCode(); hash = hash * 23 + this._curvatureRadius_mm.GetHashCode(); return hash; } } } public partial class DisplayFaceImageRGBChunk { private ushort[] _faceData; // uint_16[600] private ushort _numPixels; // uint_16 private byte _chunkIndex; // uint_8 private byte _numChunks; // uint_8 private uint _duration_ms; // uint_32 private bool _interruptRunning; // bool public ushort[] faceData { get { return _faceData; } set { if (value == null) { throw new System.ArgumentException("faceData fixed-length array is null. Must have a length of 600.", "value"); } if (value.Length != 600) { throw new System.ArgumentException("faceData fixed-length array is the wrong size. Must have a length of 600.", "value"); } _faceData = value; } } public ushort numPixels { get { return _numPixels; } set { _numPixels = value; } } public byte chunkIndex { get { return _chunkIndex; } set { _chunkIndex = value; } } public byte numChunks { get { return _numChunks; } set { _numChunks = value; } } public uint duration_ms { get { return _duration_ms; } set { _duration_ms = value; } } public bool interruptRunning { get { return _interruptRunning; } set { _interruptRunning = value; } } /**** Constructors ****/ public DisplayFaceImageRGBChunk() { this.faceData = new ushort[600]; } public DisplayFaceImageRGBChunk(ushort[] faceData, ushort numPixels, byte chunkIndex, byte numChunks, uint duration_ms, bool interruptRunning) { this.faceData = faceData; this.numPixels = numPixels; this.chunkIndex = chunkIndex; this.numChunks = numChunks; this.duration_ms = duration_ms; this.interruptRunning = interruptRunning; } public DisplayFaceImageRGBChunk(System.IO.Stream stream) { Unpack(stream); } public DisplayFaceImageRGBChunk(System.IO.BinaryReader reader) { Unpack(reader); } public DisplayFaceImageRGBChunk Initialize(ushort[] faceData, ushort numPixels, byte chunkIndex, byte numChunks, uint duration_ms, bool interruptRunning) { this.faceData = faceData; this.numPixels = numPixels; this.chunkIndex = chunkIndex; this.numChunks = numChunks; this.duration_ms = duration_ms; this.interruptRunning = interruptRunning; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _faceData = new ushort[600]; for (int i = 0; i < 600; ++i) { _faceData[i] = reader.ReadUInt16(); } _numPixels = reader.ReadUInt16(); _chunkIndex = reader.ReadByte(); _numChunks = reader.ReadByte(); _duration_ms = reader.ReadUInt32(); _interruptRunning = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { for (int i = 0; i < 600; ++i) { writer.Write((ushort)_faceData[i]); } writer.Write((ushort)_numPixels); writer.Write((byte)_chunkIndex); writer.Write((byte)_numChunks); writer.Write((uint)_duration_ms); writer.Write((bool)_interruptRunning); } public int Size { get { return 1209; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DisplayFaceImageRGBChunk a, DisplayFaceImageRGBChunk b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DisplayFaceImageRGBChunk a, DisplayFaceImageRGBChunk b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DisplayFaceImageRGBChunk); } public bool Equals(DisplayFaceImageRGBChunk p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._faceData,p._faceData) && this._numPixels.Equals(p._numPixels) && this._chunkIndex.Equals(p._chunkIndex) && this._numChunks.Equals(p._numChunks) && this._duration_ms.Equals(p._duration_ms) && this._interruptRunning.Equals(p._interruptRunning); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._numPixels.GetHashCode(); hash = hash * 23 + this._chunkIndex.GetHashCode(); hash = hash * 23 + this._numChunks.GetHashCode(); hash = hash * 23 + this._duration_ms.GetHashCode(); hash = hash * 23 + this._interruptRunning.GetHashCode(); return hash; } } } public partial class RobotHistoryRequest { /**** Constructors ****/ public RobotHistoryRequest() { } public RobotHistoryRequest(System.IO.Stream stream) { Unpack(stream); } public RobotHistoryRequest(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class AppIntent { private string _intent; // string[uint_8] private string _param; // string[uint_8] public string intent { get { return _intent; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("intent string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _intent = value; } } public string param { get { return _param; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("param string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _param = value; } } /**** Constructors ****/ public AppIntent() { } public AppIntent(string intent, string param) { this.intent = intent; this.param = param; } public AppIntent(System.IO.Stream stream) { Unpack(stream); } public AppIntent(System.IO.BinaryReader reader) { Unpack(reader); } public AppIntent Initialize(string intent, string param) { this.intent = intent; this.param = param; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { int _intent_length = (int)reader.ReadByte(); byte[] _intent_bytes = reader.ReadBytes(_intent_length); _intent = System.Text.Encoding.UTF8.GetString(_intent_bytes); int _param_length = (int)reader.ReadByte(); byte[] _param_bytes = reader.ReadBytes(_param_length); _param = System.Text.Encoding.UTF8.GetString(_param_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_intent != null) { byte[] _intent_bytes = System.Text.Encoding.UTF8.GetBytes(_intent); writer.Write((byte)_intent_bytes.Length); writer.Write(_intent_bytes); } else { writer.Write((byte)0); } if (_param != null) { byte[] _param_bytes = System.Text.Encoding.UTF8.GetBytes(_param); writer.Write((byte)_param_bytes.Length); writer.Write(_param_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (intent != null) { result += System.Text.Encoding.UTF8.GetByteCount(intent); } result += 1; // uint_8 if (param != null) { result += System.Text.Encoding.UTF8.GetByteCount(param); } return result; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(AppIntent a, AppIntent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AppIntent a, AppIntent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AppIntent); } public bool Equals(AppIntent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._intent.Equals(p._intent) && this._param.Equals(p._param); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class CancelFaceEnrollment { /**** Constructors ****/ public CancelFaceEnrollment() { } public CancelFaceEnrollment(System.IO.Stream stream) { Unpack(stream); } public CancelFaceEnrollment(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class RequestEnrolledNames { /**** Constructors ****/ public RequestEnrolledNames() { } public RequestEnrolledNames(System.IO.Stream stream) { Unpack(stream); } public RequestEnrolledNames(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class UpdateEnrolledFaceByID { private int _faceID; // int_32 private string _oldName; // string[uint_8] private string _newName; // string[uint_8] public int faceID { get { return _faceID; } set { _faceID = value; } } public string oldName { get { return _oldName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("oldName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _oldName = value; } } public string newName { get { return _newName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("newName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _newName = value; } } /**** Constructors ****/ public UpdateEnrolledFaceByID() { } public UpdateEnrolledFaceByID(int faceID, string oldName, string newName) { this.faceID = faceID; this.oldName = oldName; this.newName = newName; } public UpdateEnrolledFaceByID(System.IO.Stream stream) { Unpack(stream); } public UpdateEnrolledFaceByID(System.IO.BinaryReader reader) { Unpack(reader); } public UpdateEnrolledFaceByID Initialize(int faceID, string oldName, string newName) { this.faceID = faceID; this.oldName = oldName; this.newName = newName; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _faceID = reader.ReadInt32(); int _oldName_length = (int)reader.ReadByte(); byte[] _oldName_bytes = reader.ReadBytes(_oldName_length); _oldName = System.Text.Encoding.UTF8.GetString(_oldName_bytes); int _newName_length = (int)reader.ReadByte(); byte[] _newName_bytes = reader.ReadBytes(_newName_length); _newName = System.Text.Encoding.UTF8.GetString(_newName_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_faceID); if (_oldName != null) { byte[] _oldName_bytes = System.Text.Encoding.UTF8.GetBytes(_oldName); writer.Write((byte)_oldName_bytes.Length); writer.Write(_oldName_bytes); } else { writer.Write((byte)0); } if (_newName != null) { byte[] _newName_bytes = System.Text.Encoding.UTF8.GetBytes(_newName); writer.Write((byte)_newName_bytes.Length); writer.Write(_newName_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 4; // int_32 result += 1; // uint_8 if (oldName != null) { result += System.Text.Encoding.UTF8.GetByteCount(oldName); } result += 1; // uint_8 if (newName != null) { result += System.Text.Encoding.UTF8.GetByteCount(newName); } return result; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(UpdateEnrolledFaceByID a, UpdateEnrolledFaceByID b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(UpdateEnrolledFaceByID a, UpdateEnrolledFaceByID b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as UpdateEnrolledFaceByID); } public bool Equals(UpdateEnrolledFaceByID p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._oldName.Equals(p._oldName) && this._newName.Equals(p._newName); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); return hash; } } } public partial class EraseEnrolledFaceByID { private int _faceID; // int_32 public int faceID { get { return _faceID; } set { _faceID = value; } } /**** Constructors ****/ public EraseEnrolledFaceByID() { } public EraseEnrolledFaceByID(int faceID) { this.faceID = faceID; } public EraseEnrolledFaceByID(System.IO.Stream stream) { Unpack(stream); } public EraseEnrolledFaceByID(System.IO.BinaryReader reader) { Unpack(reader); } public EraseEnrolledFaceByID Initialize(int faceID) { this.faceID = faceID; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _faceID = reader.ReadInt32(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_faceID); } public int Size { get { return 4; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(EraseEnrolledFaceByID a, EraseEnrolledFaceByID b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(EraseEnrolledFaceByID a, EraseEnrolledFaceByID b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as EraseEnrolledFaceByID); } public bool Equals(EraseEnrolledFaceByID p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); return hash; } } } public partial class EraseAllEnrolledFaces { /**** Constructors ****/ public EraseAllEnrolledFaces() { } public EraseAllEnrolledFaces(System.IO.Stream stream) { Unpack(stream); } public EraseAllEnrolledFaces(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class SetFaceToEnroll { private string _name; // string[uint_8] private int _observedID = 0; // int_32 private int _saveID = 0; // int_32 private bool _saveToRobot = true; // bool private bool _sayName = false; // bool private bool _useMusic = false; // bool public string name { get { return _name; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("name string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _name = value; } } public int observedID { get { return _observedID; } set { _observedID = value; } } public int saveID { get { return _saveID; } set { _saveID = value; } } public bool saveToRobot { get { return _saveToRobot; } set { _saveToRobot = value; } } public bool sayName { get { return _sayName; } set { _sayName = value; } } public bool useMusic { get { return _useMusic; } set { _useMusic = value; } } /**** Constructors ****/ public SetFaceToEnroll() { } public SetFaceToEnroll(string name, int observedID, int saveID, bool saveToRobot, bool sayName, bool useMusic) { this.name = name; this.observedID = observedID; this.saveID = saveID; this.saveToRobot = saveToRobot; this.sayName = sayName; this.useMusic = useMusic; } public SetFaceToEnroll(System.IO.Stream stream) { Unpack(stream); } public SetFaceToEnroll(System.IO.BinaryReader reader) { Unpack(reader); } public SetFaceToEnroll Initialize(string name, int observedID, int saveID, bool saveToRobot, bool sayName, bool useMusic) { this.name = name; this.observedID = observedID; this.saveID = saveID; this.saveToRobot = saveToRobot; this.sayName = sayName; this.useMusic = useMusic; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { int _name_length = (int)reader.ReadByte(); byte[] _name_bytes = reader.ReadBytes(_name_length); _name = System.Text.Encoding.UTF8.GetString(_name_bytes); _observedID = reader.ReadInt32(); _saveID = reader.ReadInt32(); _saveToRobot = reader.ReadBoolean(); _sayName = reader.ReadBoolean(); _useMusic = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_name != null) { byte[] _name_bytes = System.Text.Encoding.UTF8.GetBytes(_name); writer.Write((byte)_name_bytes.Length); writer.Write(_name_bytes); } else { writer.Write((byte)0); } writer.Write((int)_observedID); writer.Write((int)_saveID); writer.Write((bool)_saveToRobot); writer.Write((bool)_sayName); writer.Write((bool)_useMusic); } public int Size { get { int result = 0; result += 1; // uint_8 if (name != null) { result += System.Text.Encoding.UTF8.GetByteCount(name); } result += 4; // int_32 result += 4; // int_32 result += 1; // bool result += 1; // bool result += 1; // bool return result; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(SetFaceToEnroll a, SetFaceToEnroll b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SetFaceToEnroll a, SetFaceToEnroll b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SetFaceToEnroll); } public bool Equals(SetFaceToEnroll p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._name.Equals(p._name) && this._observedID.Equals(p._observedID) && this._saveID.Equals(p._saveID) && this._saveToRobot.Equals(p._saveToRobot) && this._sayName.Equals(p._sayName) && this._useMusic.Equals(p._useMusic); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._observedID.GetHashCode(); hash = hash * 23 + this._saveID.GetHashCode(); hash = hash * 23 + this._saveToRobot.GetHashCode(); hash = hash * 23 + this._sayName.GetHashCode(); hash = hash * 23 + this._useMusic.GetHashCode(); return hash; } } } public enum VisionMode : uint { Faces = 0x1 }; public partial class EnableVisionMode { private Anki.Vector.Gateway.VisionMode _mode; // VisionMode private bool _enable; // bool public Anki.Vector.Gateway.VisionMode mode { get { return _mode; } set { _mode = value; } } public bool enable { get { return _enable; } set { _enable = value; } } /**** Constructors ****/ public EnableVisionMode() { } public EnableVisionMode(Anki.Vector.Gateway.VisionMode mode, bool enable) { this.mode = mode; this.enable = enable; } public EnableVisionMode(System.IO.Stream stream) { Unpack(stream); } public EnableVisionMode(System.IO.BinaryReader reader) { Unpack(reader); } public EnableVisionMode Initialize(Anki.Vector.Gateway.VisionMode mode, bool enable) { this.mode = mode; this.enable = enable; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _mode = (Anki.Vector.Gateway.VisionMode)reader.ReadUInt32(); _enable = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((uint)_mode); writer.Write((bool)_enable); } public int Size { get { return 5; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(EnableVisionMode a, EnableVisionMode b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(EnableVisionMode a, EnableVisionMode b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as EnableVisionMode); } public bool Equals(EnableVisionMode p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._mode.Equals(p._mode) && this._enable.Equals(p._enable); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._mode.GetHashCode(); hash = hash * 23 + this._enable.GetHashCode(); return hash; } } } public partial class PathMotionProfile { private float _speed_mmps = 100.0f; // float_32 private float _accel_mmps2 = 200.0f; // float_32 private float _decel_mmps2 = 500.0f; // float_32 private float _pointTurnSpeed_rad_per_sec = 2.0f; // float_32 private float _pointTurnAccel_rad_per_sec2 = 10.0f; // float_32 private float _pointTurnDecel_rad_per_sec2 = 10.0f; // float_32 private float _dockSpeed_mmps = 60.0f; // float_32 private float _dockAccel_mmps2 = 200.0f; // float_32 private float _dockDecel_mmps2 = 500.0f; // float_32 private float _reverseSpeed_mmps = 80.0f; // float_32 private bool _isCustom = false; // bool public float speed_mmps { get { return _speed_mmps; } set { _speed_mmps = value; } } public float accel_mmps2 { get { return _accel_mmps2; } set { _accel_mmps2 = value; } } public float decel_mmps2 { get { return _decel_mmps2; } set { _decel_mmps2 = value; } } public float pointTurnSpeed_rad_per_sec { get { return _pointTurnSpeed_rad_per_sec; } set { _pointTurnSpeed_rad_per_sec = value; } } public float pointTurnAccel_rad_per_sec2 { get { return _pointTurnAccel_rad_per_sec2; } set { _pointTurnAccel_rad_per_sec2 = value; } } public float pointTurnDecel_rad_per_sec2 { get { return _pointTurnDecel_rad_per_sec2; } set { _pointTurnDecel_rad_per_sec2 = value; } } public float dockSpeed_mmps { get { return _dockSpeed_mmps; } set { _dockSpeed_mmps = value; } } public float dockAccel_mmps2 { get { return _dockAccel_mmps2; } set { _dockAccel_mmps2 = value; } } public float dockDecel_mmps2 { get { return _dockDecel_mmps2; } set { _dockDecel_mmps2 = value; } } public float reverseSpeed_mmps { get { return _reverseSpeed_mmps; } set { _reverseSpeed_mmps = value; } } public bool isCustom { get { return _isCustom; } set { _isCustom = value; } } /**** Constructors ****/ public PathMotionProfile() { } public PathMotionProfile(float speed_mmps, float accel_mmps2, float decel_mmps2, float pointTurnSpeed_rad_per_sec, float pointTurnAccel_rad_per_sec2, float pointTurnDecel_rad_per_sec2, float dockSpeed_mmps, float dockAccel_mmps2, float dockDecel_mmps2, float reverseSpeed_mmps, bool isCustom) { this.speed_mmps = speed_mmps; this.accel_mmps2 = accel_mmps2; this.decel_mmps2 = decel_mmps2; this.pointTurnSpeed_rad_per_sec = pointTurnSpeed_rad_per_sec; this.pointTurnAccel_rad_per_sec2 = pointTurnAccel_rad_per_sec2; this.pointTurnDecel_rad_per_sec2 = pointTurnDecel_rad_per_sec2; this.dockSpeed_mmps = dockSpeed_mmps; this.dockAccel_mmps2 = dockAccel_mmps2; this.dockDecel_mmps2 = dockDecel_mmps2; this.reverseSpeed_mmps = reverseSpeed_mmps; this.isCustom = isCustom; } public PathMotionProfile(System.IO.Stream stream) { Unpack(stream); } public PathMotionProfile(System.IO.BinaryReader reader) { Unpack(reader); } public PathMotionProfile Initialize(float speed_mmps, float accel_mmps2, float decel_mmps2, float pointTurnSpeed_rad_per_sec, float pointTurnAccel_rad_per_sec2, float pointTurnDecel_rad_per_sec2, float dockSpeed_mmps, float dockAccel_mmps2, float dockDecel_mmps2, float reverseSpeed_mmps, bool isCustom) { this.speed_mmps = speed_mmps; this.accel_mmps2 = accel_mmps2; this.decel_mmps2 = decel_mmps2; this.pointTurnSpeed_rad_per_sec = pointTurnSpeed_rad_per_sec; this.pointTurnAccel_rad_per_sec2 = pointTurnAccel_rad_per_sec2; this.pointTurnDecel_rad_per_sec2 = pointTurnDecel_rad_per_sec2; this.dockSpeed_mmps = dockSpeed_mmps; this.dockAccel_mmps2 = dockAccel_mmps2; this.dockDecel_mmps2 = dockDecel_mmps2; this.reverseSpeed_mmps = reverseSpeed_mmps; this.isCustom = isCustom; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _speed_mmps = reader.ReadSingle(); _accel_mmps2 = reader.ReadSingle(); _decel_mmps2 = reader.ReadSingle(); _pointTurnSpeed_rad_per_sec = reader.ReadSingle(); _pointTurnAccel_rad_per_sec2 = reader.ReadSingle(); _pointTurnDecel_rad_per_sec2 = reader.ReadSingle(); _dockSpeed_mmps = reader.ReadSingle(); _dockAccel_mmps2 = reader.ReadSingle(); _dockDecel_mmps2 = reader.ReadSingle(); _reverseSpeed_mmps = reader.ReadSingle(); _isCustom = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_speed_mmps); writer.Write((float)_accel_mmps2); writer.Write((float)_decel_mmps2); writer.Write((float)_pointTurnSpeed_rad_per_sec); writer.Write((float)_pointTurnAccel_rad_per_sec2); writer.Write((float)_pointTurnDecel_rad_per_sec2); writer.Write((float)_dockSpeed_mmps); writer.Write((float)_dockAccel_mmps2); writer.Write((float)_dockDecel_mmps2); writer.Write((float)_reverseSpeed_mmps); writer.Write((bool)_isCustom); } public int Size { get { return 41; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(PathMotionProfile a, PathMotionProfile b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PathMotionProfile a, PathMotionProfile b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PathMotionProfile); } public bool Equals(PathMotionProfile p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed_mmps.Equals(p._speed_mmps) && this._accel_mmps2.Equals(p._accel_mmps2) && this._decel_mmps2.Equals(p._decel_mmps2) && this._pointTurnSpeed_rad_per_sec.Equals(p._pointTurnSpeed_rad_per_sec) && this._pointTurnAccel_rad_per_sec2.Equals(p._pointTurnAccel_rad_per_sec2) && this._pointTurnDecel_rad_per_sec2.Equals(p._pointTurnDecel_rad_per_sec2) && this._dockSpeed_mmps.Equals(p._dockSpeed_mmps) && this._dockAccel_mmps2.Equals(p._dockAccel_mmps2) && this._dockDecel_mmps2.Equals(p._dockDecel_mmps2) && this._reverseSpeed_mmps.Equals(p._reverseSpeed_mmps) && this._isCustom.Equals(p._isCustom); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed_mmps.GetHashCode(); hash = hash * 23 + this._accel_mmps2.GetHashCode(); hash = hash * 23 + this._decel_mmps2.GetHashCode(); hash = hash * 23 + this._pointTurnSpeed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._pointTurnAccel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._pointTurnDecel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._dockSpeed_mmps.GetHashCode(); hash = hash * 23 + this._dockAccel_mmps2.GetHashCode(); hash = hash * 23 + this._dockDecel_mmps2.GetHashCode(); hash = hash * 23 + this._reverseSpeed_mmps.GetHashCode(); hash = hash * 23 + this._isCustom.GetHashCode(); return hash; } } } public partial class GotoPose { private float _x_mm; // float_32 private float _y_mm; // float_32 private float _rad; // float_32 private Anki.Vector.Gateway.PathMotionProfile _motionProf; // PathMotionProfile private byte _level; // uint_8 public float x_mm { get { return _x_mm; } set { _x_mm = value; } } public float y_mm { get { return _y_mm; } set { _y_mm = value; } } public float rad { get { return _rad; } set { _rad = value; } } public Anki.Vector.Gateway.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public byte level { get { return _level; } set { _level = value; } } /**** Constructors ****/ public GotoPose() { this.motionProf = new Anki.Vector.Gateway.PathMotionProfile(); } public GotoPose(float x_mm, float y_mm, float rad, Anki.Vector.Gateway.PathMotionProfile motionProf, byte level) { this.x_mm = x_mm; this.y_mm = y_mm; this.rad = rad; this.motionProf = motionProf; this.level = level; } public GotoPose(System.IO.Stream stream) { Unpack(stream); } public GotoPose(System.IO.BinaryReader reader) { Unpack(reader); } public GotoPose Initialize(float x_mm, float y_mm, float rad, Anki.Vector.Gateway.PathMotionProfile motionProf, byte level) { this.x_mm = x_mm; this.y_mm = y_mm; this.rad = rad; this.motionProf = motionProf; this.level = level; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _x_mm = reader.ReadSingle(); _y_mm = reader.ReadSingle(); _rad = reader.ReadSingle(); _motionProf = new Anki.Vector.Gateway.PathMotionProfile(reader); _level = reader.ReadByte(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_x_mm); writer.Write((float)_y_mm); writer.Write((float)_rad); _motionProf.Pack(writer); writer.Write((byte)_level); } public int Size { get { return 54; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(GotoPose a, GotoPose b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(GotoPose a, GotoPose b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as GotoPose); } public bool Equals(GotoPose p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._x_mm.Equals(p._x_mm) && this._y_mm.Equals(p._y_mm) && this._rad.Equals(p._rad) && this._motionProf.Equals(p._motionProf) && this._level.Equals(p._level); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._x_mm.GetHashCode(); hash = hash * 23 + this._y_mm.GetHashCode(); hash = hash * 23 + this._rad.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._level.GetHashCode(); return hash; } } } public partial class DriveStraight { private float _speed_mmps; // float_32 private float _dist_mm; // float_32 private bool _shouldPlayAnimation = true; // bool public float speed_mmps { get { return _speed_mmps; } set { _speed_mmps = value; } } public float dist_mm { get { return _dist_mm; } set { _dist_mm = value; } } public bool shouldPlayAnimation { get { return _shouldPlayAnimation; } set { _shouldPlayAnimation = value; } } /**** Constructors ****/ public DriveStraight() { } public DriveStraight(float speed_mmps, float dist_mm, bool shouldPlayAnimation) { this.speed_mmps = speed_mmps; this.dist_mm = dist_mm; this.shouldPlayAnimation = shouldPlayAnimation; } public DriveStraight(System.IO.Stream stream) { Unpack(stream); } public DriveStraight(System.IO.BinaryReader reader) { Unpack(reader); } public DriveStraight Initialize(float speed_mmps, float dist_mm, bool shouldPlayAnimation) { this.speed_mmps = speed_mmps; this.dist_mm = dist_mm; this.shouldPlayAnimation = shouldPlayAnimation; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _speed_mmps = reader.ReadSingle(); _dist_mm = reader.ReadSingle(); _shouldPlayAnimation = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_speed_mmps); writer.Write((float)_dist_mm); writer.Write((bool)_shouldPlayAnimation); } public int Size { get { return 9; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DriveStraight a, DriveStraight b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DriveStraight a, DriveStraight b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DriveStraight); } public bool Equals(DriveStraight p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed_mmps.Equals(p._speed_mmps) && this._dist_mm.Equals(p._dist_mm) && this._shouldPlayAnimation.Equals(p._shouldPlayAnimation); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed_mmps.GetHashCode(); hash = hash * 23 + this._dist_mm.GetHashCode(); hash = hash * 23 + this._shouldPlayAnimation.GetHashCode(); return hash; } } } public partial class TurnInPlace { private float _angle_rad; // float_32 private float _speed_rad_per_sec = 0.0f; // float_32 private float _accel_rad_per_sec2 = 0.0f; // float_32 private float _tol_rad = 0.0f; // float_32 private byte _isAbsolute; // uint_8 public float angle_rad { get { return _angle_rad; } set { _angle_rad = value; } } public float speed_rad_per_sec { get { return _speed_rad_per_sec; } set { _speed_rad_per_sec = value; } } public float accel_rad_per_sec2 { get { return _accel_rad_per_sec2; } set { _accel_rad_per_sec2 = value; } } public float tol_rad { get { return _tol_rad; } set { _tol_rad = value; } } public byte isAbsolute { get { return _isAbsolute; } set { _isAbsolute = value; } } /**** Constructors ****/ public TurnInPlace() { } public TurnInPlace(float angle_rad, float speed_rad_per_sec, float accel_rad_per_sec2, float tol_rad, byte isAbsolute) { this.angle_rad = angle_rad; this.speed_rad_per_sec = speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.tol_rad = tol_rad; this.isAbsolute = isAbsolute; } public TurnInPlace(System.IO.Stream stream) { Unpack(stream); } public TurnInPlace(System.IO.BinaryReader reader) { Unpack(reader); } public TurnInPlace Initialize(float angle_rad, float speed_rad_per_sec, float accel_rad_per_sec2, float tol_rad, byte isAbsolute) { this.angle_rad = angle_rad; this.speed_rad_per_sec = speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.tol_rad = tol_rad; this.isAbsolute = isAbsolute; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _angle_rad = reader.ReadSingle(); _speed_rad_per_sec = reader.ReadSingle(); _accel_rad_per_sec2 = reader.ReadSingle(); _tol_rad = reader.ReadSingle(); _isAbsolute = reader.ReadByte(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_angle_rad); writer.Write((float)_speed_rad_per_sec); writer.Write((float)_accel_rad_per_sec2); writer.Write((float)_tol_rad); writer.Write((byte)_isAbsolute); } public int Size { get { return 17; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(TurnInPlace a, TurnInPlace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnInPlace a, TurnInPlace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnInPlace); } public bool Equals(TurnInPlace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._angle_rad.Equals(p._angle_rad) && this._speed_rad_per_sec.Equals(p._speed_rad_per_sec) && this._accel_rad_per_sec2.Equals(p._accel_rad_per_sec2) && this._tol_rad.Equals(p._tol_rad) && this._isAbsolute.Equals(p._isAbsolute); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._angle_rad.GetHashCode(); hash = hash * 23 + this._speed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._accel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._tol_rad.GetHashCode(); hash = hash * 23 + this._isAbsolute.GetHashCode(); return hash; } } } public partial class SetHeadAngle { private float _angle_rad; // float_32 private float _max_speed_rad_per_sec; // float_32 private float _accel_rad_per_sec2; // float_32 private float _duration_sec; // float_32 public float angle_rad { get { return _angle_rad; } set { _angle_rad = value; } } public float max_speed_rad_per_sec { get { return _max_speed_rad_per_sec; } set { _max_speed_rad_per_sec = value; } } public float accel_rad_per_sec2 { get { return _accel_rad_per_sec2; } set { _accel_rad_per_sec2 = value; } } public float duration_sec { get { return _duration_sec; } set { _duration_sec = value; } } /**** Constructors ****/ public SetHeadAngle() { } public SetHeadAngle(float angle_rad, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.angle_rad = angle_rad; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; } public SetHeadAngle(System.IO.Stream stream) { Unpack(stream); } public SetHeadAngle(System.IO.BinaryReader reader) { Unpack(reader); } public SetHeadAngle Initialize(float angle_rad, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.angle_rad = angle_rad; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _angle_rad = reader.ReadSingle(); _max_speed_rad_per_sec = reader.ReadSingle(); _accel_rad_per_sec2 = reader.ReadSingle(); _duration_sec = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_angle_rad); writer.Write((float)_max_speed_rad_per_sec); writer.Write((float)_accel_rad_per_sec2); writer.Write((float)_duration_sec); } public int Size { get { return 16; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(SetHeadAngle a, SetHeadAngle b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SetHeadAngle a, SetHeadAngle b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SetHeadAngle); } public bool Equals(SetHeadAngle p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._angle_rad.Equals(p._angle_rad) && this._max_speed_rad_per_sec.Equals(p._max_speed_rad_per_sec) && this._accel_rad_per_sec2.Equals(p._accel_rad_per_sec2) && this._duration_sec.Equals(p._duration_sec); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._angle_rad.GetHashCode(); hash = hash * 23 + this._max_speed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._accel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._duration_sec.GetHashCode(); return hash; } } } public partial class SetLiftHeight { private float _height_mm; // float_32 private float _max_speed_rad_per_sec; // float_32 private float _accel_rad_per_sec2; // float_32 private float _duration_sec; // float_32 public float height_mm { get { return _height_mm; } set { _height_mm = value; } } public float max_speed_rad_per_sec { get { return _max_speed_rad_per_sec; } set { _max_speed_rad_per_sec = value; } } public float accel_rad_per_sec2 { get { return _accel_rad_per_sec2; } set { _accel_rad_per_sec2 = value; } } public float duration_sec { get { return _duration_sec; } set { _duration_sec = value; } } /**** Constructors ****/ public SetLiftHeight() { } public SetLiftHeight(float height_mm, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.height_mm = height_mm; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; } public SetLiftHeight(System.IO.Stream stream) { Unpack(stream); } public SetLiftHeight(System.IO.BinaryReader reader) { Unpack(reader); } public SetLiftHeight Initialize(float height_mm, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.height_mm = height_mm; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _height_mm = reader.ReadSingle(); _max_speed_rad_per_sec = reader.ReadSingle(); _accel_rad_per_sec2 = reader.ReadSingle(); _duration_sec = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_height_mm); writer.Write((float)_max_speed_rad_per_sec); writer.Write((float)_accel_rad_per_sec2); writer.Write((float)_duration_sec); } public int Size { get { return 16; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(SetLiftHeight a, SetLiftHeight b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SetLiftHeight a, SetLiftHeight b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SetLiftHeight); } public bool Equals(SetLiftHeight p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._height_mm.Equals(p._height_mm) && this._max_speed_rad_per_sec.Equals(p._max_speed_rad_per_sec) && this._accel_rad_per_sec2.Equals(p._accel_rad_per_sec2) && this._duration_sec.Equals(p._duration_sec); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._height_mm.GetHashCode(); hash = hash * 23 + this._max_speed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._accel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._duration_sec.GetHashCode(); return hash; } } } public enum AlignmentType : byte { LIFT_FINGER = 0, LIFT_PLATE = 1, BODY = 2, CUSTOM = 3 }; public partial class AlignWithObject { private int _objectID; // int_32 private Anki.Vector.Gateway.PathMotionProfile _motionProf; // PathMotionProfile private float _distanceFromMarker_mm; // float_32 private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool private Anki.Vector.Gateway.AlignmentType _alignmentType; // AlignmentType public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.Gateway.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public float distanceFromMarker_mm { get { return _distanceFromMarker_mm; } set { _distanceFromMarker_mm = value; } } public float approachAngle_rad { get { return _approachAngle_rad; } set { _approachAngle_rad = value; } } public bool useApproachAngle { get { return _useApproachAngle; } set { _useApproachAngle = value; } } public bool usePreDockPose { get { return _usePreDockPose; } set { _usePreDockPose = value; } } public Anki.Vector.Gateway.AlignmentType alignmentType { get { return _alignmentType; } set { _alignmentType = value; } } /**** Constructors ****/ public AlignWithObject() { this.motionProf = new Anki.Vector.Gateway.PathMotionProfile(); } public AlignWithObject(int objectID, Anki.Vector.Gateway.PathMotionProfile motionProf, float distanceFromMarker_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose, Anki.Vector.Gateway.AlignmentType alignmentType) { this.objectID = objectID; this.motionProf = motionProf; this.distanceFromMarker_mm = distanceFromMarker_mm; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; this.alignmentType = alignmentType; } public AlignWithObject(System.IO.Stream stream) { Unpack(stream); } public AlignWithObject(System.IO.BinaryReader reader) { Unpack(reader); } public AlignWithObject Initialize(int objectID, Anki.Vector.Gateway.PathMotionProfile motionProf, float distanceFromMarker_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose, Anki.Vector.Gateway.AlignmentType alignmentType) { this.objectID = objectID; this.motionProf = motionProf; this.distanceFromMarker_mm = distanceFromMarker_mm; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; this.alignmentType = alignmentType; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _objectID = reader.ReadInt32(); _motionProf = new Anki.Vector.Gateway.PathMotionProfile(reader); _distanceFromMarker_mm = reader.ReadSingle(); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = reader.ReadBoolean(); _alignmentType = (Anki.Vector.Gateway.AlignmentType)reader.ReadByte(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_objectID); _motionProf.Pack(writer); writer.Write((float)_distanceFromMarker_mm); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); writer.Write((byte)_alignmentType); } public int Size { get { return 56; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(AlignWithObject a, AlignWithObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AlignWithObject a, AlignWithObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AlignWithObject); } public bool Equals(AlignWithObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._distanceFromMarker_mm.Equals(p._distanceFromMarker_mm) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose) && this._alignmentType.Equals(p._alignmentType); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._distanceFromMarker_mm.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); hash = hash * 23 + this._alignmentType.GetHashCode(); return hash; } } } public partial class SetLiftAngle { private float _angle_rad; // float_32 private float _max_speed_rad_per_sec; // float_32 private float _accel_rad_per_sec2; // float_32 private float _duration_sec; // float_32 public float angle_rad { get { return _angle_rad; } set { _angle_rad = value; } } public float max_speed_rad_per_sec { get { return _max_speed_rad_per_sec; } set { _max_speed_rad_per_sec = value; } } public float accel_rad_per_sec2 { get { return _accel_rad_per_sec2; } set { _accel_rad_per_sec2 = value; } } public float duration_sec { get { return _duration_sec; } set { _duration_sec = value; } } /**** Constructors ****/ public SetLiftAngle() { } public SetLiftAngle(float angle_rad, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.angle_rad = angle_rad; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; } public SetLiftAngle(System.IO.Stream stream) { Unpack(stream); } public SetLiftAngle(System.IO.BinaryReader reader) { Unpack(reader); } public SetLiftAngle Initialize(float angle_rad, float max_speed_rad_per_sec, float accel_rad_per_sec2, float duration_sec) { this.angle_rad = angle_rad; this.max_speed_rad_per_sec = max_speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; this.duration_sec = duration_sec; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _angle_rad = reader.ReadSingle(); _max_speed_rad_per_sec = reader.ReadSingle(); _accel_rad_per_sec2 = reader.ReadSingle(); _duration_sec = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_angle_rad); writer.Write((float)_max_speed_rad_per_sec); writer.Write((float)_accel_rad_per_sec2); writer.Write((float)_duration_sec); } public int Size { get { return 16; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(SetLiftAngle a, SetLiftAngle b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SetLiftAngle a, SetLiftAngle b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SetLiftAngle); } public bool Equals(SetLiftAngle p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._angle_rad.Equals(p._angle_rad) && this._max_speed_rad_per_sec.Equals(p._max_speed_rad_per_sec) && this._accel_rad_per_sec2.Equals(p._accel_rad_per_sec2) && this._duration_sec.Equals(p._duration_sec); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._angle_rad.GetHashCode(); hash = hash * 23 + this._max_speed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._accel_rad_per_sec2.GetHashCode(); hash = hash * 23 + this._duration_sec.GetHashCode(); return hash; } } } public partial class DeleteCustomMarkerObjects { /**** Constructors ****/ public DeleteCustomMarkerObjects() { } public DeleteCustomMarkerObjects(System.IO.Stream stream) { Unpack(stream); } public DeleteCustomMarkerObjects(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class DeleteFixedCustomObjects { /**** Constructors ****/ public DeleteFixedCustomObjects() { } public DeleteFixedCustomObjects(System.IO.Stream stream) { Unpack(stream); } public DeleteFixedCustomObjects(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class UndefineAllCustomMarkerObjects { /**** Constructors ****/ public UndefineAllCustomMarkerObjects() { } public UndefineAllCustomMarkerObjects(System.IO.Stream stream) { Unpack(stream); } public UndefineAllCustomMarkerObjects(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { } public void Unpack(System.IO.BinaryReader reader) { } public void Pack(System.IO.Stream stream) { } public void Pack(System.IO.BinaryWriter writer) { } public int Size { get { return 0; } } } public partial class CreateFixedCustomObject { private Anki.Vector.Gateway.PoseStruct3d _pose; // PoseStruct3d private float _xSize_mm; // float_32 private float _ySize_mm; // float_32 private float _zSize_mm; // float_32 public Anki.Vector.Gateway.PoseStruct3d pose { get { return _pose; } set { if (value == null) { throw new System.ArgumentNullException("pose cannot be null.", "value"); } _pose = value; } } public float xSize_mm { get { return _xSize_mm; } set { _xSize_mm = value; } } public float ySize_mm { get { return _ySize_mm; } set { _ySize_mm = value; } } public float zSize_mm { get { return _zSize_mm; } set { _zSize_mm = value; } } /**** Constructors ****/ public CreateFixedCustomObject() { this.pose = new Anki.Vector.Gateway.PoseStruct3d(); } public CreateFixedCustomObject(Anki.Vector.Gateway.PoseStruct3d pose, float xSize_mm, float ySize_mm, float zSize_mm) { this.pose = pose; this.xSize_mm = xSize_mm; this.ySize_mm = ySize_mm; this.zSize_mm = zSize_mm; } public CreateFixedCustomObject(System.IO.Stream stream) { Unpack(stream); } public CreateFixedCustomObject(System.IO.BinaryReader reader) { Unpack(reader); } public CreateFixedCustomObject Initialize(Anki.Vector.Gateway.PoseStruct3d pose, float xSize_mm, float ySize_mm, float zSize_mm) { this.pose = pose; this.xSize_mm = xSize_mm; this.ySize_mm = ySize_mm; this.zSize_mm = zSize_mm; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _pose = new Anki.Vector.Gateway.PoseStruct3d(reader); _xSize_mm = reader.ReadSingle(); _ySize_mm = reader.ReadSingle(); _zSize_mm = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { _pose.Pack(writer); writer.Write((float)_xSize_mm); writer.Write((float)_ySize_mm); writer.Write((float)_zSize_mm); } public int Size { get { return 44; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(CreateFixedCustomObject a, CreateFixedCustomObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CreateFixedCustomObject a, CreateFixedCustomObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CreateFixedCustomObject); } public bool Equals(CreateFixedCustomObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._pose.Equals(p._pose) && this._xSize_mm.Equals(p._xSize_mm) && this._ySize_mm.Equals(p._ySize_mm) && this._zSize_mm.Equals(p._zSize_mm); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._pose.GetHashCode(); hash = hash * 23 + this._xSize_mm.GetHashCode(); hash = hash * 23 + this._ySize_mm.GetHashCode(); hash = hash * 23 + this._zSize_mm.GetHashCode(); return hash; } } } public enum CustomObjectMarker : short { Circles2 = 0, Circles3 = 1, Circles4 = 2, Circles5 = 3, Diamonds2 = 4, Diamonds3 = 5, Diamonds4 = 6, Diamonds5 = 7, Hexagons2 = 8, Hexagons3 = 9, Hexagons4 = 10, Hexagons5 = 11, Triangles2 = 12, Triangles3 = 13, Triangles4 = 14, Triangles5 = 15, Count = 16 }; public partial class DefineCustomBox { private Anki.Vector.Gateway.ObjectType _customType; // ObjectType private Anki.Vector.Gateway.CustomObjectMarker _markerFront; // CustomObjectMarker private Anki.Vector.Gateway.CustomObjectMarker _markerBack; // CustomObjectMarker private Anki.Vector.Gateway.CustomObjectMarker _markerTop; // CustomObjectMarker private Anki.Vector.Gateway.CustomObjectMarker _markerBottom; // CustomObjectMarker private Anki.Vector.Gateway.CustomObjectMarker _markerLeft; // CustomObjectMarker private Anki.Vector.Gateway.CustomObjectMarker _markerRight; // CustomObjectMarker private float _xSize_mm; // float_32 private float _ySize_mm; // float_32 private float _zSize_mm; // float_32 private float _markerWidth_mm; // float_32 private float _markerHeight_mm; // float_32 private bool _isUnique; // bool public Anki.Vector.Gateway.ObjectType customType { get { return _customType; } set { _customType = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerFront { get { return _markerFront; } set { _markerFront = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerBack { get { return _markerBack; } set { _markerBack = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerTop { get { return _markerTop; } set { _markerTop = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerBottom { get { return _markerBottom; } set { _markerBottom = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerLeft { get { return _markerLeft; } set { _markerLeft = value; } } public Anki.Vector.Gateway.CustomObjectMarker markerRight { get { return _markerRight; } set { _markerRight = value; } } public float xSize_mm { get { return _xSize_mm; } set { _xSize_mm = value; } } public float ySize_mm { get { return _ySize_mm; } set { _ySize_mm = value; } } public float zSize_mm { get { return _zSize_mm; } set { _zSize_mm = value; } } public float markerWidth_mm { get { return _markerWidth_mm; } set { _markerWidth_mm = value; } } public float markerHeight_mm { get { return _markerHeight_mm; } set { _markerHeight_mm = value; } } public bool isUnique { get { return _isUnique; } set { _isUnique = value; } } /**** Constructors ****/ public DefineCustomBox() { } public DefineCustomBox(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker markerFront, Anki.Vector.Gateway.CustomObjectMarker markerBack, Anki.Vector.Gateway.CustomObjectMarker markerTop, Anki.Vector.Gateway.CustomObjectMarker markerBottom, Anki.Vector.Gateway.CustomObjectMarker markerLeft, Anki.Vector.Gateway.CustomObjectMarker markerRight, float xSize_mm, float ySize_mm, float zSize_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.markerFront = markerFront; this.markerBack = markerBack; this.markerTop = markerTop; this.markerBottom = markerBottom; this.markerLeft = markerLeft; this.markerRight = markerRight; this.xSize_mm = xSize_mm; this.ySize_mm = ySize_mm; this.zSize_mm = zSize_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; } public DefineCustomBox(System.IO.Stream stream) { Unpack(stream); } public DefineCustomBox(System.IO.BinaryReader reader) { Unpack(reader); } public DefineCustomBox Initialize(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker markerFront, Anki.Vector.Gateway.CustomObjectMarker markerBack, Anki.Vector.Gateway.CustomObjectMarker markerTop, Anki.Vector.Gateway.CustomObjectMarker markerBottom, Anki.Vector.Gateway.CustomObjectMarker markerLeft, Anki.Vector.Gateway.CustomObjectMarker markerRight, float xSize_mm, float ySize_mm, float zSize_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.markerFront = markerFront; this.markerBack = markerBack; this.markerTop = markerTop; this.markerBottom = markerBottom; this.markerLeft = markerLeft; this.markerRight = markerRight; this.xSize_mm = xSize_mm; this.ySize_mm = ySize_mm; this.zSize_mm = zSize_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _customType = (Anki.Vector.Gateway.ObjectType)reader.ReadInt32(); _markerFront = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _markerBack = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _markerTop = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _markerBottom = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _markerLeft = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _markerRight = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _xSize_mm = reader.ReadSingle(); _ySize_mm = reader.ReadSingle(); _zSize_mm = reader.ReadSingle(); _markerWidth_mm = reader.ReadSingle(); _markerHeight_mm = reader.ReadSingle(); _isUnique = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_customType); writer.Write((short)_markerFront); writer.Write((short)_markerBack); writer.Write((short)_markerTop); writer.Write((short)_markerBottom); writer.Write((short)_markerLeft); writer.Write((short)_markerRight); writer.Write((float)_xSize_mm); writer.Write((float)_ySize_mm); writer.Write((float)_zSize_mm); writer.Write((float)_markerWidth_mm); writer.Write((float)_markerHeight_mm); writer.Write((bool)_isUnique); } public int Size { get { return 37; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DefineCustomBox a, DefineCustomBox b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DefineCustomBox a, DefineCustomBox b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DefineCustomBox); } public bool Equals(DefineCustomBox p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._customType.Equals(p._customType) && this._markerFront.Equals(p._markerFront) && this._markerBack.Equals(p._markerBack) && this._markerTop.Equals(p._markerTop) && this._markerBottom.Equals(p._markerBottom) && this._markerLeft.Equals(p._markerLeft) && this._markerRight.Equals(p._markerRight) && this._xSize_mm.Equals(p._xSize_mm) && this._ySize_mm.Equals(p._ySize_mm) && this._zSize_mm.Equals(p._zSize_mm) && this._markerWidth_mm.Equals(p._markerWidth_mm) && this._markerHeight_mm.Equals(p._markerHeight_mm) && this._isUnique.Equals(p._isUnique); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._customType.GetHashCode(); hash = hash * 23 + this._markerFront.GetHashCode(); hash = hash * 23 + this._markerBack.GetHashCode(); hash = hash * 23 + this._markerTop.GetHashCode(); hash = hash * 23 + this._markerBottom.GetHashCode(); hash = hash * 23 + this._markerLeft.GetHashCode(); hash = hash * 23 + this._markerRight.GetHashCode(); hash = hash * 23 + this._xSize_mm.GetHashCode(); hash = hash * 23 + this._ySize_mm.GetHashCode(); hash = hash * 23 + this._zSize_mm.GetHashCode(); hash = hash * 23 + this._markerWidth_mm.GetHashCode(); hash = hash * 23 + this._markerHeight_mm.GetHashCode(); hash = hash * 23 + this._isUnique.GetHashCode(); return hash; } } } public partial class DefineCustomCube { private Anki.Vector.Gateway.ObjectType _customType; // ObjectType private Anki.Vector.Gateway.CustomObjectMarker _marker; // CustomObjectMarker private float _size_mm; // float_32 private float _markerWidth_mm; // float_32 private float _markerHeight_mm; // float_32 private bool _isUnique; // bool public Anki.Vector.Gateway.ObjectType customType { get { return _customType; } set { _customType = value; } } public Anki.Vector.Gateway.CustomObjectMarker marker { get { return _marker; } set { _marker = value; } } public float size_mm { get { return _size_mm; } set { _size_mm = value; } } public float markerWidth_mm { get { return _markerWidth_mm; } set { _markerWidth_mm = value; } } public float markerHeight_mm { get { return _markerHeight_mm; } set { _markerHeight_mm = value; } } public bool isUnique { get { return _isUnique; } set { _isUnique = value; } } /**** Constructors ****/ public DefineCustomCube() { } public DefineCustomCube(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker marker, float size_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.marker = marker; this.size_mm = size_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; } public DefineCustomCube(System.IO.Stream stream) { Unpack(stream); } public DefineCustomCube(System.IO.BinaryReader reader) { Unpack(reader); } public DefineCustomCube Initialize(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker marker, float size_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.marker = marker; this.size_mm = size_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _customType = (Anki.Vector.Gateway.ObjectType)reader.ReadInt32(); _marker = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _size_mm = reader.ReadSingle(); _markerWidth_mm = reader.ReadSingle(); _markerHeight_mm = reader.ReadSingle(); _isUnique = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_customType); writer.Write((short)_marker); writer.Write((float)_size_mm); writer.Write((float)_markerWidth_mm); writer.Write((float)_markerHeight_mm); writer.Write((bool)_isUnique); } public int Size { get { return 19; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DefineCustomCube a, DefineCustomCube b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DefineCustomCube a, DefineCustomCube b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DefineCustomCube); } public bool Equals(DefineCustomCube p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._customType.Equals(p._customType) && this._marker.Equals(p._marker) && this._size_mm.Equals(p._size_mm) && this._markerWidth_mm.Equals(p._markerWidth_mm) && this._markerHeight_mm.Equals(p._markerHeight_mm) && this._isUnique.Equals(p._isUnique); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._customType.GetHashCode(); hash = hash * 23 + this._marker.GetHashCode(); hash = hash * 23 + this._size_mm.GetHashCode(); hash = hash * 23 + this._markerWidth_mm.GetHashCode(); hash = hash * 23 + this._markerHeight_mm.GetHashCode(); hash = hash * 23 + this._isUnique.GetHashCode(); return hash; } } } public partial class DefineCustomWall { private Anki.Vector.Gateway.ObjectType _customType; // ObjectType private Anki.Vector.Gateway.CustomObjectMarker _marker; // CustomObjectMarker private float _width_mm; // float_32 private float _height_mm; // float_32 private float _markerWidth_mm; // float_32 private float _markerHeight_mm; // float_32 private bool _isUnique; // bool public Anki.Vector.Gateway.ObjectType customType { get { return _customType; } set { _customType = value; } } public Anki.Vector.Gateway.CustomObjectMarker marker { get { return _marker; } set { _marker = value; } } public float width_mm { get { return _width_mm; } set { _width_mm = value; } } public float height_mm { get { return _height_mm; } set { _height_mm = value; } } public float markerWidth_mm { get { return _markerWidth_mm; } set { _markerWidth_mm = value; } } public float markerHeight_mm { get { return _markerHeight_mm; } set { _markerHeight_mm = value; } } public bool isUnique { get { return _isUnique; } set { _isUnique = value; } } /**** Constructors ****/ public DefineCustomWall() { } public DefineCustomWall(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker marker, float width_mm, float height_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.marker = marker; this.width_mm = width_mm; this.height_mm = height_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; } public DefineCustomWall(System.IO.Stream stream) { Unpack(stream); } public DefineCustomWall(System.IO.BinaryReader reader) { Unpack(reader); } public DefineCustomWall Initialize(Anki.Vector.Gateway.ObjectType customType, Anki.Vector.Gateway.CustomObjectMarker marker, float width_mm, float height_mm, float markerWidth_mm, float markerHeight_mm, bool isUnique) { this.customType = customType; this.marker = marker; this.width_mm = width_mm; this.height_mm = height_mm; this.markerWidth_mm = markerWidth_mm; this.markerHeight_mm = markerHeight_mm; this.isUnique = isUnique; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _customType = (Anki.Vector.Gateway.ObjectType)reader.ReadInt32(); _marker = (Anki.Vector.Gateway.CustomObjectMarker)reader.ReadInt16(); _width_mm = reader.ReadSingle(); _height_mm = reader.ReadSingle(); _markerWidth_mm = reader.ReadSingle(); _markerHeight_mm = reader.ReadSingle(); _isUnique = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_customType); writer.Write((short)_marker); writer.Write((float)_width_mm); writer.Write((float)_height_mm); writer.Write((float)_markerWidth_mm); writer.Write((float)_markerHeight_mm); writer.Write((bool)_isUnique); } public int Size { get { return 23; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(DefineCustomWall a, DefineCustomWall b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DefineCustomWall a, DefineCustomWall b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DefineCustomWall); } public bool Equals(DefineCustomWall p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._customType.Equals(p._customType) && this._marker.Equals(p._marker) && this._width_mm.Equals(p._width_mm) && this._height_mm.Equals(p._height_mm) && this._markerWidth_mm.Equals(p._markerWidth_mm) && this._markerHeight_mm.Equals(p._markerHeight_mm) && this._isUnique.Equals(p._isUnique); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._customType.GetHashCode(); hash = hash * 23 + this._marker.GetHashCode(); hash = hash * 23 + this._width_mm.GetHashCode(); hash = hash * 23 + this._height_mm.GetHashCode(); hash = hash * 23 + this._markerWidth_mm.GetHashCode(); hash = hash * 23 + this._markerHeight_mm.GetHashCode(); hash = hash * 23 + this._isUnique.GetHashCode(); return hash; } } } public partial class SetMemoryMapBroadcastFrequency_sec { private float _frequency = -1.0f; // float_32 public float frequency { get { return _frequency; } set { _frequency = value; } } /**** Constructors ****/ public SetMemoryMapBroadcastFrequency_sec() { } public SetMemoryMapBroadcastFrequency_sec(float frequency) { this.frequency = frequency; } public SetMemoryMapBroadcastFrequency_sec(System.IO.Stream stream) { Unpack(stream); } public SetMemoryMapBroadcastFrequency_sec(System.IO.BinaryReader reader) { Unpack(reader); } public SetMemoryMapBroadcastFrequency_sec Initialize(float frequency) { this.frequency = frequency; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _frequency = reader.ReadSingle(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((float)_frequency); } public int Size { get { return 4; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(SetMemoryMapBroadcastFrequency_sec a, SetMemoryMapBroadcastFrequency_sec b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SetMemoryMapBroadcastFrequency_sec a, SetMemoryMapBroadcastFrequency_sec b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SetMemoryMapBroadcastFrequency_sec); } public bool Equals(SetMemoryMapBroadcastFrequency_sec p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._frequency.Equals(p._frequency); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._frequency.GetHashCode(); return hash; } } } public class MessageExternalToRobot { public enum Tag { UiDeviceConnectionWrongVersion = 0x0, // 0 MoveHead = 0x3, // 3 MoveLift = 0x4, // 4 DriveArc = 0x5, // 5 RobotHistoryRequest = 0x6, // 6 DisplayFaceImageRGBChunk = 0x8, // 8 AppIntent = 0x9, // 9 CancelFaceEnrollment = 0xa, // 10 RequestEnrolledNames = 0xb, // 11 UpdateEnrolledFaceByID = 0xc, // 12 EraseEnrolledFaceByID = 0xd, // 13 EraseAllEnrolledFaces = 0xe, // 14 SetFaceToEnroll = 0xf, // 15 EnableVisionMode = 0x10, // 16 GotoPose = 0x12, // 18 DriveStraight = 0x13, // 19 TurnInPlace = 0x14, // 20 SetHeadAngle = 0x15, // 21 SetLiftHeight = 0x16, // 22 AlignWithObject = 0x18, // 24 SetLiftAngle = 0x19, // 25 DeleteCustomMarkerObjects = 0x1a, // 26 DeleteFixedCustomObjects = 0x1b, // 27 UndefineAllCustomMarkerObjects = 0x1c, // 28 CreateFixedCustomObject = 0x1d, // 29 DefineCustomBox = 0x1e, // 30 DefineCustomCube = 0x1f, // 31 DefineCustomWall = 0x20, // 32 SetMemoryMapBroadcastFrequency_sec = 0x21, // 33 INVALID = 255 }; private Tag _tag = Tag.INVALID; public Tag GetTag() { return _tag; } private object _state = null; public object GetState() { return _state; } public Anki.Vector.Gateway.UiDeviceConnectionWrongVersion UiDeviceConnectionWrongVersion { get { if (_tag != Tag.UiDeviceConnectionWrongVersion) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UiDeviceConnectionWrongVersion\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.UiDeviceConnectionWrongVersion)this._state; } set { _tag = (value != null) ? Tag.UiDeviceConnectionWrongVersion : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.MoveHead MoveHead { get { if (_tag != Tag.MoveHead) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MoveHead\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.MoveHead)this._state; } set { _tag = (value != null) ? Tag.MoveHead : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.MoveLift MoveLift { get { if (_tag != Tag.MoveLift) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MoveLift\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.MoveLift)this._state; } set { _tag = (value != null) ? Tag.MoveLift : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DriveArc DriveArc { get { if (_tag != Tag.DriveArc) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DriveArc\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DriveArc)this._state; } set { _tag = (value != null) ? Tag.DriveArc : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.RobotHistoryRequest RobotHistoryRequest { get { if (_tag != Tag.RobotHistoryRequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotHistoryRequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.RobotHistoryRequest)this._state; } set { _tag = (value != null) ? Tag.RobotHistoryRequest : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DisplayFaceImageRGBChunk DisplayFaceImageRGBChunk { get { if (_tag != Tag.DisplayFaceImageRGBChunk) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DisplayFaceImageRGBChunk\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DisplayFaceImageRGBChunk)this._state; } set { _tag = (value != null) ? Tag.DisplayFaceImageRGBChunk : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.AppIntent AppIntent { get { if (_tag != Tag.AppIntent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AppIntent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.AppIntent)this._state; } set { _tag = (value != null) ? Tag.AppIntent : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.CancelFaceEnrollment CancelFaceEnrollment { get { if (_tag != Tag.CancelFaceEnrollment) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CancelFaceEnrollment\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.CancelFaceEnrollment)this._state; } set { _tag = (value != null) ? Tag.CancelFaceEnrollment : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.RequestEnrolledNames RequestEnrolledNames { get { if (_tag != Tag.RequestEnrolledNames) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RequestEnrolledNames\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.RequestEnrolledNames)this._state; } set { _tag = (value != null) ? Tag.RequestEnrolledNames : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.UpdateEnrolledFaceByID UpdateEnrolledFaceByID { get { if (_tag != Tag.UpdateEnrolledFaceByID) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UpdateEnrolledFaceByID\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.UpdateEnrolledFaceByID)this._state; } set { _tag = (value != null) ? Tag.UpdateEnrolledFaceByID : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.EraseEnrolledFaceByID EraseEnrolledFaceByID { get { if (_tag != Tag.EraseEnrolledFaceByID) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EraseEnrolledFaceByID\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.EraseEnrolledFaceByID)this._state; } set { _tag = (value != null) ? Tag.EraseEnrolledFaceByID : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.EraseAllEnrolledFaces EraseAllEnrolledFaces { get { if (_tag != Tag.EraseAllEnrolledFaces) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EraseAllEnrolledFaces\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.EraseAllEnrolledFaces)this._state; } set { _tag = (value != null) ? Tag.EraseAllEnrolledFaces : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.SetFaceToEnroll SetFaceToEnroll { get { if (_tag != Tag.SetFaceToEnroll) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetFaceToEnroll\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.SetFaceToEnroll)this._state; } set { _tag = (value != null) ? Tag.SetFaceToEnroll : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.EnableVisionMode EnableVisionMode { get { if (_tag != Tag.EnableVisionMode) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EnableVisionMode\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.EnableVisionMode)this._state; } set { _tag = (value != null) ? Tag.EnableVisionMode : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.GotoPose GotoPose { get { if (_tag != Tag.GotoPose) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"GotoPose\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.GotoPose)this._state; } set { _tag = (value != null) ? Tag.GotoPose : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DriveStraight DriveStraight { get { if (_tag != Tag.DriveStraight) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DriveStraight\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DriveStraight)this._state; } set { _tag = (value != null) ? Tag.DriveStraight : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.TurnInPlace TurnInPlace { get { if (_tag != Tag.TurnInPlace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"TurnInPlace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.TurnInPlace)this._state; } set { _tag = (value != null) ? Tag.TurnInPlace : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.SetHeadAngle SetHeadAngle { get { if (_tag != Tag.SetHeadAngle) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetHeadAngle\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.SetHeadAngle)this._state; } set { _tag = (value != null) ? Tag.SetHeadAngle : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.SetLiftHeight SetLiftHeight { get { if (_tag != Tag.SetLiftHeight) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetLiftHeight\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.SetLiftHeight)this._state; } set { _tag = (value != null) ? Tag.SetLiftHeight : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.AlignWithObject AlignWithObject { get { if (_tag != Tag.AlignWithObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AlignWithObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.AlignWithObject)this._state; } set { _tag = (value != null) ? Tag.AlignWithObject : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.SetLiftAngle SetLiftAngle { get { if (_tag != Tag.SetLiftAngle) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetLiftAngle\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.SetLiftAngle)this._state; } set { _tag = (value != null) ? Tag.SetLiftAngle : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DeleteCustomMarkerObjects DeleteCustomMarkerObjects { get { if (_tag != Tag.DeleteCustomMarkerObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DeleteCustomMarkerObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DeleteCustomMarkerObjects)this._state; } set { _tag = (value != null) ? Tag.DeleteCustomMarkerObjects : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DeleteFixedCustomObjects DeleteFixedCustomObjects { get { if (_tag != Tag.DeleteFixedCustomObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DeleteFixedCustomObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DeleteFixedCustomObjects)this._state; } set { _tag = (value != null) ? Tag.DeleteFixedCustomObjects : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.UndefineAllCustomMarkerObjects UndefineAllCustomMarkerObjects { get { if (_tag != Tag.UndefineAllCustomMarkerObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UndefineAllCustomMarkerObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.UndefineAllCustomMarkerObjects)this._state; } set { _tag = (value != null) ? Tag.UndefineAllCustomMarkerObjects : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.CreateFixedCustomObject CreateFixedCustomObject { get { if (_tag != Tag.CreateFixedCustomObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CreateFixedCustomObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.CreateFixedCustomObject)this._state; } set { _tag = (value != null) ? Tag.CreateFixedCustomObject : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DefineCustomBox DefineCustomBox { get { if (_tag != Tag.DefineCustomBox) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DefineCustomBox\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DefineCustomBox)this._state; } set { _tag = (value != null) ? Tag.DefineCustomBox : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DefineCustomCube DefineCustomCube { get { if (_tag != Tag.DefineCustomCube) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DefineCustomCube\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DefineCustomCube)this._state; } set { _tag = (value != null) ? Tag.DefineCustomCube : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.DefineCustomWall DefineCustomWall { get { if (_tag != Tag.DefineCustomWall) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DefineCustomWall\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.DefineCustomWall)this._state; } set { _tag = (value != null) ? Tag.DefineCustomWall : Tag.INVALID; _state = value; } } public Anki.Vector.Gateway.SetMemoryMapBroadcastFrequency_sec SetMemoryMapBroadcastFrequency_sec { get { if (_tag != Tag.SetMemoryMapBroadcastFrequency_sec) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetMemoryMapBroadcastFrequency_sec\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.Gateway.SetMemoryMapBroadcastFrequency_sec)this._state; } set { _tag = (value != null) ? Tag.SetMemoryMapBroadcastFrequency_sec : Tag.INVALID; _state = value; } } public MessageExternalToRobot Initialize(T state) { _state = state; if(typeof(T) == typeof(Anki.Vector.Gateway.UiDeviceConnectionWrongVersion)) { _tag = Tag.UiDeviceConnectionWrongVersion; } else if(typeof(T) == typeof(Anki.Vector.Gateway.MoveHead)) { _tag = Tag.MoveHead; } else if(typeof(T) == typeof(Anki.Vector.Gateway.MoveLift)) { _tag = Tag.MoveLift; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DriveArc)) { _tag = Tag.DriveArc; } else if(typeof(T) == typeof(Anki.Vector.Gateway.RobotHistoryRequest)) { _tag = Tag.RobotHistoryRequest; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DisplayFaceImageRGBChunk)) { _tag = Tag.DisplayFaceImageRGBChunk; } else if(typeof(T) == typeof(Anki.Vector.Gateway.AppIntent)) { _tag = Tag.AppIntent; } else if(typeof(T) == typeof(Anki.Vector.Gateway.CancelFaceEnrollment)) { _tag = Tag.CancelFaceEnrollment; } else if(typeof(T) == typeof(Anki.Vector.Gateway.RequestEnrolledNames)) { _tag = Tag.RequestEnrolledNames; } else if(typeof(T) == typeof(Anki.Vector.Gateway.UpdateEnrolledFaceByID)) { _tag = Tag.UpdateEnrolledFaceByID; } else if(typeof(T) == typeof(Anki.Vector.Gateway.EraseEnrolledFaceByID)) { _tag = Tag.EraseEnrolledFaceByID; } else if(typeof(T) == typeof(Anki.Vector.Gateway.EraseAllEnrolledFaces)) { _tag = Tag.EraseAllEnrolledFaces; } else if(typeof(T) == typeof(Anki.Vector.Gateway.SetFaceToEnroll)) { _tag = Tag.SetFaceToEnroll; } else if(typeof(T) == typeof(Anki.Vector.Gateway.EnableVisionMode)) { _tag = Tag.EnableVisionMode; } else if(typeof(T) == typeof(Anki.Vector.Gateway.GotoPose)) { _tag = Tag.GotoPose; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DriveStraight)) { _tag = Tag.DriveStraight; } else if(typeof(T) == typeof(Anki.Vector.Gateway.TurnInPlace)) { _tag = Tag.TurnInPlace; } else if(typeof(T) == typeof(Anki.Vector.Gateway.SetHeadAngle)) { _tag = Tag.SetHeadAngle; } else if(typeof(T) == typeof(Anki.Vector.Gateway.SetLiftHeight)) { _tag = Tag.SetLiftHeight; } else if(typeof(T) == typeof(Anki.Vector.Gateway.AlignWithObject)) { _tag = Tag.AlignWithObject; } else if(typeof(T) == typeof(Anki.Vector.Gateway.SetLiftAngle)) { _tag = Tag.SetLiftAngle; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DeleteCustomMarkerObjects)) { _tag = Tag.DeleteCustomMarkerObjects; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DeleteFixedCustomObjects)) { _tag = Tag.DeleteFixedCustomObjects; } else if(typeof(T) == typeof(Anki.Vector.Gateway.UndefineAllCustomMarkerObjects)) { _tag = Tag.UndefineAllCustomMarkerObjects; } else if(typeof(T) == typeof(Anki.Vector.Gateway.CreateFixedCustomObject)) { _tag = Tag.CreateFixedCustomObject; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DefineCustomBox)) { _tag = Tag.DefineCustomBox; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DefineCustomCube)) { _tag = Tag.DefineCustomCube; } else if(typeof(T) == typeof(Anki.Vector.Gateway.DefineCustomWall)) { _tag = Tag.DefineCustomWall; } else if(typeof(T) == typeof(Anki.Vector.Gateway.SetMemoryMapBroadcastFrequency_sec)) { _tag = Tag.SetMemoryMapBroadcastFrequency_sec; } else { _state = null; _tag = Tag.INVALID; } return this; } /**** Constructors ****/ public MessageExternalToRobot() { } public MessageExternalToRobot(System.IO.Stream stream) { Unpack(stream); } public MessageExternalToRobot(System.IO.BinaryReader reader) { Unpack(reader); } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { Tag newTag = (Tag)reader.ReadByte(); switch(newTag) { case Tag.UiDeviceConnectionWrongVersion: UiDeviceConnectionWrongVersion = new Anki.Vector.Gateway.UiDeviceConnectionWrongVersion(reader); break; case Tag.MoveHead: MoveHead = new Anki.Vector.Gateway.MoveHead(reader); break; case Tag.MoveLift: MoveLift = new Anki.Vector.Gateway.MoveLift(reader); break; case Tag.DriveArc: DriveArc = new Anki.Vector.Gateway.DriveArc(reader); break; case Tag.RobotHistoryRequest: RobotHistoryRequest = new Anki.Vector.Gateway.RobotHistoryRequest(reader); break; case Tag.DisplayFaceImageRGBChunk: DisplayFaceImageRGBChunk = new Anki.Vector.Gateway.DisplayFaceImageRGBChunk(reader); break; case Tag.AppIntent: AppIntent = new Anki.Vector.Gateway.AppIntent(reader); break; case Tag.CancelFaceEnrollment: CancelFaceEnrollment = new Anki.Vector.Gateway.CancelFaceEnrollment(reader); break; case Tag.RequestEnrolledNames: RequestEnrolledNames = new Anki.Vector.Gateway.RequestEnrolledNames(reader); break; case Tag.UpdateEnrolledFaceByID: UpdateEnrolledFaceByID = new Anki.Vector.Gateway.UpdateEnrolledFaceByID(reader); break; case Tag.EraseEnrolledFaceByID: EraseEnrolledFaceByID = new Anki.Vector.Gateway.EraseEnrolledFaceByID(reader); break; case Tag.EraseAllEnrolledFaces: EraseAllEnrolledFaces = new Anki.Vector.Gateway.EraseAllEnrolledFaces(reader); break; case Tag.SetFaceToEnroll: SetFaceToEnroll = new Anki.Vector.Gateway.SetFaceToEnroll(reader); break; case Tag.EnableVisionMode: EnableVisionMode = new Anki.Vector.Gateway.EnableVisionMode(reader); break; case Tag.GotoPose: GotoPose = new Anki.Vector.Gateway.GotoPose(reader); break; case Tag.DriveStraight: DriveStraight = new Anki.Vector.Gateway.DriveStraight(reader); break; case Tag.TurnInPlace: TurnInPlace = new Anki.Vector.Gateway.TurnInPlace(reader); break; case Tag.SetHeadAngle: SetHeadAngle = new Anki.Vector.Gateway.SetHeadAngle(reader); break; case Tag.SetLiftHeight: SetLiftHeight = new Anki.Vector.Gateway.SetLiftHeight(reader); break; case Tag.AlignWithObject: AlignWithObject = new Anki.Vector.Gateway.AlignWithObject(reader); break; case Tag.SetLiftAngle: SetLiftAngle = new Anki.Vector.Gateway.SetLiftAngle(reader); break; case Tag.DeleteCustomMarkerObjects: DeleteCustomMarkerObjects = new Anki.Vector.Gateway.DeleteCustomMarkerObjects(reader); break; case Tag.DeleteFixedCustomObjects: DeleteFixedCustomObjects = new Anki.Vector.Gateway.DeleteFixedCustomObjects(reader); break; case Tag.UndefineAllCustomMarkerObjects: UndefineAllCustomMarkerObjects = new Anki.Vector.Gateway.UndefineAllCustomMarkerObjects(reader); break; case Tag.CreateFixedCustomObject: CreateFixedCustomObject = new Anki.Vector.Gateway.CreateFixedCustomObject(reader); break; case Tag.DefineCustomBox: DefineCustomBox = new Anki.Vector.Gateway.DefineCustomBox(reader); break; case Tag.DefineCustomCube: DefineCustomCube = new Anki.Vector.Gateway.DefineCustomCube(reader); break; case Tag.DefineCustomWall: DefineCustomWall = new Anki.Vector.Gateway.DefineCustomWall(reader); break; case Tag.SetMemoryMapBroadcastFrequency_sec: SetMemoryMapBroadcastFrequency_sec = new Anki.Vector.Gateway.SetMemoryMapBroadcastFrequency_sec(reader); break; default: break; } _tag = newTag; } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((byte)GetTag()); switch(GetTag()) { case Tag.UiDeviceConnectionWrongVersion: if (UiDeviceConnectionWrongVersion == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UiDeviceConnectionWrongVersion.Pack(writer); break; case Tag.MoveHead: if (MoveHead == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MoveHead.Pack(writer); break; case Tag.MoveLift: if (MoveLift == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MoveLift.Pack(writer); break; case Tag.DriveArc: if (DriveArc == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DriveArc.Pack(writer); break; case Tag.RobotHistoryRequest: if (RobotHistoryRequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotHistoryRequest.Pack(writer); break; case Tag.DisplayFaceImageRGBChunk: if (DisplayFaceImageRGBChunk == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DisplayFaceImageRGBChunk.Pack(writer); break; case Tag.AppIntent: if (AppIntent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AppIntent.Pack(writer); break; case Tag.CancelFaceEnrollment: if (CancelFaceEnrollment == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CancelFaceEnrollment.Pack(writer); break; case Tag.RequestEnrolledNames: if (RequestEnrolledNames == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RequestEnrolledNames.Pack(writer); break; case Tag.UpdateEnrolledFaceByID: if (UpdateEnrolledFaceByID == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UpdateEnrolledFaceByID.Pack(writer); break; case Tag.EraseEnrolledFaceByID: if (EraseEnrolledFaceByID == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EraseEnrolledFaceByID.Pack(writer); break; case Tag.EraseAllEnrolledFaces: if (EraseAllEnrolledFaces == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EraseAllEnrolledFaces.Pack(writer); break; case Tag.SetFaceToEnroll: if (SetFaceToEnroll == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetFaceToEnroll.Pack(writer); break; case Tag.EnableVisionMode: if (EnableVisionMode == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EnableVisionMode.Pack(writer); break; case Tag.GotoPose: if (GotoPose == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } GotoPose.Pack(writer); break; case Tag.DriveStraight: if (DriveStraight == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DriveStraight.Pack(writer); break; case Tag.TurnInPlace: if (TurnInPlace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } TurnInPlace.Pack(writer); break; case Tag.SetHeadAngle: if (SetHeadAngle == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetHeadAngle.Pack(writer); break; case Tag.SetLiftHeight: if (SetLiftHeight == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetLiftHeight.Pack(writer); break; case Tag.AlignWithObject: if (AlignWithObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AlignWithObject.Pack(writer); break; case Tag.SetLiftAngle: if (SetLiftAngle == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetLiftAngle.Pack(writer); break; case Tag.DeleteCustomMarkerObjects: if (DeleteCustomMarkerObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DeleteCustomMarkerObjects.Pack(writer); break; case Tag.DeleteFixedCustomObjects: if (DeleteFixedCustomObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DeleteFixedCustomObjects.Pack(writer); break; case Tag.UndefineAllCustomMarkerObjects: if (UndefineAllCustomMarkerObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UndefineAllCustomMarkerObjects.Pack(writer); break; case Tag.CreateFixedCustomObject: if (CreateFixedCustomObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CreateFixedCustomObject.Pack(writer); break; case Tag.DefineCustomBox: if (DefineCustomBox == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DefineCustomBox.Pack(writer); break; case Tag.DefineCustomCube: if (DefineCustomCube == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DefineCustomCube.Pack(writer); break; case Tag.DefineCustomWall: if (DefineCustomWall == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DefineCustomWall.Pack(writer); break; case Tag.SetMemoryMapBroadcastFrequency_sec: if (SetMemoryMapBroadcastFrequency_sec == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetMemoryMapBroadcastFrequency_sec.Pack(writer); break; default: break; } } public int Size { get { int result = 1; // tag = byte switch(GetTag()) { case Tag.UiDeviceConnectionWrongVersion: if (UiDeviceConnectionWrongVersion == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UiDeviceConnectionWrongVersion.Size; break; case Tag.MoveHead: if (MoveHead == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MoveHead.Size; break; case Tag.MoveLift: if (MoveLift == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MoveLift.Size; break; case Tag.DriveArc: if (DriveArc == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DriveArc.Size; break; case Tag.RobotHistoryRequest: if (RobotHistoryRequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotHistoryRequest.Size; break; case Tag.DisplayFaceImageRGBChunk: if (DisplayFaceImageRGBChunk == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DisplayFaceImageRGBChunk.Size; break; case Tag.AppIntent: if (AppIntent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AppIntent.Size; break; case Tag.CancelFaceEnrollment: if (CancelFaceEnrollment == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CancelFaceEnrollment.Size; break; case Tag.RequestEnrolledNames: if (RequestEnrolledNames == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RequestEnrolledNames.Size; break; case Tag.UpdateEnrolledFaceByID: if (UpdateEnrolledFaceByID == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UpdateEnrolledFaceByID.Size; break; case Tag.EraseEnrolledFaceByID: if (EraseEnrolledFaceByID == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EraseEnrolledFaceByID.Size; break; case Tag.EraseAllEnrolledFaces: if (EraseAllEnrolledFaces == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EraseAllEnrolledFaces.Size; break; case Tag.SetFaceToEnroll: if (SetFaceToEnroll == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetFaceToEnroll.Size; break; case Tag.EnableVisionMode: if (EnableVisionMode == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EnableVisionMode.Size; break; case Tag.GotoPose: if (GotoPose == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += GotoPose.Size; break; case Tag.DriveStraight: if (DriveStraight == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DriveStraight.Size; break; case Tag.TurnInPlace: if (TurnInPlace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += TurnInPlace.Size; break; case Tag.SetHeadAngle: if (SetHeadAngle == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetHeadAngle.Size; break; case Tag.SetLiftHeight: if (SetLiftHeight == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetLiftHeight.Size; break; case Tag.AlignWithObject: if (AlignWithObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AlignWithObject.Size; break; case Tag.SetLiftAngle: if (SetLiftAngle == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetLiftAngle.Size; break; case Tag.DeleteCustomMarkerObjects: if (DeleteCustomMarkerObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DeleteCustomMarkerObjects.Size; break; case Tag.DeleteFixedCustomObjects: if (DeleteFixedCustomObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DeleteFixedCustomObjects.Size; break; case Tag.UndefineAllCustomMarkerObjects: if (UndefineAllCustomMarkerObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UndefineAllCustomMarkerObjects.Size; break; case Tag.CreateFixedCustomObject: if (CreateFixedCustomObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CreateFixedCustomObject.Size; break; case Tag.DefineCustomBox: if (DefineCustomBox == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DefineCustomBox.Size; break; case Tag.DefineCustomCube: if (DefineCustomCube == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DefineCustomCube.Size; break; case Tag.DefineCustomWall: if (DefineCustomWall == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DefineCustomWall.Size; break; case Tag.SetMemoryMapBroadcastFrequency_sec: if (SetMemoryMapBroadcastFrequency_sec == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetMemoryMapBroadcastFrequency_sec.Size; break; default: // Just tag size break; } return result; } } public static bool operator ==(MessageExternalToRobot a, MessageExternalToRobot b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MessageExternalToRobot a, MessageExternalToRobot b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MessageExternalToRobot); } public bool Equals(MessageExternalToRobot p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return (_tag == p._tag && _state.Equals(p._state)); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._tag.GetHashCode(); hash = hash * 23 + this._state.GetHashCode(); return hash; } } } } // namespace Gateway } // namespace Vector } // namespace Anki