コード例 #1
0
        public WristbandCharacteristic GetCharacteristicByTag(string peripheralName, WristbandCharacteristicTag characteristicTag)
        {
            WristbandProfile profile = GetProfileByName(peripheralName);

            if (profile == null)
            {
                return(null);
            }

            foreach (WristbandCharacteristic characteristic in profile.characteristics)
            {
                if (characteristic.tag == characteristicTag)
                {
                    return(characteristic);
                }
            }

            //Debug.LogError("GetCharacteristicByTag ERROR :: characteristic tag '"+characteristicTag.ToString()+"' not found!");
            throw new WristbandServiceException("GetProfileByName ERROR :: profile '" + peripheralName + "' not found!");
            return(null);
        }
コード例 #2
0
 public WristbandCharacteristic GetCharacteristicByTag(string peripheralName, WristbandCharacteristicTag characteristicTag)
 {
     return(GetCharacteristicByTag_Mock());
 }
コード例 #3
0
 public WristbandCharacteristic(WristbandCharacteristicTag tag, string id)
 {
     this.tag = tag;
     this.id  = id;
 }
コード例 #4
0
 private WristbandCharacteristic getCharacteristicByTag(WristbandCharacteristicTag tag)
 {
     return(services.GetCharacteristicByTag(connectedWristbandProfile.peripheralName, tag));
 }