// Autogenerated C# message buffer code. // Source: clad/externalInterface/messageEngineToGame.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/messageEngineToGame.clad namespace Anki { namespace Vector { namespace ExternalInterface { public partial class UiDeviceAvailable { private Anki.Vector.UiConnectionType _connectionType; // UiConnectionType private uint _deviceID; // uint_32 public Anki.Vector.UiConnectionType connectionType { get { return _connectionType; } set { _connectionType = value; } } public uint deviceID { get { return _deviceID; } set { _deviceID = value; } } /**** Constructors ****/ public UiDeviceAvailable() { } public UiDeviceAvailable(Anki.Vector.UiConnectionType connectionType, uint deviceID) { this.connectionType = connectionType; this.deviceID = deviceID; } public UiDeviceAvailable(System.IO.Stream stream) { Unpack(stream); } public UiDeviceAvailable(System.IO.BinaryReader reader) { Unpack(reader); } public UiDeviceAvailable Initialize(Anki.Vector.UiConnectionType connectionType, uint deviceID) { this.connectionType = connectionType; this.deviceID = deviceID; 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) { _connectionType = (Anki.Vector.UiConnectionType)reader.ReadByte(); _deviceID = 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((byte)_connectionType); writer.Write((uint)_deviceID); } public int Size { get { return 5; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(UiDeviceAvailable a, UiDeviceAvailable b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(UiDeviceAvailable a, UiDeviceAvailable b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as UiDeviceAvailable); } public bool Equals(UiDeviceAvailable p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._connectionType.Equals(p._connectionType) && this._deviceID.Equals(p._deviceID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._connectionType.GetHashCode(); hash = hash * 23 + this._deviceID.GetHashCode(); return hash; } } } public partial class RobotConnectionResponse { private Anki.Vector.RobotConnectionResult _result; // RobotConnectionResult public Anki.Vector.RobotConnectionResult result { get { return _result; } set { _result = value; } } /**** Constructors ****/ public RobotConnectionResponse() { } public RobotConnectionResponse(Anki.Vector.RobotConnectionResult result) { this.result = result; } public RobotConnectionResponse(System.IO.Stream stream) { Unpack(stream); } public RobotConnectionResponse(System.IO.BinaryReader reader) { Unpack(reader); } public RobotConnectionResponse Initialize(Anki.Vector.RobotConnectionResult result) { this.result = result; 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) { _result = (Anki.Vector.RobotConnectionResult)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((byte)_result); } public int Size { get { return 1; } } 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 ==(RobotConnectionResponse a, RobotConnectionResponse b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotConnectionResponse a, RobotConnectionResponse b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotConnectionResponse); } public bool Equals(RobotConnectionResponse p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._result.Equals(p._result); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._result.GetHashCode(); return hash; } } } public partial class UiDeviceConnected { private byte _reserved; // uint_8 private Anki.Vector.UiConnectionType _connectionType; // UiConnectionType private uint _deviceID; // uint_32 private byte _successful; // uint_8 private byte[] _toGameCLADHash; // uint_8[16] private byte[] _toEngineCLADHash; // uint_8[16] private string _buildVersion; // string[uint_8] public byte reserved { get { return _reserved; } set { _reserved = value; } } public Anki.Vector.UiConnectionType connectionType { get { return _connectionType; } set { _connectionType = value; } } public uint deviceID { get { return _deviceID; } set { _deviceID = value; } } public byte successful { get { return _successful; } set { _successful = value; } } public byte[] toGameCLADHash { get { return _toGameCLADHash; } set { if (value == null) { throw new System.ArgumentException("toGameCLADHash fixed-length array is null. Must have a length of 16.", "value"); } if (value.Length != 16) { throw new System.ArgumentException("toGameCLADHash fixed-length array is the wrong size. Must have a length of 16.", "value"); } _toGameCLADHash = value; } } public byte[] toEngineCLADHash { get { return _toEngineCLADHash; } set { if (value == null) { throw new System.ArgumentException("toEngineCLADHash fixed-length array is null. Must have a length of 16.", "value"); } if (value.Length != 16) { throw new System.ArgumentException("toEngineCLADHash fixed-length array is the wrong size. Must have a length of 16.", "value"); } _toEngineCLADHash = value; } } public string buildVersion { get { return _buildVersion; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("buildVersion string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _buildVersion = value; } } /**** Constructors ****/ public UiDeviceConnected() { this.toGameCLADHash = new byte[16]; this.toEngineCLADHash = new byte[16]; } public UiDeviceConnected(byte reserved, Anki.Vector.UiConnectionType connectionType, uint deviceID, byte successful, byte[] toGameCLADHash, byte[] toEngineCLADHash, string buildVersion) { this.reserved = reserved; this.connectionType = connectionType; this.deviceID = deviceID; this.successful = successful; this.toGameCLADHash = toGameCLADHash; this.toEngineCLADHash = toEngineCLADHash; this.buildVersion = buildVersion; } public UiDeviceConnected(System.IO.Stream stream) { Unpack(stream); } public UiDeviceConnected(System.IO.BinaryReader reader) { Unpack(reader); } public UiDeviceConnected Initialize(byte reserved, Anki.Vector.UiConnectionType connectionType, uint deviceID, byte successful, byte[] toGameCLADHash, byte[] toEngineCLADHash, string buildVersion) { this.reserved = reserved; this.connectionType = connectionType; this.deviceID = deviceID; this.successful = successful; this.toGameCLADHash = toGameCLADHash; this.toEngineCLADHash = toEngineCLADHash; this.buildVersion = buildVersion; 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) { _reserved = reader.ReadByte(); _connectionType = (Anki.Vector.UiConnectionType)reader.ReadByte(); _deviceID = reader.ReadUInt32(); _successful = reader.ReadByte(); _toGameCLADHash = new byte[16]; for (int i = 0; i < 16; ++i) { _toGameCLADHash[i] = reader.ReadByte(); } _toEngineCLADHash = new byte[16]; for (int i = 0; i < 16; ++i) { _toEngineCLADHash[i] = reader.ReadByte(); } int _buildVersion_length = (int)reader.ReadByte(); byte[] _buildVersion_bytes = reader.ReadBytes(_buildVersion_length); _buildVersion = System.Text.Encoding.UTF8.GetString(_buildVersion_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((byte)_reserved); writer.Write((byte)_connectionType); writer.Write((uint)_deviceID); writer.Write((byte)_successful); for (int i = 0; i < 16; ++i) { writer.Write((byte)_toGameCLADHash[i]); } for (int i = 0; i < 16; ++i) { writer.Write((byte)_toEngineCLADHash[i]); } if (_buildVersion != null) { byte[] _buildVersion_bytes = System.Text.Encoding.UTF8.GetBytes(_buildVersion); writer.Write((byte)_buildVersion_bytes.Length); writer.Write(_buildVersion_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 result += 1; // UiConnectionType result += 4; // uint_32 result += 1; // uint_8 result += 16 * 1; result += 16 * 1; result += 1; // uint_8 if (buildVersion != null) { result += System.Text.Encoding.UTF8.GetByteCount(buildVersion); } 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 ==(UiDeviceConnected a, UiDeviceConnected b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(UiDeviceConnected a, UiDeviceConnected b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as UiDeviceConnected); } public bool Equals(UiDeviceConnected p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._reserved.Equals(p._reserved) && this._connectionType.Equals(p._connectionType) && this._deviceID.Equals(p._deviceID) && this._successful.Equals(p._successful) && ArrayEquals(this._toGameCLADHash,p._toGameCLADHash) && ArrayEquals(this._toEngineCLADHash,p._toEngineCLADHash) && this._buildVersion.Equals(p._buildVersion); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._reserved.GetHashCode(); hash = hash * 23 + this._connectionType.GetHashCode(); hash = hash * 23 + this._deviceID.GetHashCode(); hash = hash * 23 + this._successful.GetHashCode(); return hash; } } } public partial class GoingToSleep { private bool _triggeredFromVoiceCommand = false; // bool public bool triggeredFromVoiceCommand { get { return _triggeredFromVoiceCommand; } set { _triggeredFromVoiceCommand = value; } } /**** Constructors ****/ public GoingToSleep() { } public GoingToSleep(bool triggeredFromVoiceCommand) { this.triggeredFromVoiceCommand = triggeredFromVoiceCommand; } public GoingToSleep(System.IO.Stream stream) { Unpack(stream); } public GoingToSleep(System.IO.BinaryReader reader) { Unpack(reader); } public GoingToSleep Initialize(bool triggeredFromVoiceCommand) { this.triggeredFromVoiceCommand = triggeredFromVoiceCommand; 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) { _triggeredFromVoiceCommand = 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)_triggeredFromVoiceCommand); } public int Size { get { return 1; } } 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 ==(GoingToSleep a, GoingToSleep b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(GoingToSleep a, GoingToSleep b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as GoingToSleep); } public bool Equals(GoingToSleep p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._triggeredFromVoiceCommand.Equals(p._triggeredFromVoiceCommand); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._triggeredFromVoiceCommand.GetHashCode(); return hash; } } } public partial class CurrentCameraParams { private float _cameraGain; // float_32 private ushort _exposure_ms; // uint_16 private bool _autoExposureEnabled; // bool public float cameraGain { get { return _cameraGain; } set { _cameraGain = value; } } public ushort exposure_ms { get { return _exposure_ms; } set { _exposure_ms = value; } } public bool autoExposureEnabled { get { return _autoExposureEnabled; } set { _autoExposureEnabled = value; } } /**** Constructors ****/ public CurrentCameraParams() { } public CurrentCameraParams(float cameraGain, ushort exposure_ms, bool autoExposureEnabled) { this.cameraGain = cameraGain; this.exposure_ms = exposure_ms; this.autoExposureEnabled = autoExposureEnabled; } public CurrentCameraParams(System.IO.Stream stream) { Unpack(stream); } public CurrentCameraParams(System.IO.BinaryReader reader) { Unpack(reader); } public CurrentCameraParams Initialize(float cameraGain, ushort exposure_ms, bool autoExposureEnabled) { this.cameraGain = cameraGain; this.exposure_ms = exposure_ms; this.autoExposureEnabled = autoExposureEnabled; 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) { _cameraGain = reader.ReadSingle(); _exposure_ms = reader.ReadUInt16(); _autoExposureEnabled = 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)_cameraGain); writer.Write((ushort)_exposure_ms); writer.Write((bool)_autoExposureEnabled); } public int Size { get { return 7; } } 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 ==(CurrentCameraParams a, CurrentCameraParams b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CurrentCameraParams a, CurrentCameraParams b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CurrentCameraParams); } public bool Equals(CurrentCameraParams p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._cameraGain.Equals(p._cameraGain) && this._exposure_ms.Equals(p._exposure_ms) && this._autoExposureEnabled.Equals(p._autoExposureEnabled); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._cameraGain.GetHashCode(); hash = hash * 23 + this._exposure_ms.GetHashCode(); hash = hash * 23 + this._autoExposureEnabled.GetHashCode(); return hash; } } } public partial class CameraConfig { private float _focalLengthX; // float_32 private float _focalLengthY; // float_32 private float _centerX; // float_32 private float _centerY; // float_32 private float _fovX; // float_32 private float _fovY; // float_32 private int _minCameraExposureTime_ms; // int_32 private int _maxCameraExposureTime_ms; // int_32 private float _minCameraGain; // float_32 private float _maxCameraGain; // float_32 public float focalLengthX { get { return _focalLengthX; } set { _focalLengthX = value; } } public float focalLengthY { get { return _focalLengthY; } set { _focalLengthY = value; } } public float centerX { get { return _centerX; } set { _centerX = value; } } public float centerY { get { return _centerY; } set { _centerY = value; } } public float fovX { get { return _fovX; } set { _fovX = value; } } public float fovY { get { return _fovY; } set { _fovY = value; } } public int minCameraExposureTime_ms { get { return _minCameraExposureTime_ms; } set { _minCameraExposureTime_ms = value; } } public int maxCameraExposureTime_ms { get { return _maxCameraExposureTime_ms; } set { _maxCameraExposureTime_ms = value; } } public float minCameraGain { get { return _minCameraGain; } set { _minCameraGain = value; } } public float maxCameraGain { get { return _maxCameraGain; } set { _maxCameraGain = value; } } /**** Constructors ****/ public CameraConfig() { } public CameraConfig(float focalLengthX, float focalLengthY, float centerX, float centerY, float fovX, float fovY, int minCameraExposureTime_ms, int maxCameraExposureTime_ms, float minCameraGain, float maxCameraGain) { this.focalLengthX = focalLengthX; this.focalLengthY = focalLengthY; this.centerX = centerX; this.centerY = centerY; this.fovX = fovX; this.fovY = fovY; this.minCameraExposureTime_ms = minCameraExposureTime_ms; this.maxCameraExposureTime_ms = maxCameraExposureTime_ms; this.minCameraGain = minCameraGain; this.maxCameraGain = maxCameraGain; } public CameraConfig(System.IO.Stream stream) { Unpack(stream); } public CameraConfig(System.IO.BinaryReader reader) { Unpack(reader); } public CameraConfig Initialize(float focalLengthX, float focalLengthY, float centerX, float centerY, float fovX, float fovY, int minCameraExposureTime_ms, int maxCameraExposureTime_ms, float minCameraGain, float maxCameraGain) { this.focalLengthX = focalLengthX; this.focalLengthY = focalLengthY; this.centerX = centerX; this.centerY = centerY; this.fovX = fovX; this.fovY = fovY; this.minCameraExposureTime_ms = minCameraExposureTime_ms; this.maxCameraExposureTime_ms = maxCameraExposureTime_ms; this.minCameraGain = minCameraGain; this.maxCameraGain = maxCameraGain; 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) { _focalLengthX = reader.ReadSingle(); _focalLengthY = reader.ReadSingle(); _centerX = reader.ReadSingle(); _centerY = reader.ReadSingle(); _fovX = reader.ReadSingle(); _fovY = reader.ReadSingle(); _minCameraExposureTime_ms = reader.ReadInt32(); _maxCameraExposureTime_ms = reader.ReadInt32(); _minCameraGain = reader.ReadSingle(); _maxCameraGain = 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)_focalLengthX); writer.Write((float)_focalLengthY); writer.Write((float)_centerX); writer.Write((float)_centerY); writer.Write((float)_fovX); writer.Write((float)_fovY); writer.Write((int)_minCameraExposureTime_ms); writer.Write((int)_maxCameraExposureTime_ms); writer.Write((float)_minCameraGain); writer.Write((float)_maxCameraGain); } 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 ==(CameraConfig a, CameraConfig b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CameraConfig a, CameraConfig b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CameraConfig); } public bool Equals(CameraConfig p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._focalLengthX.Equals(p._focalLengthX) && this._focalLengthY.Equals(p._focalLengthY) && this._centerX.Equals(p._centerX) && this._centerY.Equals(p._centerY) && this._fovX.Equals(p._fovX) && this._fovY.Equals(p._fovY) && this._minCameraExposureTime_ms.Equals(p._minCameraExposureTime_ms) && this._maxCameraExposureTime_ms.Equals(p._maxCameraExposureTime_ms) && this._minCameraGain.Equals(p._minCameraGain) && this._maxCameraGain.Equals(p._maxCameraGain); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._focalLengthX.GetHashCode(); hash = hash * 23 + this._focalLengthY.GetHashCode(); hash = hash * 23 + this._centerX.GetHashCode(); hash = hash * 23 + this._centerY.GetHashCode(); hash = hash * 23 + this._fovX.GetHashCode(); hash = hash * 23 + this._fovY.GetHashCode(); hash = hash * 23 + this._minCameraExposureTime_ms.GetHashCode(); hash = hash * 23 + this._maxCameraExposureTime_ms.GetHashCode(); hash = hash * 23 + this._minCameraGain.GetHashCode(); hash = hash * 23 + this._maxCameraGain.GetHashCode(); return hash; } } } public partial class PerRobotSettings { private uint _serialNumberHead; // uint_32 private Anki.Vector.ExternalInterface.CameraConfig _cameraConfig; // CameraConfig public uint serialNumberHead { get { return _serialNumberHead; } set { _serialNumberHead = value; } } public Anki.Vector.ExternalInterface.CameraConfig cameraConfig { get { return _cameraConfig; } set { if (value == null) { throw new System.ArgumentNullException("cameraConfig cannot be null.", "value"); } _cameraConfig = value; } } /**** Constructors ****/ public PerRobotSettings() { this.cameraConfig = new Anki.Vector.ExternalInterface.CameraConfig(); } public PerRobotSettings(uint serialNumberHead, Anki.Vector.ExternalInterface.CameraConfig cameraConfig) { this.serialNumberHead = serialNumberHead; this.cameraConfig = cameraConfig; } public PerRobotSettings(System.IO.Stream stream) { Unpack(stream); } public PerRobotSettings(System.IO.BinaryReader reader) { Unpack(reader); } public PerRobotSettings Initialize(uint serialNumberHead, Anki.Vector.ExternalInterface.CameraConfig cameraConfig) { this.serialNumberHead = serialNumberHead; this.cameraConfig = cameraConfig; 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) { _serialNumberHead = reader.ReadUInt32(); _cameraConfig = new Anki.Vector.ExternalInterface.CameraConfig(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((uint)_serialNumberHead); _cameraConfig.Pack(writer); } public int Size { get { return 44; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(PerRobotSettings a, PerRobotSettings b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PerRobotSettings a, PerRobotSettings b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PerRobotSettings); } public bool Equals(PerRobotSettings p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._serialNumberHead.Equals(p._serialNumberHead) && this._cameraConfig.Equals(p._cameraConfig); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._serialNumberHead.GetHashCode(); hash = hash * 23 + this._cameraConfig.GetHashCode(); return hash; } } } public partial class RobotState { private Anki.PoseStruct3d _pose; // PoseStruct3d private float _poseAngle_rad; // float_32 private float _posePitch_rad; // float_32 private float _leftWheelSpeed_mmps; // float_32 private float _rightWheelSpeed_mmps; // float_32 private float _headAngle_rad; // float_32 private float _liftHeight_mm; // float_32 private float _batteryVoltage; // float_32 private Anki.Vector.AccelData _accel; // AccelData private Anki.Vector.GyroData _gyro; // GyroData private int _carryingObjectID; // int_32 private int _carryingObjectOnTopID; // int_32 private int _headTrackingObjectID; // int_32 private int _localizedToObjectID; // int_32 private uint _lastImageTimeStamp; // uint_32 private uint _status; // uint_32 public Anki.PoseStruct3d pose { get { return _pose; } set { if (value == null) { throw new System.ArgumentNullException("pose cannot be null.", "value"); } _pose = value; } } public float poseAngle_rad { get { return _poseAngle_rad; } set { _poseAngle_rad = value; } } public float posePitch_rad { get { return _posePitch_rad; } set { _posePitch_rad = value; } } public float leftWheelSpeed_mmps { get { return _leftWheelSpeed_mmps; } set { _leftWheelSpeed_mmps = value; } } public float rightWheelSpeed_mmps { get { return _rightWheelSpeed_mmps; } set { _rightWheelSpeed_mmps = value; } } public float headAngle_rad { get { return _headAngle_rad; } set { _headAngle_rad = value; } } public float liftHeight_mm { get { return _liftHeight_mm; } set { _liftHeight_mm = value; } } public float batteryVoltage { get { return _batteryVoltage; } set { _batteryVoltage = value; } } public Anki.Vector.AccelData accel { get { return _accel; } set { if (value == null) { throw new System.ArgumentNullException("accel cannot be null.", "value"); } _accel = value; } } public Anki.Vector.GyroData gyro { get { return _gyro; } set { if (value == null) { throw new System.ArgumentNullException("gyro cannot be null.", "value"); } _gyro = value; } } public int carryingObjectID { get { return _carryingObjectID; } set { _carryingObjectID = value; } } public int carryingObjectOnTopID { get { return _carryingObjectOnTopID; } set { _carryingObjectOnTopID = value; } } public int headTrackingObjectID { get { return _headTrackingObjectID; } set { _headTrackingObjectID = value; } } public int localizedToObjectID { get { return _localizedToObjectID; } set { _localizedToObjectID = value; } } public uint lastImageTimeStamp { get { return _lastImageTimeStamp; } set { _lastImageTimeStamp = value; } } public uint status { get { return _status; } set { _status = value; } } /**** Constructors ****/ public RobotState() { this.pose = new Anki.PoseStruct3d(); this.accel = new Anki.Vector.AccelData(); this.gyro = new Anki.Vector.GyroData(); } public RobotState(Anki.PoseStruct3d pose, float poseAngle_rad, float posePitch_rad, float leftWheelSpeed_mmps, float rightWheelSpeed_mmps, float headAngle_rad, float liftHeight_mm, float batteryVoltage, Anki.Vector.AccelData accel, Anki.Vector.GyroData gyro, int carryingObjectID, int carryingObjectOnTopID, int headTrackingObjectID, int localizedToObjectID, uint lastImageTimeStamp, uint status) { this.pose = pose; this.poseAngle_rad = poseAngle_rad; this.posePitch_rad = posePitch_rad; this.leftWheelSpeed_mmps = leftWheelSpeed_mmps; this.rightWheelSpeed_mmps = rightWheelSpeed_mmps; this.headAngle_rad = headAngle_rad; this.liftHeight_mm = liftHeight_mm; this.batteryVoltage = batteryVoltage; this.accel = accel; this.gyro = gyro; this.carryingObjectID = carryingObjectID; this.carryingObjectOnTopID = carryingObjectOnTopID; this.headTrackingObjectID = headTrackingObjectID; this.localizedToObjectID = localizedToObjectID; this.lastImageTimeStamp = lastImageTimeStamp; this.status = status; } public RobotState(System.IO.Stream stream) { Unpack(stream); } public RobotState(System.IO.BinaryReader reader) { Unpack(reader); } public RobotState Initialize(Anki.PoseStruct3d pose, float poseAngle_rad, float posePitch_rad, float leftWheelSpeed_mmps, float rightWheelSpeed_mmps, float headAngle_rad, float liftHeight_mm, float batteryVoltage, Anki.Vector.AccelData accel, Anki.Vector.GyroData gyro, int carryingObjectID, int carryingObjectOnTopID, int headTrackingObjectID, int localizedToObjectID, uint lastImageTimeStamp, uint status) { this.pose = pose; this.poseAngle_rad = poseAngle_rad; this.posePitch_rad = posePitch_rad; this.leftWheelSpeed_mmps = leftWheelSpeed_mmps; this.rightWheelSpeed_mmps = rightWheelSpeed_mmps; this.headAngle_rad = headAngle_rad; this.liftHeight_mm = liftHeight_mm; this.batteryVoltage = batteryVoltage; this.accel = accel; this.gyro = gyro; this.carryingObjectID = carryingObjectID; this.carryingObjectOnTopID = carryingObjectOnTopID; this.headTrackingObjectID = headTrackingObjectID; this.localizedToObjectID = localizedToObjectID; this.lastImageTimeStamp = lastImageTimeStamp; this.status = status; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _pose = new Anki.PoseStruct3d(reader); _poseAngle_rad = reader.ReadSingle(); _posePitch_rad = reader.ReadSingle(); _leftWheelSpeed_mmps = reader.ReadSingle(); _rightWheelSpeed_mmps = reader.ReadSingle(); _headAngle_rad = reader.ReadSingle(); _liftHeight_mm = reader.ReadSingle(); _batteryVoltage = reader.ReadSingle(); _accel = new Anki.Vector.AccelData(reader); _gyro = new Anki.Vector.GyroData(reader); _carryingObjectID = reader.ReadInt32(); _carryingObjectOnTopID = reader.ReadInt32(); _headTrackingObjectID = reader.ReadInt32(); _localizedToObjectID = reader.ReadInt32(); _lastImageTimeStamp = reader.ReadUInt32(); _status = 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) { _pose.Pack(writer); writer.Write((float)_poseAngle_rad); writer.Write((float)_posePitch_rad); writer.Write((float)_leftWheelSpeed_mmps); writer.Write((float)_rightWheelSpeed_mmps); writer.Write((float)_headAngle_rad); writer.Write((float)_liftHeight_mm); writer.Write((float)_batteryVoltage); _accel.Pack(writer); _gyro.Pack(writer); writer.Write((int)_carryingObjectID); writer.Write((int)_carryingObjectOnTopID); writer.Write((int)_headTrackingObjectID); writer.Write((int)_localizedToObjectID); writer.Write((uint)_lastImageTimeStamp); writer.Write((uint)_status); } public int Size { get { return 108; } } 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 ==(RobotState a, RobotState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotState a, RobotState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotState); } public bool Equals(RobotState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._pose.Equals(p._pose) && this._poseAngle_rad.Equals(p._poseAngle_rad) && this._posePitch_rad.Equals(p._posePitch_rad) && this._leftWheelSpeed_mmps.Equals(p._leftWheelSpeed_mmps) && this._rightWheelSpeed_mmps.Equals(p._rightWheelSpeed_mmps) && this._headAngle_rad.Equals(p._headAngle_rad) && this._liftHeight_mm.Equals(p._liftHeight_mm) && this._batteryVoltage.Equals(p._batteryVoltage) && this._accel.Equals(p._accel) && this._gyro.Equals(p._gyro) && this._carryingObjectID.Equals(p._carryingObjectID) && this._carryingObjectOnTopID.Equals(p._carryingObjectOnTopID) && this._headTrackingObjectID.Equals(p._headTrackingObjectID) && this._localizedToObjectID.Equals(p._localizedToObjectID) && this._lastImageTimeStamp.Equals(p._lastImageTimeStamp) && this._status.Equals(p._status); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._pose.GetHashCode(); hash = hash * 23 + this._poseAngle_rad.GetHashCode(); hash = hash * 23 + this._posePitch_rad.GetHashCode(); hash = hash * 23 + this._leftWheelSpeed_mmps.GetHashCode(); hash = hash * 23 + this._rightWheelSpeed_mmps.GetHashCode(); hash = hash * 23 + this._headAngle_rad.GetHashCode(); hash = hash * 23 + this._liftHeight_mm.GetHashCode(); hash = hash * 23 + this._batteryVoltage.GetHashCode(); hash = hash * 23 + this._accel.GetHashCode(); hash = hash * 23 + this._gyro.GetHashCode(); hash = hash * 23 + this._carryingObjectID.GetHashCode(); hash = hash * 23 + this._carryingObjectOnTopID.GetHashCode(); hash = hash * 23 + this._headTrackingObjectID.GetHashCode(); hash = hash * 23 + this._localizedToObjectID.GetHashCode(); hash = hash * 23 + this._lastImageTimeStamp.GetHashCode(); hash = hash * 23 + this._status.GetHashCode(); return hash; } } } public partial class RobotDelocalized { /**** Constructors ****/ public RobotDelocalized() { } public RobotDelocalized(System.IO.Stream stream) { Unpack(stream); } public RobotDelocalized(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 RobotStopped { private Anki.Vector.StopReason _reason; // StopReason private byte _cliffDetectedFlags; // uint_8 private byte _whiteDetectedFlags; // uint_8 public Anki.Vector.StopReason reason { get { return _reason; } set { _reason = value; } } public byte cliffDetectedFlags { get { return _cliffDetectedFlags; } set { _cliffDetectedFlags = value; } } public byte whiteDetectedFlags { get { return _whiteDetectedFlags; } set { _whiteDetectedFlags = value; } } /**** Constructors ****/ public RobotStopped() { } public RobotStopped(Anki.Vector.StopReason reason, byte cliffDetectedFlags, byte whiteDetectedFlags) { this.reason = reason; this.cliffDetectedFlags = cliffDetectedFlags; this.whiteDetectedFlags = whiteDetectedFlags; } public RobotStopped(System.IO.Stream stream) { Unpack(stream); } public RobotStopped(System.IO.BinaryReader reader) { Unpack(reader); } public RobotStopped Initialize(Anki.Vector.StopReason reason, byte cliffDetectedFlags, byte whiteDetectedFlags) { this.reason = reason; this.cliffDetectedFlags = cliffDetectedFlags; this.whiteDetectedFlags = whiteDetectedFlags; 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) { _reason = (Anki.Vector.StopReason)reader.ReadByte(); _cliffDetectedFlags = reader.ReadByte(); _whiteDetectedFlags = 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((byte)_reason); writer.Write((byte)_cliffDetectedFlags); writer.Write((byte)_whiteDetectedFlags); } public int Size { get { return 3; } } 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 ==(RobotStopped a, RobotStopped b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotStopped a, RobotStopped b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotStopped); } public bool Equals(RobotStopped p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._reason.Equals(p._reason) && this._cliffDetectedFlags.Equals(p._cliffDetectedFlags) && this._whiteDetectedFlags.Equals(p._whiteDetectedFlags); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._reason.GetHashCode(); hash = hash * 23 + this._cliffDetectedFlags.GetHashCode(); hash = hash * 23 + this._whiteDetectedFlags.GetHashCode(); return hash; } } } public partial class RobotOffTreadsStateChanged { private Anki.Vector.OffTreadsState _treadsState; // OffTreadsState public Anki.Vector.OffTreadsState treadsState { get { return _treadsState; } set { _treadsState = value; } } /**** Constructors ****/ public RobotOffTreadsStateChanged() { } public RobotOffTreadsStateChanged(Anki.Vector.OffTreadsState treadsState) { this.treadsState = treadsState; } public RobotOffTreadsStateChanged(System.IO.Stream stream) { Unpack(stream); } public RobotOffTreadsStateChanged(System.IO.BinaryReader reader) { Unpack(reader); } public RobotOffTreadsStateChanged Initialize(Anki.Vector.OffTreadsState treadsState) { this.treadsState = treadsState; 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) { _treadsState = (Anki.Vector.OffTreadsState)reader.ReadSByte(); } 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((sbyte)_treadsState); } public int Size { get { return 1; } } 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 ==(RobotOffTreadsStateChanged a, RobotOffTreadsStateChanged b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotOffTreadsStateChanged a, RobotOffTreadsStateChanged b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotOffTreadsStateChanged); } public bool Equals(RobotOffTreadsStateChanged p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._treadsState.Equals(p._treadsState); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._treadsState.GetHashCode(); return hash; } } } public partial class RobotOnChargerPlatformEvent { private bool _onCharger; // bool public bool onCharger { get { return _onCharger; } set { _onCharger = value; } } /**** Constructors ****/ public RobotOnChargerPlatformEvent() { } public RobotOnChargerPlatformEvent(bool onCharger) { this.onCharger = onCharger; } public RobotOnChargerPlatformEvent(System.IO.Stream stream) { Unpack(stream); } public RobotOnChargerPlatformEvent(System.IO.BinaryReader reader) { Unpack(reader); } public RobotOnChargerPlatformEvent Initialize(bool onCharger) { this.onCharger = onCharger; 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) { _onCharger = 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)_onCharger); } public int Size { get { return 1; } } 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 ==(RobotOnChargerPlatformEvent a, RobotOnChargerPlatformEvent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotOnChargerPlatformEvent a, RobotOnChargerPlatformEvent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotOnChargerPlatformEvent); } public bool Equals(RobotOnChargerPlatformEvent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._onCharger.Equals(p._onCharger); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._onCharger.GetHashCode(); return hash; } } } public partial class ChargerEvent { private bool _onCharger; // bool public bool onCharger { get { return _onCharger; } set { _onCharger = value; } } /**** Constructors ****/ public ChargerEvent() { } public ChargerEvent(bool onCharger) { this.onCharger = onCharger; } public ChargerEvent(System.IO.Stream stream) { Unpack(stream); } public ChargerEvent(System.IO.BinaryReader reader) { Unpack(reader); } public ChargerEvent Initialize(bool onCharger) { this.onCharger = onCharger; 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) { _onCharger = 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)_onCharger); } public int Size { get { return 1; } } 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 ==(ChargerEvent a, ChargerEvent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ChargerEvent a, ChargerEvent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ChargerEvent); } public bool Equals(ChargerEvent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._onCharger.Equals(p._onCharger); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._onCharger.GetHashCode(); return hash; } } } public partial class TouchButtonEvent { private bool _isPressed; // bool public bool isPressed { get { return _isPressed; } set { _isPressed = value; } } /**** Constructors ****/ public TouchButtonEvent() { } public TouchButtonEvent(bool isPressed) { this.isPressed = isPressed; } public TouchButtonEvent(System.IO.Stream stream) { Unpack(stream); } public TouchButtonEvent(System.IO.BinaryReader reader) { Unpack(reader); } public TouchButtonEvent Initialize(bool isPressed) { this.isPressed = isPressed; 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) { _isPressed = 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)_isPressed); } public int Size { get { return 1; } } 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 ==(TouchButtonEvent a, TouchButtonEvent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TouchButtonEvent a, TouchButtonEvent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TouchButtonEvent); } public bool Equals(TouchButtonEvent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._isPressed.Equals(p._isPressed); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._isPressed.GetHashCode(); return hash; } } } public partial class UnexpectedMovement { private uint _timestamp; // uint_32 private Anki.Vector.UnexpectedMovementType _movementType; // UnexpectedMovementType private Anki.Vector.UnexpectedMovementSide _movementSide; // UnexpectedMovementSide public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.Vector.UnexpectedMovementType movementType { get { return _movementType; } set { _movementType = value; } } public Anki.Vector.UnexpectedMovementSide movementSide { get { return _movementSide; } set { _movementSide = value; } } /**** Constructors ****/ public UnexpectedMovement() { } public UnexpectedMovement(uint timestamp, Anki.Vector.UnexpectedMovementType movementType, Anki.Vector.UnexpectedMovementSide movementSide) { this.timestamp = timestamp; this.movementType = movementType; this.movementSide = movementSide; } public UnexpectedMovement(System.IO.Stream stream) { Unpack(stream); } public UnexpectedMovement(System.IO.BinaryReader reader) { Unpack(reader); } public UnexpectedMovement Initialize(uint timestamp, Anki.Vector.UnexpectedMovementType movementType, Anki.Vector.UnexpectedMovementSide movementSide) { this.timestamp = timestamp; this.movementType = movementType; this.movementSide = movementSide; 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(); _movementType = (Anki.Vector.UnexpectedMovementType)reader.ReadByte(); _movementSide = (Anki.Vector.UnexpectedMovementSide)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((uint)_timestamp); writer.Write((byte)_movementType); writer.Write((byte)_movementSide); } 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 ==(UnexpectedMovement a, UnexpectedMovement b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(UnexpectedMovement a, UnexpectedMovement b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as UnexpectedMovement); } public bool Equals(UnexpectedMovement p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._movementType.Equals(p._movementType) && this._movementSide.Equals(p._movementSide); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._movementType.GetHashCode(); hash = hash * 23 + this._movementSide.GetHashCode(); return hash; } } } public partial class RobotFallingEvent { private uint _duration_ms; // uint_32 public uint duration_ms { get { return _duration_ms; } set { _duration_ms = value; } } /**** Constructors ****/ public RobotFallingEvent() { } public RobotFallingEvent(uint duration_ms) { this.duration_ms = duration_ms; } public RobotFallingEvent(System.IO.Stream stream) { Unpack(stream); } public RobotFallingEvent(System.IO.BinaryReader reader) { Unpack(reader); } public RobotFallingEvent Initialize(uint duration_ms) { this.duration_ms = duration_ms; 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) { _duration_ms = 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)_duration_ms); } 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 ==(RobotFallingEvent a, RobotFallingEvent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotFallingEvent a, RobotFallingEvent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotFallingEvent); } public bool Equals(RobotFallingEvent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._duration_ms.Equals(p._duration_ms); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._duration_ms.GetHashCode(); return hash; } } } public partial class RobotProcessedImage { private uint _timestamp; // uint_32 private Anki.Vector.VisionMode[] _visionModes; // VisionMode[uint_8] private byte _mean; // uint_8 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.Vector.VisionMode[] visionModes { get { return _visionModes; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("visionModes variable-length array is too long. Must be less than or equal to 255.", "value"); } _visionModes = value; } } public byte mean { get { return _mean; } set { _mean = value; } } /**** Constructors ****/ public RobotProcessedImage() { } public RobotProcessedImage(uint timestamp, Anki.Vector.VisionMode[] visionModes, byte mean) { this.timestamp = timestamp; this.visionModes = visionModes; this.mean = mean; } public RobotProcessedImage(System.IO.Stream stream) { Unpack(stream); } public RobotProcessedImage(System.IO.BinaryReader reader) { Unpack(reader); } public RobotProcessedImage Initialize(uint timestamp, Anki.Vector.VisionMode[] visionModes, byte mean) { this.timestamp = timestamp; this.visionModes = visionModes; this.mean = mean; 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(); int _visionModes_length = (int)reader.ReadByte(); _visionModes = new Anki.Vector.VisionMode[_visionModes_length]; for (int i = 0; i < _visionModes_length; ++i) { _visionModes[i] = (Anki.Vector.VisionMode)reader.ReadUInt32(); } _mean = 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((uint)_timestamp); if (_visionModes != null) { writer.Write((byte)_visionModes.Length); for (int i = 0; i < _visionModes.Length; ++i) { writer.Write((uint)_visionModes[i]); } } else { writer.Write((byte)0); } writer.Write((byte)_mean); } public int Size { get { int result = 0; result += 4; // uint_32 result += 1; // uint_8 if (visionModes != null) { result += visionModes.Length * 4; // VisionMode } result += 1; // uint_8 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 ==(RobotProcessedImage a, RobotProcessedImage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotProcessedImage a, RobotProcessedImage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotProcessedImage); } public bool Equals(RobotProcessedImage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && ArrayEquals(this._visionModes,p._visionModes) && this._mean.Equals(p._mean); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._mean.GetHashCode(); return hash; } } } public partial class RobotObservedObject { private uint _timestamp; // uint_32 private Anki.Vector.ObjectFamily _objectFamily; // ObjectFamily private Anki.Vector.ObjectType _objectType; // ObjectType private int _objectID; // int_32 private Anki.CladRect _img_rect; // CladRect private Anki.PoseStruct3d _pose; // PoseStruct3d private float _topFaceOrientation_rad; // float_32 private byte _isActive; // uint_8 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.Vector.ObjectFamily objectFamily { get { return _objectFamily; } set { _objectFamily = value; } } public Anki.Vector.ObjectType objectType { get { return _objectType; } set { _objectType = value; } } public int objectID { get { return _objectID; } set { _objectID = value; } } public Anki.CladRect img_rect { get { return _img_rect; } set { if (value == null) { throw new System.ArgumentNullException("img_rect cannot be null.", "value"); } _img_rect = value; } } public Anki.PoseStruct3d pose { get { return _pose; } set { if (value == null) { throw new System.ArgumentNullException("pose cannot be null.", "value"); } _pose = value; } } public float topFaceOrientation_rad { get { return _topFaceOrientation_rad; } set { _topFaceOrientation_rad = value; } } public byte isActive { get { return _isActive; } set { _isActive = value; } } /**** Constructors ****/ public RobotObservedObject() { this.img_rect = new Anki.CladRect(); this.pose = new Anki.PoseStruct3d(); } public RobotObservedObject(uint timestamp, Anki.Vector.ObjectFamily objectFamily, Anki.Vector.ObjectType objectType, int objectID, Anki.CladRect img_rect, Anki.PoseStruct3d pose, float topFaceOrientation_rad, byte isActive) { this.timestamp = timestamp; this.objectFamily = objectFamily; this.objectType = objectType; this.objectID = objectID; this.img_rect = img_rect; this.pose = pose; this.topFaceOrientation_rad = topFaceOrientation_rad; this.isActive = isActive; } public RobotObservedObject(System.IO.Stream stream) { Unpack(stream); } public RobotObservedObject(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedObject Initialize(uint timestamp, Anki.Vector.ObjectFamily objectFamily, Anki.Vector.ObjectType objectType, int objectID, Anki.CladRect img_rect, Anki.PoseStruct3d pose, float topFaceOrientation_rad, byte isActive) { this.timestamp = timestamp; this.objectFamily = objectFamily; this.objectType = objectType; this.objectID = objectID; this.img_rect = img_rect; this.pose = pose; this.topFaceOrientation_rad = topFaceOrientation_rad; this.isActive = isActive; 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(); _objectFamily = (Anki.Vector.ObjectFamily)reader.ReadInt32(); _objectType = (Anki.Vector.ObjectType)reader.ReadInt32(); _objectID = reader.ReadInt32(); _img_rect = new Anki.CladRect(reader); _pose = new Anki.PoseStruct3d(reader); _topFaceOrientation_rad = reader.ReadSingle(); _isActive = 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((uint)_timestamp); writer.Write((int)_objectFamily); writer.Write((int)_objectType); writer.Write((int)_objectID); _img_rect.Pack(writer); _pose.Pack(writer); writer.Write((float)_topFaceOrientation_rad); writer.Write((byte)_isActive); } public int Size { get { return 69; } } 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 ==(RobotObservedObject a, RobotObservedObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedObject a, RobotObservedObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedObject); } public bool Equals(RobotObservedObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectFamily.Equals(p._objectFamily) && this._objectType.Equals(p._objectType) && this._objectID.Equals(p._objectID) && this._img_rect.Equals(p._img_rect) && this._pose.Equals(p._pose) && this._topFaceOrientation_rad.Equals(p._topFaceOrientation_rad) && this._isActive.Equals(p._isActive); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectFamily.GetHashCode(); hash = hash * 23 + this._objectType.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._img_rect.GetHashCode(); hash = hash * 23 + this._pose.GetHashCode(); hash = hash * 23 + this._topFaceOrientation_rad.GetHashCode(); hash = hash * 23 + this._isActive.GetHashCode(); return hash; } } } public partial class RobotObservedPossibleObject { private Anki.Vector.ExternalInterface.RobotObservedObject _possibleObject; // RobotObservedObject public Anki.Vector.ExternalInterface.RobotObservedObject possibleObject { get { return _possibleObject; } set { if (value == null) { throw new System.ArgumentNullException("possibleObject cannot be null.", "value"); } _possibleObject = value; } } /**** Constructors ****/ public RobotObservedPossibleObject() { this.possibleObject = new Anki.Vector.ExternalInterface.RobotObservedObject(); } public RobotObservedPossibleObject(Anki.Vector.ExternalInterface.RobotObservedObject possibleObject) { this.possibleObject = possibleObject; } public RobotObservedPossibleObject(System.IO.Stream stream) { Unpack(stream); } public RobotObservedPossibleObject(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedPossibleObject Initialize(Anki.Vector.ExternalInterface.RobotObservedObject possibleObject) { this.possibleObject = possibleObject; 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) { _possibleObject = new Anki.Vector.ExternalInterface.RobotObservedObject(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) { _possibleObject.Pack(writer); } public int Size { get { return 69; } } 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 ==(RobotObservedPossibleObject a, RobotObservedPossibleObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedPossibleObject a, RobotObservedPossibleObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedPossibleObject); } public bool Equals(RobotObservedPossibleObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._possibleObject.Equals(p._possibleObject); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._possibleObject.GetHashCode(); return hash; } } } public partial class RobotObservedFace { private int _faceID; // int_32 private uint _timestamp; // uint_32 private Anki.PoseStruct3d _pose; // PoseStruct3d private Anki.CladRect _img_rect; // CladRect private string _name; // string[uint_8] private Anki.Vision.FacialExpression _expression; // FacialExpression private Anki.Vision.SmileAmount _smileAmount; // SmileAmount private Anki.Vision.Gaze _gaze; // Gaze private Anki.Vision.BlinkAmount _blinkAmount; // BlinkAmount private byte[] _expressionValues; // uint_8[Anki::Vision::FacialExpression::Count] private Anki.CladPoint2d[] _leftEye; // CladPoint2d[uint_8] private Anki.CladPoint2d[] _rightEye; // CladPoint2d[uint_8] private Anki.CladPoint2d[] _nose; // CladPoint2d[uint_8] private Anki.CladPoint2d[] _mouth; // CladPoint2d[uint_8] public int faceID { get { return _faceID; } set { _faceID = value; } } public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.PoseStruct3d pose { get { return _pose; } set { if (value == null) { throw new System.ArgumentNullException("pose cannot be null.", "value"); } _pose = value; } } public Anki.CladRect img_rect { get { return _img_rect; } set { if (value == null) { throw new System.ArgumentNullException("img_rect cannot be null.", "value"); } _img_rect = value; } } public string name { get { return _name; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("name string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _name = value; } } public Anki.Vision.FacialExpression expression { get { return _expression; } set { _expression = value; } } public Anki.Vision.SmileAmount smileAmount { get { return _smileAmount; } set { if (value == null) { throw new System.ArgumentNullException("smileAmount cannot be null.", "value"); } _smileAmount = value; } } public Anki.Vision.Gaze gaze { get { return _gaze; } set { if (value == null) { throw new System.ArgumentNullException("gaze cannot be null.", "value"); } _gaze = value; } } public Anki.Vision.BlinkAmount blinkAmount { get { return _blinkAmount; } set { if (value == null) { throw new System.ArgumentNullException("blinkAmount cannot be null.", "value"); } _blinkAmount = value; } } public byte[] expressionValues { get { return _expressionValues; } set { if (value == null) { throw new System.ArgumentException("expressionValues fixed-length array is null. Must have a length of (int)Anki.Vision.FacialExpression.Count.", "value"); } if (value.Length != (int)Anki.Vision.FacialExpression.Count) { throw new System.ArgumentException("expressionValues fixed-length array is the wrong size. Must have a length of (int)Anki.Vision.FacialExpression.Count.", "value"); } _expressionValues = value; } } public Anki.CladPoint2d[] leftEye { get { return _leftEye; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("leftEye variable-length array is too long. Must be less than or equal to 255.", "value"); } _leftEye = value; } } public Anki.CladPoint2d[] rightEye { get { return _rightEye; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("rightEye variable-length array is too long. Must be less than or equal to 255.", "value"); } _rightEye = value; } } public Anki.CladPoint2d[] nose { get { return _nose; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("nose variable-length array is too long. Must be less than or equal to 255.", "value"); } _nose = value; } } public Anki.CladPoint2d[] mouth { get { return _mouth; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("mouth variable-length array is too long. Must be less than or equal to 255.", "value"); } _mouth = value; } } /**** Constructors ****/ public RobotObservedFace() { this.pose = new Anki.PoseStruct3d(); this.img_rect = new Anki.CladRect(); this.smileAmount = new Anki.Vision.SmileAmount(); this.gaze = new Anki.Vision.Gaze(); this.blinkAmount = new Anki.Vision.BlinkAmount(); this.expressionValues = new byte[(int)Anki.Vision.FacialExpression.Count]; } public RobotObservedFace(int faceID, uint timestamp, Anki.PoseStruct3d pose, Anki.CladRect img_rect, string name, Anki.Vision.FacialExpression expression, Anki.Vision.SmileAmount smileAmount, Anki.Vision.Gaze gaze, Anki.Vision.BlinkAmount blinkAmount, byte[] expressionValues, Anki.CladPoint2d[] leftEye, Anki.CladPoint2d[] rightEye, Anki.CladPoint2d[] nose, Anki.CladPoint2d[] mouth) { this.faceID = faceID; this.timestamp = timestamp; this.pose = pose; this.img_rect = img_rect; this.name = name; this.expression = expression; this.smileAmount = smileAmount; this.gaze = gaze; this.blinkAmount = blinkAmount; this.expressionValues = expressionValues; this.leftEye = leftEye; this.rightEye = rightEye; this.nose = nose; this.mouth = mouth; } public RobotObservedFace(System.IO.Stream stream) { Unpack(stream); } public RobotObservedFace(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedFace Initialize(int faceID, uint timestamp, Anki.PoseStruct3d pose, Anki.CladRect img_rect, string name, Anki.Vision.FacialExpression expression, Anki.Vision.SmileAmount smileAmount, Anki.Vision.Gaze gaze, Anki.Vision.BlinkAmount blinkAmount, byte[] expressionValues, Anki.CladPoint2d[] leftEye, Anki.CladPoint2d[] rightEye, Anki.CladPoint2d[] nose, Anki.CladPoint2d[] mouth) { this.faceID = faceID; this.timestamp = timestamp; this.pose = pose; this.img_rect = img_rect; this.name = name; this.expression = expression; this.smileAmount = smileAmount; this.gaze = gaze; this.blinkAmount = blinkAmount; this.expressionValues = expressionValues; this.leftEye = leftEye; this.rightEye = rightEye; this.nose = nose; this.mouth = mouth; 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(); _timestamp = reader.ReadUInt32(); _pose = new Anki.PoseStruct3d(reader); _img_rect = new Anki.CladRect(reader); int _name_length = (int)reader.ReadByte(); byte[] _name_bytes = reader.ReadBytes(_name_length); _name = System.Text.Encoding.UTF8.GetString(_name_bytes); _expression = (Anki.Vision.FacialExpression)reader.ReadSByte(); _smileAmount = new Anki.Vision.SmileAmount(reader); _gaze = new Anki.Vision.Gaze(reader); _blinkAmount = new Anki.Vision.BlinkAmount(reader); _expressionValues = new byte[(int)Anki.Vision.FacialExpression.Count]; for (int i = 0; i < (int)Anki.Vision.FacialExpression.Count; ++i) { _expressionValues[i] = reader.ReadByte(); } int _leftEye_length = (int)reader.ReadByte(); _leftEye = new Anki.CladPoint2d[_leftEye_length]; for (int i = 0; i < _leftEye_length; ++i) { _leftEye[i] = new Anki.CladPoint2d(reader); } int _rightEye_length = (int)reader.ReadByte(); _rightEye = new Anki.CladPoint2d[_rightEye_length]; for (int i = 0; i < _rightEye_length; ++i) { _rightEye[i] = new Anki.CladPoint2d(reader); } int _nose_length = (int)reader.ReadByte(); _nose = new Anki.CladPoint2d[_nose_length]; for (int i = 0; i < _nose_length; ++i) { _nose[i] = new Anki.CladPoint2d(reader); } int _mouth_length = (int)reader.ReadByte(); _mouth = new Anki.CladPoint2d[_mouth_length]; for (int i = 0; i < _mouth_length; ++i) { _mouth[i] = new Anki.CladPoint2d(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)_faceID); writer.Write((uint)_timestamp); _pose.Pack(writer); _img_rect.Pack(writer); if (_name != null) { byte[] _name_bytes = System.Text.Encoding.UTF8.GetBytes(_name); writer.Write((byte)_name_bytes.Length); writer.Write(_name_bytes); } else { writer.Write((byte)0); } writer.Write((sbyte)_expression); _smileAmount.Pack(writer); _gaze.Pack(writer); _blinkAmount.Pack(writer); for (int i = 0; i < (int)Anki.Vision.FacialExpression.Count; ++i) { writer.Write((byte)_expressionValues[i]); } if (_leftEye != null) { writer.Write((byte)_leftEye.Length); for (int i = 0; i < _leftEye.Length; ++i) { if (_leftEye[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _leftEye[i].Pack(writer); } } else { writer.Write((byte)0); } if (_rightEye != null) { writer.Write((byte)_rightEye.Length); for (int i = 0; i < _rightEye.Length; ++i) { if (_rightEye[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _rightEye[i].Pack(writer); } } else { writer.Write((byte)0); } if (_nose != null) { writer.Write((byte)_nose.Length); for (int i = 0; i < _nose.Length; ++i) { if (_nose[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _nose[i].Pack(writer); } } else { writer.Write((byte)0); } if (_mouth != null) { writer.Write((byte)_mouth.Length); for (int i = 0; i < _mouth.Length; ++i) { if (_mouth[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _mouth[i].Pack(writer); } } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 4; // int_32 result += 4; // uint_32 result += pose.Size; result += img_rect.Size; result += 1; // uint_8 if (name != null) { result += System.Text.Encoding.UTF8.GetByteCount(name); } result += 1; // FacialExpression result += smileAmount.Size; result += gaze.Size; result += blinkAmount.Size; result += (int)Anki.Vision.FacialExpression.Count * 1; result += 1; // uint_8 if (leftEye != null) { result += leftEye.Length * 8; // CladPoint2d } result += 1; // uint_8 if (rightEye != null) { result += rightEye.Length * 8; // CladPoint2d } result += 1; // uint_8 if (nose != null) { result += nose.Length * 8; // CladPoint2d } result += 1; // uint_8 if (mouth != null) { result += mouth.Length * 8; // CladPoint2d } 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 ==(RobotObservedFace a, RobotObservedFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedFace a, RobotObservedFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedFace); } public bool Equals(RobotObservedFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._timestamp.Equals(p._timestamp) && this._pose.Equals(p._pose) && this._img_rect.Equals(p._img_rect) && this._name.Equals(p._name) && this._expression.Equals(p._expression) && this._smileAmount.Equals(p._smileAmount) && this._gaze.Equals(p._gaze) && this._blinkAmount.Equals(p._blinkAmount) && ArrayEquals(this._expressionValues,p._expressionValues) && ArrayEquals(this._leftEye,p._leftEye) && ArrayEquals(this._rightEye,p._rightEye) && ArrayEquals(this._nose,p._nose) && ArrayEquals(this._mouth,p._mouth); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._pose.GetHashCode(); hash = hash * 23 + this._img_rect.GetHashCode(); hash = hash * 23 + this._expression.GetHashCode(); hash = hash * 23 + this._smileAmount.GetHashCode(); hash = hash * 23 + this._gaze.GetHashCode(); hash = hash * 23 + this._blinkAmount.GetHashCode(); return hash; } } } public partial class RobotChangedObservedFaceID { private int _oldID; // int_32 private int _newID; // int_32 public int oldID { get { return _oldID; } set { _oldID = value; } } public int newID { get { return _newID; } set { _newID = value; } } /**** Constructors ****/ public RobotChangedObservedFaceID() { } public RobotChangedObservedFaceID(int oldID, int newID) { this.oldID = oldID; this.newID = newID; } public RobotChangedObservedFaceID(System.IO.Stream stream) { Unpack(stream); } public RobotChangedObservedFaceID(System.IO.BinaryReader reader) { Unpack(reader); } public RobotChangedObservedFaceID Initialize(int oldID, int newID) { this.oldID = oldID; this.newID = newID; 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) { _oldID = reader.ReadInt32(); _newID = 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)_oldID); writer.Write((int)_newID); } 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 ==(RobotChangedObservedFaceID a, RobotChangedObservedFaceID b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotChangedObservedFaceID a, RobotChangedObservedFaceID b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotChangedObservedFaceID); } public bool Equals(RobotChangedObservedFaceID p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._oldID.Equals(p._oldID) && this._newID.Equals(p._newID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._oldID.GetHashCode(); hash = hash * 23 + this._newID.GetHashCode(); return hash; } } } public partial class RobotObservedPet { private int _petID; // int_32 private uint _timestamp; // uint_32 private uint _numTimesObserved; // uint_32 private float _score; // float_32 private Anki.CladRect _img_rect; // CladRect private Anki.Vision.PetType _petType; // PetType public int petID { get { return _petID; } set { _petID = value; } } public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint numTimesObserved { get { return _numTimesObserved; } set { _numTimesObserved = value; } } public float score { get { return _score; } set { _score = value; } } public Anki.CladRect img_rect { get { return _img_rect; } set { if (value == null) { throw new System.ArgumentNullException("img_rect cannot be null.", "value"); } _img_rect = value; } } public Anki.Vision.PetType petType { get { return _petType; } set { _petType = value; } } /**** Constructors ****/ public RobotObservedPet() { this.img_rect = new Anki.CladRect(); } public RobotObservedPet(int petID, uint timestamp, uint numTimesObserved, float score, Anki.CladRect img_rect, Anki.Vision.PetType petType) { this.petID = petID; this.timestamp = timestamp; this.numTimesObserved = numTimesObserved; this.score = score; this.img_rect = img_rect; this.petType = petType; } public RobotObservedPet(System.IO.Stream stream) { Unpack(stream); } public RobotObservedPet(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedPet Initialize(int petID, uint timestamp, uint numTimesObserved, float score, Anki.CladRect img_rect, Anki.Vision.PetType petType) { this.petID = petID; this.timestamp = timestamp; this.numTimesObserved = numTimesObserved; this.score = score; this.img_rect = img_rect; 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) { _petID = reader.ReadInt32(); _timestamp = reader.ReadUInt32(); _numTimesObserved = reader.ReadUInt32(); _score = reader.ReadSingle(); _img_rect = new Anki.CladRect(reader); _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((int)_petID); writer.Write((uint)_timestamp); writer.Write((uint)_numTimesObserved); writer.Write((float)_score); _img_rect.Pack(writer); writer.Write((byte)_petType); } public int Size { get { return 33; } } 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 ==(RobotObservedPet a, RobotObservedPet b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedPet a, RobotObservedPet b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedPet); } public bool Equals(RobotObservedPet p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._petID.Equals(p._petID) && this._timestamp.Equals(p._timestamp) && this._numTimesObserved.Equals(p._numTimesObserved) && this._score.Equals(p._score) && this._img_rect.Equals(p._img_rect) && this._petType.Equals(p._petType); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._petID.GetHashCode(); hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._numTimesObserved.GetHashCode(); hash = hash * 23 + this._score.GetHashCode(); hash = hash * 23 + this._img_rect.GetHashCode(); hash = hash * 23 + this._petType.GetHashCode(); return hash; } } } public partial class RobotObservedMotion { private uint _timestamp; // uint_32 private float _img_area; // float_32 private short _img_x; // int_16 private short _img_y; // int_16 private float _ground_area; // float_32 private short _ground_x; // int_16 private short _ground_y; // int_16 private float _top_img_area; // float_32 private short _top_img_x; // int_16 private short _top_img_y; // int_16 private float _bottom_img_area; // float_32 private short _bottom_img_x; // int_16 private short _bottom_img_y; // int_16 private float _left_img_area; // float_32 private short _left_img_x; // int_16 private short _left_img_y; // int_16 private float _right_img_area; // float_32 private short _right_img_x; // int_16 private short _right_img_y; // int_16 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public float img_area { get { return _img_area; } set { _img_area = value; } } public short img_x { get { return _img_x; } set { _img_x = value; } } public short img_y { get { return _img_y; } set { _img_y = value; } } public float ground_area { get { return _ground_area; } set { _ground_area = value; } } public short ground_x { get { return _ground_x; } set { _ground_x = value; } } public short ground_y { get { return _ground_y; } set { _ground_y = value; } } public float top_img_area { get { return _top_img_area; } set { _top_img_area = value; } } public short top_img_x { get { return _top_img_x; } set { _top_img_x = value; } } public short top_img_y { get { return _top_img_y; } set { _top_img_y = value; } } public float bottom_img_area { get { return _bottom_img_area; } set { _bottom_img_area = value; } } public short bottom_img_x { get { return _bottom_img_x; } set { _bottom_img_x = value; } } public short bottom_img_y { get { return _bottom_img_y; } set { _bottom_img_y = value; } } public float left_img_area { get { return _left_img_area; } set { _left_img_area = value; } } public short left_img_x { get { return _left_img_x; } set { _left_img_x = value; } } public short left_img_y { get { return _left_img_y; } set { _left_img_y = value; } } public float right_img_area { get { return _right_img_area; } set { _right_img_area = value; } } public short right_img_x { get { return _right_img_x; } set { _right_img_x = value; } } public short right_img_y { get { return _right_img_y; } set { _right_img_y = value; } } /**** Constructors ****/ public RobotObservedMotion() { } public RobotObservedMotion(uint timestamp, float img_area, short img_x, short img_y, float ground_area, short ground_x, short ground_y, float top_img_area, short top_img_x, short top_img_y, float bottom_img_area, short bottom_img_x, short bottom_img_y, float left_img_area, short left_img_x, short left_img_y, float right_img_area, short right_img_x, short right_img_y) { this.timestamp = timestamp; this.img_area = img_area; this.img_x = img_x; this.img_y = img_y; this.ground_area = ground_area; this.ground_x = ground_x; this.ground_y = ground_y; this.top_img_area = top_img_area; this.top_img_x = top_img_x; this.top_img_y = top_img_y; this.bottom_img_area = bottom_img_area; this.bottom_img_x = bottom_img_x; this.bottom_img_y = bottom_img_y; this.left_img_area = left_img_area; this.left_img_x = left_img_x; this.left_img_y = left_img_y; this.right_img_area = right_img_area; this.right_img_x = right_img_x; this.right_img_y = right_img_y; } public RobotObservedMotion(System.IO.Stream stream) { Unpack(stream); } public RobotObservedMotion(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedMotion Initialize(uint timestamp, float img_area, short img_x, short img_y, float ground_area, short ground_x, short ground_y, float top_img_area, short top_img_x, short top_img_y, float bottom_img_area, short bottom_img_x, short bottom_img_y, float left_img_area, short left_img_x, short left_img_y, float right_img_area, short right_img_x, short right_img_y) { this.timestamp = timestamp; this.img_area = img_area; this.img_x = img_x; this.img_y = img_y; this.ground_area = ground_area; this.ground_x = ground_x; this.ground_y = ground_y; this.top_img_area = top_img_area; this.top_img_x = top_img_x; this.top_img_y = top_img_y; this.bottom_img_area = bottom_img_area; this.bottom_img_x = bottom_img_x; this.bottom_img_y = bottom_img_y; this.left_img_area = left_img_area; this.left_img_x = left_img_x; this.left_img_y = left_img_y; this.right_img_area = right_img_area; this.right_img_x = right_img_x; this.right_img_y = right_img_y; 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(); _img_area = reader.ReadSingle(); _img_x = reader.ReadInt16(); _img_y = reader.ReadInt16(); _ground_area = reader.ReadSingle(); _ground_x = reader.ReadInt16(); _ground_y = reader.ReadInt16(); _top_img_area = reader.ReadSingle(); _top_img_x = reader.ReadInt16(); _top_img_y = reader.ReadInt16(); _bottom_img_area = reader.ReadSingle(); _bottom_img_x = reader.ReadInt16(); _bottom_img_y = reader.ReadInt16(); _left_img_area = reader.ReadSingle(); _left_img_x = reader.ReadInt16(); _left_img_y = reader.ReadInt16(); _right_img_area = reader.ReadSingle(); _right_img_x = reader.ReadInt16(); _right_img_y = reader.ReadInt16(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((uint)_timestamp); writer.Write((float)_img_area); writer.Write((short)_img_x); writer.Write((short)_img_y); writer.Write((float)_ground_area); writer.Write((short)_ground_x); writer.Write((short)_ground_y); writer.Write((float)_top_img_area); writer.Write((short)_top_img_x); writer.Write((short)_top_img_y); writer.Write((float)_bottom_img_area); writer.Write((short)_bottom_img_x); writer.Write((short)_bottom_img_y); writer.Write((float)_left_img_area); writer.Write((short)_left_img_x); writer.Write((short)_left_img_y); writer.Write((float)_right_img_area); writer.Write((short)_right_img_x); writer.Write((short)_right_img_y); } public int Size { get { return 52; } } 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 ==(RobotObservedMotion a, RobotObservedMotion b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedMotion a, RobotObservedMotion b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedMotion); } public bool Equals(RobotObservedMotion p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._img_area.Equals(p._img_area) && this._img_x.Equals(p._img_x) && this._img_y.Equals(p._img_y) && this._ground_area.Equals(p._ground_area) && this._ground_x.Equals(p._ground_x) && this._ground_y.Equals(p._ground_y) && this._top_img_area.Equals(p._top_img_area) && this._top_img_x.Equals(p._top_img_x) && this._top_img_y.Equals(p._top_img_y) && this._bottom_img_area.Equals(p._bottom_img_area) && this._bottom_img_x.Equals(p._bottom_img_x) && this._bottom_img_y.Equals(p._bottom_img_y) && this._left_img_area.Equals(p._left_img_area) && this._left_img_x.Equals(p._left_img_x) && this._left_img_y.Equals(p._left_img_y) && this._right_img_area.Equals(p._right_img_area) && this._right_img_x.Equals(p._right_img_x) && this._right_img_y.Equals(p._right_img_y); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._img_area.GetHashCode(); hash = hash * 23 + this._img_x.GetHashCode(); hash = hash * 23 + this._img_y.GetHashCode(); hash = hash * 23 + this._ground_area.GetHashCode(); hash = hash * 23 + this._ground_x.GetHashCode(); hash = hash * 23 + this._ground_y.GetHashCode(); hash = hash * 23 + this._top_img_area.GetHashCode(); hash = hash * 23 + this._top_img_x.GetHashCode(); hash = hash * 23 + this._top_img_y.GetHashCode(); hash = hash * 23 + this._bottom_img_area.GetHashCode(); hash = hash * 23 + this._bottom_img_x.GetHashCode(); hash = hash * 23 + this._bottom_img_y.GetHashCode(); hash = hash * 23 + this._left_img_area.GetHashCode(); hash = hash * 23 + this._left_img_x.GetHashCode(); hash = hash * 23 + this._left_img_y.GetHashCode(); hash = hash * 23 + this._right_img_area.GetHashCode(); hash = hash * 23 + this._right_img_x.GetHashCode(); hash = hash * 23 + this._right_img_y.GetHashCode(); return hash; } } } public partial class RobotObservedSalientPoint { private Anki.Vision.SalientPoint _salientPoint; // SalientPoint public Anki.Vision.SalientPoint salientPoint { get { return _salientPoint; } set { if (value == null) { throw new System.ArgumentNullException("salientPoint cannot be null.", "value"); } _salientPoint = value; } } /**** Constructors ****/ public RobotObservedSalientPoint() { this.salientPoint = new Anki.Vision.SalientPoint(); } public RobotObservedSalientPoint(Anki.Vision.SalientPoint salientPoint) { this.salientPoint = salientPoint; } public RobotObservedSalientPoint(System.IO.Stream stream) { Unpack(stream); } public RobotObservedSalientPoint(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedSalientPoint Initialize(Anki.Vision.SalientPoint salientPoint) { this.salientPoint = salientPoint; 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) { _salientPoint = new Anki.Vision.SalientPoint(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) { _salientPoint.Pack(writer); } public int Size { get { int result = 0; result += salientPoint.Size; 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 ==(RobotObservedSalientPoint a, RobotObservedSalientPoint b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedSalientPoint a, RobotObservedSalientPoint b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedSalientPoint); } public bool Equals(RobotObservedSalientPoint p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._salientPoint.Equals(p._salientPoint); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._salientPoint.GetHashCode(); return hash; } } } public partial class RobotObservedLaserPoint { private uint _timestamp; // uint_32 private float _ground_area_fraction; // float_32 private short _ground_x_mm; // int_16 private short _ground_y_mm; // int_16 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public float ground_area_fraction { get { return _ground_area_fraction; } set { _ground_area_fraction = value; } } public short ground_x_mm { get { return _ground_x_mm; } set { _ground_x_mm = value; } } public short ground_y_mm { get { return _ground_y_mm; } set { _ground_y_mm = value; } } /**** Constructors ****/ public RobotObservedLaserPoint() { } public RobotObservedLaserPoint(uint timestamp, float ground_area_fraction, short ground_x_mm, short ground_y_mm) { this.timestamp = timestamp; this.ground_area_fraction = ground_area_fraction; this.ground_x_mm = ground_x_mm; this.ground_y_mm = ground_y_mm; } public RobotObservedLaserPoint(System.IO.Stream stream) { Unpack(stream); } public RobotObservedLaserPoint(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedLaserPoint Initialize(uint timestamp, float ground_area_fraction, short ground_x_mm, short ground_y_mm) { this.timestamp = timestamp; this.ground_area_fraction = ground_area_fraction; this.ground_x_mm = ground_x_mm; this.ground_y_mm = ground_y_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) { _timestamp = reader.ReadUInt32(); _ground_area_fraction = reader.ReadSingle(); _ground_x_mm = reader.ReadInt16(); _ground_y_mm = reader.ReadInt16(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((uint)_timestamp); writer.Write((float)_ground_area_fraction); writer.Write((short)_ground_x_mm); writer.Write((short)_ground_y_mm); } 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 ==(RobotObservedLaserPoint a, RobotObservedLaserPoint b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedLaserPoint a, RobotObservedLaserPoint b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedLaserPoint); } public bool Equals(RobotObservedLaserPoint p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._ground_area_fraction.Equals(p._ground_area_fraction) && this._ground_x_mm.Equals(p._ground_x_mm) && this._ground_y_mm.Equals(p._ground_y_mm); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._ground_area_fraction.GetHashCode(); hash = hash * 23 + this._ground_x_mm.GetHashCode(); hash = hash * 23 + this._ground_y_mm.GetHashCode(); return hash; } } } public partial class RobotObservedIllumination { private uint _timestamp; // uint_32 private Anki.Vector.IlluminationState _state; // IlluminationState public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.Vector.IlluminationState state { get { return _state; } set { _state = value; } } /**** Constructors ****/ public RobotObservedIllumination() { } public RobotObservedIllumination(uint timestamp, Anki.Vector.IlluminationState state) { this.timestamp = timestamp; this.state = state; } public RobotObservedIllumination(System.IO.Stream stream) { Unpack(stream); } public RobotObservedIllumination(System.IO.BinaryReader reader) { Unpack(reader); } public RobotObservedIllumination Initialize(uint timestamp, Anki.Vector.IlluminationState state) { this.timestamp = timestamp; this.state = state; 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(); _state = (Anki.Vector.IlluminationState)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((uint)_timestamp); writer.Write((byte)_state); } public int Size { get { return 5; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(RobotObservedIllumination a, RobotObservedIllumination b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotObservedIllumination a, RobotObservedIllumination b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotObservedIllumination); } public bool Equals(RobotObservedIllumination p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._state.Equals(p._state); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._state.GetHashCode(); return hash; } } } public partial class RobotDeletedFace { private int _faceID; // int_32 public int faceID { get { return _faceID; } set { _faceID = value; } } /**** Constructors ****/ public RobotDeletedFace() { } public RobotDeletedFace(int faceID) { this.faceID = faceID; } public RobotDeletedFace(System.IO.Stream stream) { Unpack(stream); } public RobotDeletedFace(System.IO.BinaryReader reader) { Unpack(reader); } public RobotDeletedFace Initialize(int faceID) { this.faceID = faceID; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _faceID = reader.ReadInt32(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_faceID); } public int Size { get { return 4; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(RobotDeletedFace a, RobotDeletedFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotDeletedFace a, RobotDeletedFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotDeletedFace); } public bool Equals(RobotDeletedFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); return hash; } } } public partial class RobotDeletedLocatedObject { private uint _objectID; // uint_32 public uint objectID { get { return _objectID; } set { _objectID = value; } } /**** Constructors ****/ public RobotDeletedLocatedObject() { } public RobotDeletedLocatedObject(uint objectID) { this.objectID = objectID; } public RobotDeletedLocatedObject(System.IO.Stream stream) { Unpack(stream); } public RobotDeletedLocatedObject(System.IO.BinaryReader reader) { Unpack(reader); } public RobotDeletedLocatedObject Initialize(uint objectID) { this.objectID = objectID; 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(); } 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); } 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 ==(RobotDeletedLocatedObject a, RobotDeletedLocatedObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotDeletedLocatedObject a, RobotDeletedLocatedObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotDeletedLocatedObject); } public bool Equals(RobotDeletedLocatedObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); return hash; } } } public partial class RobotDeletedAllCustomObjects { /**** Constructors ****/ public RobotDeletedAllCustomObjects() { } public RobotDeletedAllCustomObjects(System.IO.Stream stream) { Unpack(stream); } public RobotDeletedAllCustomObjects(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 RobotDeletedFixedCustomObjects { /**** Constructors ****/ public RobotDeletedFixedCustomObjects() { } public RobotDeletedFixedCustomObjects(System.IO.Stream stream) { Unpack(stream); } public RobotDeletedFixedCustomObjects(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 RobotDeletedCustomMarkerObjects { /**** Constructors ****/ public RobotDeletedCustomMarkerObjects() { } public RobotDeletedCustomMarkerObjects(System.IO.Stream stream) { Unpack(stream); } public RobotDeletedCustomMarkerObjects(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 CreatedFixedCustomObject { private uint _objectID; // uint_32 public uint objectID { get { return _objectID; } set { _objectID = value; } } /**** Constructors ****/ public CreatedFixedCustomObject() { } public CreatedFixedCustomObject(uint objectID) { this.objectID = objectID; } public CreatedFixedCustomObject(System.IO.Stream stream) { Unpack(stream); } public CreatedFixedCustomObject(System.IO.BinaryReader reader) { Unpack(reader); } public CreatedFixedCustomObject Initialize(uint objectID) { this.objectID = objectID; 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(); } 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); } 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 ==(CreatedFixedCustomObject a, CreatedFixedCustomObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CreatedFixedCustomObject a, CreatedFixedCustomObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CreatedFixedCustomObject); } public bool Equals(CreatedFixedCustomObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); return hash; } } } public partial class DefinedCustomObject { private bool _success; // bool public bool success { get { return _success; } set { _success = value; } } /**** Constructors ****/ public DefinedCustomObject() { } public DefinedCustomObject(bool success) { this.success = success; } public DefinedCustomObject(System.IO.Stream stream) { Unpack(stream); } public DefinedCustomObject(System.IO.BinaryReader reader) { Unpack(reader); } public DefinedCustomObject Initialize(bool success) { this.success = success; 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) { _success = 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)_success); } public int Size { get { return 1; } } 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 ==(DefinedCustomObject a, DefinedCustomObject b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DefinedCustomObject a, DefinedCustomObject b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DefinedCustomObject); } public bool Equals(DefinedCustomObject p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._success.Equals(p._success); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._success.GetHashCode(); return hash; } } } public partial class LocatedObjectState { private uint _objectID; // uint_32 private uint _lastObservedTimestamp; // uint_32 private Anki.Vector.ObjectType _objectType; // ObjectType private Anki.PoseStruct3d _pose; // PoseStruct3d private Anki.PoseState _poseState; // PoseState private bool _isConnected; // bool public uint objectID { get { return _objectID; } set { _objectID = value; } } public uint lastObservedTimestamp { get { return _lastObservedTimestamp; } set { _lastObservedTimestamp = value; } } public Anki.Vector.ObjectType objectType { get { return _objectType; } set { _objectType = value; } } public Anki.PoseStruct3d pose { get { return _pose; } set { if (value == null) { throw new System.ArgumentNullException("pose cannot be null.", "value"); } _pose = value; } } public Anki.PoseState poseState { get { return _poseState; } set { _poseState = value; } } public bool isConnected { get { return _isConnected; } set { _isConnected = value; } } /**** Constructors ****/ public LocatedObjectState() { this.pose = new Anki.PoseStruct3d(); } public LocatedObjectState(uint objectID, uint lastObservedTimestamp, Anki.Vector.ObjectType objectType, Anki.PoseStruct3d pose, Anki.PoseState poseState, bool isConnected) { this.objectID = objectID; this.lastObservedTimestamp = lastObservedTimestamp; this.objectType = objectType; this.pose = pose; this.poseState = poseState; this.isConnected = isConnected; } public LocatedObjectState(System.IO.Stream stream) { Unpack(stream); } public LocatedObjectState(System.IO.BinaryReader reader) { Unpack(reader); } public LocatedObjectState Initialize(uint objectID, uint lastObservedTimestamp, Anki.Vector.ObjectType objectType, Anki.PoseStruct3d pose, Anki.PoseState poseState, bool isConnected) { this.objectID = objectID; this.lastObservedTimestamp = lastObservedTimestamp; this.objectType = objectType; this.pose = pose; this.poseState = poseState; this.isConnected = isConnected; 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(); _lastObservedTimestamp = reader.ReadUInt32(); _objectType = (Anki.Vector.ObjectType)reader.ReadInt32(); _pose = new Anki.PoseStruct3d(reader); _poseState = (Anki.PoseState)reader.ReadByte(); _isConnected = 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((uint)_lastObservedTimestamp); writer.Write((int)_objectType); _pose.Pack(writer); writer.Write((byte)_poseState); writer.Write((bool)_isConnected); } 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 ==(LocatedObjectState a, LocatedObjectState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(LocatedObjectState a, LocatedObjectState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as LocatedObjectState); } public bool Equals(LocatedObjectState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._lastObservedTimestamp.Equals(p._lastObservedTimestamp) && this._objectType.Equals(p._objectType) && this._pose.Equals(p._pose) && this._poseState.Equals(p._poseState) && this._isConnected.Equals(p._isConnected); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._lastObservedTimestamp.GetHashCode(); hash = hash * 23 + this._objectType.GetHashCode(); hash = hash * 23 + this._pose.GetHashCode(); hash = hash * 23 + this._poseState.GetHashCode(); hash = hash * 23 + this._isConnected.GetHashCode(); return hash; } } } public partial class LocatedObjectStates { private Anki.Vector.ExternalInterface.LocatedObjectState[] _objects; // LocatedObjectState[uint_8] public Anki.Vector.ExternalInterface.LocatedObjectState[] objects { get { return _objects; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("objects variable-length array is too long. Must be less than or equal to 255.", "value"); } _objects = value; } } /**** Constructors ****/ public LocatedObjectStates() { } public LocatedObjectStates(Anki.Vector.ExternalInterface.LocatedObjectState[] objects) { this.objects = objects; } public LocatedObjectStates(System.IO.Stream stream) { Unpack(stream); } public LocatedObjectStates(System.IO.BinaryReader reader) { Unpack(reader); } public LocatedObjectStates Initialize(Anki.Vector.ExternalInterface.LocatedObjectState[] objects) { this.objects = objects; 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 _objects_length = (int)reader.ReadByte(); _objects = new Anki.Vector.ExternalInterface.LocatedObjectState[_objects_length]; for (int i = 0; i < _objects_length; ++i) { _objects[i] = new Anki.Vector.ExternalInterface.LocatedObjectState(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) { if (_objects != null) { writer.Write((byte)_objects.Length); for (int i = 0; i < _objects.Length; ++i) { if (_objects[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _objects[i].Pack(writer); } } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (objects != null) { result += objects.Length * 46; // LocatedObjectState } 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 ==(LocatedObjectStates a, LocatedObjectStates b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(LocatedObjectStates a, LocatedObjectStates b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as LocatedObjectStates); } public bool Equals(LocatedObjectStates p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._objects,p._objects); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class ConnectedObjectState { private uint _objectID; // uint_32 private Anki.Vector.ObjectType _objectType; // ObjectType public uint objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.ObjectType objectType { get { return _objectType; } set { _objectType = value; } } /**** Constructors ****/ public ConnectedObjectState() { } public ConnectedObjectState(uint objectID, Anki.Vector.ObjectType objectType) { this.objectID = objectID; this.objectType = objectType; } public ConnectedObjectState(System.IO.Stream stream) { Unpack(stream); } public ConnectedObjectState(System.IO.BinaryReader reader) { Unpack(reader); } public ConnectedObjectState Initialize(uint objectID, Anki.Vector.ObjectType objectType) { this.objectID = objectID; this.objectType = objectType; 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(); _objectType = (Anki.Vector.ObjectType)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)_objectType); } 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 ==(ConnectedObjectState a, ConnectedObjectState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ConnectedObjectState a, ConnectedObjectState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ConnectedObjectState); } public bool Equals(ConnectedObjectState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._objectType.Equals(p._objectType); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._objectType.GetHashCode(); return hash; } } } public partial class ConnectedObjectStates { private Anki.Vector.ExternalInterface.ConnectedObjectState[] _objects; // ConnectedObjectState[uint_8] public Anki.Vector.ExternalInterface.ConnectedObjectState[] objects { get { return _objects; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("objects variable-length array is too long. Must be less than or equal to 255.", "value"); } _objects = value; } } /**** Constructors ****/ public ConnectedObjectStates() { } public ConnectedObjectStates(Anki.Vector.ExternalInterface.ConnectedObjectState[] objects) { this.objects = objects; } public ConnectedObjectStates(System.IO.Stream stream) { Unpack(stream); } public ConnectedObjectStates(System.IO.BinaryReader reader) { Unpack(reader); } public ConnectedObjectStates Initialize(Anki.Vector.ExternalInterface.ConnectedObjectState[] objects) { this.objects = objects; 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 _objects_length = (int)reader.ReadByte(); _objects = new Anki.Vector.ExternalInterface.ConnectedObjectState[_objects_length]; for (int i = 0; i < _objects_length; ++i) { _objects[i] = new Anki.Vector.ExternalInterface.ConnectedObjectState(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) { if (_objects != null) { writer.Write((byte)_objects.Length); for (int i = 0; i < _objects.Length; ++i) { if (_objects[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _objects[i].Pack(writer); } } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (objects != null) { result += objects.Length * 8; // ConnectedObjectState } 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 ==(ConnectedObjectStates a, ConnectedObjectStates b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ConnectedObjectStates a, ConnectedObjectStates b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ConnectedObjectStates); } public bool Equals(ConnectedObjectStates p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._objects,p._objects); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class MeetVictorStarted { private string _name; // string[uint_8] public string name { get { return _name; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("name string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _name = value; } } /**** Constructors ****/ public MeetVictorStarted() { } public MeetVictorStarted(string name) { this.name = name; } public MeetVictorStarted(System.IO.Stream stream) { Unpack(stream); } public MeetVictorStarted(System.IO.BinaryReader reader) { Unpack(reader); } public MeetVictorStarted Initialize(string name) { this.name = name; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { int _name_length = (int)reader.ReadByte(); byte[] _name_bytes = reader.ReadBytes(_name_length); _name = System.Text.Encoding.UTF8.GetString(_name_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_name != null) { byte[] _name_bytes = System.Text.Encoding.UTF8.GetBytes(_name); writer.Write((byte)_name_bytes.Length); writer.Write(_name_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (name != null) { result += System.Text.Encoding.UTF8.GetByteCount(name); } 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 ==(MeetVictorStarted a, MeetVictorStarted b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MeetVictorStarted a, MeetVictorStarted b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MeetVictorStarted); } public bool Equals(MeetVictorStarted p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._name.Equals(p._name); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class MeetVictorFaceScanStarted { /**** Constructors ****/ public MeetVictorFaceScanStarted() { } public MeetVictorFaceScanStarted(System.IO.Stream stream) { Unpack(stream); } public MeetVictorFaceScanStarted(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 MeetVictorFaceScanComplete { /**** Constructors ****/ public MeetVictorFaceScanComplete() { } public MeetVictorFaceScanComplete(System.IO.Stream stream) { Unpack(stream); } public MeetVictorFaceScanComplete(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 MeetVictorNameSaved { /**** Constructors ****/ public MeetVictorNameSaved() { } public MeetVictorNameSaved(System.IO.Stream stream) { Unpack(stream); } public MeetVictorNameSaved(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 RobotErasedEnrolledFace { private int _faceID; // int_32 private string _name; // string[uint_8] public int faceID { get { return _faceID; } set { _faceID = value; } } public string name { get { return _name; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("name string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _name = value; } } /**** Constructors ****/ public RobotErasedEnrolledFace() { } public RobotErasedEnrolledFace(int faceID, string name) { this.faceID = faceID; this.name = name; } public RobotErasedEnrolledFace(System.IO.Stream stream) { Unpack(stream); } public RobotErasedEnrolledFace(System.IO.BinaryReader reader) { Unpack(reader); } public RobotErasedEnrolledFace Initialize(int faceID, string name) { this.faceID = faceID; this.name = name; return this; } public void Unpack(System.IO.Stream stream) { System.IO.BinaryReader reader = new System.IO.BinaryReader(stream); Unpack(reader); } public void Unpack(System.IO.BinaryReader reader) { _faceID = reader.ReadInt32(); int _name_length = (int)reader.ReadByte(); byte[] _name_bytes = reader.ReadBytes(_name_length); _name = System.Text.Encoding.UTF8.GetString(_name_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((int)_faceID); if (_name != null) { byte[] _name_bytes = System.Text.Encoding.UTF8.GetBytes(_name); writer.Write((byte)_name_bytes.Length); writer.Write(_name_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 4; // int_32 result += 1; // uint_8 if (name != null) { result += System.Text.Encoding.UTF8.GetByteCount(name); } 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 ==(RobotErasedEnrolledFace a, RobotErasedEnrolledFace b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotErasedEnrolledFace a, RobotErasedEnrolledFace b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotErasedEnrolledFace); } public bool Equals(RobotErasedEnrolledFace p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._faceID.Equals(p._faceID) && this._name.Equals(p._name); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._faceID.GetHashCode(); return hash; } } } public partial class EnrolledNamesResponse { private Anki.Vision.LoadedKnownFace[] _faces; // LoadedKnownFace[uint_8] public Anki.Vision.LoadedKnownFace[] faces { get { return _faces; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("faces variable-length array is too long. Must be less than or equal to 255.", "value"); } _faces = value; } } /**** Constructors ****/ public EnrolledNamesResponse() { } public EnrolledNamesResponse(Anki.Vision.LoadedKnownFace[] faces) { this.faces = faces; } public EnrolledNamesResponse(System.IO.Stream stream) { Unpack(stream); } public EnrolledNamesResponse(System.IO.BinaryReader reader) { Unpack(reader); } public EnrolledNamesResponse Initialize(Anki.Vision.LoadedKnownFace[] faces) { this.faces = faces; 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 _faces_length = (int)reader.ReadByte(); _faces = new Anki.Vision.LoadedKnownFace[_faces_length]; for (int i = 0; i < _faces_length; ++i) { _faces[i] = new Anki.Vision.LoadedKnownFace(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) { if (_faces != null) { writer.Write((byte)_faces.Length); for (int i = 0; i < _faces.Length; ++i) { if (_faces[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _faces[i].Pack(writer); } } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (faces != null) { for (int i = 0; i < faces.Length; ++i) { if (faces[i] == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += faces[i].Size; } } 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 ==(EnrolledNamesResponse a, EnrolledNamesResponse b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(EnrolledNamesResponse a, EnrolledNamesResponse b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as EnrolledNamesResponse); } public bool Equals(EnrolledNamesResponse p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._faces,p._faces); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class RobotErasedAllEnrolledFaces { /**** Constructors ****/ public RobotErasedAllEnrolledFaces() { } public RobotErasedAllEnrolledFaces(System.IO.Stream stream) { Unpack(stream); } public RobotErasedAllEnrolledFaces(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 RobotCompletedFactoryDotTest { private float _camPoseX_mm; // float_32 private float _camPoseY_mm; // float_32 private float _camPoseZ_mm; // float_32 private float _camPoseRoll_rad; // float_32 private float _camPosePitch_rad; // float_32 private float _camPoseYaw_rad; // float_32 private float[] _dotCenX_pix; // float_32[4] private float[] _dotCenY_pix; // float_32[4] private float _headAngle; // float_32 private bool _success = false; // bool private bool _didComputePose = false; // bool public float camPoseX_mm { get { return _camPoseX_mm; } set { _camPoseX_mm = value; } } public float camPoseY_mm { get { return _camPoseY_mm; } set { _camPoseY_mm = value; } } public float camPoseZ_mm { get { return _camPoseZ_mm; } set { _camPoseZ_mm = value; } } public float camPoseRoll_rad { get { return _camPoseRoll_rad; } set { _camPoseRoll_rad = value; } } public float camPosePitch_rad { get { return _camPosePitch_rad; } set { _camPosePitch_rad = value; } } public float camPoseYaw_rad { get { return _camPoseYaw_rad; } set { _camPoseYaw_rad = value; } } public float[] dotCenX_pix { get { return _dotCenX_pix; } set { if (value == null) { throw new System.ArgumentException("dotCenX_pix fixed-length array is null. Must have a length of 4.", "value"); } if (value.Length != 4) { throw new System.ArgumentException("dotCenX_pix fixed-length array is the wrong size. Must have a length of 4.", "value"); } _dotCenX_pix = value; } } public float[] dotCenY_pix { get { return _dotCenY_pix; } set { if (value == null) { throw new System.ArgumentException("dotCenY_pix fixed-length array is null. Must have a length of 4.", "value"); } if (value.Length != 4) { throw new System.ArgumentException("dotCenY_pix fixed-length array is the wrong size. Must have a length of 4.", "value"); } _dotCenY_pix = value; } } public float headAngle { get { return _headAngle; } set { _headAngle = value; } } public bool success { get { return _success; } set { _success = value; } } public bool didComputePose { get { return _didComputePose; } set { _didComputePose = value; } } /**** Constructors ****/ public RobotCompletedFactoryDotTest() { this.dotCenX_pix = new float[4]; this.dotCenY_pix = new float[4]; } public RobotCompletedFactoryDotTest(float camPoseX_mm, float camPoseY_mm, float camPoseZ_mm, float camPoseRoll_rad, float camPosePitch_rad, float camPoseYaw_rad, float[] dotCenX_pix, float[] dotCenY_pix, float headAngle, bool success, bool didComputePose) { this.camPoseX_mm = camPoseX_mm; this.camPoseY_mm = camPoseY_mm; this.camPoseZ_mm = camPoseZ_mm; this.camPoseRoll_rad = camPoseRoll_rad; this.camPosePitch_rad = camPosePitch_rad; this.camPoseYaw_rad = camPoseYaw_rad; this.dotCenX_pix = dotCenX_pix; this.dotCenY_pix = dotCenY_pix; this.headAngle = headAngle; this.success = success; this.didComputePose = didComputePose; } public RobotCompletedFactoryDotTest(System.IO.Stream stream) { Unpack(stream); } public RobotCompletedFactoryDotTest(System.IO.BinaryReader reader) { Unpack(reader); } public RobotCompletedFactoryDotTest Initialize(float camPoseX_mm, float camPoseY_mm, float camPoseZ_mm, float camPoseRoll_rad, float camPosePitch_rad, float camPoseYaw_rad, float[] dotCenX_pix, float[] dotCenY_pix, float headAngle, bool success, bool didComputePose) { this.camPoseX_mm = camPoseX_mm; this.camPoseY_mm = camPoseY_mm; this.camPoseZ_mm = camPoseZ_mm; this.camPoseRoll_rad = camPoseRoll_rad; this.camPosePitch_rad = camPosePitch_rad; this.camPoseYaw_rad = camPoseYaw_rad; this.dotCenX_pix = dotCenX_pix; this.dotCenY_pix = dotCenY_pix; this.headAngle = headAngle; this.success = success; this.didComputePose = didComputePose; 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) { _camPoseX_mm = reader.ReadSingle(); _camPoseY_mm = reader.ReadSingle(); _camPoseZ_mm = reader.ReadSingle(); _camPoseRoll_rad = reader.ReadSingle(); _camPosePitch_rad = reader.ReadSingle(); _camPoseYaw_rad = reader.ReadSingle(); _dotCenX_pix = new float[4]; for (int i = 0; i < 4; ++i) { _dotCenX_pix[i] = reader.ReadSingle(); } _dotCenY_pix = new float[4]; for (int i = 0; i < 4; ++i) { _dotCenY_pix[i] = reader.ReadSingle(); } _headAngle = reader.ReadSingle(); _success = reader.ReadBoolean(); _didComputePose = 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)_camPoseX_mm); writer.Write((float)_camPoseY_mm); writer.Write((float)_camPoseZ_mm); writer.Write((float)_camPoseRoll_rad); writer.Write((float)_camPosePitch_rad); writer.Write((float)_camPoseYaw_rad); for (int i = 0; i < 4; ++i) { writer.Write((float)_dotCenX_pix[i]); } for (int i = 0; i < 4; ++i) { writer.Write((float)_dotCenY_pix[i]); } writer.Write((float)_headAngle); writer.Write((bool)_success); writer.Write((bool)_didComputePose); } public int Size { get { return 62; } } 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 ==(RobotCompletedFactoryDotTest a, RobotCompletedFactoryDotTest b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(RobotCompletedFactoryDotTest a, RobotCompletedFactoryDotTest b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as RobotCompletedFactoryDotTest); } public bool Equals(RobotCompletedFactoryDotTest p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._camPoseX_mm.Equals(p._camPoseX_mm) && this._camPoseY_mm.Equals(p._camPoseY_mm) && this._camPoseZ_mm.Equals(p._camPoseZ_mm) && this._camPoseRoll_rad.Equals(p._camPoseRoll_rad) && this._camPosePitch_rad.Equals(p._camPosePitch_rad) && this._camPoseYaw_rad.Equals(p._camPoseYaw_rad) && ArrayEquals(this._dotCenX_pix,p._dotCenX_pix) && ArrayEquals(this._dotCenY_pix,p._dotCenY_pix) && this._headAngle.Equals(p._headAngle) && this._success.Equals(p._success) && this._didComputePose.Equals(p._didComputePose); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._camPoseX_mm.GetHashCode(); hash = hash * 23 + this._camPoseY_mm.GetHashCode(); hash = hash * 23 + this._camPoseZ_mm.GetHashCode(); hash = hash * 23 + this._camPoseRoll_rad.GetHashCode(); hash = hash * 23 + this._camPosePitch_rad.GetHashCode(); hash = hash * 23 + this._camPoseYaw_rad.GetHashCode(); hash = hash * 23 + this._headAngle.GetHashCode(); hash = hash * 23 + this._success.GetHashCode(); hash = hash * 23 + this._didComputePose.GetHashCode(); return hash; } } } public partial class PlaypenBehaviorFailed { private Anki.Vector.FactoryTestResultCode _result; // FactoryTestResultCode public Anki.Vector.FactoryTestResultCode result { get { return _result; } set { _result = value; } } /**** Constructors ****/ public PlaypenBehaviorFailed() { } public PlaypenBehaviorFailed(Anki.Vector.FactoryTestResultCode result) { this.result = result; } public PlaypenBehaviorFailed(System.IO.Stream stream) { Unpack(stream); } public PlaypenBehaviorFailed(System.IO.BinaryReader reader) { Unpack(reader); } public PlaypenBehaviorFailed Initialize(Anki.Vector.FactoryTestResultCode result) { this.result = result; 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) { _result = (Anki.Vector.FactoryTestResultCode)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((byte)_result); } public int Size { get { return 1; } } 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 ==(PlaypenBehaviorFailed a, PlaypenBehaviorFailed b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(PlaypenBehaviorFailed a, PlaypenBehaviorFailed b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as PlaypenBehaviorFailed); } public bool Equals(PlaypenBehaviorFailed p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._result.Equals(p._result); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._result.GetHashCode(); return hash; } } } public partial class SelfTestBehaviorFailed { private Anki.Vector.SelfTestResultCode _result; // SelfTestResultCode public Anki.Vector.SelfTestResultCode result { get { return _result; } set { _result = value; } } /**** Constructors ****/ public SelfTestBehaviorFailed() { } public SelfTestBehaviorFailed(Anki.Vector.SelfTestResultCode result) { this.result = result; } public SelfTestBehaviorFailed(System.IO.Stream stream) { Unpack(stream); } public SelfTestBehaviorFailed(System.IO.BinaryReader reader) { Unpack(reader); } public SelfTestBehaviorFailed Initialize(Anki.Vector.SelfTestResultCode result) { this.result = result; 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) { _result = (Anki.Vector.SelfTestResultCode)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((byte)_result); } public int Size { get { return 1; } } 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 ==(SelfTestBehaviorFailed a, SelfTestBehaviorFailed b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(SelfTestBehaviorFailed a, SelfTestBehaviorFailed b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as SelfTestBehaviorFailed); } public bool Equals(SelfTestBehaviorFailed p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._result.Equals(p._result); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._result.GetHashCode(); return hash; } } } public partial class SelfTestEnd { /**** Constructors ****/ public SelfTestEnd() { } public SelfTestEnd(System.IO.Stream stream) { Unpack(stream); } public SelfTestEnd(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 AnimationAvailable { private string _animName; // string[uint_8] public string animName { get { return _animName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("animName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _animName = value; } } /**** Constructors ****/ public AnimationAvailable() { } public AnimationAvailable(string animName) { this.animName = animName; } public AnimationAvailable(System.IO.Stream stream) { Unpack(stream); } public AnimationAvailable(System.IO.BinaryReader reader) { Unpack(reader); } public AnimationAvailable Initialize(string animName) { this.animName = animName; 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 _animName_length = (int)reader.ReadByte(); byte[] _animName_bytes = reader.ReadBytes(_animName_length); _animName = System.Text.Encoding.UTF8.GetString(_animName_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_animName != null) { byte[] _animName_bytes = System.Text.Encoding.UTF8.GetBytes(_animName); writer.Write((byte)_animName_bytes.Length); writer.Write(_animName_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (animName != null) { result += System.Text.Encoding.UTF8.GetByteCount(animName); } 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 ==(AnimationAvailable a, AnimationAvailable b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AnimationAvailable a, AnimationAvailable b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AnimationAvailable); } public bool Equals(AnimationAvailable p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._animName.Equals(p._animName); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class AnimationGroupAvailable { private string _animGroupName; // string[uint_8] public string animGroupName { get { return _animGroupName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("animGroupName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _animGroupName = value; } } /**** Constructors ****/ public AnimationGroupAvailable() { } public AnimationGroupAvailable(string animGroupName) { this.animGroupName = animGroupName; } public AnimationGroupAvailable(System.IO.Stream stream) { Unpack(stream); } public AnimationGroupAvailable(System.IO.BinaryReader reader) { Unpack(reader); } public AnimationGroupAvailable Initialize(string animGroupName) { this.animGroupName = animGroupName; 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 _animGroupName_length = (int)reader.ReadByte(); byte[] _animGroupName_bytes = reader.ReadBytes(_animGroupName_length); _animGroupName = System.Text.Encoding.UTF8.GetString(_animGroupName_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_animGroupName != null) { byte[] _animGroupName_bytes = System.Text.Encoding.UTF8.GetBytes(_animGroupName); writer.Write((byte)_animGroupName_bytes.Length); writer.Write(_animGroupName_bytes); } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (animGroupName != null) { result += System.Text.Encoding.UTF8.GetByteCount(animGroupName); } 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 ==(AnimationGroupAvailable a, AnimationGroupAvailable b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AnimationGroupAvailable a, AnimationGroupAvailable b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AnimationGroupAvailable); } public bool Equals(AnimationGroupAvailable p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._animGroupName.Equals(p._animGroupName); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class AnimationAborted { private uint _tag; // uint_32 public uint tag { get { return _tag; } set { _tag = value; } } /**** Constructors ****/ public AnimationAborted() { } public AnimationAborted(uint tag) { this.tag = tag; } public AnimationAborted(System.IO.Stream stream) { Unpack(stream); } public AnimationAborted(System.IO.BinaryReader reader) { Unpack(reader); } public AnimationAborted Initialize(uint tag) { this.tag = tag; 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) { _tag = 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)_tag); } 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 ==(AnimationAborted a, AnimationAborted b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AnimationAborted a, AnimationAborted b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AnimationAborted); } public bool Equals(AnimationAborted p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._tag.Equals(p._tag); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._tag.GetHashCode(); return hash; } } } public partial class AnimationEvent { private uint _timestamp; // uint_32 private Anki.Vector.AnimEvent _event_id; // AnimEvent public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public Anki.Vector.AnimEvent event_id { get { return _event_id; } set { _event_id = value; } } /**** Constructors ****/ public AnimationEvent() { } public AnimationEvent(uint timestamp, Anki.Vector.AnimEvent event_id) { this.timestamp = timestamp; this.event_id = event_id; } public AnimationEvent(System.IO.Stream stream) { Unpack(stream); } public AnimationEvent(System.IO.BinaryReader reader) { Unpack(reader); } public AnimationEvent Initialize(uint timestamp, Anki.Vector.AnimEvent event_id) { this.timestamp = timestamp; this.event_id = event_id; 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(); _event_id = (Anki.Vector.AnimEvent)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((uint)_timestamp); writer.Write((byte)_event_id); } public int Size { get { return 5; } } public static bool ArrayEquals(System.Collections.Generic.IList a1, System.Collections.Generic.IList a2) { if (System.Object.ReferenceEquals(a1, a2)) return true; if (System.Object.ReferenceEquals(a1, null) || System.Object.ReferenceEquals(a2, null)) return false; if (a1.Count != a2.Count) return false; for (int i = 0; i < a1.Count; i++) { if (!a1[i].Equals(a2[i])) { return false; } } return true; } public static bool operator ==(AnimationEvent a, AnimationEvent b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AnimationEvent a, AnimationEvent b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AnimationEvent); } public bool Equals(AnimationEvent p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._event_id.Equals(p._event_id); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._event_id.GetHashCode(); return hash; } } } public partial class ObjectAvailable { private string _factory_id; // string[uint_8] private Anki.Vector.ObjectType _objectType; // ObjectType private sbyte _rssi; // int_8 public string factory_id { get { return _factory_id; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("factory_id string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _factory_id = value; } } public Anki.Vector.ObjectType objectType { get { return _objectType; } set { _objectType = value; } } public sbyte rssi { get { return _rssi; } set { _rssi = value; } } /**** Constructors ****/ public ObjectAvailable() { } public ObjectAvailable(string factory_id, Anki.Vector.ObjectType objectType, sbyte rssi) { this.factory_id = factory_id; this.objectType = objectType; this.rssi = rssi; } public ObjectAvailable(System.IO.Stream stream) { Unpack(stream); } public ObjectAvailable(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectAvailable Initialize(string factory_id, Anki.Vector.ObjectType objectType, sbyte rssi) { this.factory_id = factory_id; this.objectType = objectType; this.rssi = rssi; 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 _factory_id_length = (int)reader.ReadByte(); byte[] _factory_id_bytes = reader.ReadBytes(_factory_id_length); _factory_id = System.Text.Encoding.UTF8.GetString(_factory_id_bytes); _objectType = (Anki.Vector.ObjectType)reader.ReadInt32(); _rssi = reader.ReadSByte(); } 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 (_factory_id != null) { byte[] _factory_id_bytes = System.Text.Encoding.UTF8.GetBytes(_factory_id); writer.Write((byte)_factory_id_bytes.Length); writer.Write(_factory_id_bytes); } else { writer.Write((byte)0); } writer.Write((int)_objectType); writer.Write((sbyte)_rssi); } public int Size { get { int result = 0; result += 1; // uint_8 if (factory_id != null) { result += System.Text.Encoding.UTF8.GetByteCount(factory_id); } result += 4; // ObjectType result += 1; // int_8 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 ==(ObjectAvailable a, ObjectAvailable b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectAvailable a, ObjectAvailable b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectAvailable); } public bool Equals(ObjectAvailable p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._factory_id.Equals(p._factory_id) && this._objectType.Equals(p._objectType) && this._rssi.Equals(p._rssi); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectType.GetHashCode(); hash = hash * 23 + this._rssi.GetHashCode(); return hash; } } } public partial class ObjectConnectionState { private uint _objectID; // uint_32 private string _factoryID; // string[uint_8] private Anki.Vector.ObjectType _object_type; // ObjectType private bool _connected; // bool public uint objectID { get { return _objectID; } set { _objectID = value; } } public string factoryID { get { return _factoryID; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("factoryID string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _factoryID = value; } } public Anki.Vector.ObjectType object_type { get { return _object_type; } set { _object_type = value; } } public bool connected { get { return _connected; } set { _connected = value; } } /**** Constructors ****/ public ObjectConnectionState() { } public ObjectConnectionState(uint objectID, string factoryID, Anki.Vector.ObjectType object_type, bool connected) { this.objectID = objectID; this.factoryID = factoryID; this.object_type = object_type; this.connected = connected; } public ObjectConnectionState(System.IO.Stream stream) { Unpack(stream); } public ObjectConnectionState(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectConnectionState Initialize(uint objectID, string factoryID, Anki.Vector.ObjectType object_type, bool connected) { this.objectID = objectID; this.factoryID = factoryID; this.object_type = object_type; this.connected = connected; 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(); int _factoryID_length = (int)reader.ReadByte(); byte[] _factoryID_bytes = reader.ReadBytes(_factoryID_length); _factoryID = System.Text.Encoding.UTF8.GetString(_factoryID_bytes); _object_type = (Anki.Vector.ObjectType)reader.ReadInt32(); _connected = 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); if (_factoryID != null) { byte[] _factoryID_bytes = System.Text.Encoding.UTF8.GetBytes(_factoryID); writer.Write((byte)_factoryID_bytes.Length); writer.Write(_factoryID_bytes); } else { writer.Write((byte)0); } writer.Write((int)_object_type); writer.Write((bool)_connected); } public int Size { get { int result = 0; result += 4; // uint_32 result += 1; // uint_8 if (factoryID != null) { result += System.Text.Encoding.UTF8.GetByteCount(factoryID); } result += 4; // ObjectType 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 ==(ObjectConnectionState a, ObjectConnectionState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectConnectionState a, ObjectConnectionState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectConnectionState); } public bool Equals(ObjectConnectionState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._objectID.Equals(p._objectID) && this._factoryID.Equals(p._factoryID) && this._object_type.Equals(p._object_type) && this._connected.Equals(p._connected); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._object_type.GetHashCode(); hash = hash * 23 + this._connected.GetHashCode(); return hash; } } } public partial class ObjectMoved { private uint _timestamp; // uint_32 private uint _objectID; // uint_32 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint objectID { get { return _objectID; } set { _objectID = value; } } /**** Constructors ****/ public ObjectMoved() { } public ObjectMoved(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; } public ObjectMoved(System.IO.Stream stream) { Unpack(stream); } public ObjectMoved(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectMoved Initialize(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; 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(); _objectID = 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)_timestamp); writer.Write((uint)_objectID); } 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 ==(ObjectMoved a, ObjectMoved b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectMoved a, ObjectMoved b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectMoved); } public bool Equals(ObjectMoved p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectID.Equals(p._objectID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); return hash; } } } public partial class ObjectStoppedMoving { private uint _timestamp; // uint_32 private uint _objectID; // uint_32 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint objectID { get { return _objectID; } set { _objectID = value; } } /**** Constructors ****/ public ObjectStoppedMoving() { } public ObjectStoppedMoving(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; } public ObjectStoppedMoving(System.IO.Stream stream) { Unpack(stream); } public ObjectStoppedMoving(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectStoppedMoving Initialize(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; 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(); _objectID = 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)_timestamp); writer.Write((uint)_objectID); } 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 ==(ObjectStoppedMoving a, ObjectStoppedMoving b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectStoppedMoving a, ObjectStoppedMoving b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectStoppedMoving); } public bool Equals(ObjectStoppedMoving p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectID.Equals(p._objectID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); return hash; } } } public partial class ObjectUpAxisChanged { private uint _timestamp; // uint_32 private uint _objectID; // uint_32 private Anki.Vector.UpAxis _upAxis; // UpAxis public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.UpAxis upAxis { get { return _upAxis; } set { _upAxis = value; } } /**** Constructors ****/ public ObjectUpAxisChanged() { } public ObjectUpAxisChanged(uint timestamp, uint objectID, Anki.Vector.UpAxis upAxis) { this.timestamp = timestamp; this.objectID = objectID; this.upAxis = upAxis; } public ObjectUpAxisChanged(System.IO.Stream stream) { Unpack(stream); } public ObjectUpAxisChanged(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectUpAxisChanged Initialize(uint timestamp, uint objectID, Anki.Vector.UpAxis upAxis) { this.timestamp = timestamp; this.objectID = objectID; this.upAxis = upAxis; 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(); _objectID = reader.ReadUInt32(); _upAxis = (Anki.Vector.UpAxis)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((uint)_timestamp); writer.Write((uint)_objectID); writer.Write((byte)_upAxis); } 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 ==(ObjectUpAxisChanged a, ObjectUpAxisChanged b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectUpAxisChanged a, ObjectUpAxisChanged b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectUpAxisChanged); } public bool Equals(ObjectUpAxisChanged p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectID.Equals(p._objectID) && this._upAxis.Equals(p._upAxis); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._upAxis.GetHashCode(); return hash; } } } public partial class ObjectTapped { private uint _timestamp; // uint_32 private uint _objectID; // uint_32 public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint objectID { get { return _objectID; } set { _objectID = value; } } /**** Constructors ****/ public ObjectTapped() { } public ObjectTapped(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; } public ObjectTapped(System.IO.Stream stream) { Unpack(stream); } public ObjectTapped(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectTapped Initialize(uint timestamp, uint objectID) { this.timestamp = timestamp; this.objectID = objectID; 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(); _objectID = 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)_timestamp); writer.Write((uint)_objectID); } 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 ==(ObjectTapped a, ObjectTapped b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectTapped a, ObjectTapped b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectTapped); } public bool Equals(ObjectTapped p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectID.Equals(p._objectID); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); return hash; } } } public partial class ObjectAccel { private uint _timestamp; // uint_32 private uint _objectID; // uint_32 private Anki.Vector.ActiveAccel _accel; // ActiveAccel public uint timestamp { get { return _timestamp; } set { _timestamp = value; } } public uint objectID { get { return _objectID; } set { _objectID = value; } } public Anki.Vector.ActiveAccel accel { get { return _accel; } set { if (value == null) { throw new System.ArgumentNullException("accel cannot be null.", "value"); } _accel = value; } } /**** Constructors ****/ public ObjectAccel() { this.accel = new Anki.Vector.ActiveAccel(); } public ObjectAccel(uint timestamp, uint objectID, Anki.Vector.ActiveAccel accel) { this.timestamp = timestamp; this.objectID = objectID; this.accel = accel; } public ObjectAccel(System.IO.Stream stream) { Unpack(stream); } public ObjectAccel(System.IO.BinaryReader reader) { Unpack(reader); } public ObjectAccel Initialize(uint timestamp, uint objectID, Anki.Vector.ActiveAccel accel) { this.timestamp = timestamp; this.objectID = objectID; this.accel = accel; 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(); _objectID = reader.ReadUInt32(); _accel = new Anki.Vector.ActiveAccel(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((uint)_timestamp); writer.Write((uint)_objectID); _accel.Pack(writer); } public int Size { get { return 20; } } 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 ==(ObjectAccel a, ObjectAccel b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(ObjectAccel a, ObjectAccel b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as ObjectAccel); } public bool Equals(ObjectAccel p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._timestamp.Equals(p._timestamp) && this._objectID.Equals(p._objectID) && this._accel.Equals(p._accel); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._timestamp.GetHashCode(); hash = hash * 23 + this._objectID.GetHashCode(); hash = hash * 23 + this._accel.GetHashCode(); return hash; } } } public enum MessageType : byte { AnimationAvailable = 0 }; public partial class EndOfMessage { private Anki.Vector.ExternalInterface.MessageType _messageType; // MessageType public Anki.Vector.ExternalInterface.MessageType messageType { get { return _messageType; } set { _messageType = value; } } /**** Constructors ****/ public EndOfMessage() { } public EndOfMessage(Anki.Vector.ExternalInterface.MessageType messageType) { this.messageType = messageType; } public EndOfMessage(System.IO.Stream stream) { Unpack(stream); } public EndOfMessage(System.IO.BinaryReader reader) { Unpack(reader); } public EndOfMessage Initialize(Anki.Vector.ExternalInterface.MessageType messageType) { this.messageType = messageType; 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) { _messageType = (Anki.Vector.ExternalInterface.MessageType)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((byte)_messageType); } public int Size { get { return 1; } } 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 ==(EndOfMessage a, EndOfMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(EndOfMessage a, EndOfMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as EndOfMessage); } public bool Equals(EndOfMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._messageType.Equals(p._messageType); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._messageType.GetHashCode(); return hash; } } } public partial class MoodState { private float[] _emotionValues; // float_32[uint_8] public float[] emotionValues { get { return _emotionValues; } set { if (value != null && value.Length > 255) { throw new System.ArgumentException("emotionValues variable-length array is too long. Must be less than or equal to 255.", "value"); } _emotionValues = value; } } /**** Constructors ****/ public MoodState() { } public MoodState(float[] emotionValues) { this.emotionValues = emotionValues; } public MoodState(System.IO.Stream stream) { Unpack(stream); } public MoodState(System.IO.BinaryReader reader) { Unpack(reader); } public MoodState Initialize(float[] emotionValues) { this.emotionValues = emotionValues; 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 _emotionValues_length = (int)reader.ReadByte(); _emotionValues = new float[_emotionValues_length]; for (int i = 0; i < _emotionValues_length; ++i) { _emotionValues[i] = 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 (_emotionValues != null) { writer.Write((byte)_emotionValues.Length); for (int i = 0; i < _emotionValues.Length; ++i) { writer.Write((float)_emotionValues[i]); } } else { writer.Write((byte)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (emotionValues != null) { result += emotionValues.Length * 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 ==(MoodState a, MoodState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MoodState a, MoodState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MoodState); } public bool Equals(MoodState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._emotionValues,p._emotionValues); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class DebugConsoleVar { private string _varName; // string[uint_8] private string _category; // string[uint_8] private double _minValue; // float_64 private double _maxValue; // float_64 private Anki.Vector.ConsoleVarUnion _varValue; // ConsoleVarUnion public string varName { get { return _varName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("varName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _varName = value; } } public string category { get { return _category; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("category string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _category = value; } } public double minValue { get { return _minValue; } set { _minValue = value; } } public double maxValue { get { return _maxValue; } set { _maxValue = value; } } public Anki.Vector.ConsoleVarUnion varValue { get { return _varValue; } set { if (value == null) { throw new System.ArgumentNullException("varValue cannot be null.", "value"); } _varValue = value; } } /**** Constructors ****/ public DebugConsoleVar() { this.varValue = new Anki.Vector.ConsoleVarUnion(); } public DebugConsoleVar(string varName, string category, double minValue, double maxValue, Anki.Vector.ConsoleVarUnion varValue) { this.varName = varName; this.category = category; this.minValue = minValue; this.maxValue = maxValue; this.varValue = varValue; } public DebugConsoleVar(System.IO.Stream stream) { Unpack(stream); } public DebugConsoleVar(System.IO.BinaryReader reader) { Unpack(reader); } public DebugConsoleVar Initialize(string varName, string category, double minValue, double maxValue, Anki.Vector.ConsoleVarUnion varValue) { this.varName = varName; this.category = category; this.minValue = minValue; this.maxValue = maxValue; this.varValue = varValue; return this; } public DebugConsoleVar Initialize(string varName, string category, double minValue, double maxValue, T0 varValueState) { this.varName = varName; this.category = category; this.minValue = minValue; this.maxValue = maxValue; this.varValue.Initialize(varValueState); 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 _varName_length = (int)reader.ReadByte(); byte[] _varName_bytes = reader.ReadBytes(_varName_length); _varName = System.Text.Encoding.UTF8.GetString(_varName_bytes); int _category_length = (int)reader.ReadByte(); byte[] _category_bytes = reader.ReadBytes(_category_length); _category = System.Text.Encoding.UTF8.GetString(_category_bytes); _minValue = reader.ReadDouble(); _maxValue = reader.ReadDouble(); _varValue = new Anki.Vector.ConsoleVarUnion(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) { if (_varName != null) { byte[] _varName_bytes = System.Text.Encoding.UTF8.GetBytes(_varName); writer.Write((byte)_varName_bytes.Length); writer.Write(_varName_bytes); } else { writer.Write((byte)0); } if (_category != null) { byte[] _category_bytes = System.Text.Encoding.UTF8.GetBytes(_category); writer.Write((byte)_category_bytes.Length); writer.Write(_category_bytes); } else { writer.Write((byte)0); } writer.Write((double)_minValue); writer.Write((double)_maxValue); _varValue.Pack(writer); } public int Size { get { int result = 0; result += 1; // uint_8 if (varName != null) { result += System.Text.Encoding.UTF8.GetByteCount(varName); } result += 1; // uint_8 if (category != null) { result += System.Text.Encoding.UTF8.GetByteCount(category); } result += 8; // float_64 result += 8; // float_64 result += varValue.Size; 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 ==(DebugConsoleVar a, DebugConsoleVar b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DebugConsoleVar a, DebugConsoleVar b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DebugConsoleVar); } public bool Equals(DebugConsoleVar p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._varName.Equals(p._varName) && this._category.Equals(p._category) && this._minValue.Equals(p._minValue) && this._maxValue.Equals(p._maxValue) && this._varValue.Equals(p._varValue); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._minValue.GetHashCode(); hash = hash * 23 + this._maxValue.GetHashCode(); hash = hash * 23 + this._varValue.GetHashCode(); return hash; } } } public partial class InitDebugConsoleVarMessage { private Anki.Vector.ExternalInterface.DebugConsoleVar[] _varData; // DebugConsoleVar[uint_16] public Anki.Vector.ExternalInterface.DebugConsoleVar[] varData { get { return _varData; } set { if (value != null && value.Length > 65535) { throw new System.ArgumentException("varData variable-length array is too long. Must be less than or equal to 65535.", "value"); } _varData = value; } } /**** Constructors ****/ public InitDebugConsoleVarMessage() { } public InitDebugConsoleVarMessage(Anki.Vector.ExternalInterface.DebugConsoleVar[] varData) { this.varData = varData; } public InitDebugConsoleVarMessage(System.IO.Stream stream) { Unpack(stream); } public InitDebugConsoleVarMessage(System.IO.BinaryReader reader) { Unpack(reader); } public InitDebugConsoleVarMessage Initialize(Anki.Vector.ExternalInterface.DebugConsoleVar[] varData) { this.varData = varData; 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 _varData_length = (int)reader.ReadUInt16(); _varData = new Anki.Vector.ExternalInterface.DebugConsoleVar[_varData_length]; for (int i = 0; i < _varData_length; ++i) { _varData[i] = new Anki.Vector.ExternalInterface.DebugConsoleVar(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) { if (_varData != null) { writer.Write((ushort)_varData.Length); for (int i = 0; i < _varData.Length; ++i) { if (_varData[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _varData[i].Pack(writer); } } else { writer.Write((ushort)0); } } public int Size { get { int result = 0; result += 2; // uint_16 if (varData != null) { for (int i = 0; i < varData.Length; ++i) { if (varData[i] == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += varData[i].Size; } } 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 ==(InitDebugConsoleVarMessage a, InitDebugConsoleVarMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(InitDebugConsoleVarMessage a, InitDebugConsoleVarMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as InitDebugConsoleVarMessage); } public bool Equals(InitDebugConsoleVarMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._varData,p._varData); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class JsonDasLogMessage { private string _fileName; // string[uint_8] private string _jsonData; // string[uint_16] public string fileName { get { return _fileName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("fileName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _fileName = value; } } public string jsonData { get { return _jsonData; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 65535) { throw new System.ArgumentException("jsonData string is too long. Must decode to less than or equal to 65535 bytes.", "value"); } _jsonData = value; } } /**** Constructors ****/ public JsonDasLogMessage() { } public JsonDasLogMessage(string fileName, string jsonData) { this.fileName = fileName; this.jsonData = jsonData; } public JsonDasLogMessage(System.IO.Stream stream) { Unpack(stream); } public JsonDasLogMessage(System.IO.BinaryReader reader) { Unpack(reader); } public JsonDasLogMessage Initialize(string fileName, string jsonData) { this.fileName = fileName; this.jsonData = jsonData; 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 _fileName_length = (int)reader.ReadByte(); byte[] _fileName_bytes = reader.ReadBytes(_fileName_length); _fileName = System.Text.Encoding.UTF8.GetString(_fileName_bytes); int _jsonData_length = (int)reader.ReadUInt16(); byte[] _jsonData_bytes = reader.ReadBytes(_jsonData_length); _jsonData = System.Text.Encoding.UTF8.GetString(_jsonData_bytes); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_fileName != null) { byte[] _fileName_bytes = System.Text.Encoding.UTF8.GetBytes(_fileName); writer.Write((byte)_fileName_bytes.Length); writer.Write(_fileName_bytes); } else { writer.Write((byte)0); } if (_jsonData != null) { byte[] _jsonData_bytes = System.Text.Encoding.UTF8.GetBytes(_jsonData); writer.Write((ushort)_jsonData_bytes.Length); writer.Write(_jsonData_bytes); } else { writer.Write((ushort)0); } } public int Size { get { int result = 0; result += 1; // uint_8 if (fileName != null) { result += System.Text.Encoding.UTF8.GetByteCount(fileName); } result += 2; // uint_16 if (jsonData != null) { result += System.Text.Encoding.UTF8.GetByteCount(jsonData); } 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 ==(JsonDasLogMessage a, JsonDasLogMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(JsonDasLogMessage a, JsonDasLogMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as JsonDasLogMessage); } public bool Equals(JsonDasLogMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._fileName.Equals(p._fileName) && this._jsonData.Equals(p._jsonData); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class JsonDasLogAllSentMessage { private byte _filesSent; // uint_8 public byte filesSent { get { return _filesSent; } set { _filesSent = value; } } /**** Constructors ****/ public JsonDasLogAllSentMessage() { } public JsonDasLogAllSentMessage(byte filesSent) { this.filesSent = filesSent; } public JsonDasLogAllSentMessage(System.IO.Stream stream) { Unpack(stream); } public JsonDasLogAllSentMessage(System.IO.BinaryReader reader) { Unpack(reader); } public JsonDasLogAllSentMessage Initialize(byte filesSent) { this.filesSent = filesSent; 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) { _filesSent = 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((byte)_filesSent); } public int Size { get { return 1; } } 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 ==(JsonDasLogAllSentMessage a, JsonDasLogAllSentMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(JsonDasLogAllSentMessage a, JsonDasLogAllSentMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as JsonDasLogAllSentMessage); } public bool Equals(JsonDasLogAllSentMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._filesSent.Equals(p._filesSent); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._filesSent.GetHashCode(); return hash; } } } public partial class VerifyDebugConsoleFuncMessage { private string _funcName; // string[uint_8] private string _statusMessage; // string[uint_16] private bool _success; // bool public string funcName { get { return _funcName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("funcName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _funcName = value; } } public string statusMessage { get { return _statusMessage; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 65535) { throw new System.ArgumentException("statusMessage string is too long. Must decode to less than or equal to 65535 bytes.", "value"); } _statusMessage = value; } } public bool success { get { return _success; } set { _success = value; } } /**** Constructors ****/ public VerifyDebugConsoleFuncMessage() { } public VerifyDebugConsoleFuncMessage(string funcName, string statusMessage, bool success) { this.funcName = funcName; this.statusMessage = statusMessage; this.success = success; } public VerifyDebugConsoleFuncMessage(System.IO.Stream stream) { Unpack(stream); } public VerifyDebugConsoleFuncMessage(System.IO.BinaryReader reader) { Unpack(reader); } public VerifyDebugConsoleFuncMessage Initialize(string funcName, string statusMessage, bool success) { this.funcName = funcName; this.statusMessage = statusMessage; this.success = success; 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 _funcName_length = (int)reader.ReadByte(); byte[] _funcName_bytes = reader.ReadBytes(_funcName_length); _funcName = System.Text.Encoding.UTF8.GetString(_funcName_bytes); int _statusMessage_length = (int)reader.ReadUInt16(); byte[] _statusMessage_bytes = reader.ReadBytes(_statusMessage_length); _statusMessage = System.Text.Encoding.UTF8.GetString(_statusMessage_bytes); _success = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_funcName != null) { byte[] _funcName_bytes = System.Text.Encoding.UTF8.GetBytes(_funcName); writer.Write((byte)_funcName_bytes.Length); writer.Write(_funcName_bytes); } else { writer.Write((byte)0); } if (_statusMessage != null) { byte[] _statusMessage_bytes = System.Text.Encoding.UTF8.GetBytes(_statusMessage); writer.Write((ushort)_statusMessage_bytes.Length); writer.Write(_statusMessage_bytes); } else { writer.Write((ushort)0); } writer.Write((bool)_success); } public int Size { get { int result = 0; result += 1; // uint_8 if (funcName != null) { result += System.Text.Encoding.UTF8.GetByteCount(funcName); } result += 2; // uint_16 if (statusMessage != null) { result += System.Text.Encoding.UTF8.GetByteCount(statusMessage); } 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 ==(VerifyDebugConsoleFuncMessage a, VerifyDebugConsoleFuncMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(VerifyDebugConsoleFuncMessage a, VerifyDebugConsoleFuncMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as VerifyDebugConsoleFuncMessage); } public bool Equals(VerifyDebugConsoleFuncMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._funcName.Equals(p._funcName) && this._statusMessage.Equals(p._statusMessage) && this._success.Equals(p._success); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._success.GetHashCode(); return hash; } } } public partial class VerifyDebugConsoleVarMessage { private string _varName; // string[uint_8] private string _statusMessage; // string[uint_16] private Anki.Vector.ConsoleVarUnion _varValue; // ConsoleVarUnion private bool _success; // bool public string varName { get { return _varName; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 255) { throw new System.ArgumentException("varName string is too long. Must decode to less than or equal to 255 bytes.", "value"); } _varName = value; } } public string statusMessage { get { return _statusMessage; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 65535) { throw new System.ArgumentException("statusMessage string is too long. Must decode to less than or equal to 65535 bytes.", "value"); } _statusMessage = value; } } public Anki.Vector.ConsoleVarUnion varValue { get { return _varValue; } set { if (value == null) { throw new System.ArgumentNullException("varValue cannot be null.", "value"); } _varValue = value; } } public bool success { get { return _success; } set { _success = value; } } /**** Constructors ****/ public VerifyDebugConsoleVarMessage() { this.varValue = new Anki.Vector.ConsoleVarUnion(); } public VerifyDebugConsoleVarMessage(string varName, string statusMessage, Anki.Vector.ConsoleVarUnion varValue, bool success) { this.varName = varName; this.statusMessage = statusMessage; this.varValue = varValue; this.success = success; } public VerifyDebugConsoleVarMessage(System.IO.Stream stream) { Unpack(stream); } public VerifyDebugConsoleVarMessage(System.IO.BinaryReader reader) { Unpack(reader); } public VerifyDebugConsoleVarMessage Initialize(string varName, string statusMessage, Anki.Vector.ConsoleVarUnion varValue, bool success) { this.varName = varName; this.statusMessage = statusMessage; this.varValue = varValue; this.success = success; return this; } public VerifyDebugConsoleVarMessage Initialize(string varName, string statusMessage, T0 varValueState, bool success) { this.varName = varName; this.statusMessage = statusMessage; this.varValue.Initialize(varValueState); this.success = success; 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 _varName_length = (int)reader.ReadByte(); byte[] _varName_bytes = reader.ReadBytes(_varName_length); _varName = System.Text.Encoding.UTF8.GetString(_varName_bytes); int _statusMessage_length = (int)reader.ReadUInt16(); byte[] _statusMessage_bytes = reader.ReadBytes(_statusMessage_length); _statusMessage = System.Text.Encoding.UTF8.GetString(_statusMessage_bytes); _varValue = new Anki.Vector.ConsoleVarUnion(reader); _success = reader.ReadBoolean(); } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { if (_varName != null) { byte[] _varName_bytes = System.Text.Encoding.UTF8.GetBytes(_varName); writer.Write((byte)_varName_bytes.Length); writer.Write(_varName_bytes); } else { writer.Write((byte)0); } if (_statusMessage != null) { byte[] _statusMessage_bytes = System.Text.Encoding.UTF8.GetBytes(_statusMessage); writer.Write((ushort)_statusMessage_bytes.Length); writer.Write(_statusMessage_bytes); } else { writer.Write((ushort)0); } _varValue.Pack(writer); writer.Write((bool)_success); } public int Size { get { int result = 0; result += 1; // uint_8 if (varName != null) { result += System.Text.Encoding.UTF8.GetByteCount(varName); } result += 2; // uint_16 if (statusMessage != null) { result += System.Text.Encoding.UTF8.GetByteCount(statusMessage); } result += varValue.Size; 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 ==(VerifyDebugConsoleVarMessage a, VerifyDebugConsoleVarMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(VerifyDebugConsoleVarMessage a, VerifyDebugConsoleVarMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as VerifyDebugConsoleVarMessage); } public bool Equals(VerifyDebugConsoleVarMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._varName.Equals(p._varName) && this._statusMessage.Equals(p._statusMessage) && this._varValue.Equals(p._varValue) && this._success.Equals(p._success); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._varValue.GetHashCode(); hash = hash * 23 + this._success.GetHashCode(); return hash; } } } public partial class DebugAppendConsoleLogLine { private string _line; // string[uint_16] private Anki.Vector.LogLevel _logLevel; // LogLevel public string line { get { return _line; } set { if (!string.IsNullOrEmpty(value) && System.Text.Encoding.UTF8.GetByteCount(value) > 65535) { throw new System.ArgumentException("line string is too long. Must decode to less than or equal to 65535 bytes.", "value"); } _line = value; } } public Anki.Vector.LogLevel logLevel { get { return _logLevel; } set { _logLevel = value; } } /**** Constructors ****/ public DebugAppendConsoleLogLine() { } public DebugAppendConsoleLogLine(string line, Anki.Vector.LogLevel logLevel) { this.line = line; this.logLevel = logLevel; } public DebugAppendConsoleLogLine(System.IO.Stream stream) { Unpack(stream); } public DebugAppendConsoleLogLine(System.IO.BinaryReader reader) { Unpack(reader); } public DebugAppendConsoleLogLine Initialize(string line, Anki.Vector.LogLevel logLevel) { this.line = line; this.logLevel = logLevel; 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 _line_length = (int)reader.ReadUInt16(); byte[] _line_bytes = reader.ReadBytes(_line_length); _line = System.Text.Encoding.UTF8.GetString(_line_bytes); _logLevel = (Anki.Vector.LogLevel)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) { if (_line != null) { byte[] _line_bytes = System.Text.Encoding.UTF8.GetBytes(_line); writer.Write((ushort)_line_bytes.Length); writer.Write(_line_bytes); } else { writer.Write((ushort)0); } writer.Write((byte)_logLevel); } public int Size { get { int result = 0; result += 2; // uint_16 if (line != null) { result += System.Text.Encoding.UTF8.GetByteCount(line); } result += 1; // LogLevel 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 ==(DebugAppendConsoleLogLine a, DebugAppendConsoleLogLine b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(DebugAppendConsoleLogLine a, DebugAppendConsoleLogLine b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as DebugAppendConsoleLogLine); } public bool Equals(DebugAppendConsoleLogLine p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._line.Equals(p._line) && this._logLevel.Equals(p._logLevel); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._logLevel.GetHashCode(); return hash; } } } public partial class TimingInfo { private float _avgTime_ms; // float_32 private float _minTime_ms; // float_32 private float _maxTime_ms; // float_32 public float avgTime_ms { get { return _avgTime_ms; } set { _avgTime_ms = value; } } public float minTime_ms { get { return _minTime_ms; } set { _minTime_ms = value; } } public float maxTime_ms { get { return _maxTime_ms; } set { _maxTime_ms = value; } } /**** Constructors ****/ public TimingInfo() { } public TimingInfo(float avgTime_ms, float minTime_ms, float maxTime_ms) { this.avgTime_ms = avgTime_ms; this.minTime_ms = minTime_ms; this.maxTime_ms = maxTime_ms; } public TimingInfo(System.IO.Stream stream) { Unpack(stream); } public TimingInfo(System.IO.BinaryReader reader) { Unpack(reader); } public TimingInfo Initialize(float avgTime_ms, float minTime_ms, float maxTime_ms) { this.avgTime_ms = avgTime_ms; this.minTime_ms = minTime_ms; this.maxTime_ms = maxTime_ms; 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) { _avgTime_ms = reader.ReadSingle(); _minTime_ms = reader.ReadSingle(); _maxTime_ms = 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)_avgTime_ms); writer.Write((float)_minTime_ms); writer.Write((float)_maxTime_ms); } 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 ==(TimingInfo a, TimingInfo b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(TimingInfo a, TimingInfo b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as TimingInfo); } public bool Equals(TimingInfo p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._avgTime_ms.Equals(p._avgTime_ms) && this._minTime_ms.Equals(p._minTime_ms) && this._maxTime_ms.Equals(p._maxTime_ms); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._avgTime_ms.GetHashCode(); hash = hash * 23 + this._minTime_ms.GetHashCode(); hash = hash * 23 + this._maxTime_ms.GetHashCode(); return hash; } } } public partial class CurrentTimingInfo { private float _avgTime_ms; // float_32 private float _minTime_ms; // float_32 private float _maxTime_ms; // float_32 private float _currentTime_ms; // float_32 public float avgTime_ms { get { return _avgTime_ms; } set { _avgTime_ms = value; } } public float minTime_ms { get { return _minTime_ms; } set { _minTime_ms = value; } } public float maxTime_ms { get { return _maxTime_ms; } set { _maxTime_ms = value; } } public float currentTime_ms { get { return _currentTime_ms; } set { _currentTime_ms = value; } } /**** Constructors ****/ public CurrentTimingInfo() { } public CurrentTimingInfo(float avgTime_ms, float minTime_ms, float maxTime_ms, float currentTime_ms) { this.avgTime_ms = avgTime_ms; this.minTime_ms = minTime_ms; this.maxTime_ms = maxTime_ms; this.currentTime_ms = currentTime_ms; } public CurrentTimingInfo(System.IO.Stream stream) { Unpack(stream); } public CurrentTimingInfo(System.IO.BinaryReader reader) { Unpack(reader); } public CurrentTimingInfo Initialize(float avgTime_ms, float minTime_ms, float maxTime_ms, float currentTime_ms) { this.avgTime_ms = avgTime_ms; this.minTime_ms = minTime_ms; this.maxTime_ms = maxTime_ms; this.currentTime_ms = currentTime_ms; 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) { _avgTime_ms = reader.ReadSingle(); _minTime_ms = reader.ReadSingle(); _maxTime_ms = reader.ReadSingle(); _currentTime_ms = 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)_avgTime_ms); writer.Write((float)_minTime_ms); writer.Write((float)_maxTime_ms); writer.Write((float)_currentTime_ms); } 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 ==(CurrentTimingInfo a, CurrentTimingInfo b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(CurrentTimingInfo a, CurrentTimingInfo b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as CurrentTimingInfo); } public bool Equals(CurrentTimingInfo p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._avgTime_ms.Equals(p._avgTime_ms) && this._minTime_ms.Equals(p._minTime_ms) && this._maxTime_ms.Equals(p._maxTime_ms) && this._currentTime_ms.Equals(p._currentTime_ms); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._avgTime_ms.GetHashCode(); hash = hash * 23 + this._minTime_ms.GetHashCode(); hash = hash * 23 + this._maxTime_ms.GetHashCode(); hash = hash * 23 + this._currentTime_ms.GetHashCode(); return hash; } } } public partial class EngineErrorCodeMessage { private Anki.Vector.EngineErrorCode _errorCode; // EngineErrorCode public Anki.Vector.EngineErrorCode errorCode { get { return _errorCode; } set { _errorCode = value; } } /**** Constructors ****/ public EngineErrorCodeMessage() { } public EngineErrorCodeMessage(Anki.Vector.EngineErrorCode errorCode) { this.errorCode = errorCode; } public EngineErrorCodeMessage(System.IO.Stream stream) { Unpack(stream); } public EngineErrorCodeMessage(System.IO.BinaryReader reader) { Unpack(reader); } public EngineErrorCodeMessage Initialize(Anki.Vector.EngineErrorCode errorCode) { this.errorCode = errorCode; 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) { _errorCode = (Anki.Vector.EngineErrorCode)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((byte)_errorCode); } public int Size { get { return 1; } } 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 ==(EngineErrorCodeMessage a, EngineErrorCodeMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(EngineErrorCodeMessage a, EngineErrorCodeMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as EngineErrorCodeMessage); } public bool Equals(EngineErrorCodeMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._errorCode.Equals(p._errorCode); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._errorCode.GetHashCode(); return hash; } } } public partial class BehaviorTransition { /**** Constructors ****/ public BehaviorTransition() { } public BehaviorTransition(System.IO.Stream stream) { Unpack(stream); } public BehaviorTransition(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 OnboardingState { private Anki.Vector.OnboardingStages _stage; // OnboardingStages private bool _forceSkipStackReset; // bool public Anki.Vector.OnboardingStages stage { get { return _stage; } set { _stage = value; } } public bool forceSkipStackReset { get { return _forceSkipStackReset; } set { _forceSkipStackReset = value; } } /**** Constructors ****/ public OnboardingState() { } public OnboardingState(Anki.Vector.OnboardingStages stage, bool forceSkipStackReset) { this.stage = stage; this.forceSkipStackReset = forceSkipStackReset; } public OnboardingState(System.IO.Stream stream) { Unpack(stream); } public OnboardingState(System.IO.BinaryReader reader) { Unpack(reader); } public OnboardingState Initialize(Anki.Vector.OnboardingStages stage, bool forceSkipStackReset) { this.stage = stage; this.forceSkipStackReset = forceSkipStackReset; 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) { _stage = (Anki.Vector.OnboardingStages)reader.ReadByte(); _forceSkipStackReset = 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((byte)_stage); writer.Write((bool)_forceSkipStackReset); } 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 ==(OnboardingState a, OnboardingState b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(OnboardingState a, OnboardingState b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as OnboardingState); } public bool Equals(OnboardingState p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._stage.Equals(p._stage) && this._forceSkipStackReset.Equals(p._forceSkipStackReset); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._stage.GetHashCode(); hash = hash * 23 + this._forceSkipStackReset.GetHashCode(); return hash; } } } public partial class MemoryMapMessageBegin { private uint _originId; // uint_32 private int _rootDepth; // int_32 private float _rootSize_mm; // float_32 private float _rootCenterX; // float_32 private float _rootCenterY; // float_32 public uint originId { get { return _originId; } set { _originId = value; } } public int rootDepth { get { return _rootDepth; } set { _rootDepth = value; } } public float rootSize_mm { get { return _rootSize_mm; } set { _rootSize_mm = value; } } public float rootCenterX { get { return _rootCenterX; } set { _rootCenterX = value; } } public float rootCenterY { get { return _rootCenterY; } set { _rootCenterY = value; } } /**** Constructors ****/ public MemoryMapMessageBegin() { } public MemoryMapMessageBegin(uint originId, int rootDepth, float rootSize_mm, float rootCenterX, float rootCenterY) { this.originId = originId; this.rootDepth = rootDepth; this.rootSize_mm = rootSize_mm; this.rootCenterX = rootCenterX; this.rootCenterY = rootCenterY; } public MemoryMapMessageBegin(System.IO.Stream stream) { Unpack(stream); } public MemoryMapMessageBegin(System.IO.BinaryReader reader) { Unpack(reader); } public MemoryMapMessageBegin Initialize(uint originId, int rootDepth, float rootSize_mm, float rootCenterX, float rootCenterY) { this.originId = originId; this.rootDepth = rootDepth; this.rootSize_mm = rootSize_mm; this.rootCenterX = rootCenterX; this.rootCenterY = rootCenterY; 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) { _originId = reader.ReadUInt32(); _rootDepth = reader.ReadInt32(); _rootSize_mm = reader.ReadSingle(); _rootCenterX = reader.ReadSingle(); _rootCenterY = 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)_originId); writer.Write((int)_rootDepth); writer.Write((float)_rootSize_mm); writer.Write((float)_rootCenterX); writer.Write((float)_rootCenterY); } public int Size { get { return 20; } } 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 ==(MemoryMapMessageBegin a, MemoryMapMessageBegin b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MemoryMapMessageBegin a, MemoryMapMessageBegin b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MemoryMapMessageBegin); } public bool Equals(MemoryMapMessageBegin p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._originId.Equals(p._originId) && this._rootDepth.Equals(p._rootDepth) && this._rootSize_mm.Equals(p._rootSize_mm) && this._rootCenterX.Equals(p._rootCenterX) && this._rootCenterY.Equals(p._rootCenterY); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._originId.GetHashCode(); hash = hash * 23 + this._rootDepth.GetHashCode(); hash = hash * 23 + this._rootSize_mm.GetHashCode(); hash = hash * 23 + this._rootCenterX.GetHashCode(); hash = hash * 23 + this._rootCenterY.GetHashCode(); return hash; } } } public partial class MemoryMapMessage { private Anki.Vector.ExternalInterface.MemoryMapQuadInfo[] _quadInfos; // MemoryMapQuadInfo[uint_16] public Anki.Vector.ExternalInterface.MemoryMapQuadInfo[] quadInfos { get { return _quadInfos; } set { if (value != null && value.Length > 65535) { throw new System.ArgumentException("quadInfos variable-length array is too long. Must be less than or equal to 65535.", "value"); } _quadInfos = value; } } /**** Constructors ****/ public MemoryMapMessage() { } public MemoryMapMessage(Anki.Vector.ExternalInterface.MemoryMapQuadInfo[] quadInfos) { this.quadInfos = quadInfos; } public MemoryMapMessage(System.IO.Stream stream) { Unpack(stream); } public MemoryMapMessage(System.IO.BinaryReader reader) { Unpack(reader); } public MemoryMapMessage Initialize(Anki.Vector.ExternalInterface.MemoryMapQuadInfo[] quadInfos) { this.quadInfos = quadInfos; 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 _quadInfos_length = (int)reader.ReadUInt16(); _quadInfos = new Anki.Vector.ExternalInterface.MemoryMapQuadInfo[_quadInfos_length]; for (int i = 0; i < _quadInfos_length; ++i) { _quadInfos[i] = new Anki.Vector.ExternalInterface.MemoryMapQuadInfo(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) { if (_quadInfos != null) { writer.Write((ushort)_quadInfos.Length); for (int i = 0; i < _quadInfos.Length; ++i) { if (_quadInfos[i] == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } _quadInfos[i].Pack(writer); } } else { writer.Write((ushort)0); } } public int Size { get { int result = 0; result += 2; // uint_16 if (quadInfos != null) { result += quadInfos.Length * 6; // MemoryMapQuadInfo } 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 ==(MemoryMapMessage a, MemoryMapMessage b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MemoryMapMessage a, MemoryMapMessage b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MemoryMapMessage); } public bool Equals(MemoryMapMessage p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return ArrayEquals(this._quadInfos,p._quadInfos); } public override int GetHashCode() { unchecked { int hash = 17; return hash; } } } public partial class MemoryMapMessageEnd { /**** Constructors ****/ public MemoryMapMessageEnd() { } public MemoryMapMessageEnd(System.IO.Stream stream) { Unpack(stream); } public MemoryMapMessageEnd(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 enum BehaviorStackState : byte { NotActive = 0, Active = 1 }; public partial class AudioBehaviorStackUpdate { private Anki.Vector.ExternalInterface.BehaviorStackState _state; // BehaviorStackState private Anki.Vector.BehaviorID[] _branchPath; // BehaviorID[uint_16] public Anki.Vector.ExternalInterface.BehaviorStackState state { get { return _state; } set { _state = value; } } public Anki.Vector.BehaviorID[] branchPath { get { return _branchPath; } set { if (value != null && value.Length > 65535) { throw new System.ArgumentException("branchPath variable-length array is too long. Must be less than or equal to 65535.", "value"); } _branchPath = value; } } /**** Constructors ****/ public AudioBehaviorStackUpdate() { } public AudioBehaviorStackUpdate(Anki.Vector.ExternalInterface.BehaviorStackState state, Anki.Vector.BehaviorID[] branchPath) { this.state = state; this.branchPath = branchPath; } public AudioBehaviorStackUpdate(System.IO.Stream stream) { Unpack(stream); } public AudioBehaviorStackUpdate(System.IO.BinaryReader reader) { Unpack(reader); } public AudioBehaviorStackUpdate Initialize(Anki.Vector.ExternalInterface.BehaviorStackState state, Anki.Vector.BehaviorID[] branchPath) { this.state = state; this.branchPath = branchPath; 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) { _state = (Anki.Vector.ExternalInterface.BehaviorStackState)reader.ReadByte(); int _branchPath_length = (int)reader.ReadUInt16(); _branchPath = new Anki.Vector.BehaviorID[_branchPath_length]; for (int i = 0; i < _branchPath_length; ++i) { _branchPath[i] = (Anki.Vector.BehaviorID)reader.ReadUInt16(); } } 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)_state); if (_branchPath != null) { writer.Write((ushort)_branchPath.Length); for (int i = 0; i < _branchPath.Length; ++i) { writer.Write((ushort)_branchPath[i]); } } else { writer.Write((ushort)0); } } public int Size { get { int result = 0; result += 1; // BehaviorStackState result += 2; // uint_16 if (branchPath != null) { result += branchPath.Length * 2; // BehaviorID } 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 ==(AudioBehaviorStackUpdate a, AudioBehaviorStackUpdate b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(AudioBehaviorStackUpdate a, AudioBehaviorStackUpdate b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as AudioBehaviorStackUpdate); } public bool Equals(AudioBehaviorStackUpdate p) { if (System.Object.ReferenceEquals(p, null)) { return false; } return this._state.Equals(p._state) && ArrayEquals(this._branchPath,p._branchPath); } public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + this._state.GetHashCode(); return hash; } } } public partial class RequiredEmptyMessage { /**** Constructors ****/ public RequiredEmptyMessage() { } public RequiredEmptyMessage(System.IO.Stream stream) { Unpack(stream); } public RequiredEmptyMessage(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 class Event { public enum Tag { replaceMe, // 0 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.RequiredEmptyMessage replaceMe { get { if (_tag != Tag.replaceMe) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"replaceMe\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RequiredEmptyMessage)this._state; } set { _tag = (value != null) ? Tag.replaceMe : Tag.INVALID; _state = value; } } public Event Initialize(T state) { _state = state; if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RequiredEmptyMessage)) { _tag = Tag.replaceMe; } else { _state = null; _tag = Tag.INVALID; } return this; } /**** Constructors ****/ public Event() { } public Event(System.IO.Stream stream) { Unpack(stream); } public Event(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.replaceMe: replaceMe = new Anki.Vector.ExternalInterface.RequiredEmptyMessage(reader); break; default: break; } _tag = newTag; } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((byte)GetTag()); switch(GetTag()) { case Tag.replaceMe: if (replaceMe == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } replaceMe.Pack(writer); break; default: break; } } public int Size { get { return 1; } } public static bool operator ==(Event a, Event b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(Event a, Event b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as Event); } public bool Equals(Event 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; } } } public class MessageEngineToGame { public enum Tag { UiDeviceConnected = 0x0, // 0 RobotCompletedAction = 0x1, // 1 Event = 0x2, // 2 EnrolledNamesResponse = 0x5, // 5 RobotObservedFace = 0x6, // 6 RobotChangedObservedFaceID = 0x7, // 7 AnimationAvailable = 0x8, // 8 EndOfMessage = 0x9, // 9 ObjectConnectionState = 0xa, // 10 ObjectMoved = 0xb, // 11 ObjectStoppedMoving = 0xc, // 12 ObjectUpAxisChanged = 0xd, // 13 ObjectTapped = 0xe, // 14 ObjectAccel = 0xf, // 15 RobotObservedObject = 0x10, // 16 ObjectAvailable = 0x11, // 17 RobotDeletedFixedCustomObjects = 0x12, // 18 RobotDeletedCustomMarkerObjects = 0x13, // 19 CreatedFixedCustomObject = 0x14, // 20 DefinedCustomObject = 0x15, // 21 MemoryMapMessageBegin = 0x16, // 22 MemoryMapMessage = 0x17, // 23 MemoryMapMessageEnd = 0x18, // 24 AudioCallbackDuration, // 25 AudioCallbackMarker, // 26 AudioCallbackComplete, // 27 AudioCallbackError, // 28 AdvertisementRegistrationMsg, // 29 AdvertisementMsg, // 30 Ping, // 31 CliffEvent, // 32 PotentialCliff, // 33 SetCliffDetectThresholds, // 34 SetWhiteDetectThresholds, // 35 FactoryTestResultEntry, // 36 ImageChunk, // 37 CameraCalibration, // 38 IMURequest, // 39 IMUTemperature, // 40 LoadedKnownFace, // 41 RobotRenamedEnrolledFace, // 42 MotorCalibration, // 43 MotorAutoEnabled, // 44 CarryStateUpdate, // 45 EnterPairing, // 46 ExitPairing, // 47 WifiScanRequest, // 48 WifiConnectRequest, // 49 HasBleKeysRequest, // 50 ActivateExperimentRequest, // 51 ActivateExperimentResponse, // 52 UiDeviceAvailable, // 53 RobotConnectionResponse, // 54 GoingToSleep, // 55 CurrentCameraParams, // 56 PerRobotSettings, // 57 RobotState, // 58 RobotDelocalized, // 59 RobotStopped, // 60 RobotOffTreadsStateChanged, // 61 RobotOnChargerPlatformEvent, // 62 ChargerEvent, // 63 TouchButtonEvent, // 64 UnexpectedMovement, // 65 RobotFallingEvent, // 66 RobotProcessedImage, // 67 RobotObservedPossibleObject, // 68 RobotObservedPet, // 69 RobotObservedMotion, // 70 RobotObservedSalientPoint, // 71 RobotObservedLaserPoint, // 72 RobotObservedIllumination, // 73 RobotDeletedFace, // 74 RobotDeletedLocatedObject, // 75 RobotDeletedAllCustomObjects, // 76 LocatedObjectStates, // 77 ConnectedObjectStates, // 78 MeetVictorStarted, // 79 MeetVictorFaceScanStarted, // 80 MeetVictorFaceScanComplete, // 81 MeetVictorNameSaved, // 82 RobotErasedEnrolledFace, // 83 RobotErasedAllEnrolledFaces, // 84 RobotCompletedFactoryDotTest, // 85 PlaypenBehaviorFailed, // 86 SelfTestBehaviorFailed, // 87 SelfTestEnd, // 88 AnimationGroupAvailable, // 89 AnimationAborted, // 90 AnimationEvent, // 91 MoodState, // 92 InitDebugConsoleVarMessage, // 93 JsonDasLogMessage, // 94 JsonDasLogAllSentMessage, // 95 VerifyDebugConsoleFuncMessage, // 96 VerifyDebugConsoleVarMessage, // 97 DebugAppendConsoleLogLine, // 98 EngineErrorCodeMessage, // 99 BehaviorTransition, // 100 OnboardingState, // 101 AudioBehaviorStackUpdate, // 102 RequiredEmptyMessage, // 103 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.UiDeviceConnected UiDeviceConnected { get { if (_tag != Tag.UiDeviceConnected) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UiDeviceConnected\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.UiDeviceConnected)this._state; } set { _tag = (value != null) ? Tag.UiDeviceConnected : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotCompletedAction RobotCompletedAction { get { if (_tag != Tag.RobotCompletedAction) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotCompletedAction\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotCompletedAction)this._state; } set { _tag = (value != null) ? Tag.RobotCompletedAction : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.Event Event { get { if (_tag != Tag.Event) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"Event\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.Event)this._state; } set { _tag = (value != null) ? Tag.Event : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.EnrolledNamesResponse EnrolledNamesResponse { get { if (_tag != Tag.EnrolledNamesResponse) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EnrolledNamesResponse\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.EnrolledNamesResponse)this._state; } set { _tag = (value != null) ? Tag.EnrolledNamesResponse : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedFace RobotObservedFace { get { if (_tag != Tag.RobotObservedFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedFace)this._state; } set { _tag = (value != null) ? Tag.RobotObservedFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotChangedObservedFaceID RobotChangedObservedFaceID { get { if (_tag != Tag.RobotChangedObservedFaceID) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotChangedObservedFaceID\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotChangedObservedFaceID)this._state; } set { _tag = (value != null) ? Tag.RobotChangedObservedFaceID : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.AnimationAvailable AnimationAvailable { get { if (_tag != Tag.AnimationAvailable) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AnimationAvailable\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.AnimationAvailable)this._state; } set { _tag = (value != null) ? Tag.AnimationAvailable : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.EndOfMessage EndOfMessage { get { if (_tag != Tag.EndOfMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EndOfMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.EndOfMessage)this._state; } set { _tag = (value != null) ? Tag.EndOfMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectConnectionState ObjectConnectionState { get { if (_tag != Tag.ObjectConnectionState) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectConnectionState\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectConnectionState)this._state; } set { _tag = (value != null) ? Tag.ObjectConnectionState : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectMoved ObjectMoved { get { if (_tag != Tag.ObjectMoved) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectMoved\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectMoved)this._state; } set { _tag = (value != null) ? Tag.ObjectMoved : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectStoppedMoving ObjectStoppedMoving { get { if (_tag != Tag.ObjectStoppedMoving) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectStoppedMoving\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectStoppedMoving)this._state; } set { _tag = (value != null) ? Tag.ObjectStoppedMoving : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectUpAxisChanged ObjectUpAxisChanged { get { if (_tag != Tag.ObjectUpAxisChanged) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectUpAxisChanged\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectUpAxisChanged)this._state; } set { _tag = (value != null) ? Tag.ObjectUpAxisChanged : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectTapped ObjectTapped { get { if (_tag != Tag.ObjectTapped) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectTapped\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectTapped)this._state; } set { _tag = (value != null) ? Tag.ObjectTapped : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectAccel ObjectAccel { get { if (_tag != Tag.ObjectAccel) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectAccel\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectAccel)this._state; } set { _tag = (value != null) ? Tag.ObjectAccel : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedObject RobotObservedObject { get { if (_tag != Tag.RobotObservedObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedObject)this._state; } set { _tag = (value != null) ? Tag.RobotObservedObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ObjectAvailable ObjectAvailable { get { if (_tag != Tag.ObjectAvailable) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ObjectAvailable\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ObjectAvailable)this._state; } set { _tag = (value != null) ? Tag.ObjectAvailable : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDeletedFixedCustomObjects RobotDeletedFixedCustomObjects { get { if (_tag != Tag.RobotDeletedFixedCustomObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDeletedFixedCustomObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDeletedFixedCustomObjects)this._state; } set { _tag = (value != null) ? Tag.RobotDeletedFixedCustomObjects : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDeletedCustomMarkerObjects RobotDeletedCustomMarkerObjects { get { if (_tag != Tag.RobotDeletedCustomMarkerObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDeletedCustomMarkerObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDeletedCustomMarkerObjects)this._state; } set { _tag = (value != null) ? Tag.RobotDeletedCustomMarkerObjects : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.CreatedFixedCustomObject CreatedFixedCustomObject { get { if (_tag != Tag.CreatedFixedCustomObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CreatedFixedCustomObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.CreatedFixedCustomObject)this._state; } set { _tag = (value != null) ? Tag.CreatedFixedCustomObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.DefinedCustomObject DefinedCustomObject { get { if (_tag != Tag.DefinedCustomObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DefinedCustomObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.DefinedCustomObject)this._state; } set { _tag = (value != null) ? Tag.DefinedCustomObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MemoryMapMessageBegin MemoryMapMessageBegin { get { if (_tag != Tag.MemoryMapMessageBegin) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MemoryMapMessageBegin\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MemoryMapMessageBegin)this._state; } set { _tag = (value != null) ? Tag.MemoryMapMessageBegin : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MemoryMapMessage MemoryMapMessage { get { if (_tag != Tag.MemoryMapMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MemoryMapMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MemoryMapMessage)this._state; } set { _tag = (value != null) ? Tag.MemoryMapMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MemoryMapMessageEnd MemoryMapMessageEnd { get { if (_tag != Tag.MemoryMapMessageEnd) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MemoryMapMessageEnd\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MemoryMapMessageEnd)this._state; } set { _tag = (value != null) ? Tag.MemoryMapMessageEnd : Tag.INVALID; _state = value; } } public Anki.AudioEngine.Multiplexer.AudioCallbackDuration AudioCallbackDuration { get { if (_tag != Tag.AudioCallbackDuration) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AudioCallbackDuration\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.AudioEngine.Multiplexer.AudioCallbackDuration)this._state; } set { _tag = (value != null) ? Tag.AudioCallbackDuration : Tag.INVALID; _state = value; } } public Anki.AudioEngine.Multiplexer.AudioCallbackMarker AudioCallbackMarker { get { if (_tag != Tag.AudioCallbackMarker) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AudioCallbackMarker\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.AudioEngine.Multiplexer.AudioCallbackMarker)this._state; } set { _tag = (value != null) ? Tag.AudioCallbackMarker : Tag.INVALID; _state = value; } } public Anki.AudioEngine.Multiplexer.AudioCallbackComplete AudioCallbackComplete { get { if (_tag != Tag.AudioCallbackComplete) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AudioCallbackComplete\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.AudioEngine.Multiplexer.AudioCallbackComplete)this._state; } set { _tag = (value != null) ? Tag.AudioCallbackComplete : Tag.INVALID; _state = value; } } public Anki.AudioEngine.Multiplexer.AudioCallbackError AudioCallbackError { get { if (_tag != Tag.AudioCallbackError) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AudioCallbackError\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.AudioEngine.Multiplexer.AudioCallbackError)this._state; } set { _tag = (value != null) ? Tag.AudioCallbackError : Tag.INVALID; _state = value; } } public Anki.Vector.AdvertisementRegistrationMsg AdvertisementRegistrationMsg { get { if (_tag != Tag.AdvertisementRegistrationMsg) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AdvertisementRegistrationMsg\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.AdvertisementRegistrationMsg)this._state; } set { _tag = (value != null) ? Tag.AdvertisementRegistrationMsg : Tag.INVALID; _state = value; } } public Anki.Vector.AdvertisementMsg AdvertisementMsg { get { if (_tag != Tag.AdvertisementMsg) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AdvertisementMsg\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.AdvertisementMsg)this._state; } set { _tag = (value != null) ? Tag.AdvertisementMsg : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.Ping Ping { get { if (_tag != Tag.Ping) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"Ping\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.Ping)this._state; } set { _tag = (value != null) ? Tag.Ping : Tag.INVALID; _state = value; } } public Anki.Vector.CliffEvent CliffEvent { get { if (_tag != Tag.CliffEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CliffEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.CliffEvent)this._state; } set { _tag = (value != null) ? Tag.CliffEvent : Tag.INVALID; _state = value; } } public Anki.Vector.PotentialCliff PotentialCliff { get { if (_tag != Tag.PotentialCliff) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"PotentialCliff\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.PotentialCliff)this._state; } set { _tag = (value != null) ? Tag.PotentialCliff : Tag.INVALID; _state = value; } } public Anki.Vector.SetCliffDetectThresholds SetCliffDetectThresholds { get { if (_tag != Tag.SetCliffDetectThresholds) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetCliffDetectThresholds\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SetCliffDetectThresholds)this._state; } set { _tag = (value != null) ? Tag.SetCliffDetectThresholds : Tag.INVALID; _state = value; } } public Anki.Vector.SetWhiteDetectThresholds SetWhiteDetectThresholds { get { if (_tag != Tag.SetWhiteDetectThresholds) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SetWhiteDetectThresholds\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SetWhiteDetectThresholds)this._state; } set { _tag = (value != null) ? Tag.SetWhiteDetectThresholds : Tag.INVALID; _state = value; } } public Anki.Vector.FactoryTestResultEntry FactoryTestResultEntry { get { if (_tag != Tag.FactoryTestResultEntry) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"FactoryTestResultEntry\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.FactoryTestResultEntry)this._state; } set { _tag = (value != null) ? Tag.FactoryTestResultEntry : Tag.INVALID; _state = value; } } public Anki.Vector.ImageChunk ImageChunk { get { if (_tag != Tag.ImageChunk) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ImageChunk\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ImageChunk)this._state; } set { _tag = (value != null) ? Tag.ImageChunk : Tag.INVALID; _state = value; } } public Anki.Vector.CameraCalibration CameraCalibration { get { if (_tag != Tag.CameraCalibration) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CameraCalibration\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.CameraCalibration)this._state; } set { _tag = (value != null) ? Tag.CameraCalibration : Tag.INVALID; _state = value; } } public Anki.Vector.IMURequest IMURequest { get { if (_tag != Tag.IMURequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"IMURequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.IMURequest)this._state; } set { _tag = (value != null) ? Tag.IMURequest : Tag.INVALID; _state = value; } } public Anki.Vector.RobotInterface.IMUTemperature IMUTemperature { get { if (_tag != Tag.IMUTemperature) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"IMUTemperature\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.RobotInterface.IMUTemperature)this._state; } set { _tag = (value != null) ? Tag.IMUTemperature : Tag.INVALID; _state = value; } } public Anki.Vision.LoadedKnownFace LoadedKnownFace { get { if (_tag != Tag.LoadedKnownFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"LoadedKnownFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vision.LoadedKnownFace)this._state; } set { _tag = (value != null) ? Tag.LoadedKnownFace : Tag.INVALID; _state = value; } } public Anki.Vision.RobotRenamedEnrolledFace RobotRenamedEnrolledFace { get { if (_tag != Tag.RobotRenamedEnrolledFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotRenamedEnrolledFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vision.RobotRenamedEnrolledFace)this._state; } set { _tag = (value != null) ? Tag.RobotRenamedEnrolledFace : Tag.INVALID; _state = value; } } public Anki.Vector.MotorCalibration MotorCalibration { get { if (_tag != Tag.MotorCalibration) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MotorCalibration\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.MotorCalibration)this._state; } set { _tag = (value != null) ? Tag.MotorCalibration : Tag.INVALID; _state = value; } } public Anki.Vector.MotorAutoEnabled MotorAutoEnabled { get { if (_tag != Tag.MotorAutoEnabled) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MotorAutoEnabled\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.MotorAutoEnabled)this._state; } set { _tag = (value != null) ? Tag.MotorAutoEnabled : Tag.INVALID; _state = value; } } public Anki.Vector.CarryStateUpdate CarryStateUpdate { get { if (_tag != Tag.CarryStateUpdate) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CarryStateUpdate\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.CarryStateUpdate)this._state; } set { _tag = (value != null) ? Tag.CarryStateUpdate : Tag.INVALID; _state = value; } } public Anki.Vector.SwitchboardInterface.EnterPairing EnterPairing { get { if (_tag != Tag.EnterPairing) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EnterPairing\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SwitchboardInterface.EnterPairing)this._state; } set { _tag = (value != null) ? Tag.EnterPairing : Tag.INVALID; _state = value; } } public Anki.Vector.SwitchboardInterface.ExitPairing ExitPairing { get { if (_tag != Tag.ExitPairing) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ExitPairing\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SwitchboardInterface.ExitPairing)this._state; } set { _tag = (value != null) ? Tag.ExitPairing : Tag.INVALID; _state = value; } } public Anki.Vector.SwitchboardInterface.WifiScanRequest WifiScanRequest { get { if (_tag != Tag.WifiScanRequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"WifiScanRequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SwitchboardInterface.WifiScanRequest)this._state; } set { _tag = (value != null) ? Tag.WifiScanRequest : Tag.INVALID; _state = value; } } public Anki.Vector.SwitchboardInterface.WifiConnectRequest WifiConnectRequest { get { if (_tag != Tag.WifiConnectRequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"WifiConnectRequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SwitchboardInterface.WifiConnectRequest)this._state; } set { _tag = (value != null) ? Tag.WifiConnectRequest : Tag.INVALID; _state = value; } } public Anki.Vector.SwitchboardInterface.HasBleKeysRequest HasBleKeysRequest { get { if (_tag != Tag.HasBleKeysRequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"HasBleKeysRequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.SwitchboardInterface.HasBleKeysRequest)this._state; } set { _tag = (value != null) ? Tag.HasBleKeysRequest : Tag.INVALID; _state = value; } } public Anki.Util.AnkiLab.ActivateExperimentRequest ActivateExperimentRequest { get { if (_tag != Tag.ActivateExperimentRequest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ActivateExperimentRequest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Util.AnkiLab.ActivateExperimentRequest)this._state; } set { _tag = (value != null) ? Tag.ActivateExperimentRequest : Tag.INVALID; _state = value; } } public Anki.Util.AnkiLab.ActivateExperimentResponse ActivateExperimentResponse { get { if (_tag != Tag.ActivateExperimentResponse) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ActivateExperimentResponse\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Util.AnkiLab.ActivateExperimentResponse)this._state; } set { _tag = (value != null) ? Tag.ActivateExperimentResponse : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.UiDeviceAvailable UiDeviceAvailable { get { if (_tag != Tag.UiDeviceAvailable) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UiDeviceAvailable\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.UiDeviceAvailable)this._state; } set { _tag = (value != null) ? Tag.UiDeviceAvailable : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotConnectionResponse RobotConnectionResponse { get { if (_tag != Tag.RobotConnectionResponse) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotConnectionResponse\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotConnectionResponse)this._state; } set { _tag = (value != null) ? Tag.RobotConnectionResponse : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.GoingToSleep GoingToSleep { get { if (_tag != Tag.GoingToSleep) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"GoingToSleep\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.GoingToSleep)this._state; } set { _tag = (value != null) ? Tag.GoingToSleep : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.CurrentCameraParams CurrentCameraParams { get { if (_tag != Tag.CurrentCameraParams) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"CurrentCameraParams\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.CurrentCameraParams)this._state; } set { _tag = (value != null) ? Tag.CurrentCameraParams : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PerRobotSettings PerRobotSettings { get { if (_tag != Tag.PerRobotSettings) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"PerRobotSettings\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PerRobotSettings)this._state; } set { _tag = (value != null) ? Tag.PerRobotSettings : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotState RobotState { get { if (_tag != Tag.RobotState) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotState\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotState)this._state; } set { _tag = (value != null) ? Tag.RobotState : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDelocalized RobotDelocalized { get { if (_tag != Tag.RobotDelocalized) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDelocalized\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDelocalized)this._state; } set { _tag = (value != null) ? Tag.RobotDelocalized : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotStopped RobotStopped { get { if (_tag != Tag.RobotStopped) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotStopped\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotStopped)this._state; } set { _tag = (value != null) ? Tag.RobotStopped : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotOffTreadsStateChanged RobotOffTreadsStateChanged { get { if (_tag != Tag.RobotOffTreadsStateChanged) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotOffTreadsStateChanged\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotOffTreadsStateChanged)this._state; } set { _tag = (value != null) ? Tag.RobotOffTreadsStateChanged : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotOnChargerPlatformEvent RobotOnChargerPlatformEvent { get { if (_tag != Tag.RobotOnChargerPlatformEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotOnChargerPlatformEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotOnChargerPlatformEvent)this._state; } set { _tag = (value != null) ? Tag.RobotOnChargerPlatformEvent : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ChargerEvent ChargerEvent { get { if (_tag != Tag.ChargerEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ChargerEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ChargerEvent)this._state; } set { _tag = (value != null) ? Tag.ChargerEvent : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.TouchButtonEvent TouchButtonEvent { get { if (_tag != Tag.TouchButtonEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"TouchButtonEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.TouchButtonEvent)this._state; } set { _tag = (value != null) ? Tag.TouchButtonEvent : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.UnexpectedMovement UnexpectedMovement { get { if (_tag != Tag.UnexpectedMovement) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"UnexpectedMovement\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.UnexpectedMovement)this._state; } set { _tag = (value != null) ? Tag.UnexpectedMovement : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotFallingEvent RobotFallingEvent { get { if (_tag != Tag.RobotFallingEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotFallingEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotFallingEvent)this._state; } set { _tag = (value != null) ? Tag.RobotFallingEvent : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotProcessedImage RobotProcessedImage { get { if (_tag != Tag.RobotProcessedImage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotProcessedImage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotProcessedImage)this._state; } set { _tag = (value != null) ? Tag.RobotProcessedImage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedPossibleObject RobotObservedPossibleObject { get { if (_tag != Tag.RobotObservedPossibleObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedPossibleObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedPossibleObject)this._state; } set { _tag = (value != null) ? Tag.RobotObservedPossibleObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedPet RobotObservedPet { get { if (_tag != Tag.RobotObservedPet) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedPet\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedPet)this._state; } set { _tag = (value != null) ? Tag.RobotObservedPet : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedMotion RobotObservedMotion { get { if (_tag != Tag.RobotObservedMotion) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedMotion\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedMotion)this._state; } set { _tag = (value != null) ? Tag.RobotObservedMotion : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedSalientPoint RobotObservedSalientPoint { get { if (_tag != Tag.RobotObservedSalientPoint) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedSalientPoint\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedSalientPoint)this._state; } set { _tag = (value != null) ? Tag.RobotObservedSalientPoint : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedLaserPoint RobotObservedLaserPoint { get { if (_tag != Tag.RobotObservedLaserPoint) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedLaserPoint\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedLaserPoint)this._state; } set { _tag = (value != null) ? Tag.RobotObservedLaserPoint : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotObservedIllumination RobotObservedIllumination { get { if (_tag != Tag.RobotObservedIllumination) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotObservedIllumination\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotObservedIllumination)this._state; } set { _tag = (value != null) ? Tag.RobotObservedIllumination : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDeletedFace RobotDeletedFace { get { if (_tag != Tag.RobotDeletedFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDeletedFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDeletedFace)this._state; } set { _tag = (value != null) ? Tag.RobotDeletedFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDeletedLocatedObject RobotDeletedLocatedObject { get { if (_tag != Tag.RobotDeletedLocatedObject) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDeletedLocatedObject\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDeletedLocatedObject)this._state; } set { _tag = (value != null) ? Tag.RobotDeletedLocatedObject : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotDeletedAllCustomObjects RobotDeletedAllCustomObjects { get { if (_tag != Tag.RobotDeletedAllCustomObjects) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotDeletedAllCustomObjects\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotDeletedAllCustomObjects)this._state; } set { _tag = (value != null) ? Tag.RobotDeletedAllCustomObjects : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.LocatedObjectStates LocatedObjectStates { get { if (_tag != Tag.LocatedObjectStates) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"LocatedObjectStates\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.LocatedObjectStates)this._state; } set { _tag = (value != null) ? Tag.LocatedObjectStates : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.ConnectedObjectStates ConnectedObjectStates { get { if (_tag != Tag.ConnectedObjectStates) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"ConnectedObjectStates\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.ConnectedObjectStates)this._state; } set { _tag = (value != null) ? Tag.ConnectedObjectStates : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MeetVictorStarted MeetVictorStarted { get { if (_tag != Tag.MeetVictorStarted) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MeetVictorStarted\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MeetVictorStarted)this._state; } set { _tag = (value != null) ? Tag.MeetVictorStarted : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MeetVictorFaceScanStarted MeetVictorFaceScanStarted { get { if (_tag != Tag.MeetVictorFaceScanStarted) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MeetVictorFaceScanStarted\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MeetVictorFaceScanStarted)this._state; } set { _tag = (value != null) ? Tag.MeetVictorFaceScanStarted : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MeetVictorFaceScanComplete MeetVictorFaceScanComplete { get { if (_tag != Tag.MeetVictorFaceScanComplete) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MeetVictorFaceScanComplete\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MeetVictorFaceScanComplete)this._state; } set { _tag = (value != null) ? Tag.MeetVictorFaceScanComplete : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MeetVictorNameSaved MeetVictorNameSaved { get { if (_tag != Tag.MeetVictorNameSaved) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MeetVictorNameSaved\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MeetVictorNameSaved)this._state; } set { _tag = (value != null) ? Tag.MeetVictorNameSaved : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotErasedEnrolledFace RobotErasedEnrolledFace { get { if (_tag != Tag.RobotErasedEnrolledFace) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotErasedEnrolledFace\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotErasedEnrolledFace)this._state; } set { _tag = (value != null) ? Tag.RobotErasedEnrolledFace : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotErasedAllEnrolledFaces RobotErasedAllEnrolledFaces { get { if (_tag != Tag.RobotErasedAllEnrolledFaces) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotErasedAllEnrolledFaces\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotErasedAllEnrolledFaces)this._state; } set { _tag = (value != null) ? Tag.RobotErasedAllEnrolledFaces : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RobotCompletedFactoryDotTest RobotCompletedFactoryDotTest { get { if (_tag != Tag.RobotCompletedFactoryDotTest) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RobotCompletedFactoryDotTest\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RobotCompletedFactoryDotTest)this._state; } set { _tag = (value != null) ? Tag.RobotCompletedFactoryDotTest : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.PlaypenBehaviorFailed PlaypenBehaviorFailed { get { if (_tag != Tag.PlaypenBehaviorFailed) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"PlaypenBehaviorFailed\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.PlaypenBehaviorFailed)this._state; } set { _tag = (value != null) ? Tag.PlaypenBehaviorFailed : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.SelfTestBehaviorFailed SelfTestBehaviorFailed { get { if (_tag != Tag.SelfTestBehaviorFailed) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SelfTestBehaviorFailed\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.SelfTestBehaviorFailed)this._state; } set { _tag = (value != null) ? Tag.SelfTestBehaviorFailed : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.SelfTestEnd SelfTestEnd { get { if (_tag != Tag.SelfTestEnd) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"SelfTestEnd\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.SelfTestEnd)this._state; } set { _tag = (value != null) ? Tag.SelfTestEnd : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.AnimationGroupAvailable AnimationGroupAvailable { get { if (_tag != Tag.AnimationGroupAvailable) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AnimationGroupAvailable\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.AnimationGroupAvailable)this._state; } set { _tag = (value != null) ? Tag.AnimationGroupAvailable : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.AnimationAborted AnimationAborted { get { if (_tag != Tag.AnimationAborted) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AnimationAborted\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.AnimationAborted)this._state; } set { _tag = (value != null) ? Tag.AnimationAborted : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.AnimationEvent AnimationEvent { get { if (_tag != Tag.AnimationEvent) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AnimationEvent\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.AnimationEvent)this._state; } set { _tag = (value != null) ? Tag.AnimationEvent : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.MoodState MoodState { get { if (_tag != Tag.MoodState) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"MoodState\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.MoodState)this._state; } set { _tag = (value != null) ? Tag.MoodState : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.InitDebugConsoleVarMessage InitDebugConsoleVarMessage { get { if (_tag != Tag.InitDebugConsoleVarMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"InitDebugConsoleVarMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.InitDebugConsoleVarMessage)this._state; } set { _tag = (value != null) ? Tag.InitDebugConsoleVarMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.JsonDasLogMessage JsonDasLogMessage { get { if (_tag != Tag.JsonDasLogMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"JsonDasLogMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.JsonDasLogMessage)this._state; } set { _tag = (value != null) ? Tag.JsonDasLogMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.JsonDasLogAllSentMessage JsonDasLogAllSentMessage { get { if (_tag != Tag.JsonDasLogAllSentMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"JsonDasLogAllSentMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.JsonDasLogAllSentMessage)this._state; } set { _tag = (value != null) ? Tag.JsonDasLogAllSentMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.VerifyDebugConsoleFuncMessage VerifyDebugConsoleFuncMessage { get { if (_tag != Tag.VerifyDebugConsoleFuncMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"VerifyDebugConsoleFuncMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.VerifyDebugConsoleFuncMessage)this._state; } set { _tag = (value != null) ? Tag.VerifyDebugConsoleFuncMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.VerifyDebugConsoleVarMessage VerifyDebugConsoleVarMessage { get { if (_tag != Tag.VerifyDebugConsoleVarMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"VerifyDebugConsoleVarMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.VerifyDebugConsoleVarMessage)this._state; } set { _tag = (value != null) ? Tag.VerifyDebugConsoleVarMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.DebugAppendConsoleLogLine DebugAppendConsoleLogLine { get { if (_tag != Tag.DebugAppendConsoleLogLine) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"DebugAppendConsoleLogLine\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.DebugAppendConsoleLogLine)this._state; } set { _tag = (value != null) ? Tag.DebugAppendConsoleLogLine : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.EngineErrorCodeMessage EngineErrorCodeMessage { get { if (_tag != Tag.EngineErrorCodeMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"EngineErrorCodeMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.EngineErrorCodeMessage)this._state; } set { _tag = (value != null) ? Tag.EngineErrorCodeMessage : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.BehaviorTransition BehaviorTransition { get { if (_tag != Tag.BehaviorTransition) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"BehaviorTransition\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.BehaviorTransition)this._state; } set { _tag = (value != null) ? Tag.BehaviorTransition : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.OnboardingState OnboardingState { get { if (_tag != Tag.OnboardingState) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"OnboardingState\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.OnboardingState)this._state; } set { _tag = (value != null) ? Tag.OnboardingState : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.AudioBehaviorStackUpdate AudioBehaviorStackUpdate { get { if (_tag != Tag.AudioBehaviorStackUpdate) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"AudioBehaviorStackUpdate\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.AudioBehaviorStackUpdate)this._state; } set { _tag = (value != null) ? Tag.AudioBehaviorStackUpdate : Tag.INVALID; _state = value; } } public Anki.Vector.ExternalInterface.RequiredEmptyMessage RequiredEmptyMessage { get { if (_tag != Tag.RequiredEmptyMessage) { throw new System.InvalidOperationException(string.Format( "Cannot access union member \"RequiredEmptyMessage\" when a value of type {0} is stored.", _tag.ToString())); } return (Anki.Vector.ExternalInterface.RequiredEmptyMessage)this._state; } set { _tag = (value != null) ? Tag.RequiredEmptyMessage : Tag.INVALID; _state = value; } } public MessageEngineToGame Initialize(T state) { _state = state; if(typeof(T) == typeof(Anki.Vector.ExternalInterface.UiDeviceConnected)) { _tag = Tag.UiDeviceConnected; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotCompletedAction)) { _tag = Tag.RobotCompletedAction; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.Event)) { _tag = Tag.Event; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.EnrolledNamesResponse)) { _tag = Tag.EnrolledNamesResponse; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedFace)) { _tag = Tag.RobotObservedFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotChangedObservedFaceID)) { _tag = Tag.RobotChangedObservedFaceID; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AnimationAvailable)) { _tag = Tag.AnimationAvailable; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.EndOfMessage)) { _tag = Tag.EndOfMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectConnectionState)) { _tag = Tag.ObjectConnectionState; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectMoved)) { _tag = Tag.ObjectMoved; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectStoppedMoving)) { _tag = Tag.ObjectStoppedMoving; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectUpAxisChanged)) { _tag = Tag.ObjectUpAxisChanged; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectTapped)) { _tag = Tag.ObjectTapped; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectAccel)) { _tag = Tag.ObjectAccel; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedObject)) { _tag = Tag.RobotObservedObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ObjectAvailable)) { _tag = Tag.ObjectAvailable; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDeletedFixedCustomObjects)) { _tag = Tag.RobotDeletedFixedCustomObjects; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDeletedCustomMarkerObjects)) { _tag = Tag.RobotDeletedCustomMarkerObjects; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.CreatedFixedCustomObject)) { _tag = Tag.CreatedFixedCustomObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.DefinedCustomObject)) { _tag = Tag.DefinedCustomObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MemoryMapMessageBegin)) { _tag = Tag.MemoryMapMessageBegin; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MemoryMapMessage)) { _tag = Tag.MemoryMapMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MemoryMapMessageEnd)) { _tag = Tag.MemoryMapMessageEnd; } else if(typeof(T) == typeof(Anki.AudioEngine.Multiplexer.AudioCallbackDuration)) { _tag = Tag.AudioCallbackDuration; } else if(typeof(T) == typeof(Anki.AudioEngine.Multiplexer.AudioCallbackMarker)) { _tag = Tag.AudioCallbackMarker; } else if(typeof(T) == typeof(Anki.AudioEngine.Multiplexer.AudioCallbackComplete)) { _tag = Tag.AudioCallbackComplete; } else if(typeof(T) == typeof(Anki.AudioEngine.Multiplexer.AudioCallbackError)) { _tag = Tag.AudioCallbackError; } else if(typeof(T) == typeof(Anki.Vector.AdvertisementRegistrationMsg)) { _tag = Tag.AdvertisementRegistrationMsg; } else if(typeof(T) == typeof(Anki.Vector.AdvertisementMsg)) { _tag = Tag.AdvertisementMsg; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.Ping)) { _tag = Tag.Ping; } else if(typeof(T) == typeof(Anki.Vector.CliffEvent)) { _tag = Tag.CliffEvent; } else if(typeof(T) == typeof(Anki.Vector.PotentialCliff)) { _tag = Tag.PotentialCliff; } else if(typeof(T) == typeof(Anki.Vector.SetCliffDetectThresholds)) { _tag = Tag.SetCliffDetectThresholds; } else if(typeof(T) == typeof(Anki.Vector.SetWhiteDetectThresholds)) { _tag = Tag.SetWhiteDetectThresholds; } else if(typeof(T) == typeof(Anki.Vector.FactoryTestResultEntry)) { _tag = Tag.FactoryTestResultEntry; } else if(typeof(T) == typeof(Anki.Vector.ImageChunk)) { _tag = Tag.ImageChunk; } else if(typeof(T) == typeof(Anki.Vector.CameraCalibration)) { _tag = Tag.CameraCalibration; } else if(typeof(T) == typeof(Anki.Vector.IMURequest)) { _tag = Tag.IMURequest; } else if(typeof(T) == typeof(Anki.Vector.RobotInterface.IMUTemperature)) { _tag = Tag.IMUTemperature; } else if(typeof(T) == typeof(Anki.Vision.LoadedKnownFace)) { _tag = Tag.LoadedKnownFace; } else if(typeof(T) == typeof(Anki.Vision.RobotRenamedEnrolledFace)) { _tag = Tag.RobotRenamedEnrolledFace; } else if(typeof(T) == typeof(Anki.Vector.MotorCalibration)) { _tag = Tag.MotorCalibration; } else if(typeof(T) == typeof(Anki.Vector.MotorAutoEnabled)) { _tag = Tag.MotorAutoEnabled; } else if(typeof(T) == typeof(Anki.Vector.CarryStateUpdate)) { _tag = Tag.CarryStateUpdate; } else if(typeof(T) == typeof(Anki.Vector.SwitchboardInterface.EnterPairing)) { _tag = Tag.EnterPairing; } else if(typeof(T) == typeof(Anki.Vector.SwitchboardInterface.ExitPairing)) { _tag = Tag.ExitPairing; } else if(typeof(T) == typeof(Anki.Vector.SwitchboardInterface.WifiScanRequest)) { _tag = Tag.WifiScanRequest; } else if(typeof(T) == typeof(Anki.Vector.SwitchboardInterface.WifiConnectRequest)) { _tag = Tag.WifiConnectRequest; } else if(typeof(T) == typeof(Anki.Vector.SwitchboardInterface.HasBleKeysRequest)) { _tag = Tag.HasBleKeysRequest; } else if(typeof(T) == typeof(Anki.Util.AnkiLab.ActivateExperimentRequest)) { _tag = Tag.ActivateExperimentRequest; } else if(typeof(T) == typeof(Anki.Util.AnkiLab.ActivateExperimentResponse)) { _tag = Tag.ActivateExperimentResponse; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.UiDeviceAvailable)) { _tag = Tag.UiDeviceAvailable; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotConnectionResponse)) { _tag = Tag.RobotConnectionResponse; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.GoingToSleep)) { _tag = Tag.GoingToSleep; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.CurrentCameraParams)) { _tag = Tag.CurrentCameraParams; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PerRobotSettings)) { _tag = Tag.PerRobotSettings; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotState)) { _tag = Tag.RobotState; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDelocalized)) { _tag = Tag.RobotDelocalized; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotStopped)) { _tag = Tag.RobotStopped; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotOffTreadsStateChanged)) { _tag = Tag.RobotOffTreadsStateChanged; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotOnChargerPlatformEvent)) { _tag = Tag.RobotOnChargerPlatformEvent; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ChargerEvent)) { _tag = Tag.ChargerEvent; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.TouchButtonEvent)) { _tag = Tag.TouchButtonEvent; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.UnexpectedMovement)) { _tag = Tag.UnexpectedMovement; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotFallingEvent)) { _tag = Tag.RobotFallingEvent; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotProcessedImage)) { _tag = Tag.RobotProcessedImage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedPossibleObject)) { _tag = Tag.RobotObservedPossibleObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedPet)) { _tag = Tag.RobotObservedPet; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedMotion)) { _tag = Tag.RobotObservedMotion; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedSalientPoint)) { _tag = Tag.RobotObservedSalientPoint; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedLaserPoint)) { _tag = Tag.RobotObservedLaserPoint; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotObservedIllumination)) { _tag = Tag.RobotObservedIllumination; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDeletedFace)) { _tag = Tag.RobotDeletedFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDeletedLocatedObject)) { _tag = Tag.RobotDeletedLocatedObject; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotDeletedAllCustomObjects)) { _tag = Tag.RobotDeletedAllCustomObjects; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.LocatedObjectStates)) { _tag = Tag.LocatedObjectStates; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.ConnectedObjectStates)) { _tag = Tag.ConnectedObjectStates; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MeetVictorStarted)) { _tag = Tag.MeetVictorStarted; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MeetVictorFaceScanStarted)) { _tag = Tag.MeetVictorFaceScanStarted; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MeetVictorFaceScanComplete)) { _tag = Tag.MeetVictorFaceScanComplete; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MeetVictorNameSaved)) { _tag = Tag.MeetVictorNameSaved; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotErasedEnrolledFace)) { _tag = Tag.RobotErasedEnrolledFace; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotErasedAllEnrolledFaces)) { _tag = Tag.RobotErasedAllEnrolledFaces; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RobotCompletedFactoryDotTest)) { _tag = Tag.RobotCompletedFactoryDotTest; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.PlaypenBehaviorFailed)) { _tag = Tag.PlaypenBehaviorFailed; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SelfTestBehaviorFailed)) { _tag = Tag.SelfTestBehaviorFailed; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.SelfTestEnd)) { _tag = Tag.SelfTestEnd; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AnimationGroupAvailable)) { _tag = Tag.AnimationGroupAvailable; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AnimationAborted)) { _tag = Tag.AnimationAborted; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AnimationEvent)) { _tag = Tag.AnimationEvent; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.MoodState)) { _tag = Tag.MoodState; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.InitDebugConsoleVarMessage)) { _tag = Tag.InitDebugConsoleVarMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.JsonDasLogMessage)) { _tag = Tag.JsonDasLogMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.JsonDasLogAllSentMessage)) { _tag = Tag.JsonDasLogAllSentMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.VerifyDebugConsoleFuncMessage)) { _tag = Tag.VerifyDebugConsoleFuncMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.VerifyDebugConsoleVarMessage)) { _tag = Tag.VerifyDebugConsoleVarMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.DebugAppendConsoleLogLine)) { _tag = Tag.DebugAppendConsoleLogLine; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.EngineErrorCodeMessage)) { _tag = Tag.EngineErrorCodeMessage; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.BehaviorTransition)) { _tag = Tag.BehaviorTransition; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.OnboardingState)) { _tag = Tag.OnboardingState; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.AudioBehaviorStackUpdate)) { _tag = Tag.AudioBehaviorStackUpdate; } else if(typeof(T) == typeof(Anki.Vector.ExternalInterface.RequiredEmptyMessage)) { _tag = Tag.RequiredEmptyMessage; } else { _state = null; _tag = Tag.INVALID; } return this; } /**** Constructors ****/ public MessageEngineToGame() { } public MessageEngineToGame(System.IO.Stream stream) { Unpack(stream); } public MessageEngineToGame(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.UiDeviceConnected: UiDeviceConnected = new Anki.Vector.ExternalInterface.UiDeviceConnected(reader); break; case Tag.RobotCompletedAction: RobotCompletedAction = new Anki.Vector.ExternalInterface.RobotCompletedAction(reader); break; case Tag.Event: Event = new Anki.Vector.ExternalInterface.Event(reader); break; case Tag.EnrolledNamesResponse: EnrolledNamesResponse = new Anki.Vector.ExternalInterface.EnrolledNamesResponse(reader); break; case Tag.RobotObservedFace: RobotObservedFace = new Anki.Vector.ExternalInterface.RobotObservedFace(reader); break; case Tag.RobotChangedObservedFaceID: RobotChangedObservedFaceID = new Anki.Vector.ExternalInterface.RobotChangedObservedFaceID(reader); break; case Tag.AnimationAvailable: AnimationAvailable = new Anki.Vector.ExternalInterface.AnimationAvailable(reader); break; case Tag.EndOfMessage: EndOfMessage = new Anki.Vector.ExternalInterface.EndOfMessage(reader); break; case Tag.ObjectConnectionState: ObjectConnectionState = new Anki.Vector.ExternalInterface.ObjectConnectionState(reader); break; case Tag.ObjectMoved: ObjectMoved = new Anki.Vector.ExternalInterface.ObjectMoved(reader); break; case Tag.ObjectStoppedMoving: ObjectStoppedMoving = new Anki.Vector.ExternalInterface.ObjectStoppedMoving(reader); break; case Tag.ObjectUpAxisChanged: ObjectUpAxisChanged = new Anki.Vector.ExternalInterface.ObjectUpAxisChanged(reader); break; case Tag.ObjectTapped: ObjectTapped = new Anki.Vector.ExternalInterface.ObjectTapped(reader); break; case Tag.ObjectAccel: ObjectAccel = new Anki.Vector.ExternalInterface.ObjectAccel(reader); break; case Tag.RobotObservedObject: RobotObservedObject = new Anki.Vector.ExternalInterface.RobotObservedObject(reader); break; case Tag.ObjectAvailable: ObjectAvailable = new Anki.Vector.ExternalInterface.ObjectAvailable(reader); break; case Tag.RobotDeletedFixedCustomObjects: RobotDeletedFixedCustomObjects = new Anki.Vector.ExternalInterface.RobotDeletedFixedCustomObjects(reader); break; case Tag.RobotDeletedCustomMarkerObjects: RobotDeletedCustomMarkerObjects = new Anki.Vector.ExternalInterface.RobotDeletedCustomMarkerObjects(reader); break; case Tag.CreatedFixedCustomObject: CreatedFixedCustomObject = new Anki.Vector.ExternalInterface.CreatedFixedCustomObject(reader); break; case Tag.DefinedCustomObject: DefinedCustomObject = new Anki.Vector.ExternalInterface.DefinedCustomObject(reader); break; case Tag.MemoryMapMessageBegin: MemoryMapMessageBegin = new Anki.Vector.ExternalInterface.MemoryMapMessageBegin(reader); break; case Tag.MemoryMapMessage: MemoryMapMessage = new Anki.Vector.ExternalInterface.MemoryMapMessage(reader); break; case Tag.MemoryMapMessageEnd: MemoryMapMessageEnd = new Anki.Vector.ExternalInterface.MemoryMapMessageEnd(reader); break; case Tag.AudioCallbackDuration: AudioCallbackDuration = new Anki.AudioEngine.Multiplexer.AudioCallbackDuration(reader); break; case Tag.AudioCallbackMarker: AudioCallbackMarker = new Anki.AudioEngine.Multiplexer.AudioCallbackMarker(reader); break; case Tag.AudioCallbackComplete: AudioCallbackComplete = new Anki.AudioEngine.Multiplexer.AudioCallbackComplete(reader); break; case Tag.AudioCallbackError: AudioCallbackError = new Anki.AudioEngine.Multiplexer.AudioCallbackError(reader); break; case Tag.AdvertisementRegistrationMsg: AdvertisementRegistrationMsg = new Anki.Vector.AdvertisementRegistrationMsg(reader); break; case Tag.AdvertisementMsg: AdvertisementMsg = new Anki.Vector.AdvertisementMsg(reader); break; case Tag.Ping: Ping = new Anki.Vector.ExternalInterface.Ping(reader); break; case Tag.CliffEvent: CliffEvent = new Anki.Vector.CliffEvent(reader); break; case Tag.PotentialCliff: PotentialCliff = new Anki.Vector.PotentialCliff(reader); break; case Tag.SetCliffDetectThresholds: SetCliffDetectThresholds = new Anki.Vector.SetCliffDetectThresholds(reader); break; case Tag.SetWhiteDetectThresholds: SetWhiteDetectThresholds = new Anki.Vector.SetWhiteDetectThresholds(reader); break; case Tag.FactoryTestResultEntry: FactoryTestResultEntry = new Anki.Vector.FactoryTestResultEntry(reader); break; case Tag.ImageChunk: ImageChunk = new Anki.Vector.ImageChunk(reader); break; case Tag.CameraCalibration: CameraCalibration = new Anki.Vector.CameraCalibration(reader); break; case Tag.IMURequest: IMURequest = new Anki.Vector.IMURequest(reader); break; case Tag.IMUTemperature: IMUTemperature = new Anki.Vector.RobotInterface.IMUTemperature(reader); break; case Tag.LoadedKnownFace: LoadedKnownFace = new Anki.Vision.LoadedKnownFace(reader); break; case Tag.RobotRenamedEnrolledFace: RobotRenamedEnrolledFace = new Anki.Vision.RobotRenamedEnrolledFace(reader); break; case Tag.MotorCalibration: MotorCalibration = new Anki.Vector.MotorCalibration(reader); break; case Tag.MotorAutoEnabled: MotorAutoEnabled = new Anki.Vector.MotorAutoEnabled(reader); break; case Tag.CarryStateUpdate: CarryStateUpdate = new Anki.Vector.CarryStateUpdate(reader); break; case Tag.EnterPairing: EnterPairing = new Anki.Vector.SwitchboardInterface.EnterPairing(reader); break; case Tag.ExitPairing: ExitPairing = new Anki.Vector.SwitchboardInterface.ExitPairing(reader); break; case Tag.WifiScanRequest: WifiScanRequest = new Anki.Vector.SwitchboardInterface.WifiScanRequest(reader); break; case Tag.WifiConnectRequest: WifiConnectRequest = new Anki.Vector.SwitchboardInterface.WifiConnectRequest(reader); break; case Tag.HasBleKeysRequest: HasBleKeysRequest = new Anki.Vector.SwitchboardInterface.HasBleKeysRequest(reader); break; case Tag.ActivateExperimentRequest: ActivateExperimentRequest = new Anki.Util.AnkiLab.ActivateExperimentRequest(reader); break; case Tag.ActivateExperimentResponse: ActivateExperimentResponse = new Anki.Util.AnkiLab.ActivateExperimentResponse(reader); break; case Tag.UiDeviceAvailable: UiDeviceAvailable = new Anki.Vector.ExternalInterface.UiDeviceAvailable(reader); break; case Tag.RobotConnectionResponse: RobotConnectionResponse = new Anki.Vector.ExternalInterface.RobotConnectionResponse(reader); break; case Tag.GoingToSleep: GoingToSleep = new Anki.Vector.ExternalInterface.GoingToSleep(reader); break; case Tag.CurrentCameraParams: CurrentCameraParams = new Anki.Vector.ExternalInterface.CurrentCameraParams(reader); break; case Tag.PerRobotSettings: PerRobotSettings = new Anki.Vector.ExternalInterface.PerRobotSettings(reader); break; case Tag.RobotState: RobotState = new Anki.Vector.ExternalInterface.RobotState(reader); break; case Tag.RobotDelocalized: RobotDelocalized = new Anki.Vector.ExternalInterface.RobotDelocalized(reader); break; case Tag.RobotStopped: RobotStopped = new Anki.Vector.ExternalInterface.RobotStopped(reader); break; case Tag.RobotOffTreadsStateChanged: RobotOffTreadsStateChanged = new Anki.Vector.ExternalInterface.RobotOffTreadsStateChanged(reader); break; case Tag.RobotOnChargerPlatformEvent: RobotOnChargerPlatformEvent = new Anki.Vector.ExternalInterface.RobotOnChargerPlatformEvent(reader); break; case Tag.ChargerEvent: ChargerEvent = new Anki.Vector.ExternalInterface.ChargerEvent(reader); break; case Tag.TouchButtonEvent: TouchButtonEvent = new Anki.Vector.ExternalInterface.TouchButtonEvent(reader); break; case Tag.UnexpectedMovement: UnexpectedMovement = new Anki.Vector.ExternalInterface.UnexpectedMovement(reader); break; case Tag.RobotFallingEvent: RobotFallingEvent = new Anki.Vector.ExternalInterface.RobotFallingEvent(reader); break; case Tag.RobotProcessedImage: RobotProcessedImage = new Anki.Vector.ExternalInterface.RobotProcessedImage(reader); break; case Tag.RobotObservedPossibleObject: RobotObservedPossibleObject = new Anki.Vector.ExternalInterface.RobotObservedPossibleObject(reader); break; case Tag.RobotObservedPet: RobotObservedPet = new Anki.Vector.ExternalInterface.RobotObservedPet(reader); break; case Tag.RobotObservedMotion: RobotObservedMotion = new Anki.Vector.ExternalInterface.RobotObservedMotion(reader); break; case Tag.RobotObservedSalientPoint: RobotObservedSalientPoint = new Anki.Vector.ExternalInterface.RobotObservedSalientPoint(reader); break; case Tag.RobotObservedLaserPoint: RobotObservedLaserPoint = new Anki.Vector.ExternalInterface.RobotObservedLaserPoint(reader); break; case Tag.RobotObservedIllumination: RobotObservedIllumination = new Anki.Vector.ExternalInterface.RobotObservedIllumination(reader); break; case Tag.RobotDeletedFace: RobotDeletedFace = new Anki.Vector.ExternalInterface.RobotDeletedFace(reader); break; case Tag.RobotDeletedLocatedObject: RobotDeletedLocatedObject = new Anki.Vector.ExternalInterface.RobotDeletedLocatedObject(reader); break; case Tag.RobotDeletedAllCustomObjects: RobotDeletedAllCustomObjects = new Anki.Vector.ExternalInterface.RobotDeletedAllCustomObjects(reader); break; case Tag.LocatedObjectStates: LocatedObjectStates = new Anki.Vector.ExternalInterface.LocatedObjectStates(reader); break; case Tag.ConnectedObjectStates: ConnectedObjectStates = new Anki.Vector.ExternalInterface.ConnectedObjectStates(reader); break; case Tag.MeetVictorStarted: MeetVictorStarted = new Anki.Vector.ExternalInterface.MeetVictorStarted(reader); break; case Tag.MeetVictorFaceScanStarted: MeetVictorFaceScanStarted = new Anki.Vector.ExternalInterface.MeetVictorFaceScanStarted(reader); break; case Tag.MeetVictorFaceScanComplete: MeetVictorFaceScanComplete = new Anki.Vector.ExternalInterface.MeetVictorFaceScanComplete(reader); break; case Tag.MeetVictorNameSaved: MeetVictorNameSaved = new Anki.Vector.ExternalInterface.MeetVictorNameSaved(reader); break; case Tag.RobotErasedEnrolledFace: RobotErasedEnrolledFace = new Anki.Vector.ExternalInterface.RobotErasedEnrolledFace(reader); break; case Tag.RobotErasedAllEnrolledFaces: RobotErasedAllEnrolledFaces = new Anki.Vector.ExternalInterface.RobotErasedAllEnrolledFaces(reader); break; case Tag.RobotCompletedFactoryDotTest: RobotCompletedFactoryDotTest = new Anki.Vector.ExternalInterface.RobotCompletedFactoryDotTest(reader); break; case Tag.PlaypenBehaviorFailed: PlaypenBehaviorFailed = new Anki.Vector.ExternalInterface.PlaypenBehaviorFailed(reader); break; case Tag.SelfTestBehaviorFailed: SelfTestBehaviorFailed = new Anki.Vector.ExternalInterface.SelfTestBehaviorFailed(reader); break; case Tag.SelfTestEnd: SelfTestEnd = new Anki.Vector.ExternalInterface.SelfTestEnd(reader); break; case Tag.AnimationGroupAvailable: AnimationGroupAvailable = new Anki.Vector.ExternalInterface.AnimationGroupAvailable(reader); break; case Tag.AnimationAborted: AnimationAborted = new Anki.Vector.ExternalInterface.AnimationAborted(reader); break; case Tag.AnimationEvent: AnimationEvent = new Anki.Vector.ExternalInterface.AnimationEvent(reader); break; case Tag.MoodState: MoodState = new Anki.Vector.ExternalInterface.MoodState(reader); break; case Tag.InitDebugConsoleVarMessage: InitDebugConsoleVarMessage = new Anki.Vector.ExternalInterface.InitDebugConsoleVarMessage(reader); break; case Tag.JsonDasLogMessage: JsonDasLogMessage = new Anki.Vector.ExternalInterface.JsonDasLogMessage(reader); break; case Tag.JsonDasLogAllSentMessage: JsonDasLogAllSentMessage = new Anki.Vector.ExternalInterface.JsonDasLogAllSentMessage(reader); break; case Tag.VerifyDebugConsoleFuncMessage: VerifyDebugConsoleFuncMessage = new Anki.Vector.ExternalInterface.VerifyDebugConsoleFuncMessage(reader); break; case Tag.VerifyDebugConsoleVarMessage: VerifyDebugConsoleVarMessage = new Anki.Vector.ExternalInterface.VerifyDebugConsoleVarMessage(reader); break; case Tag.DebugAppendConsoleLogLine: DebugAppendConsoleLogLine = new Anki.Vector.ExternalInterface.DebugAppendConsoleLogLine(reader); break; case Tag.EngineErrorCodeMessage: EngineErrorCodeMessage = new Anki.Vector.ExternalInterface.EngineErrorCodeMessage(reader); break; case Tag.BehaviorTransition: BehaviorTransition = new Anki.Vector.ExternalInterface.BehaviorTransition(reader); break; case Tag.OnboardingState: OnboardingState = new Anki.Vector.ExternalInterface.OnboardingState(reader); break; case Tag.AudioBehaviorStackUpdate: AudioBehaviorStackUpdate = new Anki.Vector.ExternalInterface.AudioBehaviorStackUpdate(reader); break; case Tag.RequiredEmptyMessage: RequiredEmptyMessage = new Anki.Vector.ExternalInterface.RequiredEmptyMessage(reader); break; default: break; } _tag = newTag; } public void Pack(System.IO.Stream stream) { System.IO.BinaryWriter writer = new System.IO.BinaryWriter(stream); Pack(writer); } public void Pack(System.IO.BinaryWriter writer) { writer.Write((byte)GetTag()); switch(GetTag()) { case Tag.UiDeviceConnected: if (UiDeviceConnected == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UiDeviceConnected.Pack(writer); break; case Tag.RobotCompletedAction: if (RobotCompletedAction == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotCompletedAction.Pack(writer); break; case Tag.Event: if (Event == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } Event.Pack(writer); break; case Tag.EnrolledNamesResponse: if (EnrolledNamesResponse == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EnrolledNamesResponse.Pack(writer); break; case Tag.RobotObservedFace: if (RobotObservedFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedFace.Pack(writer); break; case Tag.RobotChangedObservedFaceID: if (RobotChangedObservedFaceID == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotChangedObservedFaceID.Pack(writer); break; case Tag.AnimationAvailable: if (AnimationAvailable == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AnimationAvailable.Pack(writer); break; case Tag.EndOfMessage: if (EndOfMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EndOfMessage.Pack(writer); break; case Tag.ObjectConnectionState: if (ObjectConnectionState == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectConnectionState.Pack(writer); break; case Tag.ObjectMoved: if (ObjectMoved == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectMoved.Pack(writer); break; case Tag.ObjectStoppedMoving: if (ObjectStoppedMoving == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectStoppedMoving.Pack(writer); break; case Tag.ObjectUpAxisChanged: if (ObjectUpAxisChanged == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectUpAxisChanged.Pack(writer); break; case Tag.ObjectTapped: if (ObjectTapped == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectTapped.Pack(writer); break; case Tag.ObjectAccel: if (ObjectAccel == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectAccel.Pack(writer); break; case Tag.RobotObservedObject: if (RobotObservedObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedObject.Pack(writer); break; case Tag.ObjectAvailable: if (ObjectAvailable == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ObjectAvailable.Pack(writer); break; case Tag.RobotDeletedFixedCustomObjects: if (RobotDeletedFixedCustomObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDeletedFixedCustomObjects.Pack(writer); break; case Tag.RobotDeletedCustomMarkerObjects: if (RobotDeletedCustomMarkerObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDeletedCustomMarkerObjects.Pack(writer); break; case Tag.CreatedFixedCustomObject: if (CreatedFixedCustomObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CreatedFixedCustomObject.Pack(writer); break; case Tag.DefinedCustomObject: if (DefinedCustomObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DefinedCustomObject.Pack(writer); break; case Tag.MemoryMapMessageBegin: if (MemoryMapMessageBegin == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MemoryMapMessageBegin.Pack(writer); break; case Tag.MemoryMapMessage: if (MemoryMapMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MemoryMapMessage.Pack(writer); break; case Tag.MemoryMapMessageEnd: if (MemoryMapMessageEnd == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MemoryMapMessageEnd.Pack(writer); break; case Tag.AudioCallbackDuration: if (AudioCallbackDuration == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AudioCallbackDuration.Pack(writer); break; case Tag.AudioCallbackMarker: if (AudioCallbackMarker == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AudioCallbackMarker.Pack(writer); break; case Tag.AudioCallbackComplete: if (AudioCallbackComplete == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AudioCallbackComplete.Pack(writer); break; case Tag.AudioCallbackError: if (AudioCallbackError == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AudioCallbackError.Pack(writer); break; case Tag.AdvertisementRegistrationMsg: if (AdvertisementRegistrationMsg == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AdvertisementRegistrationMsg.Pack(writer); break; case Tag.AdvertisementMsg: if (AdvertisementMsg == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AdvertisementMsg.Pack(writer); break; case Tag.Ping: if (Ping == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } Ping.Pack(writer); break; case Tag.CliffEvent: if (CliffEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CliffEvent.Pack(writer); break; case Tag.PotentialCliff: if (PotentialCliff == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } PotentialCliff.Pack(writer); break; case Tag.SetCliffDetectThresholds: if (SetCliffDetectThresholds == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetCliffDetectThresholds.Pack(writer); break; case Tag.SetWhiteDetectThresholds: if (SetWhiteDetectThresholds == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SetWhiteDetectThresholds.Pack(writer); break; case Tag.FactoryTestResultEntry: if (FactoryTestResultEntry == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } FactoryTestResultEntry.Pack(writer); break; case Tag.ImageChunk: if (ImageChunk == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ImageChunk.Pack(writer); break; case Tag.CameraCalibration: if (CameraCalibration == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CameraCalibration.Pack(writer); break; case Tag.IMURequest: if (IMURequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } IMURequest.Pack(writer); break; case Tag.IMUTemperature: if (IMUTemperature == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } IMUTemperature.Pack(writer); break; case Tag.LoadedKnownFace: if (LoadedKnownFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } LoadedKnownFace.Pack(writer); break; case Tag.RobotRenamedEnrolledFace: if (RobotRenamedEnrolledFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotRenamedEnrolledFace.Pack(writer); break; case Tag.MotorCalibration: if (MotorCalibration == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MotorCalibration.Pack(writer); break; case Tag.MotorAutoEnabled: if (MotorAutoEnabled == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MotorAutoEnabled.Pack(writer); break; case Tag.CarryStateUpdate: if (CarryStateUpdate == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CarryStateUpdate.Pack(writer); break; case Tag.EnterPairing: if (EnterPairing == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EnterPairing.Pack(writer); break; case Tag.ExitPairing: if (ExitPairing == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ExitPairing.Pack(writer); break; case Tag.WifiScanRequest: if (WifiScanRequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } WifiScanRequest.Pack(writer); break; case Tag.WifiConnectRequest: if (WifiConnectRequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } WifiConnectRequest.Pack(writer); break; case Tag.HasBleKeysRequest: if (HasBleKeysRequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } HasBleKeysRequest.Pack(writer); break; case Tag.ActivateExperimentRequest: if (ActivateExperimentRequest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ActivateExperimentRequest.Pack(writer); break; case Tag.ActivateExperimentResponse: if (ActivateExperimentResponse == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ActivateExperimentResponse.Pack(writer); break; case Tag.UiDeviceAvailable: if (UiDeviceAvailable == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UiDeviceAvailable.Pack(writer); break; case Tag.RobotConnectionResponse: if (RobotConnectionResponse == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotConnectionResponse.Pack(writer); break; case Tag.GoingToSleep: if (GoingToSleep == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } GoingToSleep.Pack(writer); break; case Tag.CurrentCameraParams: if (CurrentCameraParams == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } CurrentCameraParams.Pack(writer); break; case Tag.PerRobotSettings: if (PerRobotSettings == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } PerRobotSettings.Pack(writer); break; case Tag.RobotState: if (RobotState == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotState.Pack(writer); break; case Tag.RobotDelocalized: if (RobotDelocalized == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDelocalized.Pack(writer); break; case Tag.RobotStopped: if (RobotStopped == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotStopped.Pack(writer); break; case Tag.RobotOffTreadsStateChanged: if (RobotOffTreadsStateChanged == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotOffTreadsStateChanged.Pack(writer); break; case Tag.RobotOnChargerPlatformEvent: if (RobotOnChargerPlatformEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotOnChargerPlatformEvent.Pack(writer); break; case Tag.ChargerEvent: if (ChargerEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ChargerEvent.Pack(writer); break; case Tag.TouchButtonEvent: if (TouchButtonEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } TouchButtonEvent.Pack(writer); break; case Tag.UnexpectedMovement: if (UnexpectedMovement == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } UnexpectedMovement.Pack(writer); break; case Tag.RobotFallingEvent: if (RobotFallingEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotFallingEvent.Pack(writer); break; case Tag.RobotProcessedImage: if (RobotProcessedImage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotProcessedImage.Pack(writer); break; case Tag.RobotObservedPossibleObject: if (RobotObservedPossibleObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedPossibleObject.Pack(writer); break; case Tag.RobotObservedPet: if (RobotObservedPet == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedPet.Pack(writer); break; case Tag.RobotObservedMotion: if (RobotObservedMotion == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedMotion.Pack(writer); break; case Tag.RobotObservedSalientPoint: if (RobotObservedSalientPoint == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedSalientPoint.Pack(writer); break; case Tag.RobotObservedLaserPoint: if (RobotObservedLaserPoint == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedLaserPoint.Pack(writer); break; case Tag.RobotObservedIllumination: if (RobotObservedIllumination == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotObservedIllumination.Pack(writer); break; case Tag.RobotDeletedFace: if (RobotDeletedFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDeletedFace.Pack(writer); break; case Tag.RobotDeletedLocatedObject: if (RobotDeletedLocatedObject == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDeletedLocatedObject.Pack(writer); break; case Tag.RobotDeletedAllCustomObjects: if (RobotDeletedAllCustomObjects == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotDeletedAllCustomObjects.Pack(writer); break; case Tag.LocatedObjectStates: if (LocatedObjectStates == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } LocatedObjectStates.Pack(writer); break; case Tag.ConnectedObjectStates: if (ConnectedObjectStates == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } ConnectedObjectStates.Pack(writer); break; case Tag.MeetVictorStarted: if (MeetVictorStarted == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MeetVictorStarted.Pack(writer); break; case Tag.MeetVictorFaceScanStarted: if (MeetVictorFaceScanStarted == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MeetVictorFaceScanStarted.Pack(writer); break; case Tag.MeetVictorFaceScanComplete: if (MeetVictorFaceScanComplete == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MeetVictorFaceScanComplete.Pack(writer); break; case Tag.MeetVictorNameSaved: if (MeetVictorNameSaved == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MeetVictorNameSaved.Pack(writer); break; case Tag.RobotErasedEnrolledFace: if (RobotErasedEnrolledFace == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotErasedEnrolledFace.Pack(writer); break; case Tag.RobotErasedAllEnrolledFaces: if (RobotErasedAllEnrolledFaces == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotErasedAllEnrolledFaces.Pack(writer); break; case Tag.RobotCompletedFactoryDotTest: if (RobotCompletedFactoryDotTest == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RobotCompletedFactoryDotTest.Pack(writer); break; case Tag.PlaypenBehaviorFailed: if (PlaypenBehaviorFailed == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } PlaypenBehaviorFailed.Pack(writer); break; case Tag.SelfTestBehaviorFailed: if (SelfTestBehaviorFailed == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SelfTestBehaviorFailed.Pack(writer); break; case Tag.SelfTestEnd: if (SelfTestEnd == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } SelfTestEnd.Pack(writer); break; case Tag.AnimationGroupAvailable: if (AnimationGroupAvailable == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AnimationGroupAvailable.Pack(writer); break; case Tag.AnimationAborted: if (AnimationAborted == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AnimationAborted.Pack(writer); break; case Tag.AnimationEvent: if (AnimationEvent == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AnimationEvent.Pack(writer); break; case Tag.MoodState: if (MoodState == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } MoodState.Pack(writer); break; case Tag.InitDebugConsoleVarMessage: if (InitDebugConsoleVarMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } InitDebugConsoleVarMessage.Pack(writer); break; case Tag.JsonDasLogMessage: if (JsonDasLogMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } JsonDasLogMessage.Pack(writer); break; case Tag.JsonDasLogAllSentMessage: if (JsonDasLogAllSentMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } JsonDasLogAllSentMessage.Pack(writer); break; case Tag.VerifyDebugConsoleFuncMessage: if (VerifyDebugConsoleFuncMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } VerifyDebugConsoleFuncMessage.Pack(writer); break; case Tag.VerifyDebugConsoleVarMessage: if (VerifyDebugConsoleVarMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } VerifyDebugConsoleVarMessage.Pack(writer); break; case Tag.DebugAppendConsoleLogLine: if (DebugAppendConsoleLogLine == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } DebugAppendConsoleLogLine.Pack(writer); break; case Tag.EngineErrorCodeMessage: if (EngineErrorCodeMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } EngineErrorCodeMessage.Pack(writer); break; case Tag.BehaviorTransition: if (BehaviorTransition == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } BehaviorTransition.Pack(writer); break; case Tag.OnboardingState: if (OnboardingState == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } OnboardingState.Pack(writer); break; case Tag.AudioBehaviorStackUpdate: if (AudioBehaviorStackUpdate == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } AudioBehaviorStackUpdate.Pack(writer); break; case Tag.RequiredEmptyMessage: if (RequiredEmptyMessage == null) { throw new System.InvalidOperationException("Arrays in messages may not have null entries."); } RequiredEmptyMessage.Pack(writer); break; default: break; } } public int Size { get { int result = 1; // tag = byte switch(GetTag()) { case Tag.UiDeviceConnected: if (UiDeviceConnected == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UiDeviceConnected.Size; break; case Tag.RobotCompletedAction: if (RobotCompletedAction == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotCompletedAction.Size; break; case Tag.Event: if (Event == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += Event.Size; break; case Tag.EnrolledNamesResponse: if (EnrolledNamesResponse == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EnrolledNamesResponse.Size; break; case Tag.RobotObservedFace: if (RobotObservedFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedFace.Size; break; case Tag.RobotChangedObservedFaceID: if (RobotChangedObservedFaceID == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotChangedObservedFaceID.Size; break; case Tag.AnimationAvailable: if (AnimationAvailable == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AnimationAvailable.Size; break; case Tag.EndOfMessage: if (EndOfMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EndOfMessage.Size; break; case Tag.ObjectConnectionState: if (ObjectConnectionState == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectConnectionState.Size; break; case Tag.ObjectMoved: if (ObjectMoved == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectMoved.Size; break; case Tag.ObjectStoppedMoving: if (ObjectStoppedMoving == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectStoppedMoving.Size; break; case Tag.ObjectUpAxisChanged: if (ObjectUpAxisChanged == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectUpAxisChanged.Size; break; case Tag.ObjectTapped: if (ObjectTapped == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectTapped.Size; break; case Tag.ObjectAccel: if (ObjectAccel == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectAccel.Size; break; case Tag.RobotObservedObject: if (RobotObservedObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedObject.Size; break; case Tag.ObjectAvailable: if (ObjectAvailable == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ObjectAvailable.Size; break; case Tag.RobotDeletedFixedCustomObjects: if (RobotDeletedFixedCustomObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDeletedFixedCustomObjects.Size; break; case Tag.RobotDeletedCustomMarkerObjects: if (RobotDeletedCustomMarkerObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDeletedCustomMarkerObjects.Size; break; case Tag.CreatedFixedCustomObject: if (CreatedFixedCustomObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CreatedFixedCustomObject.Size; break; case Tag.DefinedCustomObject: if (DefinedCustomObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DefinedCustomObject.Size; break; case Tag.MemoryMapMessageBegin: if (MemoryMapMessageBegin == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MemoryMapMessageBegin.Size; break; case Tag.MemoryMapMessage: if (MemoryMapMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MemoryMapMessage.Size; break; case Tag.MemoryMapMessageEnd: if (MemoryMapMessageEnd == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MemoryMapMessageEnd.Size; break; case Tag.AudioCallbackDuration: if (AudioCallbackDuration == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AudioCallbackDuration.Size; break; case Tag.AudioCallbackMarker: if (AudioCallbackMarker == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AudioCallbackMarker.Size; break; case Tag.AudioCallbackComplete: if (AudioCallbackComplete == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AudioCallbackComplete.Size; break; case Tag.AudioCallbackError: if (AudioCallbackError == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AudioCallbackError.Size; break; case Tag.AdvertisementRegistrationMsg: if (AdvertisementRegistrationMsg == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AdvertisementRegistrationMsg.Size; break; case Tag.AdvertisementMsg: if (AdvertisementMsg == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AdvertisementMsg.Size; break; case Tag.Ping: if (Ping == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += Ping.Size; break; case Tag.CliffEvent: if (CliffEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CliffEvent.Size; break; case Tag.PotentialCliff: if (PotentialCliff == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += PotentialCliff.Size; break; case Tag.SetCliffDetectThresholds: if (SetCliffDetectThresholds == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetCliffDetectThresholds.Size; break; case Tag.SetWhiteDetectThresholds: if (SetWhiteDetectThresholds == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SetWhiteDetectThresholds.Size; break; case Tag.FactoryTestResultEntry: if (FactoryTestResultEntry == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += FactoryTestResultEntry.Size; break; case Tag.ImageChunk: if (ImageChunk == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ImageChunk.Size; break; case Tag.CameraCalibration: if (CameraCalibration == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CameraCalibration.Size; break; case Tag.IMURequest: if (IMURequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += IMURequest.Size; break; case Tag.IMUTemperature: if (IMUTemperature == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += IMUTemperature.Size; break; case Tag.LoadedKnownFace: if (LoadedKnownFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += LoadedKnownFace.Size; break; case Tag.RobotRenamedEnrolledFace: if (RobotRenamedEnrolledFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotRenamedEnrolledFace.Size; break; case Tag.MotorCalibration: if (MotorCalibration == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MotorCalibration.Size; break; case Tag.MotorAutoEnabled: if (MotorAutoEnabled == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MotorAutoEnabled.Size; break; case Tag.CarryStateUpdate: if (CarryStateUpdate == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CarryStateUpdate.Size; break; case Tag.EnterPairing: if (EnterPairing == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EnterPairing.Size; break; case Tag.ExitPairing: if (ExitPairing == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ExitPairing.Size; break; case Tag.WifiScanRequest: if (WifiScanRequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += WifiScanRequest.Size; break; case Tag.WifiConnectRequest: if (WifiConnectRequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += WifiConnectRequest.Size; break; case Tag.HasBleKeysRequest: if (HasBleKeysRequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += HasBleKeysRequest.Size; break; case Tag.ActivateExperimentRequest: if (ActivateExperimentRequest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ActivateExperimentRequest.Size; break; case Tag.ActivateExperimentResponse: if (ActivateExperimentResponse == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ActivateExperimentResponse.Size; break; case Tag.UiDeviceAvailable: if (UiDeviceAvailable == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UiDeviceAvailable.Size; break; case Tag.RobotConnectionResponse: if (RobotConnectionResponse == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotConnectionResponse.Size; break; case Tag.GoingToSleep: if (GoingToSleep == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += GoingToSleep.Size; break; case Tag.CurrentCameraParams: if (CurrentCameraParams == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += CurrentCameraParams.Size; break; case Tag.PerRobotSettings: if (PerRobotSettings == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += PerRobotSettings.Size; break; case Tag.RobotState: if (RobotState == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotState.Size; break; case Tag.RobotDelocalized: if (RobotDelocalized == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDelocalized.Size; break; case Tag.RobotStopped: if (RobotStopped == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotStopped.Size; break; case Tag.RobotOffTreadsStateChanged: if (RobotOffTreadsStateChanged == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotOffTreadsStateChanged.Size; break; case Tag.RobotOnChargerPlatformEvent: if (RobotOnChargerPlatformEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotOnChargerPlatformEvent.Size; break; case Tag.ChargerEvent: if (ChargerEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ChargerEvent.Size; break; case Tag.TouchButtonEvent: if (TouchButtonEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += TouchButtonEvent.Size; break; case Tag.UnexpectedMovement: if (UnexpectedMovement == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += UnexpectedMovement.Size; break; case Tag.RobotFallingEvent: if (RobotFallingEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotFallingEvent.Size; break; case Tag.RobotProcessedImage: if (RobotProcessedImage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotProcessedImage.Size; break; case Tag.RobotObservedPossibleObject: if (RobotObservedPossibleObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedPossibleObject.Size; break; case Tag.RobotObservedPet: if (RobotObservedPet == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedPet.Size; break; case Tag.RobotObservedMotion: if (RobotObservedMotion == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedMotion.Size; break; case Tag.RobotObservedSalientPoint: if (RobotObservedSalientPoint == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedSalientPoint.Size; break; case Tag.RobotObservedLaserPoint: if (RobotObservedLaserPoint == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedLaserPoint.Size; break; case Tag.RobotObservedIllumination: if (RobotObservedIllumination == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotObservedIllumination.Size; break; case Tag.RobotDeletedFace: if (RobotDeletedFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDeletedFace.Size; break; case Tag.RobotDeletedLocatedObject: if (RobotDeletedLocatedObject == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDeletedLocatedObject.Size; break; case Tag.RobotDeletedAllCustomObjects: if (RobotDeletedAllCustomObjects == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotDeletedAllCustomObjects.Size; break; case Tag.LocatedObjectStates: if (LocatedObjectStates == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += LocatedObjectStates.Size; break; case Tag.ConnectedObjectStates: if (ConnectedObjectStates == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += ConnectedObjectStates.Size; break; case Tag.MeetVictorStarted: if (MeetVictorStarted == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MeetVictorStarted.Size; break; case Tag.MeetVictorFaceScanStarted: if (MeetVictorFaceScanStarted == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MeetVictorFaceScanStarted.Size; break; case Tag.MeetVictorFaceScanComplete: if (MeetVictorFaceScanComplete == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MeetVictorFaceScanComplete.Size; break; case Tag.MeetVictorNameSaved: if (MeetVictorNameSaved == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MeetVictorNameSaved.Size; break; case Tag.RobotErasedEnrolledFace: if (RobotErasedEnrolledFace == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotErasedEnrolledFace.Size; break; case Tag.RobotErasedAllEnrolledFaces: if (RobotErasedAllEnrolledFaces == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotErasedAllEnrolledFaces.Size; break; case Tag.RobotCompletedFactoryDotTest: if (RobotCompletedFactoryDotTest == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RobotCompletedFactoryDotTest.Size; break; case Tag.PlaypenBehaviorFailed: if (PlaypenBehaviorFailed == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += PlaypenBehaviorFailed.Size; break; case Tag.SelfTestBehaviorFailed: if (SelfTestBehaviorFailed == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SelfTestBehaviorFailed.Size; break; case Tag.SelfTestEnd: if (SelfTestEnd == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += SelfTestEnd.Size; break; case Tag.AnimationGroupAvailable: if (AnimationGroupAvailable == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AnimationGroupAvailable.Size; break; case Tag.AnimationAborted: if (AnimationAborted == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AnimationAborted.Size; break; case Tag.AnimationEvent: if (AnimationEvent == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AnimationEvent.Size; break; case Tag.MoodState: if (MoodState == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += MoodState.Size; break; case Tag.InitDebugConsoleVarMessage: if (InitDebugConsoleVarMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += InitDebugConsoleVarMessage.Size; break; case Tag.JsonDasLogMessage: if (JsonDasLogMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += JsonDasLogMessage.Size; break; case Tag.JsonDasLogAllSentMessage: if (JsonDasLogAllSentMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += JsonDasLogAllSentMessage.Size; break; case Tag.VerifyDebugConsoleFuncMessage: if (VerifyDebugConsoleFuncMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += VerifyDebugConsoleFuncMessage.Size; break; case Tag.VerifyDebugConsoleVarMessage: if (VerifyDebugConsoleVarMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += VerifyDebugConsoleVarMessage.Size; break; case Tag.DebugAppendConsoleLogLine: if (DebugAppendConsoleLogLine == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += DebugAppendConsoleLogLine.Size; break; case Tag.EngineErrorCodeMessage: if (EngineErrorCodeMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += EngineErrorCodeMessage.Size; break; case Tag.BehaviorTransition: if (BehaviorTransition == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += BehaviorTransition.Size; break; case Tag.OnboardingState: if (OnboardingState == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += OnboardingState.Size; break; case Tag.AudioBehaviorStackUpdate: if (AudioBehaviorStackUpdate == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += AudioBehaviorStackUpdate.Size; break; case Tag.RequiredEmptyMessage: if (RequiredEmptyMessage == null) { throw new System.InvalidOperationException("Messages may not have null members."); } result += RequiredEmptyMessage.Size; break; default: // Just tag size break; } return result; } } public static bool operator ==(MessageEngineToGame a, MessageEngineToGame b) { if (System.Object.ReferenceEquals(a, null)) { return System.Object.ReferenceEquals(b, null); } return a.Equals(b); } public static bool operator !=(MessageEngineToGame a, MessageEngineToGame b) { return !(a == b); } public override bool Equals(System.Object obj) { return this.Equals(obj as MessageEngineToGame); } public bool Equals(MessageEngineToGame 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