// Autogenerated C# message buffer code. // Source: clad/externalInterface/messageActions.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/externalInterface/messageActions.clad namespace Anki { namespace Vector { namespace ExternalInterface { public partial class AlignWithObject { private int _objectID; // int_32 private Anki.Vector.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.AlignmentType _alignmentType; // AlignmentType public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.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.AlignmentType alignmentType { get { return _alignmentType; } set { _alignmentType = value; } } /**** Constructors ****/ public AlignWithObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public AlignWithObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float distanceFromMarker_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose, Anki.Vector.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.PathMotionProfile motionProf, float distanceFromMarker_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose, Anki.Vector.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.PathMotionProfile(reader); _distanceFromMarker_mm = reader.ReadSingle(); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = reader.ReadBoolean(); _alignmentType = (Anki.Vector.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 CalibrateMotors { private bool _calibrateHead; // bool private bool _calibrateLift; // bool public bool calibrateHead { get { return _calibrateHead; } set { _calibrateHead = value; } } public bool calibrateLift { get { return _calibrateLift; } set { _calibrateLift = value; } } /**** Constructors ****/ public CalibrateMotors() { } public CalibrateMotors(bool calibrateHead, bool calibrateLift) { this.calibrateHead = calibrateHead; this.calibrateLift = calibrateLift; } public CalibrateMotors(System.IO.Stream stream) { Unpack(stream); } public CalibrateMotors(System.IO.BinaryReader reader) { Unpack(reader); } public CalibrateMotors Initialize(bool calibrateHead, bool calibrateLift) { this.calibrateHead = calibrateHead; this.calibrateLift = calibrateLift; 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) { _calibrateHead = reader.ReadBoolean(); _calibrateLift = 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((bool)_calibrateHead); writer.Write((bool)_calibrateLift); } public int Size { get { return 2; } } 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 ==(CalibrateMotors a, CalibrateMotors b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CalibrateMotors a, CalibrateMotors b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CalibrateMotors); } public bool Equals(CalibrateMotors p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._calibrateHead.Equals(p._calibrateHead) && this._calibrateLift.Equals(p._calibrateLift); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._calibrateHead.GetHashCode(); hash = hash * 23 + this._calibrateLift.GetHashCode(); return hash; } } } public partial class CliffAlignToWhite { /**** Constructors ****/ public CliffAlignToWhite() { } public CliffAlignToWhite(System.IO.Stream stream) { Unpack(stream); } public CliffAlignToWhite(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 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 FlipBlock { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } /**** Constructors ****/ public FlipBlock() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public FlipBlock(int objectID, Anki.Vector.PathMotionProfile motionProf) { this.objectID = objectID; this.motionProf = motionProf; } public FlipBlock(System.IO.Stream stream) { Unpack(stream); } public FlipBlock(System.IO.BinaryReader reader) { Unpack(reader); } public FlipBlock Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf) { this.objectID = objectID; this.motionProf = motionProf; 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.PathMotionProfile(reader); } 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); } public int Size { get { return 45; } } 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 ==(FlipBlock a, FlipBlock b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(FlipBlock a, FlipBlock b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as FlipBlock); } public bool Equals(FlipBlock p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); return hash; } } } public partial class GotoObject { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _distanceFromObjectOrigin_mm; // float_32 private bool _usePreDockPose = false; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public float distanceFromObjectOrigin_mm { get { return _distanceFromObjectOrigin_mm; } set { _distanceFromObjectOrigin_mm = value; } } public bool usePreDockPose { get { return _usePreDockPose; } set { _usePreDockPose = value; } } /**** Constructors ****/ public GotoObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public GotoObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float distanceFromObjectOrigin_mm, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.distanceFromObjectOrigin_mm = distanceFromObjectOrigin_mm; this.usePreDockPose = usePreDockPose; } public GotoObject(System.IO.Stream stream) { Unpack(stream); } public GotoObject(System.IO.BinaryReader reader) { Unpack(reader); } public GotoObject Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float distanceFromObjectOrigin_mm, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.distanceFromObjectOrigin_mm = distanceFromObjectOrigin_mm; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _distanceFromObjectOrigin_mm = reader.ReadSingle(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_distanceFromObjectOrigin_mm); writer.Write((bool)_usePreDockPose); } public int Size { get { return 50; } } 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 ==(GotoObject a, GotoObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(GotoObject a, GotoObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as GotoObject); } public bool Equals(GotoObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._distanceFromObjectOrigin_mm.Equals(p._distanceFromObjectOrigin_mm) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._distanceFromObjectOrigin_mm.GetHashCode(); hash = hash * 23 + this._usePreDockPose.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.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.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.PathMotionProfile(); } public GotoPose(float x_mm, float y_mm, float rad, Anki.Vector.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.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.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 MountCharger { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private bool _useCliffSensorCorrection; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public bool useCliffSensorCorrection { get { return _useCliffSensorCorrection; } set { _useCliffSensorCorrection = value; } } /**** Constructors ****/ public MountCharger() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public MountCharger(int objectID, Anki.Vector.PathMotionProfile motionProf, bool useCliffSensorCorrection) { this.objectID = objectID; this.motionProf = motionProf; this.useCliffSensorCorrection = useCliffSensorCorrection; } public MountCharger(System.IO.Stream stream) { Unpack(stream); } public MountCharger(System.IO.BinaryReader reader) { Unpack(reader); } public MountCharger Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, bool useCliffSensorCorrection) { this.objectID = objectID; this.motionProf = motionProf; this.useCliffSensorCorrection = useCliffSensorCorrection; 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.PathMotionProfile(reader); _useCliffSensorCorrection = 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)_objectID); _motionProf.Pack(writer); writer.Write((bool)_useCliffSensorCorrection); } public int Size { get { return 46; } } 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 ==(MountCharger a, MountCharger b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MountCharger a, MountCharger b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MountCharger); } public bool Equals(MountCharger p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._useCliffSensorCorrection.Equals(p._useCliffSensorCorrection); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._useCliffSensorCorrection.GetHashCode(); return hash; } } } public partial class PanAndTilt { private float _bodyPan; // float_32 private float _headTilt; // float_32 private bool _isPanAbsolute; // bool private bool _isTiltAbsolute; // bool public float bodyPan { get { return _bodyPan; } set { _bodyPan = value; } } public float headTilt { get { return _headTilt; } set { _headTilt = value; } } public bool isPanAbsolute { get { return _isPanAbsolute; } set { _isPanAbsolute = value; } } public bool isTiltAbsolute { get { return _isTiltAbsolute; } set { _isTiltAbsolute = value; } } /**** Constructors ****/ public PanAndTilt() { } public PanAndTilt(float bodyPan, float headTilt, bool isPanAbsolute, bool isTiltAbsolute) { this.bodyPan = bodyPan; this.headTilt = headTilt; this.isPanAbsolute = isPanAbsolute; this.isTiltAbsolute = isTiltAbsolute; } public PanAndTilt(System.IO.Stream stream) { Unpack(stream); } public PanAndTilt(System.IO.BinaryReader reader) { Unpack(reader); } public PanAndTilt Initialize(float bodyPan, float headTilt, bool isPanAbsolute, bool isTiltAbsolute) { this.bodyPan = bodyPan; this.headTilt = headTilt; this.isPanAbsolute = isPanAbsolute; this.isTiltAbsolute = isTiltAbsolute; 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) { _bodyPan = reader.ReadSingle(); _headTilt = reader.ReadSingle(); _isPanAbsolute = reader.ReadBoolean(); _isTiltAbsolute = 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)_bodyPan); writer.Write((float)_headTilt); writer.Write((bool)_isPanAbsolute); writer.Write((bool)_isTiltAbsolute); } 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 ==(PanAndTilt a, PanAndTilt b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PanAndTilt a, PanAndTilt b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PanAndTilt); } public bool Equals(PanAndTilt p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._bodyPan.Equals(p._bodyPan) && this._headTilt.Equals(p._headTilt) && this._isPanAbsolute.Equals(p._isPanAbsolute) && this._isTiltAbsolute.Equals(p._isTiltAbsolute); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._bodyPan.GetHashCode(); hash = hash * 23 + this._headTilt.GetHashCode(); hash = hash * 23 + this._isPanAbsolute.GetHashCode(); hash = hash * 23 + this._isTiltAbsolute.GetHashCode(); return hash; } } } public partial class PickupObject { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = 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; } } /**** Constructors ****/ public PickupObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public PickupObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; } public PickupObject(System.IO.Stream stream) { Unpack(stream); } public PickupObject(System.IO.BinaryReader reader) { Unpack(reader); } public PickupObject Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); } public int Size { get { return 51; } } 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 ==(PickupObject a, PickupObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PickupObject a, PickupObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PickupObject); } public bool Equals(PickupObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); return hash; } } } public partial class PlaceObjectOnGround { private float _x_mm; // float_32 private float _y_mm; // float_32 private float _qw; // float_32 private float _qx; // float_32 private float _qy; // float_32 private float _qz; // float_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private byte _level; // uint_8 private bool _useExactRotation; // bool private bool _checkDestinationFree; // bool 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 qw { get { return _qw; } set { _qw = value; } } public float qx { get { return _qx; } set { _qx = value; } } public float qy { get { return _qy; } set { _qy = value; } } public float qz { get { return _qz; } set { _qz = value; } } public Anki.Vector.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; } } public bool useExactRotation { get { return _useExactRotation; } set { _useExactRotation = value; } } public bool checkDestinationFree { get { return _checkDestinationFree; } set { _checkDestinationFree = value; } } /**** Constructors ****/ public PlaceObjectOnGround() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public PlaceObjectOnGround(float x_mm, float y_mm, float qw, float qx, float qy, float qz, Anki.Vector.PathMotionProfile motionProf, byte level, bool useExactRotation, bool checkDestinationFree) { this.x_mm = x_mm; this.y_mm = y_mm; this.qw = qw; this.qx = qx; this.qy = qy; this.qz = qz; this.motionProf = motionProf; this.level = level; this.useExactRotation = useExactRotation; this.checkDestinationFree = checkDestinationFree; } public PlaceObjectOnGround(System.IO.Stream stream) { Unpack(stream); } public PlaceObjectOnGround(System.IO.BinaryReader reader) { Unpack(reader); } public PlaceObjectOnGround Initialize(float x_mm, float y_mm, float qw, float qx, float qy, float qz, Anki.Vector.PathMotionProfile motionProf, byte level, bool useExactRotation, bool checkDestinationFree) { this.x_mm = x_mm; this.y_mm = y_mm; this.qw = qw; this.qx = qx; this.qy = qy; this.qz = qz; this.motionProf = motionProf; this.level = level; this.useExactRotation = useExactRotation; this.checkDestinationFree = checkDestinationFree; 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(); _qw = reader.ReadSingle(); _qx = reader.ReadSingle(); _qy = reader.ReadSingle(); _qz = reader.ReadSingle(); _motionProf = new Anki.Vector.PathMotionProfile(reader); _level = reader.ReadByte(); _useExactRotation = reader.ReadBoolean(); _checkDestinationFree = 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)_x_mm); writer.Write((float)_y_mm); writer.Write((float)_qw); writer.Write((float)_qx); writer.Write((float)_qy); writer.Write((float)_qz); _motionProf.Pack(writer); writer.Write((byte)_level); writer.Write((bool)_useExactRotation); writer.Write((bool)_checkDestinationFree); } public int Size { get { return 68; } } 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 ==(PlaceObjectOnGround a, PlaceObjectOnGround b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlaceObjectOnGround a, PlaceObjectOnGround b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlaceObjectOnGround); } public bool Equals(PlaceObjectOnGround 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._qw.Equals(p._qw) && this._qx.Equals(p._qx) && this._qy.Equals(p._qy) && this._qz.Equals(p._qz) && this._motionProf.Equals(p._motionProf) && this._level.Equals(p._level) && this._useExactRotation.Equals(p._useExactRotation) && this._checkDestinationFree.Equals(p._checkDestinationFree); } 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._qw.GetHashCode(); hash = hash * 23 + this._qx.GetHashCode(); hash = hash * 23 + this._qy.GetHashCode(); hash = hash * 23 + this._qz.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._level.GetHashCode(); hash = hash * 23 + this._useExactRotation.GetHashCode(); hash = hash * 23 + this._checkDestinationFree.GetHashCode(); return hash; } } } public partial class PlaceObjectOnGroundHere { /**** Constructors ****/ public PlaceObjectOnGroundHere() { } public PlaceObjectOnGroundHere(System.IO.Stream stream) { Unpack(stream); } public PlaceObjectOnGroundHere(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 PlaceOnObject { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = 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; } } /**** Constructors ****/ public PlaceOnObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public PlaceOnObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; } public PlaceOnObject(System.IO.Stream stream) { Unpack(stream); } public PlaceOnObject(System.IO.BinaryReader reader) { Unpack(reader); } public PlaceOnObject Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); } public int Size { get { return 51; } } 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 ==(PlaceOnObject a, PlaceOnObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlaceOnObject a, PlaceOnObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlaceOnObject); } public bool Equals(PlaceOnObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); return hash; } } } public partial class PlaceRelObject { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _placementOffsetX_mm; // float_32 private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public float placementOffsetX_mm { get { return _placementOffsetX_mm; } set { _placementOffsetX_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; } } /**** Constructors ****/ public PlaceRelObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public PlaceRelObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float placementOffsetX_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.placementOffsetX_mm = placementOffsetX_mm; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; } public PlaceRelObject(System.IO.Stream stream) { Unpack(stream); } public PlaceRelObject(System.IO.BinaryReader reader) { Unpack(reader); } public PlaceRelObject Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float placementOffsetX_mm, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.placementOffsetX_mm = placementOffsetX_mm; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _placementOffsetX_mm = reader.ReadSingle(); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_placementOffsetX_mm); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); } public int Size { get { return 55; } } 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 ==(PlaceRelObject a, PlaceRelObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlaceRelObject a, PlaceRelObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlaceRelObject); } public bool Equals(PlaceRelObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._placementOffsetX_mm.Equals(p._placementOffsetX_mm) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._placementOffsetX_mm.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); return hash; } } } public partial class PlayAnimation { private uint _numLoops; // uint_32 private string _animationName; // string[uint_8] private bool _ignoreBodyTrack = false; // bool private bool _ignoreHeadTrack = false; // bool private bool _ignoreLiftTrack = false; // bool public uint numLoops { get { return _numLoops; } set { _numLoops = value; } } public string animationName { get { return _animationName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("animationName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _animationName = value; } } public bool ignoreBodyTrack { get { return _ignoreBodyTrack; } set { _ignoreBodyTrack = value; } } public bool ignoreHeadTrack { get { return _ignoreHeadTrack; } set { _ignoreHeadTrack = value; } } public bool ignoreLiftTrack { get { return _ignoreLiftTrack; } set { _ignoreLiftTrack = value; } } /**** Constructors ****/ public PlayAnimation() { } public PlayAnimation(uint numLoops, string animationName, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.animationName = animationName; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; } public PlayAnimation(System.IO.Stream stream) { Unpack(stream); } public PlayAnimation(System.IO.BinaryReader reader) { Unpack(reader); } public PlayAnimation Initialize(uint numLoops, string animationName, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.animationName = animationName; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; 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) { _numLoops = reader.ReadUInt32(); int _animationName_length = (int)reader.ReadByte(); byte[] _animationName_bytes = reader.ReadBytes(_animationName_length); _animationName = System.Text.Encoding.UTF8.GetString(_animationName_bytes); _ignoreBodyTrack = reader.ReadBoolean(); _ignoreHeadTrack = reader.ReadBoolean(); _ignoreLiftTrack = 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)_numLoops); if (_animationName != null) { byte[] _animationName_bytes = System.Text.Encoding.UTF8.GetBytes(_animationName); writer.Write((byte)_animationName_bytes.Length); writer.Write(_animationName_bytes); } else { writer.Write((byte)0); } writer.Write((bool)_ignoreBodyTrack); writer.Write((bool)_ignoreHeadTrack); writer.Write((bool)_ignoreLiftTrack); } public int Size { get { int result = 0; result += 4; // uint_32 result += 1; // uint_8 if (animationName != null) { result += System.Text.Encoding.UTF8.GetByteCount(animationName); } 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 ==(PlayAnimation a, PlayAnimation b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlayAnimation a, PlayAnimation b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlayAnimation); } public bool Equals(PlayAnimation p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._numLoops.Equals(p._numLoops) && this._animationName.Equals(p._animationName) && this._ignoreBodyTrack.Equals(p._ignoreBodyTrack) && this._ignoreHeadTrack.Equals(p._ignoreHeadTrack) && this._ignoreLiftTrack.Equals(p._ignoreLiftTrack); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._numLoops.GetHashCode(); hash = hash * 23 + this._ignoreBodyTrack.GetHashCode(); hash = hash * 23 + this._ignoreHeadTrack.GetHashCode(); hash = hash * 23 + this._ignoreLiftTrack.GetHashCode(); return hash; } } } public partial class ListAnimations { /**** Constructors ****/ public ListAnimations() { } public ListAnimations(System.IO.Stream stream) { Unpack(stream); } public ListAnimations(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 PlayAnimationGroup { private uint _numLoops; // uint_32 private string _animationGroupName; // string[uint_8] private bool _ignoreBodyTrack = false; // bool private bool _ignoreHeadTrack = false; // bool private bool _ignoreLiftTrack = false; // bool public uint numLoops { get { return _numLoops; } set { _numLoops = value; } } public string animationGroupName { get { return _animationGroupName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("animationGroupName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _animationGroupName = value; } } public bool ignoreBodyTrack { get { return _ignoreBodyTrack; } set { _ignoreBodyTrack = value; } } public bool ignoreHeadTrack { get { return _ignoreHeadTrack; } set { _ignoreHeadTrack = value; } } public bool ignoreLiftTrack { get { return _ignoreLiftTrack; } set { _ignoreLiftTrack = value; } } /**** Constructors ****/ public PlayAnimationGroup() { } public PlayAnimationGroup(uint numLoops, string animationGroupName, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.animationGroupName = animationGroupName; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; } public PlayAnimationGroup(System.IO.Stream stream) { Unpack(stream); } public PlayAnimationGroup(System.IO.BinaryReader reader) { Unpack(reader); } public PlayAnimationGroup Initialize(uint numLoops, string animationGroupName, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.animationGroupName = animationGroupName; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; 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) { _numLoops = reader.ReadUInt32(); int _animationGroupName_length = (int)reader.ReadByte(); byte[] _animationGroupName_bytes = reader.ReadBytes(_animationGroupName_length); _animationGroupName = System.Text.Encoding.UTF8.GetString(_animationGroupName_bytes); _ignoreBodyTrack = reader.ReadBoolean(); _ignoreHeadTrack = reader.ReadBoolean(); _ignoreLiftTrack = 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)_numLoops); if (_animationGroupName != null) { byte[] _animationGroupName_bytes = System.Text.Encoding.UTF8.GetBytes(_animationGroupName); writer.Write((byte)_animationGroupName_bytes.Length); writer.Write(_animationGroupName_bytes); } else { writer.Write((byte)0); } writer.Write((bool)_ignoreBodyTrack); writer.Write((bool)_ignoreHeadTrack); writer.Write((bool)_ignoreLiftTrack); } public int Size { get { int result = 0; result += 4; // uint_32 result += 1; // uint_8 if (animationGroupName != null) { result += System.Text.Encoding.UTF8.GetByteCount(animationGroupName); } 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 ==(PlayAnimationGroup a, PlayAnimationGroup b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlayAnimationGroup a, PlayAnimationGroup b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlayAnimationGroup); } public bool Equals(PlayAnimationGroup p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._numLoops.Equals(p._numLoops) && this._animationGroupName.Equals(p._animationGroupName) && this._ignoreBodyTrack.Equals(p._ignoreBodyTrack) && this._ignoreHeadTrack.Equals(p._ignoreHeadTrack) && this._ignoreLiftTrack.Equals(p._ignoreLiftTrack); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._numLoops.GetHashCode(); hash = hash * 23 + this._ignoreBodyTrack.GetHashCode(); hash = hash * 23 + this._ignoreHeadTrack.GetHashCode(); hash = hash * 23 + this._ignoreLiftTrack.GetHashCode(); return hash; } } } public partial class PlayAnimationTrigger { private uint _numLoops; // uint_32 private Anki.Vector.AnimationTrigger _trigger; // AnimationTrigger private bool _useLiftSafe; // bool private bool _ignoreBodyTrack; // bool private bool _ignoreHeadTrack; // bool private bool _ignoreLiftTrack; // bool public uint numLoops { get { return _numLoops; } set { _numLoops = value; } } public Anki.Vector.AnimationTrigger trigger { get { return _trigger; } set { _trigger = value; } } public bool useLiftSafe { get { return _useLiftSafe; } set { _useLiftSafe = value; } } public bool ignoreBodyTrack { get { return _ignoreBodyTrack; } set { _ignoreBodyTrack = value; } } public bool ignoreHeadTrack { get { return _ignoreHeadTrack; } set { _ignoreHeadTrack = value; } } public bool ignoreLiftTrack { get { return _ignoreLiftTrack; } set { _ignoreLiftTrack = value; } } /**** Constructors ****/ public PlayAnimationTrigger() { } public PlayAnimationTrigger(uint numLoops, Anki.Vector.AnimationTrigger trigger, bool useLiftSafe, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.trigger = trigger; this.useLiftSafe = useLiftSafe; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; } public PlayAnimationTrigger(System.IO.Stream stream) { Unpack(stream); } public PlayAnimationTrigger(System.IO.BinaryReader reader) { Unpack(reader); } public PlayAnimationTrigger Initialize(uint numLoops, Anki.Vector.AnimationTrigger trigger, bool useLiftSafe, bool ignoreBodyTrack, bool ignoreHeadTrack, bool ignoreLiftTrack) { this.numLoops = numLoops; this.trigger = trigger; this.useLiftSafe = useLiftSafe; this.ignoreBodyTrack = ignoreBodyTrack; this.ignoreHeadTrack = ignoreHeadTrack; this.ignoreLiftTrack = ignoreLiftTrack; 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) { _numLoops = reader.ReadUInt32(); _trigger = (Anki.Vector.AnimationTrigger)reader.ReadInt32(); _useLiftSafe = reader.ReadBoolean(); _ignoreBodyTrack = reader.ReadBoolean(); _ignoreHeadTrack = reader.ReadBoolean(); _ignoreLiftTrack = 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)_numLoops); writer.Write((int)_trigger); writer.Write((bool)_useLiftSafe); writer.Write((bool)_ignoreBodyTrack); writer.Write((bool)_ignoreHeadTrack); writer.Write((bool)_ignoreLiftTrack); } public int Size { get { return 12; } } 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 ==(PlayAnimationTrigger a, PlayAnimationTrigger b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlayAnimationTrigger a, PlayAnimationTrigger b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlayAnimationTrigger); } public bool Equals(PlayAnimationTrigger p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._numLoops.Equals(p._numLoops) && this._trigger.Equals(p._trigger) && this._useLiftSafe.Equals(p._useLiftSafe) && this._ignoreBodyTrack.Equals(p._ignoreBodyTrack) && this._ignoreHeadTrack.Equals(p._ignoreHeadTrack) && this._ignoreLiftTrack.Equals(p._ignoreLiftTrack); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._numLoops.GetHashCode(); hash = hash * 23 + this._trigger.GetHashCode(); hash = hash * 23 + this._useLiftSafe.GetHashCode(); hash = hash * 23 + this._ignoreBodyTrack.GetHashCode(); hash = hash * 23 + this._ignoreHeadTrack.GetHashCode(); hash = hash * 23 + this._ignoreLiftTrack.GetHashCode(); return hash; } } } public partial class PopAWheelie { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = 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; } } /**** Constructors ****/ public PopAWheelie() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public PopAWheelie(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; } public PopAWheelie(System.IO.Stream stream) { Unpack(stream); } public PopAWheelie(System.IO.BinaryReader reader) { Unpack(reader); } public PopAWheelie Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); } public int Size { get { return 51; } } 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 ==(PopAWheelie a, PopAWheelie b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PopAWheelie a, PopAWheelie b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PopAWheelie); } public bool Equals(PopAWheelie p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); return hash; } } } public partial class FacePlant { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _approachAngle_rad; // float_32 private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = 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; } } /**** Constructors ****/ public FacePlant() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public FacePlant(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; } public FacePlant(System.IO.Stream stream) { Unpack(stream); } public FacePlant(System.IO.BinaryReader reader) { Unpack(reader); } public FacePlant Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool useApproachAngle, bool usePreDockPose) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; 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.PathMotionProfile(reader); _approachAngle_rad = reader.ReadSingle(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_approachAngle_rad); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); } public int Size { get { return 51; } } 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 ==(FacePlant a, FacePlant b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(FacePlant a, FacePlant b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as FacePlant); } public bool Equals(FacePlant p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); return hash; } } } public partial class RealignWithObject { private int _objectID; // int_32 private float _dist_mm; // float_32 public int objectID { get { return _objectID; } set { _objectID = value; } } public float dist_mm { get { return _dist_mm; } set { _dist_mm = value; } } /**** Constructors ****/ public RealignWithObject() { } public RealignWithObject(int objectID, float dist_mm) { this.objectID = objectID; this.dist_mm = dist_mm; } public RealignWithObject(System.IO.Stream stream) { Unpack(stream); } public RealignWithObject(System.IO.BinaryReader reader) { Unpack(reader); } public RealignWithObject Initialize(int objectID, float dist_mm) { this.objectID = objectID; this.dist_mm = dist_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) { _objectID = reader.ReadInt32(); _dist_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) { writer.Write((int)_objectID); writer.Write((float)_dist_mm); } public int Size { get { return 8; } } 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 ==(RealignWithObject a, RealignWithObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RealignWithObject a, RealignWithObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RealignWithObject); } public bool Equals(RealignWithObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._dist_mm.Equals(p._dist_mm); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._dist_mm.GetHashCode(); return hash; } } } public partial class RollObject { private int _objectID; // int_32 private Anki.Vector.PathMotionProfile _motionProf; // PathMotionProfile private float _approachAngle_rad; // float_32 private bool _doDeepRoll; // bool private bool _useApproachAngle; // bool private bool _usePreDockPose; // bool private bool _rollWithoutDocking = false; // bool public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.PathMotionProfile motionProf { get { return _motionProf; } set { if (value == null) { throw new System.ArgumentNullException("motionProf cannot be null.", "value"); } _motionProf = value; } } public float approachAngle_rad { get { return _approachAngle_rad; } set { _approachAngle_rad = value; } } public bool doDeepRoll { get { return _doDeepRoll; } set { _doDeepRoll = value; } } public bool useApproachAngle { get { return _useApproachAngle; } set { _useApproachAngle = value; } } public bool usePreDockPose { get { return _usePreDockPose; } set { _usePreDockPose = value; } } public bool rollWithoutDocking { get { return _rollWithoutDocking; } set { _rollWithoutDocking = value; } } /**** Constructors ****/ public RollObject() { this.motionProf = new Anki.Vector.PathMotionProfile(); } public RollObject(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool doDeepRoll, bool useApproachAngle, bool usePreDockPose, bool rollWithoutDocking) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.doDeepRoll = doDeepRoll; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; this.rollWithoutDocking = rollWithoutDocking; } public RollObject(System.IO.Stream stream) { Unpack(stream); } public RollObject(System.IO.BinaryReader reader) { Unpack(reader); } public RollObject Initialize(int objectID, Anki.Vector.PathMotionProfile motionProf, float approachAngle_rad, bool doDeepRoll, bool useApproachAngle, bool usePreDockPose, bool rollWithoutDocking) { this.objectID = objectID; this.motionProf = motionProf; this.approachAngle_rad = approachAngle_rad; this.doDeepRoll = doDeepRoll; this.useApproachAngle = useApproachAngle; this.usePreDockPose = usePreDockPose; this.rollWithoutDocking = rollWithoutDocking; 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.PathMotionProfile(reader); _approachAngle_rad = reader.ReadSingle(); _doDeepRoll = reader.ReadBoolean(); _useApproachAngle = reader.ReadBoolean(); _usePreDockPose = reader.ReadBoolean(); _rollWithoutDocking = 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)_objectID); _motionProf.Pack(writer); writer.Write((float)_approachAngle_rad); writer.Write((bool)_doDeepRoll); writer.Write((bool)_useApproachAngle); writer.Write((bool)_usePreDockPose); writer.Write((bool)_rollWithoutDocking); } public int Size { get { return 53; } } 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 ==(RollObject a, RollObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RollObject a, RollObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RollObject); } public bool Equals(RollObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._motionProf.Equals(p._motionProf) && this._approachAngle_rad.Equals(p._approachAngle_rad) && this._doDeepRoll.Equals(p._doDeepRoll) && this._useApproachAngle.Equals(p._useApproachAngle) && this._usePreDockPose.Equals(p._usePreDockPose) && this._rollWithoutDocking.Equals(p._rollWithoutDocking); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._motionProf.GetHashCode(); hash = hash * 23 + this._approachAngle_rad.GetHashCode(); hash = hash * 23 + this._doDeepRoll.GetHashCode(); hash = hash * 23 + this._useApproachAngle.GetHashCode(); hash = hash * 23 + this._usePreDockPose.GetHashCode(); hash = hash * 23 + this._rollWithoutDocking.GetHashCode(); return hash; } } } public partial class SayText { private string _text; // string[uint_8] private Anki.Vector.AnimationTrigger _playEvent; // AnimationTrigger private Anki.AudioMetaData.SwitchState.Robot_Vic_External_Processing _voiceStyle; // Robot_Vic_External_Processing private float _durationScalar = 1.0f; // float_32 public string text { get { return _text; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("text string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _text = value; } } public Anki.Vector.AnimationTrigger playEvent { get { return _playEvent; } set { _playEvent = value; } } public Anki.AudioMetaData.SwitchState.Robot_Vic_External_Processing voiceStyle { get { return _voiceStyle; } set { _voiceStyle = value; } } public float durationScalar { get { return _durationScalar; } set { _durationScalar = value; } } /**** Constructors ****/ public SayText() { } public SayText(string text, Anki.Vector.AnimationTrigger playEvent, Anki.AudioMetaData.SwitchState.Robot_Vic_External_Processing voiceStyle, float durationScalar) { this.text = text; this.playEvent = playEvent; this.voiceStyle = voiceStyle; this.durationScalar = durationScalar; } public SayText(System.IO.Stream stream) { Unpack(stream); } public SayText(System.IO.BinaryReader reader) { Unpack(reader); } public SayText Initialize(string text, Anki.Vector.AnimationTrigger playEvent, Anki.AudioMetaData.SwitchState.Robot_Vic_External_Processing voiceStyle, float durationScalar) { this.text = text; this.playEvent = playEvent; this.voiceStyle = voiceStyle; this.durationScalar = durationScalar; 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 _text_length = (int)reader.ReadByte(); byte[] _text_bytes = reader.ReadBytes(_text_length); _text = System.Text.Encoding.UTF8.GetString(_text_bytes); _playEvent = (Anki.Vector.AnimationTrigger)reader.ReadInt32(); _voiceStyle = (Anki.AudioMetaData.SwitchState.Robot_Vic_External_Processing)reader.ReadUInt32(); _durationScalar = 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) { if (_text != null) { byte[] _text_bytes = System.Text.Encoding.UTF8.GetBytes(_text); writer.Write((byte)_text_bytes.Length); writer.Write(_text_bytes); } else { writer.Write((byte)0); } writer.Write((int)_playEvent); writer.Write((uint)_voiceStyle); writer.Write((float)_durationScalar); } public int Size { get { int result = 0; result += 1; // uint_8 if (text != null) { result += System.Text.Encoding.UTF8.GetByteCount(text); } result += 4; // AnimationTrigger result += 4; // Robot_Vic_External_Processing result += 4; // float_32 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 ==(SayText a, SayText b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SayText a, SayText b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SayText); } public bool Equals(SayText p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._text.Equals(p._text) && this._playEvent.Equals(p._playEvent) && this._voiceStyle.Equals(p._voiceStyle) && this._durationScalar.Equals(p._durationScalar); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._playEvent.GetHashCode(); hash = hash * 23 + this._voiceStyle.GetHashCode(); hash = hash * 23 + this._durationScalar.GetHashCode(); return hash; } } } public enum SearchForNearbyObjectDefaults : int { BackupDistance_mm = -20, BackupSpeed_mms = 100, HeadAngle_deg = -5 }; public partial class SearchForNearbyObject { private int _desiredObjectID = -1; // int_32 private float _backupDistance_mm = 0.0f; // float_32 private float _backupSpeed_mms = 0.0f; // float_32 private float _headAngle_rad = 0.0f; // float_32 public int desiredObjectID { get { return _desiredObjectID; } set { _desiredObjectID = value; } } public float backupDistance_mm { get { return _backupDistance_mm; } set { _backupDistance_mm = value; } } public float backupSpeed_mms { get { return _backupSpeed_mms; } set { _backupSpeed_mms = value; } } public float headAngle_rad { get { return _headAngle_rad; } set { _headAngle_rad = value; } } /**** Constructors ****/ public SearchForNearbyObject() { } public SearchForNearbyObject(int desiredObjectID, float backupDistance_mm, float backupSpeed_mms, float headAngle_rad) { this.desiredObjectID = desiredObjectID; this.backupDistance_mm = backupDistance_mm; this.backupSpeed_mms = backupSpeed_mms; this.headAngle_rad = headAngle_rad; } public SearchForNearbyObject(System.IO.Stream stream) { Unpack(stream); } public SearchForNearbyObject(System.IO.BinaryReader reader) { Unpack(reader); } public SearchForNearbyObject Initialize(int desiredObjectID, float backupDistance_mm, float backupSpeed_mms, float headAngle_rad) { this.desiredObjectID = desiredObjectID; this.backupDistance_mm = backupDistance_mm; this.backupSpeed_mms = backupSpeed_mms; this.headAngle_rad = headAngle_rad; 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) { _desiredObjectID = reader.ReadInt32(); _backupDistance_mm = reader.ReadSingle(); _backupSpeed_mms = reader.ReadSingle(); _headAngle_rad = 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((int)_desiredObjectID); writer.Write((float)_backupDistance_mm); writer.Write((float)_backupSpeed_mms); writer.Write((float)_headAngle_rad); } 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 ==(SearchForNearbyObject a, SearchForNearbyObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SearchForNearbyObject a, SearchForNearbyObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SearchForNearbyObject); } public bool Equals(SearchForNearbyObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._desiredObjectID.Equals(p._desiredObjectID) && this._backupDistance_mm.Equals(p._backupDistance_mm) && this._backupSpeed_mms.Equals(p._backupSpeed_mms) && this._headAngle_rad.Equals(p._headAngle_rad); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._desiredObjectID.GetHashCode(); hash = hash * 23 + this._backupDistance_mm.GetHashCode(); hash = hash * 23 + this._backupSpeed_mms.GetHashCode(); hash = hash * 23 + this._headAngle_rad.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 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 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 partial class TrackToFace { private uint _faceID; // uint_32 private bool _headOnly; // bool private bool _moveEyes; // bool public uint faceID { get { return _faceID; } set { _faceID = value; } } public bool headOnly { get { return _headOnly; } set { _headOnly = value; } } public bool moveEyes { get { return _moveEyes; } set { _moveEyes = value; } } /**** Constructors ****/ public TrackToFace() { } public TrackToFace(uint faceID, bool headOnly, bool moveEyes) { this.faceID = faceID; this.headOnly = headOnly; this.moveEyes = moveEyes; } public TrackToFace(System.IO.Stream stream) { Unpack(stream); } public TrackToFace(System.IO.BinaryReader reader) { Unpack(reader); } public TrackToFace Initialize(uint faceID, bool headOnly, bool moveEyes) { this.faceID = faceID; this.headOnly = headOnly; this.moveEyes = moveEyes; 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.ReadUInt32(); _headOnly = reader.ReadBoolean(); _moveEyes = 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)_faceID); writer.Write((bool)_headOnly); writer.Write((bool)_moveEyes); } public int Size { get { return 6; } } 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 ==(TrackToFace a, TrackToFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TrackToFace a, TrackToFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TrackToFace); } public bool Equals(TrackToFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._headOnly.Equals(p._headOnly) && this._moveEyes.Equals(p._moveEyes); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); hash = hash * 23 + this._headOnly.GetHashCode(); hash = hash * 23 + this._moveEyes.GetHashCode(); return hash; } } } public partial class TrackToObject { private uint _objectID; // uint_32 private bool _headOnly; // bool private bool _moveEyes; // bool public uint objectID { get { return _objectID; } set { _objectID = value; } } public bool headOnly { get { return _headOnly; } set { _headOnly = value; } } public bool moveEyes { get { return _moveEyes; } set { _moveEyes = value; } } /**** Constructors ****/ public TrackToObject() { } public TrackToObject(uint objectID, bool headOnly, bool moveEyes) { this.objectID = objectID; this.headOnly = headOnly; this.moveEyes = moveEyes; } public TrackToObject(System.IO.Stream stream) { Unpack(stream); } public TrackToObject(System.IO.BinaryReader reader) { Unpack(reader); } public TrackToObject Initialize(uint objectID, bool headOnly, bool moveEyes) { this.objectID = objectID; this.headOnly = headOnly; this.moveEyes = moveEyes; 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.ReadUInt32(); _headOnly = reader.ReadBoolean(); _moveEyes = 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)_objectID); writer.Write((bool)_headOnly); writer.Write((bool)_moveEyes); } public int Size { get { return 6; } } 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 ==(TrackToObject a, TrackToObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TrackToObject a, TrackToObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TrackToObject); } public bool Equals(TrackToObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._headOnly.Equals(p._headOnly) && this._moveEyes.Equals(p._moveEyes); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._headOnly.GetHashCode(); hash = hash * 23 + this._moveEyes.GetHashCode(); return hash; } } } public partial class TrackToLaserPoint { /**** Constructors ****/ public TrackToLaserPoint() { } public TrackToLaserPoint(System.IO.Stream stream) { Unpack(stream); } public TrackToLaserPoint(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 TrackToPet { private float _timeout_sec; // float_32 private uint _petID; // uint_32 private Anki.Vision.PetType _petType; // PetType public float timeout_sec { get { return _timeout_sec; } set { _timeout_sec = value; } } public uint petID { get { return _petID; } set { _petID = value; } } public Anki.Vision.PetType petType { get { return _petType; } set { _petType = value; } } /**** Constructors ****/ public TrackToPet() { } public TrackToPet(float timeout_sec, uint petID, Anki.Vision.PetType petType) { this.timeout_sec = timeout_sec; this.petID = petID; this.petType = petType; } public TrackToPet(System.IO.Stream stream) { Unpack(stream); } public TrackToPet(System.IO.BinaryReader reader) { Unpack(reader); } public TrackToPet Initialize(float timeout_sec, uint petID, Anki.Vision.PetType petType) { this.timeout_sec = timeout_sec; this.petID = petID; this.petType = petType; 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) { _timeout_sec = reader.ReadSingle(); _petID = reader.ReadUInt32(); _petType = (Anki.Vision.PetType)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)_timeout_sec); writer.Write((uint)_petID); writer.Write((byte)_petType); } 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 ==(TrackToPet a, TrackToPet b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TrackToPet a, TrackToPet b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TrackToPet); } public bool Equals(TrackToPet p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timeout_sec.Equals(p._timeout_sec) && this._petID.Equals(p._petID) && this._petType.Equals(p._petType); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timeout_sec.GetHashCode(); hash = hash * 23 + this._petID.GetHashCode(); hash = hash * 23 + this._petType.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 TurnInPlaceAtSpeed { private float _speed_rad_per_sec; // float_32 private float _accel_rad_per_sec2; // float_32 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; } } /**** Constructors ****/ public TurnInPlaceAtSpeed() { } public TurnInPlaceAtSpeed(float speed_rad_per_sec, float accel_rad_per_sec2) { this.speed_rad_per_sec = speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; } public TurnInPlaceAtSpeed(System.IO.Stream stream) { Unpack(stream); } public TurnInPlaceAtSpeed(System.IO.BinaryReader reader) { Unpack(reader); } public TurnInPlaceAtSpeed Initialize(float speed_rad_per_sec, float accel_rad_per_sec2) { this.speed_rad_per_sec = speed_rad_per_sec; this.accel_rad_per_sec2 = accel_rad_per_sec2; 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(); _accel_rad_per_sec2 = 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); writer.Write((float)_accel_rad_per_sec2); } public int Size { get { return 8; } } 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 ==(TurnInPlaceAtSpeed a, TurnInPlaceAtSpeed b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnInPlaceAtSpeed a, TurnInPlaceAtSpeed b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnInPlaceAtSpeed); } public bool Equals(TurnInPlaceAtSpeed p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._speed_rad_per_sec.Equals(p._speed_rad_per_sec) && this._accel_rad_per_sec2.Equals(p._accel_rad_per_sec2); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._speed_rad_per_sec.GetHashCode(); hash = hash * 23 + this._accel_rad_per_sec2.GetHashCode(); return hash; } } } public partial class TurnTowardsFace { private int _faceID; // int_32 private float _maxTurnAngle_rad; // float_32 private float _maxPanSpeed_radPerSec = 0.0f; // float_32 private float _panAccel_radPerSec2 = 0.0f; // float_32 private float _panTolerance_rad = 0.0f; // float_32 private float _maxTiltSpeed_radPerSec = 0.0f; // float_32 private float _tiltAccel_radPerSec2 = 0.0f; // float_32 private float _tiltTolerance_rad = 0.0f; // float_32 private bool _sayName = false; // bool private Anki.Vector.AnimationTrigger _namedTrigger; // AnimationTrigger private Anki.Vector.AnimationTrigger _unnamedTrigger; // AnimationTrigger public int faceID { get { return _faceID; } set { _faceID = value; } } public float maxTurnAngle_rad { get { return _maxTurnAngle_rad; } set { _maxTurnAngle_rad = value; } } public float maxPanSpeed_radPerSec { get { return _maxPanSpeed_radPerSec; } set { _maxPanSpeed_radPerSec = value; } } public float panAccel_radPerSec2 { get { return _panAccel_radPerSec2; } set { _panAccel_radPerSec2 = value; } } public float panTolerance_rad { get { return _panTolerance_rad; } set { _panTolerance_rad = value; } } public float maxTiltSpeed_radPerSec { get { return _maxTiltSpeed_radPerSec; } set { _maxTiltSpeed_radPerSec = value; } } public float tiltAccel_radPerSec2 { get { return _tiltAccel_radPerSec2; } set { _tiltAccel_radPerSec2 = value; } } public float tiltTolerance_rad { get { return _tiltTolerance_rad; } set { _tiltTolerance_rad = value; } } public bool sayName { get { return _sayName; } set { _sayName = value; } } public Anki.Vector.AnimationTrigger namedTrigger { get { return _namedTrigger; } set { _namedTrigger = value; } } public Anki.Vector.AnimationTrigger unnamedTrigger { get { return _unnamedTrigger; } set { _unnamedTrigger = value; } } /**** Constructors ****/ public TurnTowardsFace() { } public TurnTowardsFace(int faceID, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool sayName, Anki.Vector.AnimationTrigger namedTrigger, Anki.Vector.AnimationTrigger unnamedTrigger) { this.faceID = faceID; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.sayName = sayName; this.namedTrigger = namedTrigger; this.unnamedTrigger = unnamedTrigger; } public TurnTowardsFace(System.IO.Stream stream) { Unpack(stream); } public TurnTowardsFace(System.IO.BinaryReader reader) { Unpack(reader); } public TurnTowardsFace Initialize(int faceID, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool sayName, Anki.Vector.AnimationTrigger namedTrigger, Anki.Vector.AnimationTrigger unnamedTrigger) { this.faceID = faceID; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.sayName = sayName; this.namedTrigger = namedTrigger; this.unnamedTrigger = unnamedTrigger; 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(); _maxTurnAngle_rad = reader.ReadSingle(); _maxPanSpeed_radPerSec = reader.ReadSingle(); _panAccel_radPerSec2 = reader.ReadSingle(); _panTolerance_rad = reader.ReadSingle(); _maxTiltSpeed_radPerSec = reader.ReadSingle(); _tiltAccel_radPerSec2 = reader.ReadSingle(); _tiltTolerance_rad = reader.ReadSingle(); _sayName = reader.ReadBoolean(); _namedTrigger = (Anki.Vector.AnimationTrigger)reader.ReadInt32(); _unnamedTrigger = (Anki.Vector.AnimationTrigger)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); writer.Write((float)_maxTurnAngle_rad); writer.Write((float)_maxPanSpeed_radPerSec); writer.Write((float)_panAccel_radPerSec2); writer.Write((float)_panTolerance_rad); writer.Write((float)_maxTiltSpeed_radPerSec); writer.Write((float)_tiltAccel_radPerSec2); writer.Write((float)_tiltTolerance_rad); writer.Write((bool)_sayName); writer.Write((int)_namedTrigger); writer.Write((int)_unnamedTrigger); } 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 ==(TurnTowardsFace a, TurnTowardsFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnTowardsFace a, TurnTowardsFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnTowardsFace); } public bool Equals(TurnTowardsFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._maxTurnAngle_rad.Equals(p._maxTurnAngle_rad) && this._maxPanSpeed_radPerSec.Equals(p._maxPanSpeed_radPerSec) && this._panAccel_radPerSec2.Equals(p._panAccel_radPerSec2) && this._panTolerance_rad.Equals(p._panTolerance_rad) && this._maxTiltSpeed_radPerSec.Equals(p._maxTiltSpeed_radPerSec) && this._tiltAccel_radPerSec2.Equals(p._tiltAccel_radPerSec2) && this._tiltTolerance_rad.Equals(p._tiltTolerance_rad) && this._sayName.Equals(p._sayName) && this._namedTrigger.Equals(p._namedTrigger) && this._unnamedTrigger.Equals(p._unnamedTrigger); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); hash = hash * 23 + this._maxTurnAngle_rad.GetHashCode(); hash = hash * 23 + this._maxPanSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._panAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._panTolerance_rad.GetHashCode(); hash = hash * 23 + this._maxTiltSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._tiltAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._tiltTolerance_rad.GetHashCode(); hash = hash * 23 + this._sayName.GetHashCode(); hash = hash * 23 + this._namedTrigger.GetHashCode(); hash = hash * 23 + this._unnamedTrigger.GetHashCode(); return hash; } } } public partial class TurnTowardsImagePoint { private uint _timestamp; // uint_32 private float _x; // float_32 private float _y; // float_32 private float _maxPanSpeed_radPerSec = 0.0f; // float_32 private float _panAccel_radPerSec2 = 0.0f; // float_32 private float _panTolerance_rad = 0.0f; // float_32 private float _maxTiltSpeed_radPerSec = 0.0f; // float_32 private float _tiltAccel_radPerSec2 = 0.0f; // float_32 private float _tiltTolerance_rad = 0.0f; // float_32 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public float x { get { return _x; } set { _x = value; } } public float y { get { return _y; } set { _y = value; } } public float maxPanSpeed_radPerSec { get { return _maxPanSpeed_radPerSec; } set { _maxPanSpeed_radPerSec = value; } } public float panAccel_radPerSec2 { get { return _panAccel_radPerSec2; } set { _panAccel_radPerSec2 = value; } } public float panTolerance_rad { get { return _panTolerance_rad; } set { _panTolerance_rad = value; } } public float maxTiltSpeed_radPerSec { get { return _maxTiltSpeed_radPerSec; } set { _maxTiltSpeed_radPerSec = value; } } public float tiltAccel_radPerSec2 { get { return _tiltAccel_radPerSec2; } set { _tiltAccel_radPerSec2 = value; } } public float tiltTolerance_rad { get { return _tiltTolerance_rad; } set { _tiltTolerance_rad = value; } } /**** Constructors ****/ public TurnTowardsImagePoint() { } public TurnTowardsImagePoint(uint timestamp, float x, float y, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad) { this.timestamp = timestamp; this.x = x; this.y = y; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; } public TurnTowardsImagePoint(System.IO.Stream stream) { Unpack(stream); } public TurnTowardsImagePoint(System.IO.BinaryReader reader) { Unpack(reader); } public TurnTowardsImagePoint Initialize(uint timestamp, float x, float y, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad) { this.timestamp = timestamp; this.x = x; this.y = y; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; 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) { _timestamp = reader.ReadUInt32(); _x = reader.ReadSingle(); _y = reader.ReadSingle(); _maxPanSpeed_radPerSec = reader.ReadSingle(); _panAccel_radPerSec2 = reader.ReadSingle(); _panTolerance_rad = reader.ReadSingle(); _maxTiltSpeed_radPerSec = reader.ReadSingle(); _tiltAccel_radPerSec2 = reader.ReadSingle(); _tiltTolerance_rad = 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((uint)_timestamp); writer.Write((float)_x); writer.Write((float)_y); writer.Write((float)_maxPanSpeed_radPerSec); writer.Write((float)_panAccel_radPerSec2); writer.Write((float)_panTolerance_rad); writer.Write((float)_maxTiltSpeed_radPerSec); writer.Write((float)_tiltAccel_radPerSec2); writer.Write((float)_tiltTolerance_rad); } public int Size { get { return 36; } } 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 ==(TurnTowardsImagePoint a, TurnTowardsImagePoint b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnTowardsImagePoint a, TurnTowardsImagePoint b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnTowardsImagePoint); } public bool Equals(TurnTowardsImagePoint p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._x.Equals(p._x) && this._y.Equals(p._y) && this._maxPanSpeed_radPerSec.Equals(p._maxPanSpeed_radPerSec) && this._panAccel_radPerSec2.Equals(p._panAccel_radPerSec2) && this._panTolerance_rad.Equals(p._panTolerance_rad) && this._maxTiltSpeed_radPerSec.Equals(p._maxTiltSpeed_radPerSec) && this._tiltAccel_radPerSec2.Equals(p._tiltAccel_radPerSec2) && this._tiltTolerance_rad.Equals(p._tiltTolerance_rad); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._x.GetHashCode(); hash = hash * 23 + this._y.GetHashCode(); hash = hash * 23 + this._maxPanSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._panAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._panTolerance_rad.GetHashCode(); hash = hash * 23 + this._maxTiltSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._tiltAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._tiltTolerance_rad.GetHashCode(); return hash; } } } public partial class TurnTowardsLastFacePose { private float _maxTurnAngle_rad; // float_32 private float _maxPanSpeed_radPerSec = 0.0f; // float_32 private float _panAccel_radPerSec2 = 0.0f; // float_32 private float _panTolerance_rad = 0.0f; // float_32 private float _maxTiltSpeed_radPerSec = 0.0f; // float_32 private float _tiltAccel_radPerSec2 = 0.0f; // float_32 private float _tiltTolerance_rad = 0.0f; // float_32 private bool _sayName = false; // bool private Anki.Vector.AnimationTrigger _namedTrigger; // AnimationTrigger private Anki.Vector.AnimationTrigger _unnamedTrigger; // AnimationTrigger public float maxTurnAngle_rad { get { return _maxTurnAngle_rad; } set { _maxTurnAngle_rad = value; } } public float maxPanSpeed_radPerSec { get { return _maxPanSpeed_radPerSec; } set { _maxPanSpeed_radPerSec = value; } } public float panAccel_radPerSec2 { get { return _panAccel_radPerSec2; } set { _panAccel_radPerSec2 = value; } } public float panTolerance_rad { get { return _panTolerance_rad; } set { _panTolerance_rad = value; } } public float maxTiltSpeed_radPerSec { get { return _maxTiltSpeed_radPerSec; } set { _maxTiltSpeed_radPerSec = value; } } public float tiltAccel_radPerSec2 { get { return _tiltAccel_radPerSec2; } set { _tiltAccel_radPerSec2 = value; } } public float tiltTolerance_rad { get { return _tiltTolerance_rad; } set { _tiltTolerance_rad = value; } } public bool sayName { get { return _sayName; } set { _sayName = value; } } public Anki.Vector.AnimationTrigger namedTrigger { get { return _namedTrigger; } set { _namedTrigger = value; } } public Anki.Vector.AnimationTrigger unnamedTrigger { get { return _unnamedTrigger; } set { _unnamedTrigger = value; } } /**** Constructors ****/ public TurnTowardsLastFacePose() { } public TurnTowardsLastFacePose(float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool sayName, Anki.Vector.AnimationTrigger namedTrigger, Anki.Vector.AnimationTrigger unnamedTrigger) { this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.sayName = sayName; this.namedTrigger = namedTrigger; this.unnamedTrigger = unnamedTrigger; } public TurnTowardsLastFacePose(System.IO.Stream stream) { Unpack(stream); } public TurnTowardsLastFacePose(System.IO.BinaryReader reader) { Unpack(reader); } public TurnTowardsLastFacePose Initialize(float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool sayName, Anki.Vector.AnimationTrigger namedTrigger, Anki.Vector.AnimationTrigger unnamedTrigger) { this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.sayName = sayName; this.namedTrigger = namedTrigger; this.unnamedTrigger = unnamedTrigger; 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) { _maxTurnAngle_rad = reader.ReadSingle(); _maxPanSpeed_radPerSec = reader.ReadSingle(); _panAccel_radPerSec2 = reader.ReadSingle(); _panTolerance_rad = reader.ReadSingle(); _maxTiltSpeed_radPerSec = reader.ReadSingle(); _tiltAccel_radPerSec2 = reader.ReadSingle(); _tiltTolerance_rad = reader.ReadSingle(); _sayName = reader.ReadBoolean(); _namedTrigger = (Anki.Vector.AnimationTrigger)reader.ReadInt32(); _unnamedTrigger = (Anki.Vector.AnimationTrigger)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((float)_maxTurnAngle_rad); writer.Write((float)_maxPanSpeed_radPerSec); writer.Write((float)_panAccel_radPerSec2); writer.Write((float)_panTolerance_rad); writer.Write((float)_maxTiltSpeed_radPerSec); writer.Write((float)_tiltAccel_radPerSec2); writer.Write((float)_tiltTolerance_rad); writer.Write((bool)_sayName); writer.Write((int)_namedTrigger); writer.Write((int)_unnamedTrigger); } 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 ==(TurnTowardsLastFacePose a, TurnTowardsLastFacePose b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnTowardsLastFacePose a, TurnTowardsLastFacePose b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnTowardsLastFacePose); } public bool Equals(TurnTowardsLastFacePose p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._maxTurnAngle_rad.Equals(p._maxTurnAngle_rad) && this._maxPanSpeed_radPerSec.Equals(p._maxPanSpeed_radPerSec) && this._panAccel_radPerSec2.Equals(p._panAccel_radPerSec2) && this._panTolerance_rad.Equals(p._panTolerance_rad) && this._maxTiltSpeed_radPerSec.Equals(p._maxTiltSpeed_radPerSec) && this._tiltAccel_radPerSec2.Equals(p._tiltAccel_radPerSec2) && this._tiltTolerance_rad.Equals(p._tiltTolerance_rad) && this._sayName.Equals(p._sayName) && this._namedTrigger.Equals(p._namedTrigger) && this._unnamedTrigger.Equals(p._unnamedTrigger); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._maxTurnAngle_rad.GetHashCode(); hash = hash * 23 + this._maxPanSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._panAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._panTolerance_rad.GetHashCode(); hash = hash * 23 + this._maxTiltSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._tiltAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._tiltTolerance_rad.GetHashCode(); hash = hash * 23 + this._sayName.GetHashCode(); hash = hash * 23 + this._namedTrigger.GetHashCode(); hash = hash * 23 + this._unnamedTrigger.GetHashCode(); return hash; } } } public partial class TurnTowardsObject { private uint _objectID; // uint_32 private float _maxTurnAngle_rad; // float_32 private float _maxPanSpeed_radPerSec = 0.0f; // float_32 private float _panAccel_radPerSec2 = 0.0f; // float_32 private float _panTolerance_rad = 0.0f; // float_32 private float _maxTiltSpeed_radPerSec = 0.0f; // float_32 private float _tiltAccel_radPerSec2 = 0.0f; // float_32 private float _tiltTolerance_rad = 0.0f; // float_32 private bool _visuallyVerifyWhenDone; // bool private bool _headTrackWhenDone; // bool public uint objectID { get { return _objectID; } set { _objectID = value; } } public float maxTurnAngle_rad { get { return _maxTurnAngle_rad; } set { _maxTurnAngle_rad = value; } } public float maxPanSpeed_radPerSec { get { return _maxPanSpeed_radPerSec; } set { _maxPanSpeed_radPerSec = value; } } public float panAccel_radPerSec2 { get { return _panAccel_radPerSec2; } set { _panAccel_radPerSec2 = value; } } public float panTolerance_rad { get { return _panTolerance_rad; } set { _panTolerance_rad = value; } } public float maxTiltSpeed_radPerSec { get { return _maxTiltSpeed_radPerSec; } set { _maxTiltSpeed_radPerSec = value; } } public float tiltAccel_radPerSec2 { get { return _tiltAccel_radPerSec2; } set { _tiltAccel_radPerSec2 = value; } } public float tiltTolerance_rad { get { return _tiltTolerance_rad; } set { _tiltTolerance_rad = value; } } public bool visuallyVerifyWhenDone { get { return _visuallyVerifyWhenDone; } set { _visuallyVerifyWhenDone = value; } } public bool headTrackWhenDone { get { return _headTrackWhenDone; } set { _headTrackWhenDone = value; } } /**** Constructors ****/ public TurnTowardsObject() { } public TurnTowardsObject(uint objectID, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool visuallyVerifyWhenDone, bool headTrackWhenDone) { this.objectID = objectID; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.visuallyVerifyWhenDone = visuallyVerifyWhenDone; this.headTrackWhenDone = headTrackWhenDone; } public TurnTowardsObject(System.IO.Stream stream) { Unpack(stream); } public TurnTowardsObject(System.IO.BinaryReader reader) { Unpack(reader); } public TurnTowardsObject Initialize(uint objectID, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad, bool visuallyVerifyWhenDone, bool headTrackWhenDone) { this.objectID = objectID; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; this.visuallyVerifyWhenDone = visuallyVerifyWhenDone; this.headTrackWhenDone = headTrackWhenDone; 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.ReadUInt32(); _maxTurnAngle_rad = reader.ReadSingle(); _maxPanSpeed_radPerSec = reader.ReadSingle(); _panAccel_radPerSec2 = reader.ReadSingle(); _panTolerance_rad = reader.ReadSingle(); _maxTiltSpeed_radPerSec = reader.ReadSingle(); _tiltAccel_radPerSec2 = reader.ReadSingle(); _tiltTolerance_rad = reader.ReadSingle(); _visuallyVerifyWhenDone = reader.ReadBoolean(); _headTrackWhenDone = 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)_objectID); writer.Write((float)_maxTurnAngle_rad); writer.Write((float)_maxPanSpeed_radPerSec); writer.Write((float)_panAccel_radPerSec2); writer.Write((float)_panTolerance_rad); writer.Write((float)_maxTiltSpeed_radPerSec); writer.Write((float)_tiltAccel_radPerSec2); writer.Write((float)_tiltTolerance_rad); writer.Write((bool)_visuallyVerifyWhenDone); writer.Write((bool)_headTrackWhenDone); } public int Size { get { return 34; } } 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 ==(TurnTowardsObject a, TurnTowardsObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnTowardsObject a, TurnTowardsObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnTowardsObject); } public bool Equals(TurnTowardsObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._maxTurnAngle_rad.Equals(p._maxTurnAngle_rad) && this._maxPanSpeed_radPerSec.Equals(p._maxPanSpeed_radPerSec) && this._panAccel_radPerSec2.Equals(p._panAccel_radPerSec2) && this._panTolerance_rad.Equals(p._panTolerance_rad) && this._maxTiltSpeed_radPerSec.Equals(p._maxTiltSpeed_radPerSec) && this._tiltAccel_radPerSec2.Equals(p._tiltAccel_radPerSec2) && this._tiltTolerance_rad.Equals(p._tiltTolerance_rad) && this._visuallyVerifyWhenDone.Equals(p._visuallyVerifyWhenDone) && this._headTrackWhenDone.Equals(p._headTrackWhenDone); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._maxTurnAngle_rad.GetHashCode(); hash = hash * 23 + this._maxPanSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._panAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._panTolerance_rad.GetHashCode(); hash = hash * 23 + this._maxTiltSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._tiltAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._tiltTolerance_rad.GetHashCode(); hash = hash * 23 + this._visuallyVerifyWhenDone.GetHashCode(); hash = hash * 23 + this._headTrackWhenDone.GetHashCode(); return hash; } } } public partial class TurnTowardsPose { private float _world_x; // float_32 private float _world_y; // float_32 private float _world_z; // float_32 private float _maxTurnAngle_rad; // float_32 private float _maxPanSpeed_radPerSec = 0.0f; // float_32 private float _panAccel_radPerSec2 = 0.0f; // float_32 private float _panTolerance_rad = 0.0f; // float_32 private float _maxTiltSpeed_radPerSec = 0.0f; // float_32 private float _tiltAccel_radPerSec2 = 0.0f; // float_32 private float _tiltTolerance_rad = 0.0f; // float_32 public float world_x { get { return _world_x; } set { _world_x = value; } } public float world_y { get { return _world_y; } set { _world_y = value; } } public float world_z { get { return _world_z; } set { _world_z = value; } } public float maxTurnAngle_rad { get { return _maxTurnAngle_rad; } set { _maxTurnAngle_rad = value; } } public float maxPanSpeed_radPerSec { get { return _maxPanSpeed_radPerSec; } set { _maxPanSpeed_radPerSec = value; } } public float panAccel_radPerSec2 { get { return _panAccel_radPerSec2; } set { _panAccel_radPerSec2 = value; } } public float panTolerance_rad { get { return _panTolerance_rad; } set { _panTolerance_rad = value; } } public float maxTiltSpeed_radPerSec { get { return _maxTiltSpeed_radPerSec; } set { _maxTiltSpeed_radPerSec = value; } } public float tiltAccel_radPerSec2 { get { return _tiltAccel_radPerSec2; } set { _tiltAccel_radPerSec2 = value; } } public float tiltTolerance_rad { get { return _tiltTolerance_rad; } set { _tiltTolerance_rad = value; } } /**** Constructors ****/ public TurnTowardsPose() { } public TurnTowardsPose(float world_x, float world_y, float world_z, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad) { this.world_x = world_x; this.world_y = world_y; this.world_z = world_z; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; } public TurnTowardsPose(System.IO.Stream stream) { Unpack(stream); } public TurnTowardsPose(System.IO.BinaryReader reader) { Unpack(reader); } public TurnTowardsPose Initialize(float world_x, float world_y, float world_z, float maxTurnAngle_rad, float maxPanSpeed_radPerSec, float panAccel_radPerSec2, float panTolerance_rad, float maxTiltSpeed_radPerSec, float tiltAccel_radPerSec2, float tiltTolerance_rad) { this.world_x = world_x; this.world_y = world_y; this.world_z = world_z; this.maxTurnAngle_rad = maxTurnAngle_rad; this.maxPanSpeed_radPerSec = maxPanSpeed_radPerSec; this.panAccel_radPerSec2 = panAccel_radPerSec2; this.panTolerance_rad = panTolerance_rad; this.maxTiltSpeed_radPerSec = maxTiltSpeed_radPerSec; this.tiltAccel_radPerSec2 = tiltAccel_radPerSec2; this.tiltTolerance_rad = tiltTolerance_rad; 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) { _world_x = reader.ReadSingle(); _world_y = reader.ReadSingle(); _world_z = reader.ReadSingle(); _maxTurnAngle_rad = reader.ReadSingle(); _maxPanSpeed_radPerSec = reader.ReadSingle(); _panAccel_radPerSec2 = reader.ReadSingle(); _panTolerance_rad = reader.ReadSingle(); _maxTiltSpeed_radPerSec = reader.ReadSingle(); _tiltAccel_radPerSec2 = reader.ReadSingle(); _tiltTolerance_rad = 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)_world_x); writer.Write((float)_world_y); writer.Write((float)_world_z); writer.Write((float)_maxTurnAngle_rad); writer.Write((float)_maxPanSpeed_radPerSec); writer.Write((float)_panAccel_radPerSec2); writer.Write((float)_panTolerance_rad); writer.Write((float)_maxTiltSpeed_radPerSec); writer.Write((float)_tiltAccel_radPerSec2); writer.Write((float)_tiltTolerance_rad); } public int Size { get { return 40; } } 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 ==(TurnTowardsPose a, TurnTowardsPose b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TurnTowardsPose a, TurnTowardsPose b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TurnTowardsPose); } public bool Equals(TurnTowardsPose p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._world_x.Equals(p._world_x) && this._world_y.Equals(p._world_y) && this._world_z.Equals(p._world_z) && this._maxTurnAngle_rad.Equals(p._maxTurnAngle_rad) && this._maxPanSpeed_radPerSec.Equals(p._maxPanSpeed_radPerSec) && this._panAccel_radPerSec2.Equals(p._panAccel_radPerSec2) && this._panTolerance_rad.Equals(p._panTolerance_rad) && this._maxTiltSpeed_radPerSec.Equals(p._maxTiltSpeed_radPerSec) && this._tiltAccel_radPerSec2.Equals(p._tiltAccel_radPerSec2) && this._tiltTolerance_rad.Equals(p._tiltTolerance_rad); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._world_x.GetHashCode(); hash = hash * 23 + this._world_y.GetHashCode(); hash = hash * 23 + this._world_z.GetHashCode(); hash = hash * 23 + this._maxTurnAngle_rad.GetHashCode(); hash = hash * 23 + this._maxPanSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._panAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._panTolerance_rad.GetHashCode(); hash = hash * 23 + this._maxTiltSpeed_radPerSec.GetHashCode(); hash = hash * 23 + this._tiltAccel_radPerSec2.GetHashCode(); hash = hash * 23 + this._tiltTolerance_rad.GetHashCode(); return hash; } } } public partial class VisuallyVerifyFace { private int _faceID; // int_32 private int _numImagesToWait; // int_32 public int faceID { get { return _faceID; } set { _faceID = value; } } public int numImagesToWait { get { return _numImagesToWait; } set { _numImagesToWait = value; } } /**** Constructors ****/ public VisuallyVerifyFace() { } public VisuallyVerifyFace(int faceID, int numImagesToWait) { this.faceID = faceID; this.numImagesToWait = numImagesToWait; } public VisuallyVerifyFace(System.IO.Stream stream) { Unpack(stream); } public VisuallyVerifyFace(System.IO.BinaryReader reader) { Unpack(reader); } public VisuallyVerifyFace Initialize(int faceID, int numImagesToWait) { this.faceID = faceID; this.numImagesToWait = numImagesToWait; 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(); _numImagesToWait = 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); writer.Write((int)_numImagesToWait); } public int Size { get { return 8; } } 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 ==(VisuallyVerifyFace a, VisuallyVerifyFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(VisuallyVerifyFace a, VisuallyVerifyFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as VisuallyVerifyFace); } public bool Equals(VisuallyVerifyFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._numImagesToWait.Equals(p._numImagesToWait); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); hash = hash * 23 + this._numImagesToWait.GetHashCode(); return hash; } } } public partial class VisuallyVerifyObject { private uint _objectID; // uint_32 private int _numImagesToWait; // int_32 public uint objectID { get { return _objectID; } set { _objectID = value; } } public int numImagesToWait { get { return _numImagesToWait; } set { _numImagesToWait = value; } } /**** Constructors ****/ public VisuallyVerifyObject() { } public VisuallyVerifyObject(uint objectID, int numImagesToWait) { this.objectID = objectID; this.numImagesToWait = numImagesToWait; } public VisuallyVerifyObject(System.IO.Stream stream) { Unpack(stream); } public VisuallyVerifyObject(System.IO.BinaryReader reader) { Unpack(reader); } public VisuallyVerifyObject Initialize(uint objectID, int numImagesToWait) { this.objectID = objectID; this.numImagesToWait = numImagesToWait; 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.ReadUInt32(); _numImagesToWait = 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((uint)_objectID); writer.Write((int)_numImagesToWait); } public int Size { get { return 8; } } 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 ==(VisuallyVerifyObject a, VisuallyVerifyObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(VisuallyVerifyObject a, VisuallyVerifyObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as VisuallyVerifyObject); } public bool Equals(VisuallyVerifyObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._numImagesToWait.Equals(p._numImagesToWait); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._numImagesToWait.GetHashCode(); return hash; } } } public partial class VisuallyVerifyNoObjectAtPose { private float _x_mm; // float_32 private float _y_mm; // float_32 private float _z_mm; // float_32 private float _x_thresh_mm = 10.0f; // float_32 private float _y_thresh_mm = 10.0f; // float_32 private float _z_thresh_mm = 10.0f; // float_32 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 z_mm { get { return _z_mm; } set { _z_mm = value; } } public float x_thresh_mm { get { return _x_thresh_mm; } set { _x_thresh_mm = value; } } public float y_thresh_mm { get { return _y_thresh_mm; } set { _y_thresh_mm = value; } } public float z_thresh_mm { get { return _z_thresh_mm; } set { _z_thresh_mm = value; } } /**** Constructors ****/ public VisuallyVerifyNoObjectAtPose() { } public VisuallyVerifyNoObjectAtPose(float x_mm, float y_mm, float z_mm, float x_thresh_mm, float y_thresh_mm, float z_thresh_mm) { this.x_mm = x_mm; this.y_mm = y_mm; this.z_mm = z_mm; this.x_thresh_mm = x_thresh_mm; this.y_thresh_mm = y_thresh_mm; this.z_thresh_mm = z_thresh_mm; } public VisuallyVerifyNoObjectAtPose(System.IO.Stream stream) { Unpack(stream); } public VisuallyVerifyNoObjectAtPose(System.IO.BinaryReader reader) { Unpack(reader); } public VisuallyVerifyNoObjectAtPose Initialize(float x_mm, float y_mm, float z_mm, float x_thresh_mm, float y_thresh_mm, float z_thresh_mm) { this.x_mm = x_mm; this.y_mm = y_mm; this.z_mm = z_mm; this.x_thresh_mm = x_thresh_mm; this.y_thresh_mm = y_thresh_mm; this.z_thresh_mm = z_thresh_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) { _x_mm = reader.ReadSingle(); _y_mm = reader.ReadSingle(); _z_mm = reader.ReadSingle(); _x_thresh_mm = reader.ReadSingle(); _y_thresh_mm = reader.ReadSingle(); _z_thresh_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) { writer.Write((float)_x_mm); writer.Write((float)_y_mm); writer.Write((float)_z_mm); writer.Write((float)_x_thresh_mm); writer.Write((float)_y_thresh_mm); writer.Write((float)_z_thresh_mm); } public int Size { get { return 24; } } 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 ==(VisuallyVerifyNoObjectAtPose a, VisuallyVerifyNoObjectAtPose b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(VisuallyVerifyNoObjectAtPose a, VisuallyVerifyNoObjectAtPose b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as VisuallyVerifyNoObjectAtPose); } public bool Equals(VisuallyVerifyNoObjectAtPose 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._z_mm.Equals(p._z_mm) && this._x_thresh_mm.Equals(p._x_thresh_mm) && this._y_thresh_mm.Equals(p._y_thresh_mm) && this._z_thresh_mm.Equals(p._z_thresh_mm); } 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._z_mm.GetHashCode(); hash = hash * 23 + this._x_thresh_mm.GetHashCode(); hash = hash * 23 + this._y_thresh_mm.GetHashCode(); hash = hash * 23 + this._z_thresh_mm.GetHashCode(); return hash; } } } public partial class Wait { private float _time_s; // float_32 public float time_s { get { return _time_s; } set { _time_s = value; } } /**** Constructors ****/ public Wait() { } public Wait(float time_s) { this.time_s = time_s; } public Wait(System.IO.Stream stream) { Unpack(stream); } public Wait(System.IO.BinaryReader reader) { Unpack(reader); } public Wait Initialize(float time_s) { this.time_s = time_s; 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) { _time_s = 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)_time_s); } 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 ==(Wait a, Wait b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(Wait a, Wait b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as Wait); } public bool Equals(Wait p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._time_s.Equals(p._time_s); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._time_s.GetHashCode(); return hash; } } } public partial class WaitForImages { private uint _numImages; // uint_32 private uint _afterTimeStamp = 0; // uint_32 private Anki.Vector.VisionMode _visionMode; // VisionMode public uint numImages { get { return _numImages; } set { _numImages = value; } } public uint afterTimeStamp { get { return _afterTimeStamp; } set { _afterTimeStamp = value; } } public Anki.Vector.VisionMode visionMode { get { return _visionMode; } set { _visionMode = value; } } /**** Constructors ****/ public WaitForImages() { } public WaitForImages(uint numImages, uint afterTimeStamp, Anki.Vector.VisionMode visionMode) { this.numImages = numImages; this.afterTimeStamp = afterTimeStamp; this.visionMode = visionMode; } public WaitForImages(System.IO.Stream stream) { Unpack(stream); } public WaitForImages(System.IO.BinaryReader reader) { Unpack(reader); } public WaitForImages Initialize(uint numImages, uint afterTimeStamp, Anki.Vector.VisionMode visionMode) { this.numImages = numImages; this.afterTimeStamp = afterTimeStamp; this.visionMode = visionMode; 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) { _numImages = reader.ReadUInt32(); _afterTimeStamp = reader.ReadUInt32(); _visionMode = (Anki.Vector.VisionMode)reader.ReadUInt32(); } 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)_numImages); writer.Write((uint)_afterTimeStamp); writer.Write((uint)_visionMode); } public int Size { get { return 12; } } 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 ==(WaitForImages a, WaitForImages b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(WaitForImages a, WaitForImages b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as WaitForImages); } public bool Equals(WaitForImages p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._numImages.Equals(p._numImages) && this._afterTimeStamp.Equals(p._afterTimeStamp) && this._visionMode.Equals(p._visionMode); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._numImages.GetHashCode(); hash = hash * 23 + this._afterTimeStamp.GetHashCode(); hash = hash * 23 + this._visionMode.GetHashCode(); return hash; } } } public class RobotActionUnion { public enum Tag { alignWithObject, // 0 calibrateMotors, // 1 cliffAlignToWhite, // 2 driveStraight, // 3 facePlant, // 4 flipBlock, // 5 gotoObject, // 6 gotoPose, // 7 mountCharger, // 8 panAndTilt, // 9 pickupObject, // 10 placeObjectOnGround, // 11 placeObjectOnGroundHere, // 12 placeOnObject, // 13 placeRelObject, // 14 playAnimation, // 15 playAnimationGroup, // 16 playAnimationTrigger, // 17 popAWheelie, // 18 realignWithObject, // 19 rollObject, // 20 sayText, // 21 searchForNearbyObject, // 22 setHeadAngle, // 23 setLiftHeight, // 24 setLiftAngle, // 25 trackFace, // 26 trackObject, // 27 trackLaserPoint, // 28 trackPet, // 29 turnInPlace, // 30 turnTowardsFace, // 31 turnTowardsImagePoint, // 32 turnTowardsLastFacePose, // 33 turnTowardsObject, // 34 turnTowardsPose, // 35 visuallyVerifyFace, // 36 visuallyVerifyNoObjectAtPose, // 37 visuallyVerifyObject, // 38 wait, // 39 waitForImages, // 40 count, // 41 INVALID = 255 }; private Tag _tag = Tag.INVALID; public Tag GetTag() { return _tag; } private object _state = null; public object GetState() { return _state; } public Anki.Vector.ExternalInterface.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.ExternalInterface.AlignWithObject)this._state; } set { _tag = (value != null) ? Tag.alignWithObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.CalibrateMotors calibrateMotors { get { if (_tag != Tag.calibrateMotors) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"calibrateMotors\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.CalibrateMotors)this._state; } set { _tag = (value != null) ? Tag.calibrateMotors : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.CliffAlignToWhite cliffAlignToWhite { get { if (_tag != Tag.cliffAlignToWhite) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"cliffAlignToWhite\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.CliffAlignToWhite)this._state; } set { _tag = (value != null) ? Tag.cliffAlignToWhite : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.DriveStraight)this._state; } set { _tag = (value != null) ? Tag.driveStraight : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.FacePlant facePlant { get { if (_tag != Tag.facePlant) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"facePlant\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.FacePlant)this._state; } set { _tag = (value != null) ? Tag.facePlant : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.FlipBlock flipBlock { get { if (_tag != Tag.flipBlock) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"flipBlock\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.FlipBlock)this._state; } set { _tag = (value != null) ? Tag.flipBlock : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.GotoObject gotoObject { get { if (_tag != Tag.gotoObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"gotoObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.GotoObject)this._state; } set { _tag = (value != null) ? Tag.gotoObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.GotoPose)this._state; } set { _tag = (value != null) ? Tag.gotoPose : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MountCharger mountCharger { get { if (_tag != Tag.mountCharger) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"mountCharger\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MountCharger)this._state; } set { _tag = (value != null) ? Tag.mountCharger : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PanAndTilt panAndTilt { get { if (_tag != Tag.panAndTilt) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"panAndTilt\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PanAndTilt)this._state; } set { _tag = (value != null) ? Tag.panAndTilt : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PickupObject pickupObject { get { if (_tag != Tag.pickupObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"pickupObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PickupObject)this._state; } set { _tag = (value != null) ? Tag.pickupObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlaceObjectOnGround placeObjectOnGround { get { if (_tag != Tag.placeObjectOnGround) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"placeObjectOnGround\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlaceObjectOnGround)this._state; } set { _tag = (value != null) ? Tag.placeObjectOnGround : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlaceObjectOnGroundHere placeObjectOnGroundHere { get { if (_tag != Tag.placeObjectOnGroundHere) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"placeObjectOnGroundHere\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlaceObjectOnGroundHere)this._state; } set { _tag = (value != null) ? Tag.placeObjectOnGroundHere : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlaceOnObject placeOnObject { get { if (_tag != Tag.placeOnObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"placeOnObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlaceOnObject)this._state; } set { _tag = (value != null) ? Tag.placeOnObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlaceRelObject placeRelObject { get { if (_tag != Tag.placeRelObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"placeRelObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlaceRelObject)this._state; } set { _tag = (value != null) ? Tag.placeRelObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlayAnimation playAnimation { get { if (_tag != Tag.playAnimation) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"playAnimation\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlayAnimation)this._state; } set { _tag = (value != null) ? Tag.playAnimation : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlayAnimationGroup playAnimationGroup { get { if (_tag != Tag.playAnimationGroup) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"playAnimationGroup\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlayAnimationGroup)this._state; } set { _tag = (value != null) ? Tag.playAnimationGroup : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlayAnimationTrigger playAnimationTrigger { get { if (_tag != Tag.playAnimationTrigger) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"playAnimationTrigger\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlayAnimationTrigger)this._state; } set { _tag = (value != null) ? Tag.playAnimationTrigger : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PopAWheelie popAWheelie { get { if (_tag != Tag.popAWheelie) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"popAWheelie\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PopAWheelie)this._state; } set { _tag = (value != null) ? Tag.popAWheelie : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RealignWithObject realignWithObject { get { if (_tag != Tag.realignWithObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"realignWithObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RealignWithObject)this._state; } set { _tag = (value != null) ? Tag.realignWithObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RollObject rollObject { get { if (_tag != Tag.rollObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"rollObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RollObject)this._state; } set { _tag = (value != null) ? Tag.rollObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.SayText sayText { get { if (_tag != Tag.sayText) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"sayText\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.SayText)this._state; } set { _tag = (value != null) ? Tag.sayText : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.SearchForNearbyObject searchForNearbyObject { get { if (_tag != Tag.searchForNearbyObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"searchForNearbyObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.SearchForNearbyObject)this._state; } set { _tag = (value != null) ? Tag.searchForNearbyObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.SetHeadAngle)this._state; } set { _tag = (value != null) ? Tag.setHeadAngle : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.SetLiftHeight)this._state; } set { _tag = (value != null) ? Tag.setLiftHeight : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.SetLiftAngle)this._state; } set { _tag = (value != null) ? Tag.setLiftAngle : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TrackToFace trackFace { get { if (_tag != Tag.trackFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"trackFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TrackToFace)this._state; } set { _tag = (value != null) ? Tag.trackFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TrackToObject trackObject { get { if (_tag != Tag.trackObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"trackObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TrackToObject)this._state; } set { _tag = (value != null) ? Tag.trackObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TrackToLaserPoint trackLaserPoint { get { if (_tag != Tag.trackLaserPoint) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"trackLaserPoint\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TrackToLaserPoint)this._state; } set { _tag = (value != null) ? Tag.trackLaserPoint : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TrackToPet trackPet { get { if (_tag != Tag.trackPet) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"trackPet\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TrackToPet)this._state; } set { _tag = (value != null) ? Tag.trackPet : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.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.ExternalInterface.TurnInPlace)this._state; } set { _tag = (value != null) ? Tag.turnInPlace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TurnTowardsFace turnTowardsFace { get { if (_tag != Tag.turnTowardsFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"turnTowardsFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TurnTowardsFace)this._state; } set { _tag = (value != null) ? Tag.turnTowardsFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TurnTowardsImagePoint turnTowardsImagePoint { get { if (_tag != Tag.turnTowardsImagePoint) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"turnTowardsImagePoint\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TurnTowardsImagePoint)this._state; } set { _tag = (value != null) ? Tag.turnTowardsImagePoint : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TurnTowardsLastFacePose turnTowardsLastFacePose { get { if (_tag != Tag.turnTowardsLastFacePose) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"turnTowardsLastFacePose\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TurnTowardsLastFacePose)this._state; } set { _tag = (value != null) ? Tag.turnTowardsLastFacePose : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TurnTowardsObject turnTowardsObject { get { if (_tag != Tag.turnTowardsObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"turnTowardsObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TurnTowardsObject)this._state; } set { _tag = (value != null) ? Tag.turnTowardsObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TurnTowardsPose turnTowardsPose { get { if (_tag != Tag.turnTowardsPose) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"turnTowardsPose\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TurnTowardsPose)this._state; } set { _tag = (value != null) ? Tag.turnTowardsPose : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.VisuallyVerifyFace visuallyVerifyFace { get { if (_tag != Tag.visuallyVerifyFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"visuallyVerifyFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.VisuallyVerifyFace)this._state; } set { _tag = (value != null) ? Tag.visuallyVerifyFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.VisuallyVerifyNoObjectAtPose visuallyVerifyNoObjectAtPose { get { if (_tag != Tag.visuallyVerifyNoObjectAtPose) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"visuallyVerifyNoObjectAtPose\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.VisuallyVerifyNoObjectAtPose)this._state; } set { _tag = (value != null) ? Tag.visuallyVerifyNoObjectAtPose : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.VisuallyVerifyObject visuallyVerifyObject { get { if (_tag != Tag.visuallyVerifyObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"visuallyVerifyObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.VisuallyVerifyObject)this._state; } set { _tag = (value != null) ? Tag.visuallyVerifyObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.Wait wait { get { if (_tag != Tag.wait) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"wait\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.Wait)this._state; } set { _tag = (value != null) ? Tag.wait : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.WaitForImages waitForImages { get { if (_tag != Tag.waitForImages) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"waitForImages\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.WaitForImages)this._state; } set { _tag = (value != null) ? Tag.waitForImages : Tag.INVALID; _state = value; } } public byte count { get { if (_tag != Tag.count) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"count\" when a value of type {0} is stored.", _tag.ToString())); } return (byte)this._state; } set { _tag = Tag.count; _state = value; } } public RobotActionUnion Initialize(T state) { _state = state; if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AlignWithObject)) { _tag = Tag.alignWithObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.CalibrateMotors)) { _tag = Tag.calibrateMotors; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.CliffAlignToWhite)) { _tag = Tag.cliffAlignToWhite; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.DriveStraight)) { _tag = Tag.driveStraight; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.FacePlant)) { _tag = Tag.facePlant; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.FlipBlock)) { _tag = Tag.flipBlock; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.GotoObject)) { _tag = Tag.gotoObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.GotoPose)) { _tag = Tag.gotoPose; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MountCharger)) { _tag = Tag.mountCharger; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PanAndTilt)) { _tag = Tag.panAndTilt; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PickupObject)) { _tag = Tag.pickupObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlaceObjectOnGround)) { _tag = Tag.placeObjectOnGround; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlaceObjectOnGroundHere)) { _tag = Tag.placeObjectOnGroundHere; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlaceOnObject)) { _tag = Tag.placeOnObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlaceRelObject)) { _tag = Tag.placeRelObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlayAnimation)) { _tag = Tag.playAnimation; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlayAnimationGroup)) { _tag = Tag.playAnimationGroup; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlayAnimationTrigger)) { _tag = Tag.playAnimationTrigger; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PopAWheelie)) { _tag = Tag.popAWheelie; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RealignWithObject)) { _tag = Tag.realignWithObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RollObject)) { _tag = Tag.rollObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SayText)) { _tag = Tag.sayText; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SearchForNearbyObject)) { _tag = Tag.searchForNearbyObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SetHeadAngle)) { _tag = Tag.setHeadAngle; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SetLiftHeight)) { _tag = Tag.setLiftHeight; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SetLiftAngle)) { _tag = Tag.setLiftAngle; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TrackToFace)) { _tag = Tag.trackFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TrackToObject)) { _tag = Tag.trackObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TrackToLaserPoint)) { _tag = Tag.trackLaserPoint; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TrackToPet)) { _tag = Tag.trackPet; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnInPlace)) { _tag = Tag.turnInPlace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnTowardsFace)) { _tag = Tag.turnTowardsFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnTowardsImagePoint)) { _tag = Tag.turnTowardsImagePoint; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnTowardsLastFacePose)) { _tag = Tag.turnTowardsLastFacePose; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnTowardsObject)) { _tag = Tag.turnTowardsObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TurnTowardsPose)) { _tag = Tag.turnTowardsPose; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.VisuallyVerifyFace)) { _tag = Tag.visuallyVerifyFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.VisuallyVerifyNoObjectAtPose)) { _tag = Tag.visuallyVerifyNoObjectAtPose; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.VisuallyVerifyObject)) { _tag = Tag.visuallyVerifyObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.Wait)) { _tag = Tag.wait; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.WaitForImages)) { _tag = Tag.waitForImages; } else if(typeof(T) == typeof(byte)) { _tag = Tag.count; } else { _state = null; _tag = Tag.INVALID; } return this; } /**** Constructors ****/ public RobotActionUnion() { } public RobotActionUnion(System.IO.Stream stream) { Unpack(stream); } public RobotActionUnion(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.alignWithObject: alignWithObject = new Anki.Vector.ExternalInterface.AlignWithObject(reader); break; case Tag.calibrateMotors: calibrateMotors = new Anki.Vector.ExternalInterface.CalibrateMotors(reader); break; case Tag.cliffAlignToWhite: cliffAlignToWhite = new Anki.Vector.ExternalInterface.CliffAlignToWhite(reader); break; case Tag.driveStraight: driveStraight = new Anki.Vector.ExternalInterface.DriveStraight(reader); break; case Tag.facePlant: facePlant = new Anki.Vector.ExternalInterface.FacePlant(reader); break; case Tag.flipBlock: flipBlock = new Anki.Vector.ExternalInterface.FlipBlock(reader); break; case Tag.gotoObject: gotoObject = new Anki.Vector.ExternalInterface.GotoObject(reader); break; case Tag.gotoPose: gotoPose = new Anki.Vector.ExternalInterface.GotoPose(reader); break; case Tag.mountCharger: mountCharger = new Anki.Vector.ExternalInterface.MountCharger(reader); break; case Tag.panAndTilt: panAndTilt = new Anki.Vector.ExternalInterface.PanAndTilt(reader); break; case Tag.pickupObject: pickupObject = new Anki.Vector.ExternalInterface.PickupObject(reader); break; case Tag.placeObjectOnGround: placeObjectOnGround = new Anki.Vector.ExternalInterface.PlaceObjectOnGround(reader); break; case Tag.placeObjectOnGroundHere: placeObjectOnGroundHere = new Anki.Vector.ExternalInterface.PlaceObjectOnGroundHere(reader); break; case Tag.placeOnObject: placeOnObject = new Anki.Vector.ExternalInterface.PlaceOnObject(reader); break; case Tag.placeRelObject: placeRelObject = new Anki.Vector.ExternalInterface.PlaceRelObject(reader); break; case Tag.playAnimation: playAnimation = new Anki.Vector.ExternalInterface.PlayAnimation(reader); break; case Tag.playAnimationGroup: playAnimationGroup = new Anki.Vector.ExternalInterface.PlayAnimationGroup(reader); break; case Tag.playAnimationTrigger: playAnimationTrigger = new Anki.Vector.ExternalInterface.PlayAnimationTrigger(reader); break; case Tag.popAWheelie: popAWheelie = new Anki.Vector.ExternalInterface.PopAWheelie(reader); break; case Tag.realignWithObject: realignWithObject = new Anki.Vector.ExternalInterface.RealignWithObject(reader); break; case Tag.rollObject: rollObject = new Anki.Vector.ExternalInterface.RollObject(reader); break; case Tag.sayText: sayText = new Anki.Vector.ExternalInterface.SayText(reader); break; case Tag.searchForNearbyObject: searchForNearbyObject = new Anki.Vector.ExternalInterface.SearchForNearbyObject(reader); break; case Tag.setHeadAngle: setHeadAngle = new Anki.Vector.ExternalInterface.SetHeadAngle(reader); break; case Tag.setLiftHeight: setLiftHeight = new Anki.Vector.ExternalInterface.SetLiftHeight(reader); break; case Tag.setLiftAngle: setLiftAngle = new Anki.Vector.ExternalInterface.SetLiftAngle(reader); break; case Tag.trackFace: trackFace = new Anki.Vector.ExternalInterface.TrackToFace(reader); break; case Tag.trackObject: trackObject = new Anki.Vector.ExternalInterface.TrackToObject(reader); break; case Tag.trackLaserPoint: trackLaserPoint = new Anki.Vector.ExternalInterface.TrackToLaserPoint(reader); break; case Tag.trackPet: trackPet = new Anki.Vector.ExternalInterface.TrackToPet(reader); break; case Tag.turnInPlace: turnInPlace = new Anki.Vector.ExternalInterface.TurnInPlace(reader); break; case Tag.turnTowardsFace: turnTowardsFace = new Anki.Vector.ExternalInterface.TurnTowardsFace(reader); break; case Tag.turnTowardsImagePoint: turnTowardsImagePoint = new Anki.Vector.ExternalInterface.TurnTowardsImagePoint(reader); break; case Tag.turnTowardsLastFacePose: turnTowardsLastFacePose = new Anki.Vector.ExternalInterface.TurnTowardsLastFacePose(reader); break; case Tag.turnTowardsObject: turnTowardsObject = new Anki.Vector.ExternalInterface.TurnTowardsObject(reader); break; case Tag.turnTowardsPose: turnTowardsPose = new Anki.Vector.ExternalInterface.TurnTowardsPose(reader); break; case Tag.visuallyVerifyFace: visuallyVerifyFace = new Anki.Vector.ExternalInterface.VisuallyVerifyFace(reader); break; case Tag.visuallyVerifyNoObjectAtPose: visuallyVerifyNoObjectAtPose = new Anki.Vector.ExternalInterface.VisuallyVerifyNoObjectAtPose(reader); break; case Tag.visuallyVerifyObject: visuallyVerifyObject = new Anki.Vector.ExternalInterface.VisuallyVerifyObject(reader); break; case Tag.wait: wait = new Anki.Vector.ExternalInterface.Wait(reader); break; case Tag.waitForImages: waitForImages = new Anki.Vector.ExternalInterface.WaitForImages(reader); break; case Tag.count: count = reader.ReadByte(); 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.alignWithObject: if (alignWithObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } alignWithObject.Pack(writer); break; case Tag.calibrateMotors: if (calibrateMotors == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } calibrateMotors.Pack(writer); break; case Tag.cliffAlignToWhite: if (cliffAlignToWhite == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } cliffAlignToWhite.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.facePlant: if (facePlant == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } facePlant.Pack(writer); break; case Tag.flipBlock: if (flipBlock == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } flipBlock.Pack(writer); break; case Tag.gotoObject: if (gotoObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } gotoObject.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.mountCharger: if (mountCharger == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } mountCharger.Pack(writer); break; case Tag.panAndTilt: if (panAndTilt == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } panAndTilt.Pack(writer); break; case Tag.pickupObject: if (pickupObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } pickupObject.Pack(writer); break; case Tag.placeObjectOnGround: if (placeObjectOnGround == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } placeObjectOnGround.Pack(writer); break; case Tag.placeObjectOnGroundHere: if (placeObjectOnGroundHere == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } placeObjectOnGroundHere.Pack(writer); break; case Tag.placeOnObject: if (placeOnObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } placeOnObject.Pack(writer); break; case Tag.placeRelObject: if (placeRelObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } placeRelObject.Pack(writer); break; case Tag.playAnimation: if (playAnimation == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } playAnimation.Pack(writer); break; case Tag.playAnimationGroup: if (playAnimationGroup == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } playAnimationGroup.Pack(writer); break; case Tag.playAnimationTrigger: if (playAnimationTrigger == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } playAnimationTrigger.Pack(writer); break; case Tag.popAWheelie: if (popAWheelie == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } popAWheelie.Pack(writer); break; case Tag.realignWithObject: if (realignWithObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } realignWithObject.Pack(writer); break; case Tag.rollObject: if (rollObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } rollObject.Pack(writer); break; case Tag.sayText: if (sayText == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } sayText.Pack(writer); break; case Tag.searchForNearbyObject: if (searchForNearbyObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } searchForNearbyObject.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.setLiftAngle: if (setLiftAngle == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } setLiftAngle.Pack(writer); break; case Tag.trackFace: if (trackFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } trackFace.Pack(writer); break; case Tag.trackObject: if (trackObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } trackObject.Pack(writer); break; case Tag.trackLaserPoint: if (trackLaserPoint == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } trackLaserPoint.Pack(writer); break; case Tag.trackPet: if (trackPet == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } trackPet.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.turnTowardsFace: if (turnTowardsFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } turnTowardsFace.Pack(writer); break; case Tag.turnTowardsImagePoint: if (turnTowardsImagePoint == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } turnTowardsImagePoint.Pack(writer); break; case Tag.turnTowardsLastFacePose: if (turnTowardsLastFacePose == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } turnTowardsLastFacePose.Pack(writer); break; case Tag.turnTowardsObject: if (turnTowardsObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } turnTowardsObject.Pack(writer); break; case Tag.turnTowardsPose: if (turnTowardsPose == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } turnTowardsPose.Pack(writer); break; case Tag.visuallyVerifyFace: if (visuallyVerifyFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } visuallyVerifyFace.Pack(writer); break; case Tag.visuallyVerifyNoObjectAtPose: if (visuallyVerifyNoObjectAtPose == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } visuallyVerifyNoObjectAtPose.Pack(writer); break; case Tag.visuallyVerifyObject: if (visuallyVerifyObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } visuallyVerifyObject.Pack(writer); break; case Tag.wait: if (wait == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } wait.Pack(writer); break; case Tag.waitForImages: if (waitForImages == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } waitForImages.Pack(writer); break; case Tag.count: writer.Write((byte)count); break; default: break; } } public int Size { get { int result = 1; // tag = byte switch(GetTag()) { case Tag.alignWithObject: if (alignWithObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += alignWithObject.Size; break; case Tag.calibrateMotors: if (calibrateMotors == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += calibrateMotors.Size; break; case Tag.cliffAlignToWhite: if (cliffAlignToWhite == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += cliffAlignToWhite.Size; break; case Tag.driveStraight: if (driveStraight == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += driveStraight.Size; break; case Tag.facePlant: if (facePlant == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += facePlant.Size; break; case Tag.flipBlock: if (flipBlock == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += flipBlock.Size; break; case Tag.gotoObject: if (gotoObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += gotoObject.Size; break; case Tag.gotoPose: if (gotoPose == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += gotoPose.Size; break; case Tag.mountCharger: if (mountCharger == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += mountCharger.Size; break; case Tag.panAndTilt: if (panAndTilt == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += panAndTilt.Size; break; case Tag.pickupObject: if (pickupObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += pickupObject.Size; break; case Tag.placeObjectOnGround: if (placeObjectOnGround == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += placeObjectOnGround.Size; break; case Tag.placeObjectOnGroundHere: if (placeObjectOnGroundHere == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += placeObjectOnGroundHere.Size; break; case Tag.placeOnObject: if (placeOnObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += placeOnObject.Size; break; case Tag.placeRelObject: if (placeRelObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += placeRelObject.Size; break; case Tag.playAnimation: if (playAnimation == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += playAnimation.Size; break; case Tag.playAnimationGroup: if (playAnimationGroup == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += playAnimationGroup.Size; break; case Tag.playAnimationTrigger: if (playAnimationTrigger == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += playAnimationTrigger.Size; break; case Tag.popAWheelie: if (popAWheelie == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += popAWheelie.Size; break; case Tag.realignWithObject: if (realignWithObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += realignWithObject.Size; break; case Tag.rollObject: if (rollObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += rollObject.Size; break; case Tag.sayText: if (sayText == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += sayText.Size; break; case Tag.searchForNearbyObject: if (searchForNearbyObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += searchForNearbyObject.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.setLiftAngle: if (setLiftAngle == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += setLiftAngle.Size; break; case Tag.trackFace: if (trackFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += trackFace.Size; break; case Tag.trackObject: if (trackObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += trackObject.Size; break; case Tag.trackLaserPoint: if (trackLaserPoint == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += trackLaserPoint.Size; break; case Tag.trackPet: if (trackPet == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += trackPet.Size; break; case Tag.turnInPlace: if (turnInPlace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnInPlace.Size; break; case Tag.turnTowardsFace: if (turnTowardsFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnTowardsFace.Size; break; case Tag.turnTowardsImagePoint: if (turnTowardsImagePoint == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnTowardsImagePoint.Size; break; case Tag.turnTowardsLastFacePose: if (turnTowardsLastFacePose == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnTowardsLastFacePose.Size; break; case Tag.turnTowardsObject: if (turnTowardsObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnTowardsObject.Size; break; case Tag.turnTowardsPose: if (turnTowardsPose == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += turnTowardsPose.Size; break; case Tag.visuallyVerifyFace: if (visuallyVerifyFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += visuallyVerifyFace.Size; break; case Tag.visuallyVerifyNoObjectAtPose: if (visuallyVerifyNoObjectAtPose == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += visuallyVerifyNoObjectAtPose.Size; break; case Tag.visuallyVerifyObject: if (visuallyVerifyObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += visuallyVerifyObject.Size; break; case Tag.wait: if (wait == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += wait.Size; break; case Tag.waitForImages: if (waitForImages == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += waitForImages.Size; break; case Tag.count: result += 1; // uint_8 break; default: // Just tag size break; } return result; } } public static bool operator ==(RobotActionUnion a, RobotActionUnion b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotActionUnion a, RobotActionUnion b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotActionUnion); } public bool Equals(RobotActionUnion 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 ExternalInterface } // namespace Vector } // namespace Anki