/// <summary> /// Initializes a new instance of the <see cref="FeatureStatusEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal FeatureStatusEventArgs(ExternalInterface.Event e) : base(e) { var featureStatus = e.TimeStampedStatus.Status.FeatureStatus; FeatureName = featureStatus.FeatureName; Source = featureStatus.Source; }
/// <summary> /// Initializes a new instance of the <see cref="CubeBatteryEventArgs" /> class. /// </summary> /// <param name="e">The event information.</param> internal CubeBatteryEventArgs(ExternalInterface.Event e) : base(e) { BatteryVolts = e.CubeBattery.BatteryVolts; Level = (CubeBatteryLevel)e.CubeBattery.Level; FactoryId = e.CubeBattery.FactoryId; TimeSinceLastReadingSec = e.CubeBattery.TimeSinceLastReadingSec; }
/// <summary> /// Initializes a new instance of the <see cref="CheckUpdateStatusEventArgs"/> class. /// </summary> /// <param name="e">The e.</param> internal CheckUpdateStatusEventArgs(ExternalInterface.Event e) : base(e) { Expected = e.CheckUpdateStatusResponse.Expected; Progress = e.CheckUpdateStatusResponse.Progress; UpdateStatus = (UpdateStatus)e.CheckUpdateStatusResponse.UpdateStatus; UpdateVersion = e.CheckUpdateStatusResponse.UpdateVersion; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObjectMovedEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObjectMovedEventArgs(ExternalInterface.Event e) : base(e) { var objectMoved = e.ObjectEvent.ObjectMoved; ObjectId = (int)objectMoved.ObjectId; RobotTimestamp = objectMoved.Timestamp; }
/// <summary> /// Initializes a new instance of the <see cref="AttentionTransferEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal AttentionTransferEventArgs(ExternalInterface.Event e) : base(e) { var attentionTransfer = e.AttentionTransfer; SecondsAgo = attentionTransfer.SecondsAgo; Reason = attentionTransfer.Reason; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObjectStoppedMovingEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObjectStoppedMovingEventArgs(ExternalInterface.Event e) : base(e) { var objectStoppedMoving = e.ObjectEvent.ObjectStoppedMoving; ObjectId = (int)objectStoppedMoving.ObjectId; RobotTimestamp = objectStoppedMoving.Timestamp; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObjectUpAxisChangedEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObjectUpAxisChangedEventArgs(ExternalInterface.Event e) : base(e) { var objectUpAxisChanged = e.ObjectEvent.ObjectUpAxisChanged; ObjectId = (int)objectUpAxisChanged.ObjectId; RobotTimestamp = objectUpAxisChanged.Timestamp; UpAxis = (UpAxis)(int)objectUpAxisChanged.UpAxis; }
/// <summary> /// Initializes a new instance of the <see cref="FaceEnrollmentCompletedEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal FaceEnrollmentCompletedEventArgs(ExternalInterface.Event e) : base(e) { var faceEnrollmentCompleted = e.TimeStampedStatus.Status.FaceEnrollmentCompleted; FaceId = faceEnrollmentCompleted.FaceId; Name = faceEnrollmentCompleted.Name; Result = (FaceEnrollmentResult)faceEnrollmentCompleted.Result; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObjectConnectionStateEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObjectConnectionStateEventArgs(ExternalInterface.Event e) : base(e) { var objectConnectionState = e.ObjectEvent.ObjectConnectionState; Connected = objectConnectionState.Connected; FactoryId = objectConnectionState.FactoryId; ObjectId = (int)objectConnectionState.ObjectId; ObjectType = objectConnectionState.ObjectType.ToSdkObjectType(); CustomObjectType = objectConnectionState.ObjectType.ToSdkCustomObjectType(); }
/// <summary> /// Initializes a new instance of the <see cref="StimulationInfoEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal StimulationInfoEventArgs(ExternalInterface.Event e) : base(e) { var stimulationInfo = e.StimulationInfo; Acceleration = stimulationInfo.Accel; EmotionEvents = stimulationInfo.EmotionEvents.ToList().AsReadOnly(); MaxValue = stimulationInfo.MaxValue; MinValue = stimulationInfo.MinValue; Value = stimulationInfo.Value; ValueBeforeEvent = stimulationInfo.ValueBeforeEvent; Velocity = stimulationInfo.Velocity; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObservedObjectEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObservedObjectEventArgs(ExternalInterface.Event e) : base(e) { var robotObservedObject = e.ObjectEvent.RobotObservedObject; ImageRect = new ImageRect(robotObservedObject.ImgRect); IsActive = robotObservedObject.IsActive != 0; ObjectId = robotObservedObject.ObjectId; ObjectType = robotObservedObject.ObjectType.ToSdkObjectType(); CustomObjectType = robotObservedObject.ObjectType.ToSdkCustomObjectType(); Pose = new Pose(robotObservedObject.Pose); RobotTimestamp = robotObservedObject.Timestamp; TopFaceOrientationRad = robotObservedObject.TopFaceOrientationRad; }
/// <summary> /// Initializes a new instance of the <see cref="RobotObservedFaceEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotObservedFaceEventArgs(ExternalInterface.Event e) : base(e) { var robotObservedFace = e.RobotObservedFace; Expression = (FacialExpression)robotObservedFace.Expression; ExpressionValues = new ReadOnlyCollection <uint>(robotObservedFace.ExpressionValues); FaceId = robotObservedFace.FaceId; ImageRect = new ImageRect(robotObservedFace.ImgRect); LeftEye = robotObservedFace.LeftEye.Select(r => new Point(r)).ToList().AsReadOnly(); Mouth = robotObservedFace.Mouth.Select(r => new Point(r)).ToList().AsReadOnly(); Name = robotObservedFace.Name; Nose = robotObservedFace.Nose.Select(r => new Point(r)).ToList().AsReadOnly(); Pose = new Pose(robotObservedFace.Pose); RightEye = robotObservedFace.RightEye.Select(r => new Point(r)).ToList().AsReadOnly(); RobotTimestamp = robotObservedFace.Timestamp; }
/// <summary> /// Initializes a new instance of the <see cref="RobotStateEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotStateEventArgs(ExternalInterface.Event e) : base(e) { var robotState = e.RobotState; Acceleration = new Acceleration(robotState.Accel); CarryingObjectId = robotState.CarryingObjectId; CarryingObjectOnTopId = robotState.CarryingObjectOnTopId; Gyro = new AngularVelocity(robotState.Gyro); HeadAngleRad = robotState.HeadAngleRad; HeadTrackingObjectId = robotState.HeadTrackingObjectId; LastImageTimestamp = robotState.LastImageTimeStamp; LeftWheelSpeedMmps = robotState.LeftWheelSpeedMmps; LiftHeightMm = robotState.LiftHeightMm; LocalizedToObjectId = robotState.LocalizedToObjectId; Pose = new Pose(robotState.Pose); PoseAngleRad = robotState.PoseAngleRad; PosePitchRad = robotState.PosePitchRad; Proximity = new ProximitySensorData(robotState.ProxData); RightWheelSpeedMmps = robotState.RightWheelSpeedMmps; Status = new RobotStatus(robotState.Status); Touch = new TouchSensorData(robotState.TouchData); }
/// <summary> /// Initializes a new instance of the <see cref="RobotObservedMotionEventArgs"/> class. /// </summary> /// <param name="e">The e.</param> internal RobotObservedMotionEventArgs(ExternalInterface.Event e) : base(e) { BottomImgArea = e.RobotObservedMotion.BottomImgArea; BottomImgX = e.RobotObservedMotion.BottomImgX; BottomImgY = e.RobotObservedMotion.BottomImgY; GroundArea = e.RobotObservedMotion.GroundArea; GroundX = e.RobotObservedMotion.GroundX; GroundY = e.RobotObservedMotion.GroundY; ImgArea = e.RobotObservedMotion.ImgArea; ImgX = e.RobotObservedMotion.ImgX; ImgY = e.RobotObservedMotion.ImgY; LeftImgArea = e.RobotObservedMotion.LeftImgArea; LeftImgX = e.RobotObservedMotion.LeftImgX; LeftImgY = e.RobotObservedMotion.LeftImgY; RightImgArea = e.RobotObservedMotion.RightImgArea; RightImgX = e.RobotObservedMotion.RightImgX; RightImgY = e.RobotObservedMotion.RightImgY; TopImgArea = e.RobotObservedMotion.TopImgArea; TopImgX = e.RobotObservedMotion.TopImgX; TopImgY = e.RobotObservedMotion.TopImgY; Timestamp = e.RobotObservedMotion.Timestamp; }
/// <summary> /// Initializes a new instance of the <see cref="WakeWordEventArgs" /> class. /// </summary> /// <param name="e">The event info.</param> internal WakeWordEventArgs(ExternalInterface.Event e) : base(e) { WakeWordEventType = (WakeWordEventType)e.WakeWord.WakeWordTypeCase; }
/// <summary> /// Initializes a new instance of the <see cref="MirrorModeDisabledEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal MirrorModeDisabledEventArgs(ExternalInterface.Event e) : base(e) { }
/// <summary> /// Initializes a new instance of the <see cref="VisionModesAutoDisabledEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal VisionModesAutoDisabledEventArgs(ExternalInterface.Event e) : base(e) { }
/// <summary> /// Initializes a new instance of the <see cref="KeepAliveEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal KeepAliveEventArgs(ExternalInterface.Event e) : base(e) { }
/// <summary> /// Initializes a new instance of the <see cref="TimestampedStatusEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal TimestampedStatusEventArgs(ExternalInterface.Event e) : base(e) { StatusType = (StatusType)e.TimeStampedStatus.Status.StatusTypeCase; Timestamp = DateTimeOffset.FromUnixTimeSeconds(e.TimeStampedStatus.TimestampUtc); }
/// <summary> /// Initializes a new instance of the <see cref="WakeWordEndEventArgs" /> class. /// </summary> /// <param name="e">The event.</param> internal WakeWordEndEventArgs(ExternalInterface.Event e) : base(e) { IntentHeard = e.WakeWord.WakeWordEnd.IntentHeard; IntentJson = e.WakeWord.WakeWordEnd.IntentJson; }
/// <summary> /// Initializes a new instance of the <see cref="UserIntentEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal UserIntentEventArgs(ExternalInterface.Event e) : base(e) { IntentData = e.UserIntent.JsonData; Intent = Intents.DefaultIntents.GetIntentBy(Types.IntentData.Property.SdkId, e.UserIntent.IntentId); }
/// <summary> /// Initializes a new instance of the <see cref="AlexaAuthEventArgs"/> class. /// </summary> /// <param name="e">The e.</param> internal AlexaAuthEventArgs(ExternalInterface.Event e) : base(e) { AuthState = (AlexaAuthState)e.AlexaAuthEvent.AuthState; Extra = e.AlexaAuthEvent.Extra; }
/// <summary> /// Initializes a new instance of the <see cref="FaceScanStartedEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal FaceScanStartedEventArgs(ExternalInterface.Event e) : base(e) { }
/// <summary> /// Initializes a new instance of the <see cref="UserIntentEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal UserIntentEventArgs(ExternalInterface.Event e) : base(e) { Intent = (UserIntent)e.UserIntent.IntentId; IntentData = e.UserIntent.JsonData; }
/// <summary> /// Initializes a new instance of the <see cref="RobotChangedObservedFaceIdEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal RobotChangedObservedFaceIdEventArgs(ExternalInterface.Event e) : base(e) { NewId = e.RobotChangedObservedFaceId.NewId; OldId = e.RobotChangedObservedFaceId.OldId; }
/// <summary> /// Initializes a new instance of the <see cref="CameraSettingsUpdateEventArgs"/> class. /// </summary> /// <param name="e">The e.</param> internal CameraSettingsUpdateEventArgs(ExternalInterface.Event e) : base(e) { AutoExposureEnabled = e.CameraSettingsUpdate.AutoExposureEnabled; ExposureMs = e.CameraSettingsUpdate.ExposureMs; Gain = e.CameraSettingsUpdate.Gain; }
/// <summary> /// Initializes a new instance of the <see cref="WakeWordEndEventArgs" /> class. /// </summary> /// <param name="e">The event.</param> internal WakeWordEndEventArgs(ExternalInterface.Event e) : base(e) { IntentHeard = e.WakeWord.WakeWordEnd.IntentHeard; IntentJson = e.WakeWord.WakeWordEnd.IntentJson; Intent = ParseUserIntent(e.WakeWord.WakeWordEnd.IntentJson); }
/// <summary> /// Initializes a new instance of the <see cref="CubeConnectionLostEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal CubeConnectionLostEventArgs(ExternalInterface.Event e) : base(e) { }
/// <summary> /// Initializes a new instance of the <see cref="PhotoTakenEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal PhotoTakenEventArgs(ExternalInterface.Event e) : base(e) { PhotoId = e.PhotoTaken.PhotoId; }
/// <summary> /// Initializes a new instance of the <see cref="FaceScanCompleteEventArgs"/> class. /// </summary> /// <param name="e">The event.</param> internal FaceScanCompleteEventArgs(ExternalInterface.Event e) : base(e) { }