コード例 #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());
        }
コード例 #4
0
		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
ファイル: ProtocolInfoType.cs プロジェクト: jedinja/monomyo
		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
ファイル: ProtocolInfoType.cs プロジェクト: tyounsi/monomyo
        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
ファイル: BleConnector.cs プロジェクト: tyounsi/monomyo
        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
ファイル: BleConnector.cs プロジェクト: jedinja/monomyo
		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 ());
		}