#include <stdio.h>#include "idl_export.h"#include "idl_request.h"
Go to the source code of this file.
Functions | |
| IDL_VPTR | gs_call (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_call_async (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_probe (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_cancel (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_wait (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_error_string (int argc, IDL_VPTR *argv) |
| IDL_VPTR | gs_get_last_error (int argc, IDL_VPTR *argv) |
| void | gridsolve (int argc, IDL_VPTR *argv) |
| void | gs_info (int argc, IDL_VPTR *argv) |
| void | gs_requests (int argc, IDL_VPTR *argv) |
| int | IDL_Load (void) |
| void gridsolve | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| IDL_VPTR gs_call | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |
Entry module of GridSolve interface for IDL
This is part of the IDL Client for GridSolve.

| IDL_VPTR gs_call_async | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| IDL_VPTR gs_cancel | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| IDL_VPTR gs_error_string | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| IDL_VPTR gs_get_last_error | ( | int | argc, | |
| IDL_VPTR * | argv_idl | |||
| ) |
Gets the last GridRPC error code that was generated. This includes successful calls, too.
| argc | -- the number of arguments | |
| argv_idl | -- the array of IDL arguments passed in. this should be empty. |
Definition at line 60 of file gs_error.c.
{
grpc_sessionid_t id;
grpc_error_t retval;
/* 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);
}
if(grpc_get_failed_sessionid(&id) != GRPC_NO_ERROR) {
IDL_Message(IDL_M_GENERIC, IDL_MSG_INFO,
"Error: could not get last failed session ID.");
return IDL_GettmpLong(0);
}
return IDL_GettmpLong(grpc_get_error(id));
}


| void gs_info | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| IDL_VPTR gs_probe | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| void gs_requests | ( | int | argc, | |
| IDL_VPTR * | argv_idl | |||
| ) |
Prints the request id and service name for all the currently outstanding GridRPC non-blocking requests.
| argc | -- the number of arguments | |
| argv_idl | -- the array of IDL arguments passed in |
Definition at line 42 of file idl_request.c.
{
int i;
if(argc == 0) {
for(i=0;i<MAX_GRPC_REQUESTS;i++) {
if(requests[i].gs_req_id != GS_IDL_NULL_ID) {
if(requests[i].pd)
printf("%d: %s\n", i, requests[i].pd->name);
else
printf("%d: Error: null problem description.\n", i);
}
}
}
else {
IDL_ENSURE_SCALAR(argv_idl[0]);
i = argv_idl[0]->value.l;
if((i < 0) || (i >= MAX_GRPC_REQUESTS)) {
IDL_Message(IDL_M_GENERIC,IDL_MSG_INFO, "Error: bad request id\n");
return;
}
if(requests[i].gs_req_id != GS_IDL_NULL_ID) {
if(requests[i].pd)
printf("%d: %s\n", i, requests[i].pd->name);
else
printf("%d: Error: null problem description.\n", i);
}
else
printf("%d: no request using this id\n", i);
}
return;
}

| IDL_VPTR gs_wait | ( | int | argc, | |
| IDL_VPTR * | argv | |||
| ) |

| int IDL_Load | ( | void | ) |
Loads all the GridSolve functions into the IDL environment.
Definition at line 36 of file gridsolve_module.c.
{
/* Definitions of GridSolve functions */
static IDL_SYSFUN_DEF2 function_addr[] = {
{{gs_call}, "GS_CALL", 1, IDL_MAXPARAMS, 0, 0},
{{gs_call_async}, "GS_CALL_ASYNC", 1, IDL_MAXPARAMS, 0, 0},
{{gs_probe}, "GS_PROBE", 1, 1, 0, 0},
{{gs_cancel}, "GS_CANCEL", 1, 1, 0, 0},
{{gs_wait}, "GS_WAIT", 1, 1, 0, 0},
{{gs_error_string}, "GS_ERROR_STRING", 1, 1, 0, 0},
{{gs_get_last_error}, "GS_GET_LAST_ERROR", 0, 0, 0, 0}
};
/* Definitions of GridSolve procedures */
static IDL_SYSFUN_DEF2 procedure_addr[] = {
{{(IDL_SYSRTN_GENERIC)gridsolve}, "GRIDSOLVE", 0, 0, 0, 0},
{{(IDL_SYSRTN_GENERIC)gs_info}, "GS_INFO", 1, 1, 0, 0},
{{(IDL_SYSRTN_GENERIC)gs_requests}, "GS_REQUESTS", 0, 1, 0, 0}
};
/* Register all GridSolve functions and procedures */
if(!IDL_SysRtnAdd(function_addr, TRUE, IDL_CARRAY_ELTS(function_addr)) ||
!IDL_SysRtnAdd(procedure_addr, FALSE, IDL_CARRAY_ELTS(procedure_addr)))
{
IDL_Message(IDL_M_GENERIC, IDL_MSG_RET, "Error adding GridSolve functions!");
return FALSE;
}
/* Initialize the request structures. */
gs_init_req();
return TRUE;
}

1.6.3-20100507