Ejemplo n.º 1
0
        public DeviceInformationService()
            : base()
        {
            BleCharacteristic systemIdCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["SystemId"], false, true);

            BleCharacteristic modelNumberCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["ModelNumber"], false, true);

            BleCharacteristic serialNumberCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["SerialNumber"], false, true);

            BleCharacteristic firmwareRevisionCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["FirmwareRevision"], false, true);

            BleCharacteristic hardwareRevisionCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["HardwareRevision"], false, true);

            BleCharacteristic softwareRevisionCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["SoftwareRevision"], false, true);

            BleCharacteristic manufacturerNameCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["DeviceInfoService"], Uuids.UuidDict["ManufacturerName"], false, true);

            BleCharacteristics.Add("SystemId", systemIdCharacteristic);
            BleCharacteristics.Add("ModelNumber", modelNumberCharacteristic);
            BleCharacteristics.Add("SerialNumber", serialNumberCharacteristic);
            BleCharacteristics.Add("FirmwareRevision", firmwareRevisionCharacteristic);
            BleCharacteristics.Add("HardwareRevision", hardwareRevisionCharacteristic);
            BleCharacteristics.Add("SoftwareRevision", softwareRevisionCharacteristic);
            BleCharacteristics.Add("ManufacturerName", manufacturerNameCharacteristic);
        }
Ejemplo n.º 2
0
        public Movement() : base()
        {
            BleCharacteristic movementCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["MovementService"], Uuids.UuidDict["MovementData"], true);

            BleCharacteristic movementConfig =
                new BleCharacteristic(Uuids.UuidDict["MovementService"], Uuids.UuidDict["MovementConfig"]);

            BleCharacteristic movementPeriod =
                new BleCharacteristic(Uuids.UuidDict["MovementService"], Uuids.UuidDict["MovementPeriod"]);

            movementCharacteristic.BleCharacteristicChanged += OnBleMovementCharacteristicChanged;

            BleCharacteristics.Add("MovementData", movementCharacteristic);
            BleCharacteristics.Add("MovementConfig", movementConfig);
            BleCharacteristics.Add("MovementPeriod", movementPeriod);
        }
Ejemplo n.º 3
0
        public Humidity() : base()
        {
            BleCharacteristic humidityCharacteristic =
                new BleCharacteristic(Uuids.UuidDict["HumidityService"], Uuids.UuidDict["HumidityData"], true);

            BleCharacteristic humidityConfig =
                new BleCharacteristic(Uuids.UuidDict["HumidityService"], Uuids.UuidDict["HumidityConfig"]);

            BleCharacteristic humidityPeriod =
                new BleCharacteristic(Uuids.UuidDict["HumidityService"], Uuids.UuidDict["HumidityPeriod"]);

            humidityCharacteristic.BleCharacteristicChanged += OnBleHumidityCharacteristicChanged;

            BleCharacteristics.Add("HumidityData", humidityCharacteristic);
            BleCharacteristics.Add("HumidityConfig", humidityConfig);
            BleCharacteristics.Add("humidityPeriod", humidityPeriod);
        }
Ejemplo n.º 4
0
        public IRTemperature()
            : base()
        {
            BleCharacteristic temperatureCharacteristics =
                new BleCharacteristic(Uuids.UuidDict["IRTemperatureService"], Uuids.UuidDict["IRTemperatureData"], true);

            BleCharacteristic temperatureConfig =
                new BleCharacteristic(Uuids.UuidDict["IRTemperatureService"], Uuids.UuidDict["IRTemperatureConfig"]);

            BleCharacteristic temperaturePeriod =
                new BleCharacteristic(Uuids.UuidDict["IRTemperatureService"], Uuids.UuidDict["IRTemperaturePeriod"]);

            temperatureCharacteristics.BleCharacteristicChanged += OnBleIRTemperatureCharacteristicsChanged;

            BleCharacteristics.Add("IRTemperatureData", temperatureCharacteristics);
            BleCharacteristics.Add("IRTemperatureConfig", temperatureConfig);
            BleCharacteristics.Add("IRTemperaturePeriod", temperaturePeriod);
        }
Ejemplo n.º 5
0
        public BarometricPressure()
            : base()
        {
            BleCharacteristic barometerCharacteristics =
                new BleCharacteristic(Uuids.UuidDict["BarometerService"], Uuids.UuidDict["BarometerData"], true);

            BleCharacteristic barometerConfig =
                new BleCharacteristic(Uuids.UuidDict["BarometerService"], Uuids.UuidDict["BarometerConfig"]);

            BleCharacteristic barometerPeriod =
                new BleCharacteristic(Uuids.UuidDict["BarometerService"], Uuids.UuidDict["BarometerPeriod"]);

            barometerCharacteristics.BleCharacteristicChanged += OnBleBarometerCharacteristicsChanged;

            BleCharacteristics.Add("BarometerData", barometerCharacteristics);
            BleCharacteristics.Add("BarometerConfig", barometerConfig);
            BleCharacteristics.Add("BarometerPeriod", barometerPeriod);
        }