Esempio n. 1
0
        public static GattCharacteristic1Properties CreateGattCharacteristic(GattCharacteristicDescription characteristic)
        {
            var characteristicProperties = new GattCharacteristic1Properties {
                UUID = characteristic.UUID, Flags = CharacteristicFlagConverter.ConvertFlags(characteristic.Flags)
            };

            return(characteristicProperties);
        }
Esempio n. 2
0
        public GattCharacteristic AddCharacteristic(GattCharacteristic1Properties characteristic, ICharacteristicSource characteristicSource)
        {
            characteristic.Service = ObjectPath;
            var gattCharacteristic = new GattCharacteristic(NextCharacteristicPath(), characteristic, characteristicSource);

            _Characteristics.Add(gattCharacteristic);

            Properties.Characteristics = Properties.Characteristics.Append(NextCharacteristicPath()).ToArray();

            return(gattCharacteristic);
        }