def FetchUniverses(self, callback): """Fetch a list of universes from the server Args: callback: The function to call once complete, takes two arguments, a RequestStatus object and a list of Universe objects. """ controller = SimpleRpcController() request = Ola_pb2.UniverseInfoRequest() done = lambda x, y: self._UniverseInfoComplete(callback, x, y) self._stub.GetUniverseInfo(controller, request, done)
def FetchDmx(self, universe, callback): """Fetch a list of universes from the server Args: universe: the universe to fetch the data for callback: The function to call once complete, takes three arguments, a RequestStatus object, a universe number and a list of dmx data. """ controller = SimpleRpcController() request = Ola_pb2.UniverseInfoRequest() request.universe = universe done = lambda x, y: self._GetDmxComplete(callback, x, y) self._stub.GetDmx(controller, request, done)