Пример #1
0
        public void DeSerialize(Bytes bytes)
        {
            using (ByteDeserializer bd = new ByteDeserializer(bytes))
            {
                Event = bd.DeSerializeClassifierEvent();

                switch (Event)
                {
                case ProtocolClassifierEvent.ArmSynced:
                {
                    Arm       = bd.DeSerializeArm();
                    Direction = bd.DeSerializeBraceletDirection();
                    break;
                }

                case ProtocolClassifierEvent.Pose:
                {
                    Pose = bd.DeSerializePose();
                    break;
                }

                case ProtocolClassifierEvent.SyncFailed:
                {
                    SyncResult = bd.DeSerializeSyncResult();
                    break;
                }
                }
            }
        }
		public void DeSerialize (Bytes bytes)
		{
			using (ByteDeserializer bd = new ByteDeserializer (bytes))
			{
				Event = bd.DeSerializeClassifierEvent ();

				switch (Event)
				{
				case ProtocolClassifierEvent.ArmSynced:
					{
						Arm = bd.DeSerializeArm ();
						Direction = bd.DeSerializeBraceletDirection ();
						break;
					}
				case ProtocolClassifierEvent.Pose:
					{
						Pose = bd.DeSerializePose ();
						break;
					}
				case ProtocolClassifierEvent.SyncFailed:
					{
						SyncResult = bd.DeSerializeSyncResult ();
						break;
					}
				}
			}
		}
Пример #3
0
		public void Serialize (ProtocolSyncResult sync)
		{
			Serialize ((byte) sync);
		}
Пример #4
0
 public void Serialize(ProtocolSyncResult sync)
 {
     Serialize((byte)sync);
 }