def METHOD_NAME(self, channel, distance):
    error_code = c_int()
    error_message = c_char_p()
    error_data = c_char_p()
    self._controller_sys.METHOD_NAME(channel, c_double(distance), byref(error_code), byref(error_message), byref(error_data))
    error_code = error_code.value
    if error_code != 0:
        error_message = "" if error_message.value is None else error_message.value.decode("utf-8")
        error_data = "" if error_data.value is None else error_data.value.decode("utf-8")
        raise RpcError(error_code, error_message, error_data)