(uuid)
return UUIDType.nonstandard
Checks if the UUID is a custom 128-bit UUID or a GATT characteristic
        descriptor UUID.

        uuid -- the UUID as a bytearray.

        Return a UUIDType.
Checks if the UUID is a custom 128-bit UUID or a GATT characteristic
        descriptor UUID.
Checks if the UUID is a custom 128 - bit UUID or a GATT characteristic descriptor UUID .
def _get_uuid_type(uuid):
        """
        Checks if the UUID is a custom 128-bit UUID or a GATT characteristic
        descriptor UUID.

        uuid -- the UUID as a bytearray.

        Return a UUIDType.
        """
        if len(uuid) == 16:  # 128-bit --> 16 byte
            return UUIDType.custom
        if uuid in constants.gatt_service_uuid.values():
            return UUIDType.service
        if uuid in constants.gatt_attribute_type_uuid.values():
            return UUIDType.attribute
        if uuid in constants.gatt_characteristic_descriptor_uuid.values():
            return UUIDType.descriptor
        if uuid in constants.gatt_characteristic_type_uuid.values():
            return UUIDType.characteristic

        log.warn("Unrecognized 4 byte UUID %s", hexlify(uuid))
        return UUIDType.nonstandard
def _get_uuid_type ( uuid ) : if len ( uuid ) == 16 : # 128-bit --> 16 byte return UUIDType . custom if uuid in constants . gatt_service_uuid . values ( ) : return UUIDType . service if uuid in constants . gatt_attribute_type_uuid . values ( ) : return UUIDType . attribute if uuid in constants . gatt_characteristic_descriptor_uuid . values ( ) : return UUIDType . descriptor if uuid in constants . gatt_characteristic_type_uuid . values ( ) : return UUIDType . characteristic log . warn ( "Unrecognized 4 byte UUID %s" , hexlify ( uuid ) ) return UUIDType . nonstandard