32 lines
857 B
C#
32 lines
857 B
C#
using Assets.Scripts.Ble;
|
|
using Assets.Scripts.Devices.Ble.Interfaces;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace Assets.Scripts.Devices.Ble.Characteristic
|
|
{
|
|
public class ModelNumberCharacteristic : ICharacteristic
|
|
{
|
|
public Guid Uuid => ServiceUuids.Characteristics.ModelNumber;
|
|
|
|
public Guid ServiceUuid => ServiceUuids.Get(ServiceUuids.DeviceInformation).IdGuid;
|
|
|
|
public bool IsOptional => true;
|
|
|
|
public void HandleAttributeReceived(byte[] data)
|
|
{
|
|
//throw new NotImplementedException();
|
|
Debug.Log($"model number:\t{ Encoding.UTF8.GetString(data) }");
|
|
}
|
|
|
|
public void SetUnavailable()
|
|
{
|
|
//throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|