This library contains the set of functions for server-side RPC function registration and sending results. Part of the server-side RPC library.
- Author
- Victor Rodrigues (CERN, BE-ICS-SDS)
void fwRPC_registerFunction |
( |
string |
funcName, |
|
|
string |
stub, |
|
|
string |
lib, |
|
|
int |
timeout = -1 , |
|
|
dyn_int |
paramType = makeDynInt(ANYTYPE_VAR) , |
|
|
bool |
exclusive = false |
|
) |
| |
Register a function with the RPC service. The function must have a wrapping stub, which is called whenever a new request is received for the function to register. The stub should have the following signature, and should return a result using the fwRPC_sendResult() function.
void stub(anytype callHandle, anytype params)
Optionally, a timeout value can be set, in seconds, that will cause the execution of the procedure to be halted if the total time surpasses the timeout value. If set to -1, then no timeout is checked.
- Parameters
-
funcName | (IN, string) name of the function |
stub | (IN, string) name of the function stub to call |
lib | (IN, string) file name of the lib required for import |
timeout | (IN, int) timeout value in seconds |
paramType | (IN, dyn_int) list of accepted parameter types. |
exclusive | (IN, bool) whether or not the function requires exclusive execution in it's own CTRL manager |
- Returns
- nothing
- Exceptions
-
if | the stub name is invalid if the valid param list is empty |