public QueryParams(IEnumerable <GattDeviceService> services, Guid serviceGuid, SensorData sensorData) { Services = services; ServiceGuid = serviceGuid; SensorData = sensorData; }
private void OnFirmware(byte[] bytes, SensorData sensorData) { sensorData.Battery = Convert.ToInt32(bytes[0]); sensorData.Verison = Encoding.ASCII.GetString(bytes, 2, 5); }
private void OnCommand(byte[] data, SensorData sensorData) { }
private void OnDeviceName(byte[] bytes, SensorData sensorData) { sensorData.Name = Encoding.ASCII.GetString(bytes, 0, bytes.Length); }
private void OnSerial(byte[] bytes, SensorData sensorData) { sensorData.SerialNumber = BitConverter.ToString(bytes).Replace("-", string.Empty);; }