private void ProcessImuDataNotification(NotificationCarrier notification) { ProtocolImuDataType imuData = new ProtocolImuDataType(); imuData.DeSerialize(notification.CharacteristicValue); OnImuDataReceived(this, imuData.OrientationW, imuData.OrientationX, imuData.OrientationY, imuData.OrientationZ, imuData.Accelerometer, imuData.Gyroscope, notification.Timestamp); }
private void ProcessEmgDataNotification(NotificationCarrier notification) { byte sensorNumber = (byte)(notification.CharacteristicUUID.ToArray()[13] - 1); ProtocolEmgDataType emgData = new ProtocolEmgDataType(); emgData.DeSerialize(notification.CharacteristicValue); OnEmgDataReceived(this, emgData.EmgData.ToArray(), sensorNumber, notification.Timestamp); }
private void ProcessMotionEventNotification(NotificationCarrier notification) { ProtocolMotionEventType motionEvent = new ProtocolMotionEventType(); motionEvent.DeSerialize(notification.CharacteristicValue); switch (motionEvent.Event) { case ProtocolMotionEvent.Tap: { OnTapDetected(this, motionEvent.TapDirection, motionEvent.TapCount, notification.Timestamp); break; } } }
private void ProcessClassifierEventNotification(NotificationCarrier notification) { ProtocolClassifierEventType classifierEvent = new ProtocolClassifierEventType(); classifierEvent.DeSerialize(notification.CharacteristicValue); switch (classifierEvent.Event) { case ProtocolClassifierEvent.ArmSynced: { OnArmSynced(this, (Arm)classifierEvent.Arm, (BraceletDirection)classifierEvent.Direction, notification.Timestamp); break; } case ProtocolClassifierEvent.ArmUnsynced: { OnArmUnsynced(this, notification.Timestamp); break; } case ProtocolClassifierEvent.SyncFailed: { OnSyncFailed(this, notification.Timestamp); break; } case ProtocolClassifierEvent.Locked: { OnLocked(this, notification.Timestamp); break; } case ProtocolClassifierEvent.Unlocked: { OnUnLocked(this, notification.Timestamp); break; } case ProtocolClassifierEvent.Pose: { OnPoseChanged(this, (Pose)classifierEvent.Pose, notification.Timestamp); break; } } }
private void ProcessClassifierEventNotification (NotificationCarrier notification) { ProtocolClassifierEventType classifierEvent = new ProtocolClassifierEventType (); classifierEvent.DeSerialize (notification.CharacteristicValue); switch (classifierEvent.Event) { case ProtocolClassifierEvent.ArmSynced: { OnArmSynced (this, (Arm) classifierEvent.Arm, (BraceletDirection) classifierEvent.Direction, notification.Timestamp); break; } case ProtocolClassifierEvent.ArmUnsynced: { OnArmUnsynced (this, notification.Timestamp); break; } case ProtocolClassifierEvent.SyncFailed: { OnSyncFailed (this, notification.Timestamp); break; } case ProtocolClassifierEvent.Locked: { OnLocked (this, notification.Timestamp); break; } case ProtocolClassifierEvent.Unlocked: { OnUnLocked (this, notification.Timestamp); break; } case ProtocolClassifierEvent.Pose: { OnPoseChanged (this, (Pose) classifierEvent.Pose, notification.Timestamp); break; } } }
private void ProcessMotionEventNotification (NotificationCarrier notification) { ProtocolMotionEventType motionEvent = new ProtocolMotionEventType (); motionEvent.DeSerialize (notification.CharacteristicValue); switch (motionEvent.Event) { case ProtocolMotionEvent.Tap: { OnTapDetected (this, motionEvent.TapDirection, motionEvent.TapCount, notification.Timestamp); break; } } }
private void ProcessImuDataNotification (NotificationCarrier notification) { ProtocolImuDataType imuData = new ProtocolImuDataType (); imuData.DeSerialize (notification.CharacteristicValue); OnImuDataReceived (this, imuData.OrientationW, imuData.OrientationX, imuData.OrientationY, imuData.OrientationZ, imuData.Accelerometer, imuData.Gyroscope, notification.Timestamp); }
private void ProcessEmgDataNotification (NotificationCarrier notification) { byte sensorNumber = (byte) (notification.CharacteristicUUID.ToArray ()[13] - 1); ProtocolEmgDataType emgData = new ProtocolEmgDataType (); emgData.DeSerialize (notification.CharacteristicValue); OnEmgDataReceived (this, emgData.EmgData.ToArray (), sensorNumber, notification.Timestamp); }
private void ProcessBatteryNotification (NotificationCarrier notification) { BatteryLevel level = new BatteryLevel (notification.CharacteristicValue); OnBatteryChange (this, level, notification.Timestamp); }
private void ProcessBatteryNotification(NotificationCarrier notification) { BatteryLevel level = new BatteryLevel(notification.CharacteristicValue); OnBatteryChange(this, level, notification.Timestamp); }