Function
Enable a routine to call a Data Explorer module.
Syntax
#include <dx/dx.h>
Error DXCallModule(char *modname, int num_inputs, ModuleInput *listin,
int num_outputs, ModuleOutput *listout);
Object DXModSetFloatInput(ModuleInput *in, char *name, int n);
Object DXModSetIntegerInput(ModuleInput *in, char *name, int n);
Object DXModSetStringInput(ModuleInput *in, char *name, char *s);
void DXModSetObjectInput(ModuleInput *in, char *name, Object obj);
void DXModSetObjectOutput(ModuleOutput *out, char *name, Object *obj);
DXSetModuleInput(ModuleInput in, char *name, Object *obj);
DXSetModuleOutput(ModuleOutput out, char *name, Object *obj);
Functional Details
The five DXModSet... routines are auxiliary to DXCallModule, which makes the actual call to a specified module.
Notes:
modname | specifies the name of the module being called. |
num_inputs | specifies the number of inputs in listin. |
listin | is an Array of ModuleInput structures specifying the module inputs. |
num_outputs | specifies the number of outputs in listout. |
listout | is an Array of ModuleOutput structures specifying the module outputs. |
The four DXModSet...Input routines set the contents of ModuleInput structures. DXModSetObjectOutput sets the destination for module outputs.
A ModuleInput is defined as follows:
typedef struct {
char *name;
Object value;
} ModuleInput;
A ModuleOutput is defined as follows:
typedef struct {
char *name;
Object *value;
} ModuleOutput;
Return Value
Returns NULL or returns ERROR and sets an error code.
See Also
DXInitModules, DXGetErrorExit, DXSetErrorExit, DXCheckRIH
Readme file in /usr/local/dx/samples/callmodule/Readme.