def dbrDirectory(dbr_hdl, match_template, group, count, size, ret_size): tbuf = createBuf('char[]', size) retval = libdatabroker.dbrDirectory(dbr_hdl, match_template, group, count, ffi.from_buffer(tbuf), ffi.cast('const size_t', size), ret_size) result_buffer = (tbuf[0:ret_size[0]].split('\n')) return retval, result_buffer
def directory(dbr_hdl, match_template, group, count, size): tbuf = createBuf('char[]', size) rsize = ffi.new('int64_t*') retval = libdatabroker.dbrDirectory(dbr_hdl, match_template.encode(), group.encode(), count, ffi.from_buffer(tbuf), ffi.cast('const size_t', size), rsize) result_buffer = (tbuf[0:rsize[0]].decode().split('\n')) return result_buffer, rsize[0], retval