Functions

gs_probe.c File Reference

#include <stdio.h>
#include "idl_export.h"
#include "grpc.h"
Include dependency graph for gs_probe.c:

Go to the source code of this file.

Functions

IDL_VPTR gs_probe (int argc, IDL_VPTR *argv_idl)

Function Documentation

IDL_VPTR gs_probe ( int  argc,
IDL_VPTR *  argv_idl 
)

The implementation of gs_probe() call. This determines whether a previously submitted request has completed yet.

This is part of the IDL Client for GridSolve. GridRPC probe call

Parameters:
argc -- the number of arguments
argv_idl -- the array of IDL arguments passed in. this should contain one argument: the request ID of the job to probe.
Returns:
GridRPC return status of the probe.

Definition at line 26 of file gs_probe.c.

{
  grpc_error_t retval;
  int req_id, ret;

  IDL_ENSURE_SCALAR(argv_idl[0]);

  req_id = IDL_LongScalar(argv_idl[0]);

  /* Initialize GridRPC system */
  retval = grpc_initialize(NULL);
  if((retval != GRPC_NO_ERROR) && (retval != GRPC_ALREADY_INITIALIZED)) {
    IDL_Message(IDL_M_GENERIC, IDL_MSG_INFO, "Error: cannot initialize!");
    return IDL_GettmpLong(retval);
  }

  IDL_TimerBlock(IDL_TRUE);
  ret = (int) grpc_probe((grpc_sessionid_t) req_id);
  IDL_TimerBlock(IDL_FALSE);

  return IDL_GettmpLong(ret);
}

Here is the call graph for this function: