@staticmethod
    def cf_string_to_unicode(value):

        string_ptr = CoreFoundation.CFStringGetCStringPtr(
            value,
            kCFStringEncodingUTF8
        )
        string = ffi.string(string_ptr)
        if string is None:
            buffer = buffer_from_bytes(1024)
            result = CoreFoundation.CFStringGetCString(
                value,
                buffer,
                1024,
                kCFStringEncodingUTF8
            )
            if not result:
                raise OSError('Error copying C string from CFStringRef')
            string = byte_string_from_buffer(buffer)
        if string is not None:
            string = string.decode('utf-8')
        return string
Called periodically by the update timer to read data
dataset/ETHPy150Open wbond/oscrypto/oscrypto/_osx/_core_foundation_cffi.py/CFHelpers.cf_string_to_unicode--crossover with--dataset/ETHPy150Open mba7/SerialPort-RealTime-Data-Plotter/live_monitor.py/PlottingDataMonitor.read_serial_data