示例#1
0
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			bs.Serialize (EmgData);

			return bs.GetBuffer ();
		}
示例#2
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            bs.Serialize(EmgData);

            return(bs.GetBuffer());
        }
示例#3
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            bs.Serialize(Event);
            bs.Serialize(TapDirection);
            bs.Serialize(TapCount);

            return(bs.GetBuffer());
        }
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			bs.Serialize (Event);
			bs.Serialize (TapDirection);
			bs.Serialize (TapCount);

			return bs.GetBuffer ();
		}
示例#5
0
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			bs.Serialize (Command);
			bs.Serialize (PayloadSize);

			this.Serialize (bs);

			return bs.GetBuffer ();
		}
示例#6
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            bs.Serialize(Command);
            bs.Serialize(PayloadSize);

            this.Serialize(bs);

            return(bs.GetBuffer());
        }
示例#7
0
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			// ORDER IS MANDATORY
			bs.Serialize (Major);
			bs.Serialize (Minor);
			bs.Serialize (Patch);
			bs.Serialize (HardwareRevision);

			return bs.GetBuffer ();
		}
示例#8
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            // ORDER IS MANDATORY
            bs.Serialize(Major);
            bs.Serialize(Minor);
            bs.Serialize(Patch);
            bs.Serialize(HardwareRevision);

            return(bs.GetBuffer());
        }
示例#9
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            // ORDER IS MANDATORY
            bs.Serialize(OrientationW);
            bs.Serialize(OrientationX);
            bs.Serialize(OrientationY);
            bs.Serialize(OrientationZ);
            bs.Serialize(Accelerometer);
            bs.Serialize(Gyroscope);

            return(bs.GetBuffer());
        }
示例#10
0
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			// ORDER IS MANDATORY
			bs.Serialize (OrientationW);
			bs.Serialize (OrientationX);
			bs.Serialize (OrientationY);
			bs.Serialize (OrientationZ);
			bs.Serialize (Accelerometer);
			bs.Serialize (Gyroscope);

			return bs.GetBuffer ();
		}
示例#11
0
		public Bytes Serialize ()
		{
			ByteSerializer bs = new ByteSerializer ();

			// ORDER IS MANDATORY
			bs.Serialize (SerialNumber);
			bs.Serialize (UnlockPose);
			bs.Serialize (ActiveClassifierType);
			bs.Serialize (ActiveClassifierIndex);
			bs.Serialize (HasCustomClassifier);
			bs.Serialize (StreamIndicating);
			bs.Serialize (Sku);
			bs.Serialize (Reserved);

			return bs.GetBuffer ();
		}
示例#12
0
        public Bytes Serialize()
        {
            ByteSerializer bs = new ByteSerializer();

            // ORDER IS MANDATORY
            bs.Serialize(SerialNumber);
            bs.Serialize(UnlockPose);
            bs.Serialize(ActiveClassifierType);
            bs.Serialize(ActiveClassifierIndex);
            bs.Serialize(HasCustomClassifier);
            bs.Serialize(StreamIndicating);
            bs.Serialize(Sku);
            bs.Serialize(Reserved);

            return(bs.GetBuffer());
        }
示例#13
0
        public void WriteClientCharacteristicConfiguration(Bytes uuid, BleCCCValue value)
        {
            BlePeripheralCharacteristic characteristic = this.PeripheralMap.FindCharacteristicByUUID(uuid);

            if (!characteristic.HasCCC)
            {
                throw new ArgumentException($"Client characteristic {uuid} doesn't have a configuration attribute!");
            }

            ByteSerializer bs = new ByteSerializer();

            bs.Serialize(value);

            ushort attrHandle = characteristic.HandleCCC;

            this.WriteAttribute(attrHandle, bs.GetBuffer());
        }
示例#14
0
		public void WriteClientCharacteristicConfiguration (Bytes uuid, BleCCCValue value)
		{
			BlePeripheralCharacteristic characteristic = this.PeripheralMap.FindCharacteristicByUUID (uuid);

			if (!characteristic.HasCCC)
			{
				throw new ArgumentException ($"Client characteristic {uuid} doesn't have a configuration attribute!");
			}

			ByteSerializer bs = new ByteSerializer ();
			bs.Serialize (value);

			ushort attrHandle = characteristic.HandleCCC;

			this.WriteAttribute (attrHandle, bs.GetBuffer ());
		}