8 #ifndef _APPL_INTERFACE_H
9 #define _APPL_INTERFACE_H
64 static void doPipelineFinish();
66 static void generic(
Message *applMsg);
68 static void doStartWithoutFinish(
Message *
m);
70 static void doAddObject();
113 static void set_module_description(
const char *desc);
114 static const char *get_module_description();
118 const char *datatype,
const char *description);
121 static void set_port_default(
const char *
name,
const char *defVal);
124 static void set_port_dependency(
const char *port,
char *depPort);
127 static void set_port_required(
const char *
name,
int isReqired);
129 static char *get_description_message();
134 return msg ? msg->is_port_connected(name) : 0;
139 return objNameToAdd_;
143 return objNameToDelete_;
158 static void init(
int argc,
char *argv[], XtAppContext appContext);
160 static void init(
int argc,
char *argv[]);
162 static void sendFinishedMsg(
void *msg);
163 static int check_and_handle_event(
float time = 0.0);
164 static void do_one_event();
165 static void ReceiveOneMsg();
166 static int deleteConnection();
167 static void main_loop();
168 static void progress_main_loop();
170 static void set_add_object_callback(
CoviseCallback *
f,
void *userData);
178 static void set_after_finish_callback(
CoviseCallback *
f,
void *userData);
179 static void set_pipeline_finish_callback(
CoviseCallback *
f,
void *userData);
180 static void remove_start_callback();
181 static void remove_feedback_callback();
183 static void remove_generic_callback();
184 static void remove_sync_callback();
186 static void remove_after_finish_callback();
187 static void remove_pipeline_finish_callback();
191 return reply_port_name;
198 return msg ? msg->get_object_name(name) :
NULL;
203 return msg ? msg->getObjectType(name) :
NULL;
211 return msg ? msg->get_scalar_param(name, val) : 0;
216 return msg ? msg->get_scalar_param(name, val) : 0;
221 return msg ? msg->get_vector_param(name, pos, list) : 0;
226 return msg ? msg->get_vector_param(name, pos, list) : 0;
231 return msg ? msg->get_string_param(name,
string) : 0;
236 return msg ? msg->get_browser_param(name, file) : 0;
241 return msg ? msg->get_boolean_param(name, b) : 0;
246 return msg ? msg->get_slider_param(name, min, max, val) : 0;
251 return msg ? msg->get_slider_param(name, min, max, val) : 0;
256 return msg ? msg->get_text_param(name, text, linenum) : 0;
261 return msg ? msg->get_timer_param(name, start, delta, state) : 0;
267 return msg ? msg->get_passwd_param(name, host, user, passwd) : 0;
272 return msg ? msg->get_choice_param(name, pos) : 0;
277 return msg ? msg->get_choice_param(name,
string) : 0;
282 return msg ? msg->get_material_param(name,
string) : 0;
287 return msg ? msg->get_colormapchoice_param(name, pos) : 0;
292 return msg ? msg->get_colormapchoice_param(name,
string) : 0;
297 return msg ? msg->get_colormap_param(name, min, max, len, type) : 0;
302 return msg ? msg->get_color_param(name, r, g, b, a) : 0;
307 return msg ? msg->set_scalar_param(name, val) : 0;
312 return msg ? msg->set_scalar_param(name, val) : 0;
317 return msg ? msg->set_vector_param(name, num, list) : 0;
322 return msg ? msg->set_vector_param(name, num, list) : 0;
327 return msg ? msg->set_string_param(name,
string) : 0;
332 return msg ? msg->set_boolean_param(name, val) : 0;
337 return msg ? msg->set_slider_param(name, min, max, val) : 0;
342 return msg ? msg->set_slider_param(name, min, max, val) : 0;
347 return msg ? msg->set_choice_param(name, len, list, pos) : 0;
352 return msg ? msg->set_browser_param(name, file, wildcard) : 0;
357 return msg ? msg->set_text_param(name, text, linenum) : 0;
362 return msg ? msg->set_timer_param(name, start, delta, state) : 0;
367 return msg ? msg->set_passwd_param(name, host, user, passwd) : 0;
372 return msg ? msg->set_save_object(name) : 0;
377 return msg ? msg->set_release_object(name) : 0;
380 static void cancel_param(
const char *
name);
381 static void reopen_param(
const char *
name);
386 static int send_generic_message(
const char *keyword,
const char *
string);
387 static int send_genericinit_message(
const char *mkey,
const char *keyword,
const char *
string);
388 static char *get_generic_message();
390 static void send_stop_pipeline();
392 static void sendFinishedMsg();
398 static void callFeedbackCallback(
Message *);
399 static void callStartCallback(
void);
401 static void callAddObjectCallback(
void);
403 static void callGenericCallback(
void);
404 static void callSyncCallback(
void);
406 static void callPortReplyCallback(
void);
407 static void callAfterFinishCallback(
void);
408 static void callPipelineFinishCallback(
void);
412 static void partobjects_initialized(
void);
static int get_scalar_param(const char *name, long *val)
Definition: ApplInterface.h:209
static int get_vector_param(const char *name, int pos, long *list)
Definition: ApplInterface.h:219
static int pipeline_state_once
Definition: ApplInterface.h:59
static int set_string_param(const char *name, char *string)
Definition: ApplInterface.h:325
static int get_boolean_param(const char *name, int *b)
Definition: ApplInterface.h:239
static char * genericMessageData
Definition: ApplInterface.h:92
static int set_passwd_param(const char *name, char *host, char *user, char *passwd)
Definition: ApplInterface.h:365
static int set_release_object(char *name)
Definition: ApplInterface.h:375
GLsizei const GLfloat * value
Definition: khronos-glext.h:6760
static char * get_object_name(const char *name)
Definition: ApplInterface.h:196
static void * syncCallbackData
Definition: ApplInterface.h:96
static CoviseCallback * portReplyCallbackFunc
Definition: ApplInterface.h:98
static int set_browser_param(const char *name, char *file, char *wildcard)
Definition: ApplInterface.h:350
static char * getObjectType(const char *name)
Definition: ApplInterface.h:201
static int set_vector_param(const char *name, int num, long *list)
Definition: ApplInterface.h:315
static void * pipelineFinishUserData
Definition: ApplInterface.h:105
appl_port_type
Definition: CoviseBase.h:42
static CtlMessage * msg
Definition: ApplInterface.h:52
int min(int a, int b)
Definition: cutil_math.h:60
static int get_color_param(const char *name, float *r, float *g, float *b, float *a)
Definition: ApplInterface.h:300
static CoviseCallback * afterFinishCallbackFunc
Definition: ApplInterface.h:101
static void * syncUserData
Definition: ApplInterface.h:95
static void * afterFinishCallbackData
Definition: ApplInterface.h:103
GLenum GLsizei len
Definition: khronos-glext.h:7440
static int is_port_connected(const char *name)
check whether port is connected - use in compute() CB only
Definition: ApplInterface.h:132
GLsizei GLsizei GLuint * obj
Definition: khronos-glext.h:6733
void FeedbackCallback(void *userData, int len, const char *data)
Definition: ApplInterface.h:43
static int set_slider_param(const char *name, long min, long max, long val)
Definition: ApplInterface.h:335
static int set_vector_param(const char *name, int num, float *list)
Definition: ApplInterface.h:320
GLuint GLfloat * val
Definition: khronos-glext.h:7898
static void * portReplyUserData
Definition: ApplInterface.h:99
void CoviseCallback(void *userData, void *callbackData)
Definition: CoviseBase.h:60
static void * genericUserData
Definition: ApplInterface.h:90
static int get_slider_param(const char *name, long *min, long *max, long *val)
Definition: ApplInterface.h:244
static void * addObjectUserData
Definition: ApplInterface.h:86
static int get_material_param(const char *name, char **string)
Definition: ApplInterface.h:280
#define NULL
Definition: covise_list.h:22
static CoviseCallback * addObjectCallbackFunc
Definition: ApplInterface.h:85
static char * objNameToAdd_
Definition: ApplInterface.h:108
Definition: message.h:111
static char * getObjNameToAdd()
Definition: ApplInterface.h:137
static void * pipelineFinishCallbackData
Definition: ApplInterface.h:106
static int get_browser_param(const char *name, char **file)
Definition: ApplInterface.h:234
GLboolean GLboolean GLboolean b
Definition: khronos-glext.h:6895
static char * modkey
Definition: ApplInterface.h:55
static CoviseCallback * genericCallbackFunc
Definition: ApplInterface.h:89
static int set_scalar_param(const char *name, long val)
Definition: ApplInterface.h:305
static void * addObjectCallbackData
Definition: ApplInterface.h:87
static int get_string_param(const char *name, char **string)
Definition: ApplInterface.h:229
static void * genericCallbackData
Definition: ApplInterface.h:91
static FeedbackCallback * feedbackCallbackFunc
Definition: ApplInterface.h:78
GLuint start
Definition: khronos-glext.h:6343
static int set_boolean_param(const char *name, int val)
Definition: ApplInterface.h:330
GLenum type
Definition: khronos-glext.h:6279
static int get_choice_param(const char *name, char **string)
Definition: ApplInterface.h:275
static CoviseCallback * startCallbackFunc
Definition: ApplInterface.h:81
Definition: CoviseBase.h:63
static void * feedbackUserData
Definition: ApplInterface.h:79
static int get_vector_param(const char *name, int pos, float *list)
Definition: ApplInterface.h:224
covise_msg_type
Definition: message_types.h:64
static int get_timer_param(const char *name, long *start, long *delta, long *state)
Definition: ApplInterface.h:259
static char * get_reply_port_name()
Definition: ApplInterface.h:189
static int get_colormapchoice_param(const char *name, int *pos)
Definition: ApplInterface.h:285
static int get_text_param(const char *name, char ***text, int *linenum)
Definition: ApplInterface.h:254
static int set_scalar_param(const char *name, float val)
Definition: ApplInterface.h:310
static int renderMode_
Definition: ApplInterface.h:57
static int get_colormapchoice_param(const char *name, char **string)
Definition: ApplInterface.h:290
static int set_save_object(char *name)
Definition: ApplInterface.h:370
static CoviseCallback * syncCallbackFunc
Definition: ApplInterface.h:94
static char * objNameToDelete_
Definition: ApplInterface.h:109
static int set_choice_param(const char *name, int len, char **list, int pos)
Definition: ApplInterface.h:345
static CoviseCallback * pipelineFinishCallbackFunc
Definition: ApplInterface.h:104
GLdouble GLdouble GLdouble r
Definition: khronos-glext.h:6457
static void * portReplyCallbackData
Definition: ApplInterface.h:100
static int set_timer_param(const char *name, int start, int delta, int state)
Definition: ApplInterface.h:360
static int get_slider_param(const char *name, float *min, float *max, float *val)
Definition: ApplInterface.h:249
static int set_text_param(const char *name, char *text, int linenum)
Definition: ApplInterface.h:355
GLuint GLuint num
Definition: khronos-glext.h:10593
GLfloat f
Definition: khronos-glext.h:8258
static int get_scalar_param(const char *name, float *val)
Definition: ApplInterface.h:214
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
static int get_colormap_param(const char *name, float *min, float *max, int *len, colormap_type *type)
Definition: ApplInterface.h:295
int max(int a, int b)
Definition: cutil_math.h:55
static void * startUserData
Definition: ApplInterface.h:82
#define APPLEXPORT
Definition: coExport.h:57
colormap_type
Definition: covise_msg.h:79
Definition: coDistributedObject.h:294
static void * startCallbackData
Definition: ApplInterface.h:83
static char * reply_port_name
Definition: ApplInterface.h:53
Definition: covise_msg.h:745
const GLfloat * m
Definition: khronos-glext.h:12117
Definition: ApplInterface.h:48
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLboolean GLboolean g
Definition: khronos-glext.h:6895
static char * getObjNameToDelete()
Definition: ApplInterface.h:141
static int get_passwd_param(const char *name, char **host, char **user, char **passwd)
Definition: ApplInterface.h:264
static int get_choice_param(const char *name, int *pos)
Definition: ApplInterface.h:270
static void * afterFinishUserData
Definition: ApplInterface.h:102
static int set_slider_param(const char *name, float min, float max, float val)
Definition: ApplInterface.h:340